From 646201bd9d0a7431fb4043254c10b5846ce08f5b Mon Sep 17 00:00:00 2001 From: lyft-metaservice-2 <26174213+lyft-metaservice-2@users.noreply.github.com> Date: Fri, 3 Jan 2020 09:07:55 -0800 Subject: [PATCH 001/356] Initial commit --- flytectl/README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 flytectl/README.md diff --git a/flytectl/README.md b/flytectl/README.md new file mode 100644 index 0000000000..4e55a2acea --- /dev/null +++ b/flytectl/README.md @@ -0,0 +1,2 @@ +# flytectl +Flyte CLI From c68c5c2f20198417abddd4b9558f2a43ed93ccc2 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Fri, 3 Jan 2020 09:50:33 -0800 Subject: [PATCH 002/356] Adding open-source boilerplate (#1) --- flytectl/CODE_OF_CONDUCT.md | 2 + flytectl/LICENSE | 202 ++++++++++++++++++++++++++++++++++++ flytectl/NOTICE | 4 + 3 files changed, 208 insertions(+) create mode 100644 flytectl/CODE_OF_CONDUCT.md create mode 100644 flytectl/LICENSE create mode 100644 flytectl/NOTICE diff --git a/flytectl/CODE_OF_CONDUCT.md b/flytectl/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..4c3a38cc48 --- /dev/null +++ b/flytectl/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). +All contributors and participants agree to abide by its terms. diff --git a/flytectl/LICENSE b/flytectl/LICENSE new file mode 100644 index 0000000000..bed437514f --- /dev/null +++ b/flytectl/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Lyft, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/flytectl/NOTICE b/flytectl/NOTICE new file mode 100644 index 0000000000..938e7ae038 --- /dev/null +++ b/flytectl/NOTICE @@ -0,0 +1,4 @@ +flytectl +Copyright 2019-2020 Lyft Inc. + +This product includes software developed at Lyft Inc. From ff172b9286ac498b03747ab345290df1d0aa914b Mon Sep 17 00:00:00 2001 From: Ketan Umare Date: Sun, 14 Jun 2020 20:30:21 -0700 Subject: [PATCH 003/356] Proposal for flytectl (#2) * Proposal for flytectl * fixing changes * fixing changes * more changes * readme updated --- flytectl/proposal/README.md | 129 +++++++++++++++++++++ flytectl/proposal/flytectl_interaction.png | Bin 0 -> 24231 bytes 2 files changed, 129 insertions(+) create mode 100644 flytectl/proposal/README.md create mode 100644 flytectl/proposal/flytectl_interaction.png diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md new file mode 100644 index 0000000000..8b776350b4 --- /dev/null +++ b/flytectl/proposal/README.md @@ -0,0 +1,129 @@ +# Introduction + +This document proposes, **flytectl** as one singular CLI that interacts with flyteadmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of +FlyteAdmin. We will start with gRPC endpoint as the client is easily generated and in future we should investigate generation of a Swagger based REST client from the gRPC specification. As we build +more SDK's in different languages we should support a common way of interacting with the API. This does no mean that some SDK's may provide native ways of interacting with the Admin API (for e.g. +flytekit), but the intention is that we will eventually replace **flytekit/flyte-cli** with flytectl exclusively. + +We also recommend that the design of flytectl is careful and it could helps us with delivering user features faster without having to rely on the UI. flytectl with follow standard oauth2 for +authentication already supported by flyteAdmin. Moreover, flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. + +# Why One CLI? + +As we build multiple SDK's they need a native way of interacting with the API. Having multiple CLI's makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. + +*Diagram here* + + +# Why Golang? +- Most of Flytebackend is written in golang +- Golang offers great CLI tooling support with viper and cobra +- Golang toolchain to create cross-compiled small, light weight binary is really efficient and easy to use +- We already generate golang proto and clients for all our IDL +- we have multiple common libraries available to ease the development of this tool +- kubectl is a stellar example of a cli done well + +## Generating Swagger code +We started exploring this (flytetools)[https://github.com/lyft/flytetools#tools] has some work. We also got approached by the swagger code gen maintainer to see if they can help. + +# API + +## Top level commands + +```bash +$ flytectl [options] + version + configure + get + create + update + delete +``` + +### base options +- *endpoint* endpoint where flyteadmin is available +- *insecure* use if Oauth is not available +- optional *project* project for which we need to retrieve details +- optional *domain* domain for which we need to retrieve details +- TBD + +### version +returns the version of the CLI, version of Admin service and version of the Platform that is deployed + +### configure +Allows configuring flytectl for your own usage (low pri). Needed for especially storing Auth tokens. + +### get/delete +Get retrieves a list of resources that is qualified by a further sub-command. for example +```bash +$ flytectl --endpoint "example.flyte.net" get projects +$ flytectl --endpoint "example.flyte.net" --project "p" --domain "d" delete workflows +``` +This returns a list of projects + +To retrieve just one project +```bash +$ flytectl --endpoint "example.flyte.net" get projects +$ flytectl --endpoint "example.flyte.net" --project "p" --domain "d" delete workflows "W1" +``` + +### Create is special +Create may need more information than can be easily passed in command line and we recommend using files to create an entity. The file could be in protobuf, jsonpb (json) or jsonpb (yaml) form. +Eventually we may want to simplify the json and yaml representations but that is not required in first pass. We may also want to create just a separate option for that. + +The create for Task and Workflow is essential what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that pyflyte, jflyte (other native cli's or +code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **flytectl**. Thus flytectl is essential in every flow for the user. + +![Registration process](flytectl_interaction.png) + +### update +This is a lower priority option as most entities in flyte are immutable and do not support updates. For the ones where update is supported, we should look into retrieving the existing and allow editing in an editor, like kubectl edit does. + +**To be specified** + + +# Details of each resource + +## Projects +Support + - create + - get + - update + +## Tasks +Support + - create + - get + - update + +## Workflows +Support + - create + - get + - update + +## Launch Plans +Support + - create + - get + - update + +## Execution +Support + - create + - get + - update + - delete - here refers to terminate + +## MatchableEntity +Support + - create + - get + - update + +## Outputs +Support + - create + - get + - update + diff --git a/flytectl/proposal/flytectl_interaction.png b/flytectl/proposal/flytectl_interaction.png new file mode 100644 index 0000000000000000000000000000000000000000..b08e587195caa3ad4232ad4b818535a4eea9c095 GIT binary patch literal 24231 zcmeFZWmuHo`Zf%R2C}U>x%O{uRB6jSr&4g>N*w{7DQeSrjCVm1%icz zt%Z*V{!{wqiUt-I1C~5YO4HMDvxUG{bNKl3k|p%^17lvM7dLX4Q26(U8;2S-+ad=@ ziZ5!J#;mX2!=1XSUn^;V6{KA`a^2cM4?^*!NK4bYwsiP<*-TZ_tg6aTq9)$lTEFyev_Zq zUcY{Q{k07$Cntxq`t7l+2ySFllwfj7%Kg&f;$nMS+vfhB8O7z@XE(6%C9!ab09xa=AY$lb)dMT5u`^-x}X^KAY~pjNT=I0_zRyEWC2 zZrPVH{=LkgscE##K(sroY=8xq0qdV3CA;uz;80f{9-eIf-(T4eONxrt2J#hC;~;5U zBg4bG=H`nh>{*^BUUqhyl@{7p$p3vOU<4NCxH<#}508<$uI{+Q&(9I65aB@iL^fS5 zt>MYq+S=1#Uk+FLzc-GVkRb|pkOZP2U-a(XZE>H2ja#}Kq*}{yAHs>5M|5;_W)+Ln zZ{-e={rm3l?*zKSJ{hvIvO0`>|4vrz!Dyy!pW8ICKG5QGcoI!5xYfC|vNDz&FUg=n z;A?J?ojy)y_0mYVF254m8wwR49n9|?9#3iY`c7LEh*>=0z$CbgvGH79rD><30Pt9E_tdZZLRKpbI!6%?6(!k?YVQHZz>_}RD74$X>FU)!O*u<(vnIvwgxL77un*Vy zTqs$)O_VDRXlaOC?(bJ8ThvYU+=>ytDEREhe%*!9GFc^K!&<-{AEn3xCFWW>L}OyjIrGw+qyI>=BkV%OB3a@4`XbLDyGWS+6zX! z)l7U%pL+bJULfK)ju|MVghWOtOI6#*NbeZ*+G^Y_iho~_+i+3j5Xsh+yX|1%@MX=F z)&frAM|G;}!l|-@GH!b1NJ1K|_5%KewkbI7#E70$n&jr;mjlC+*wQs_Cgw`U%E4z5 zl#tO*xG9-koN0OZ6GA?HYEt=#gK>c`;uPuQVZ5i^DVHzDmnry$Zou}J1uMg4ZR(W2 zSTyA!bnGSZB|n(rgyY2qhSrL}WS-uWZDS<5j#EZjM#dt%$))F&67JdGbHeu0q&1D! z)WRoCx9zC{y0`K>+u`75Z%N%%G(+b_@7R~Ju>lF64kmJiAuA>5=R=)rT5F4FUd!pt zu=N$2{PPkrc+lFhhV8RimD{JgmEl3!E5ou8kO;iYt~^(cDKg%D>irAV)G>%?DhnzIW5?ncC91pQdF&aEs*N(AG_y+ zQ%^@K3H7`QEg5E{`e-eD0tr+lavUce`FK@WL1(akuimHG+C?pJ>116%>_gAv&#?Y1i?_)R z$*!=V1Ggtp`Es0ET&)O|kOMQhCy2`s*r&Dkyp5yQZbs;Y7@=f&rWZL zrt89|EHB9wcXUUkz12 zG;3zmx!-zi+4=OXEherp$ZGgd+sEdMt-@IIhgqVaERlF{iKOl~Em#Wi=vSIGt2(FD zgAq`~cF=(t$AqK&$1x+m>MQdHB4%7vuN5x`SJfu)Tm7F@@LOhUp1vbvkB0l)?&yey z3nU$>Stoqf<*G|j(yvYv$fr_V(`Ue0S0~$yjTiS zgTy7y1N)uR_?b^wYDZ+pWu;|DS1+e)c;H4Xzsby1yVbbr#Ko?rTlqica)*40mSSfl zV#5g!eW1%7g@i-Ri0^C3VBz!%&!K*br09u_DAZ=jcSny_7AwT6c_(x?KYg7bFuZnI z+dtPcww(Z{O0p>@ql4pd^*%YJuc4Q+>((9FCJz}9W%9GKAWTnFmK;KBk9F_J6&2HPeicg*=4O9Le*1PUM7j>g@;E{qNHAu4Ie$M zGm@qun;YoYOc-Y$7GHa(2e*e(&@%hj+Rn=QYO;~*7ntz%#%peL8(hQ2_k4nd{=qv? zp&f?6FJ4>`#Fds}aM})>v?`@iiS)UXe(EATE%di{%X$=0p3_F`u ze=rl}7V*2@;WQ2^*OQ^?O478Srv){Pn>LO{FOv!p1LD|l;+Sw7*rxSedrgLMPmRqt zuvaKyk@&CoNS=CA2CFw}s@J-42`DbU#;x8}0ghh-?8Fm-#|yjRq2ad^j3pT|aQCVN zXnBjiGt=@Fkvr9|2(yN1;7GIctZL>ojx}NJ@s$q7+8U3M(D-!HAWPrb>{bQKn5c;) zO}Gu^C1@26`H&IB3!x+H^;tAsyU~*lsM*=+2C|jwxI_?6$?h;kBFOP`^A7w# zRgyT;6XlH>CffG3vJc$dIb?MCbXMkBzuj;mP}t&_)bt_nI$iiiuHr8d;W78_5a2RB zmh9);^iuVX)~;|1MwE}Gr;+myP{+*c95M@>2@qaG4_LVR65$XbVz5wwUUNi}&Jq zike!!^0_gzuPi?(ZNdS%wEFhlsX{4W%>S=pR}u=ez*EmNB?@N=%!mr@r1R-1YyPdk z9_iS_+c{S5e{M6`>{U(cG39iSeRP`o>OPTgerNOalgPtqOVO?OZ_bwl z+nls_wJiFx>;z|ht4j@gTyZMIN`{z=@H_HvK)XbHDZ%S4WCYUuxp~+Xk5A846HR%3H0cTk9~gKB4)Wow}oj0R`E9 z6T123MMci)zDXpmXFHvfgnqxSh#pS4&;~LrpB*n}d-(Ye%CifP9e*iRv1#ZTU4`d=KoZ`O|L zA(1TxPG88Co9w*@DUE#Re3$0J=<8CA{Knm<-A2omg3Z6B=x)!n*iARO_4(luP!e1t zAd8^dx4bwz9;vm_k-a_bwVbKkm^fIGbUojue$rla(lQ&F(Ld#Px_R*N29J4KC>Ry36D#|dK4*bG@A1i!Vilj0;h{i|wqWi0knqMo8 z|EA^B8U%WDFp-67!S!2iimK50-q2=od21D;OsG(NSkqSHw?diXUxHJPK`r|u`Y{^! zERFhHO&WfEys=4tc@#G7(k~X{=(U=ky7A!(p(~2Yd1d+>8=N2)@wG_2bHn1}^0te{ z&B{)?*>^gp^nK!|w)&MOA-ke*WsAOy)je5s%-p9iQKpsi!&wiSGY9|E$%CCvdQp@V zN|N{{NRpSvOk>@cxKCboaJA>|&^dQ8#=HW#@z2`Ji&IhJbOZNs)_DRdQi#$W9oSVO ze7wM`76;SMT|*52@dO`LFjf%LHt7FWC3`Dw2+yRnukB>5_+S+nf)bR&pwsR1oZ?ngg*R)4XyV`WcSPaAC0X1Pq6Mc5?~p=5R{dhu z8HrSJqP@{xlBbXB|8X+8%yE4(were7Z03V`@^y}L(mo6EvKiK{I0FILS2CcCrDN=q z__RD!Nf&&G0S5MMBY5%Qgv|rTA0Ntvha=9PHG5VjKF$-n?y}rh%WK*pbgOno!NJP0=$7K36U!HX!AR1h4@x~}u%T?}*Vqd|G@#;wM6+nHvszO1VeWN?ur z>%11yvfGZ#kcs}>i+nDs8RVgXrNgJ!{5CYk3090^oEk5D#h>HunJ4!h>VIfd@%ZN% z+L^#J@SCE4ZTnwNw(e$bj{z5E*;zRfiU6V2Wsg+l(cFg7(L$n1M#jYvv(7xQUe`>j zJdqj`9`-im=|SIhzcU42CJW&m5{{E*n$6$8oi+TwrwFiL&Jp@oD5VPsQ^&>%{R}U+ z3pQ-?Yata=oroVy{uzZLX`GoJ%9&klM8A<0wbG2tkwe_1do)ITHB#g~4NF3jd){82 zD?A96A`t20cK05N@u?tN%hy*}C`Qv@&A(or=!iZr17x^deUEmZSk@ZcYRf><))r+T zg-1o4TFRTT6#pe@GX)c${Y2jS#Q*IlHbIC^oOIC2ag9#g+<@dvykph(KHO#fe z!^rw~1`*f$kDs@O&7Ysfjx(hOr=i@;$e|(2z z7Xg^ZUb4I~7V#^RWgj;f>^?(i4)q`Gj|c*Oix}gbS7V@h_*m|0JEqP{5nF-$iPymy z;I|8Sdqt=Jo%a9RB6CKC{`~n9!mVAxu{zb@0)5=aQAhH$);ig3eZi z6q%Tp< zP|{dvB67utxBjG?__zSb3`*O-$H}R?H*T42H(97rAnBT=Y^MBte{HyKNLkcw;=R+n zB%hDqE>$5mP9U&4{NOt)xPMFq79uHvYFAKH+!osZuF;>xZ=)Ud4y)_X=_QS@^EvRh z&a)G>HauM(6fY&z!E?qxWDmmNr&!o+1bM7fJtaBK&Awm3_y<`J0-sQ{MWYIgN$P_jsy2&4p-8Z{Tli#TWO)m}1o`>N$tWouxVX9X z>%8~Zgu#v+R;&tpxT9E&z{&P)SAO&N3AJ$2B12*K4M!=pw)|dlvj)z|b|Oe|bivYh z;b<29nKST=H6Ss&t5PL@CToM zcaFRy!#Rdwq2p9WEK2^&7v}~Rr-b<}@G2j!0qBiBXXr1k4@(6L-&kjEM$}~qe&Smv zZW{LIdHaELc_gb40;a&i_@w8!jeo-mni2SL&sC@dnn3yj(^pbg{u)r-W{oO9f|K87k z*XO_X^WXCoAo>5F|6#bqe<@h~)xtd_t@i<+4)i5|^?L6H7hjX`WyJ%Nzu-@RAaLF@ zj(HTojTzz4_HNwZvw2XxZ=r2(QEM^M-c!e0P1|D|-DZ&I_V)rwPvD9_+K77J!p8T_ z3}CuG-%}#A)wypWFx^vzOYztHV&T}a2OtolqT&SD__$F4CA5k-ZzhJ=Jzf(!FaFe!^?AFjuXjx0XK^|iGnsDQwX zjm7rW`ue@Q&v8#E$jKqw-wPAZv#w z47gvpcB`f@Q}mkWtK;d~|5HJr3DQ)X&52sd1wr!1v52m0VWP)qRXsg#Ss9s6a#?(H zuL^n}S#B8u#PXfvUY6krEQeu9CFZu6x9eOSqs%XM#l^+lYlL)D z)gTMJBF(7P)83$rS6))`Ou}KN`CmC;(2%J2Pxe4@vS1=inrA~sB)Mqz? zV2s6D#>1pPt=`7Q=FsX>=dqkC0a;fzjiCM13@O`_@GXvAGqZ@p24*TU>3<6wygoAi z{zSuT^7&+KZS7P}E3&yzgO&lssHM)>bpI|Yx1?kv#`sfcX0HpI8EHw#R+dYj@cMF3 znhQ^%0=m-bEi)%K_o))79AYhcUx!GfarOlGiZ7{%95(!i9wIS;jOd2f03;-((PP`N z&1t>^+cxF^3vpB|2@ReN?TukzLFGEg%YUVQWQpP@0Jf2_-1Al`{lL`4wZ?X`1HETA z+j@=y^t+wByft$>mfzjJ?5XmciVDZUu}V{(baAA26V^fUeRIj@XGc5fmOZbWOifLh zg)Q$mzU-1E2KA5G&j%kFs3IdH*<$bTEe%=?z1_)(7<+_SoF#qxhQ&}|yT!}`(9lG- zK#*i}ns&ytm;tzVYT2sl#>pbD|8Km-td@TlO*57!sciogO;>%W2Nx*N->TWD1nefv z4rl$_GMzf^jO5Ck5U;Xl`wo`9|9O3xtm3E&;L~IN7rWUOy*r0(m(u{0Q0-S59vFBI zthL%>#;fz>U^BhuV)0w*BzJkUiNx6)q1d)eBYCJ4^jC)bXwh85MF^!~g@%e)atmaR zS9io)&(QFqFGJYngbulf*0l+WJZJndvwZb`6dMT=pB?>>wS7g?cI)Iwxsij!`KpRifz2aO zD(W*sNE$zd5!Qbql$bhB(}%{=Blpx!F>vsiT=5wOsct#lYI6Tbz&_S1IJ<$LI(xPx z2ypZ5@#SoP`+kYb=1lhqD|Z0=3va%Ak}W>1EPia3E@1b%RJXc=;{G#4q~6)=<$3nB z^S67-d9Zjq9cWLc=xBrXrth}TZ1sA1+YBhrHs8<3xS$xw$;l78m}6NsRqk7;-i859 z%(EU`{|WrBXS>&w{c818RaGnUD=UfpnP0ejY`ef@aHFXuSYR@rAsHvXs@SM5ey6qx z#hikDrU~Hf_f7>|Q?e~B^wzDf` zCNlIpHZRDEp%oRuF$RQyMrxKLi)S80`7Aml=kEh zun|q0jq7E~2D29j^_zefr~(YjD4R;w#&;bpt;Ls0YH?=g^3#v(+8(kf>yIoMO@7^x z=fMv)yYS-GTtlRRX!em07fob5&qVe6^ZQi@pN+DsO6hde*`~b3V)kUDK0_`L_v2u`VkSpeK$8gAsRLfAZr27*oTR=N zM1S^S&nI8CkY~Ol+9f#Rb6B^;#SS5Rv=#WQt*-tvk9~h@dUDT%8cv?no!15L&k}26 zq|#ecxx6^97H5_ISz~T@VNUx1QX|K}vP;Nqkq!3Y^d-^;8~ua&WJ=&AqU+u^R(%S8 z!97E07vn6THE4}<-n}@Wyh$T8;PgFNJ1>d(TumELneSI@Tjtp{=;gfkW(s~U! z5)G9T;^_XhR$M*-R$&{)MCbV<&>=iDn>cOt^&?qBl>*luWE(UV&;G93H3EX73S zDqpAb9*YNI2oo8}bqw(~4VVk%bPTnpK>-nA z)0UQIlERTyBeolKhkwF=^QY6>e#?9Ck8|o4PIa0F@7bcfcSJErt@4&4``1S0Q>NtCjSXK0E!lV_DBEtIL_Qv3&! zCSo4_mh-_dN%OH1?gHfB3boOdd3u?nRx%@ya^R zhpg|iJ`W`Vkj|t)oID>YA5P=a!`n9#@>woOK!K1}#MLHGic@YaH3JEk*1YxTm!xI( zi#6xjp&aqG@9dkFs%SQ=d=bu{4?KT87yS`%<%z78jS9T#B0Q)pxuSc7T3rU1j@w18 z_;~}9KCbk`%PM}~wR3uqW(Hec0Y|wbnw|>9sB&}q0Ny*Jw>OQfMOQDqG@V=I{{DarVQ=1vg+#Fu zdaF>;JNH=?in71ucQ<#RTD4(voRD2>pG5gnjebD_;G2ybHvk-ImR;#^55R~r*^{C2 zD%}{5uv9#BFxqx8j0d4wpvf;vt!mgd4`1H@8O1Y!A*(@H(RzHFRiw^#{O9+|-9Ay# z?J&n#p_Wg#M9mhF1Z9YU8*`YDn|D51Sthcj#s1Js3pk@=k;`TiB{6`eNveY~0$=48 zuqO}@p)i@O+l~9iZx?Hn(jI;hrrV#eDd!jdxSZhc zPwVuV7(lHVewns;9!x8{mYHrTyLHO|Fc!}DYY-xt-OkavP`uyp*{lAAVb|M}Jra@H zHy#2jW8XpEFyl2oX&gqo)Xb^}-wuw;N&BCCVWoLNX})1GMZZKQ?3TXKb#`=4>i1Q> z+Bb*FE9bYU!e(@GIl`H^VjukuCv`)VNtCAV`s*-I4d#BSH6+C(3f^Pi50x;>(SIGY z98ria()qW7JvFdT7!kwhGneRUru*@Z7stz@G258@2#BFkyCX{&t-!&whmqyt*-O4Y zM_4c{fC-O;mXuxDm1Y-Y;^U&*&89j=$l6uAJ_W4=gy->MYUZp5pm0G-sn!|j&J3~E z;CYhhIOfoHPJ@16@)>^;1Wdin(W{itDw3ZxBUEvvw?pF)!XWKZ;z4R?%BT^wkO303 z%w=Yh0sUrY4ekIG%N3ScUL6rJ;UO{BEkIpD@>Ev@9;89caD!ah6gQ0QkXMVpI!KEJa4)PU?=9(pz{sXD`7KhJBV zpq~BE2mE-CpuczJ5*Bv{ChKqqKgeYHPY_ z5@b`hzzey-K7jZ;U(#*!#Q-j`K3bm5>0pGC;r?~vYiykBk{KLA<00IGp|!2H1GoHz z7xW5aRaDerGB2d1VT)x=Th1st>*89!FWa2qlo02U+LLmQ2){Cp02I#JJV-a}fL=j= zR(iTrUyxeNyM~#~&}Wl>S!pDaOpbx$#qaMLD#GX9E4g7An0y0>CbAW> zMfa1{0@1^;ixKMvbq~!wceCmA^4620c};Fw`NI+g6vFZFc2~RK<@sSILZ%rp(8l^G z^cL-!ui>p0b)UU2!+LE$JL!3-$c$Bk87fy!mqBXd-bx8XIGbmBb{ti|F`3P=AJv2B z0es?cCFtV_!emUsq)e4K<5_wr&XHW~u{|RI>SOkz98EU(eeZ*fV+eXc-T&lpJ39gG z7N4!G|BPKM+n@7F*T;}?PXX3-i?eDa2Wk~_86-vM)DqWuhX0BBP)m`k+%Zuvd4vRQ zYtFmpb&#lO@>D# zqzEt<(TW`<8_|ZmK!m>_*P!}@$H%RC(vqfR_4rZVJs@Y~amw*gAT)$iVfcTc!(3P} zjp^b6x1iA%x3Wb^l}wRZIGUlr7L9`UwealZt^*B#VdGmeCISj_I8Kd2z12H&o%ngOa(t%fc4lalT573L<<}uG$%2~p`aT%y zUEY}?kM!%4Ko+iEB&q6jNV_Zs5sFuU5gyE6q0lqQ+vYo_P>8lIl~}F1^$LMl6(E|)UzqVlhr3)Bf2`~$W|jmJujit$MMDMNJ@zJJFZw=LR&FaHw{H7!W8BFwsxW% zl`K*Ekjp@t(1+8j@S$B2ji`IcE?=Rr*pK}C^Kh9nHpNnPu6{l4;D~hM`P_A>@@LB+ zF^=tvP1ZOE5nzVQUcI$e+i>yuJA021twQRx@{@9<7;D*EaUE}Ie!Yni;nHzGe=PbZ znQxp^P#S&ZI8YV&Ip|{ZG2I{q#Cf0=tpl`}>IIN*dgnTk3EDqu8+4g|g4(H?)@vcY zFBCC-V}hpCCof+vh#Hba6lZ!LyAm*Sr9M}Ab?0DL_xRIVM&}{Eid)xjWYX%+zMKwPiOm z|NQAmbA}d@aK?MRRGCcr98G`BcR1ryPMVq2;->myV#dB{Gs7Dw$&@v`^Cm_=%71{# zC>}O!qvk-#Pzw@Xzx7<|#x}ESNW%3dqZ>lMNwvsUHwW{hOsh2s3lM$uQx@rV8DH3s z-~84{hP)9*UFC-p*S>cjkh&&(L&3u3PfkErm44gvgX-%BGup;$4uB63?>O~;WTF=AkT6t0Q9Z&ctXk2pt zUFt@F#2x4t4Sc zM~(trYOY#oPT4hpt+;f&<$0*Y(RT2Vk;=EF-+9`zG|i6Qrp7Rh+rqs%O)13_!3mpu zCJQ>DY(Q-oV_JIVC*0vJwAS7X{I4kC0AK&3p|s^jWkRLWi513D9!X(wk~>_^k)TB0 zD2~7EVK9v6pyd)sfd+4e3qW7x=FeONo$h3jj0LLYG9^ApPv8v(cUMc zIBO8;%eJl}LfWZPa4$DItFO)Vwx^d}U6ztF$HE6hIl$YIH0&~HwqDx9@waV@kC>>` zs}a852^0bg^j&C58)WKAll6F&c^{vy#L&m!TdV^v_yGYgvcECRUT&Zv9&a=(sb$(S zd?_;HRP$DW+!CQRw$kaYtID^I-#p13#oqfjHoWf_KNadHJV&=v`BBWmgUDXlbA`m#s4s)s-CUl~L>S`ing71lq+s~5pqPAv z^~5U<>;WMA?DUFX8Hi?QZ*5RY*%3C~nd2DFrPegBpLTblTiD9NLpmvjui%m)=j5Oq z6FFMfkd-zcS3^fr2aa~;GYOclDF`;5lxb-SD|Cm9JU!>|iy)WiP)P438MC#BP1A+f zwf4AOa(EaSWvrIO)m!kuN!|RdlMRc#4SUUz@!YO0z;C=o8m;ZI2%nwc=!l*4Ar}(|cQm%xyMsCru3$Hr&EuMW_Rgd4!36T>kp59|AJ>m9|DtJ@4a;LN_hDJi{ z)Bc$bTC6BM50xLOj@Xfzb<%SjI8()yf{(86>eadrB~FP!to2Q#Zg6nv2@M>^P>^ZH zHa#f%&UP=dODAr=@QY?I0fAg}d+~OQwy}k~)bp*~qjML%3O9JrK{aQu7TOV>K_;w& zD~&UV^iWm|)99kK?W6zxF->`Y=l|!tp>R%U|CH$$ zehH{QKi;8_v>L%?ljGqv3yZgP{vs79DZ#7^LQZ&QBPv}ZZhlvM|4VUAz-JUeuBwSk z`rX6`yi!lDT6wr&y}h9hR1TZVHIL`!A$EDP)E%u+IsBEV$D|zw$YjTO>7>_5x7EkE zK~aj}Cb!FO@U3FSF?yBe^9<&j*M3Nz^X^qIIpn&=wR~KTL86G`)F)806Wau41~rCG z{?>|u+)WR4le~7NJI?T+LI1rCcX-f4QZo63H_H@a1+|ilvWB`hxDsmiz{WNN-9FZWyysTBE^gB;i8KJ-SJu@ zAsJm*kEs%-mrvB6WtM&^)U=d;i2jj<|E??UOaad5%G1HaRPQPTFHp{Wy??DXr}SM7 zw-A47jp{-qp5Tj|i(`~1Qr!Dp~BgzzW+`o=o(?4@F+#=q+Vk` z62LBg?4*#B%!3(uECn*IX|2`m9aL`qC(as)T48@xCRHoz-^}KM@T<`5XJ{gSssdQh zQf4|+`V;8qf^H@%lj_QR9t**+r>P1zS2jHCXcAGW&sDpW)1_T^xx!RW36f&p&C2KU z*MC(PtSDaiDag$BR^#)wm1<@;UlNs@Ad>54K0yHiipLunk8nwE)pR9EQcp8;JXa=# z6+`S1-GuBxVh}&o!+fPoYsU5;Sy>B_SL^x0@r-&B&L3Z4qGIB^tlGCtn16T9N0Q}C zRGTW>k1x!-Rjm}mRKT9^*AH5r@^4r(s=(E*35Wis-;?c>u~Acv3e>|-5_7GH+{o38 z^8`j2gt}HFBcP@bbzle*5;F5me$}GfL9%3rtyU}z94YY^+7YZwW~Q6p60&ppwRChu ziE%dxHD)#aekW!N#p4m&zV~>=yS6w)Vbccz!e<;Nneh4n8ortimN|bGaKsM=sf%Su zA6mIwf%_0+_|{&s>0z@(fsW$q6pctwZ~dQaxw4q^GK3kvlKj| zPOnv*zW4BzvXtB-=izCy!d@N#9+*YUzPvp<2X0;KYNlZhQ#>jeXYq^GLyi|eLaUys z<%HF@K7|r!?Jede=GLT5l=}i8Lt%*bI_0W-;UVY)y9$#bE1CRw8|PmusDAy0cEhws z;EHapmN~p^$}(M>bMdaVso9z0^`J)~pk^s73l49&rSBMPKFpN&duY*zh1+?Lm0^*{ zI$o7Y#xFARK&zWQ+{jgPL2CaSarEh+n|4;Mj)tsufqIfSGjXB27LL2OI#?D4n9Nx& z^^OnKXZ6w#N%xit0`#sf>ygc zDdLBRh+WMkRe`b{F|op0snu7Ui$@Kz<&C53k4GW-OqK?@Qc5_7mZih%7vfHQs8biE zo5;#09*?2aP`2ccO3oi@$KmOvKih7TOn$d?ixzlpCD?X>*v+HAivDqJU$QQ3ZI?eT zvq0l3!O?0>zHw?-Pur7hrHRY8%d$WD7%#?C@N{N*Km`o9P_KRdB_JX+Wl0}Ajw0>% z7IxmZ-<|SHSa+`_(ki19B;IM1v(VIDV`E7l9Xi>qulktZw#OMGJ*Q z<^N*6y%$o}{GNjhvmGm6Z~vYOJDuWdl3h^!<8 zA&0GgJr&^)>8rSD;C4u!|BLs21Tkj#r?TlU-5LYk^OvhQv=mIFWQ!Y(yPnl$N7n&@ zAcv}3WOweEO5u~)gcYW!KcPE0US6)|g!BowL0NWrmY@BuXqS|wO2W%S1l%fgA{_WC zLtQ&n>_Ll#MW>Bh#qc5d_*5JPf#wdzD8hf?f5iVxFckjv$vvo7~)fGm!8NS<3@ zFeaS;9di3wQ`^Upq!WyREkm5$YiCvgY&ml6BY7H-(U~bc_>e6N#T^qebcdjSu=c8s zh73_y@3LhAdgbWDrltzs3Nh6`p|n zfER+mer*5Kf%oJB5UcGoCWx2G)Lv-BPzqi7z_Vxsesm$zI2z0@S4B9M zLj=L*3s0Q}2$VeE2RC9X{0b-MNq$(+wPsA_9!1Gh=P`>M1<0dyw(suqdT|jj> z2Egmt!$VglFi$RUKR)ykuf6vtfQ`kby41qj&yIIDzfc<0fKHl*9Z-13;UA#@* zKin=dTrH?8u}p4Pxj06pDGQ06LDQ}#589p>$iCC z^L|U^nZ*Ek&1n77lchxHl3pfW=6`u%Dsgc%ZwmPO%b!5i zV3|(L{5bEK+8^w{n*uT#f|=q4Ro@Jl!m2*WI~pNJpmD@wq9Su-w}QrZoOq3`tD#|9 zKkL_oVTK@L-g}-7O`CO1`^h?n4WF2otaMzu7{i`bfR)Tf0{F$pz;iAHPHE_w3%Xg9 zIZLt9(n?)9|g=&^nBW2AbBdpk3h5~z7?t!!;?{ytQ7MJ#)==)+~4oOVLVxwVsA zx2A+U4RRW6N&i#ieQH||KM!ON7^1L5#Y$X^**EWW^w!UK+caTc!Rx`00rv%~S+T2r zih~x3Ha`IV6ui8{XR!>gR-K&u~ZDHs@Jx^2%O=YjUZv(K|fz;+mr z{tnL?oEPgva9@zz!`VU_0)fhfyPMnoOb{LZQ^u4DQ9{|HJQ&?KMc`c?HNWmVs zC=0y?{bvBC&$j|xakI^rNbmHEe`iU~M1=xV9V%;FD^kK(+!8nrM`>yIZlFt6YC+*Mqo17d%U98+7YmSXv2}fQ_1}-dY2xJs+L$W!#DA+@EDr2lA9u)2$T2v;KY}j|3IYt=6SAF=XENktfY>va}!6qf3w&PG_;*+eKP8kvn+11ARH8p!NK`B zp6^-DeR-SL1PS&HX){{Z!cZ>tz%y0SFfw$#tVy|04&t*>*_j6@k!RG&s{?KRmo|Wx zX#xFMPdFMuLs)4=g{sVrJ-p9Am?R45@D3L?uEc?!KH=qzeV3)41`i-$dBX&~8=8O} zh|w+q3Dy~6q(t{9@s8uoL0Qv_JeO<-WEaP>>(qNEA8yMO5__CPHl?bfBCdmn!ILiy z55>!2pFW1%z{pPYHFR_iM*tb)*_ei0;2*&HUat=t0WT{6@UguMI3Ks0jR+zhF-xFy zKg<$}fB6-wC;Me1kxySmDkF1b{8`08_x<+lm!Wo~+q*}}g>?UDxSI8~w6w0NCx5hb z42c8Rj`pVuZoiqBm@w_#82T0cg3dBRatO4vVpIWr>ig}52cRp>?lzyr6Ery9g5VUp zX|=EFx_b{cxGYD3lXlcjC~@}7qk8B?LGAC19Wu);?kJzWyRl-HFMQ)9x3JMDe4)c* z&Vr1eM~NA4$y(*(H^eU=3+Wds0BJt6Y%HC@1GBC;jF=6I3v-0r|8!rkrfaD$v&n0z zCk<$-;MH>S*UMUbH^#9st+oz?!V7U*pcPXk*1%(WxU(Fo64oku=f}HZYp>!8(H$YE?r2rKA5~F%! zyfFI(dEJf7x_hn80lai(92}Oyr_~lp<=_=B2|ox0C4Anw#DDAVP8l8^))EA&z0SAG zXBpS5UY<~byVRNToR6jk&3~h;(fwCXFxo04=^Z9%aBK&)S zL6fyM9z$6^TjRi5x7NHs*Kn9S15e9d0;Zjmo(J6TD#j|)$BT1mZ_@s4BEZMRbfkUg z$h9HrdKj2ZK}o4{=b>3wC}=?0ngZwIuHdr4K8Q2*fX&OZ01bPS_EYb76!@BknkEVf zfRYlU>7d)_^m==Tl@m> z;*)Np2K5`cVRUQ5t;o|!0oyUhmNevs!Hw^@|Mc!kDuP6=hY;v8vm^=ms0}nVUFSg9 zY<&;-7*UMw%-~#l??(`!pEyV=hC$0$$1PxO^=WArj-THc;pH0q5%zZJ11hnZU+hYl zWEAe+^ntm+-C$SqT$Ggjuz}#wqf1q1eH!^B_mz!%` zm)6^DU;G`2g8wLV0o8`-e260mY_$No1k+Bw_4Rchdf#8|+(15-hXMe#Qz~d;m6#6+ z3%NllAa=Zv_$}M>XT&`~7p*CSu0BPO_MGRWX}JVDvRTYm|6MxlZG5w{4~J#kn1>Gz z_;BCit>Y&(peL1mH4Yd&52H$uOW5Ce@LaMJESCK&=n7sAi37rbdb_&u4!}B_Pz%^T zXc1ZhZFlt`4Lghilly^AT?e~rlP{5576-oc}}Iu1@g6B}rn{B&k!jI{s><%5(CKH2kE9m79O&2#yDHywrZv z52U~kaUvfAO}GhPv0(KojQZ8xe@wCmGmxbm1pMRyzALmkxsoGjk{JbQuYk1tHTyU~ z_y4kIg+tJ`1?tM5*@(1(rB&#~_yKkG4z8=-APZm9#~zDUx`}D4r=^2EWPz`UCTFqu z|FupNp#Nq758(^u!heLV1I2B9;|gBAfVnLqJTTNhZ$nrGg-4#^%XN&}8ra}HaL68r zf%D1%{trVJz5IKCeSzZq7eovK=Ke>eT@?D~Sf7C}x+K#1Oz;=30J)0z(=^_{ty_Kn ztDQ3shjQ)XIGQp?=IyZ_*&0h(+EkOWi$N0;ro+ooXgRh};ZTtb8Y-1UAz3Duow9ez z>lGbKmu+aV91NF|P>xXH=>6UEQ0iRQ`^S5|fA-%D^W1Yk_jBLBZGPVm3Gs z3quWJnsn4V9bz~MYsNly*p$c&LjB%mx!YWLQ?8eW>z}nUpsAg!1nY8T++CVCUA7r? zY3tqGsz@~Cp4}V}ww(8PV6O5o*OPo#)!{3uM96K}&TFj-yrGEOV5s3!=Zfe zqH%F=f1l6y_4&SkzMrrEVt=A7D2ODvvjXy)8ps6Nfh1Y^s75pUv9SQ^PDjxsU>lnt z)2(>k*!%A8>6}nQJFu}llo`*^FqNU@U{SYGZ++WTLRe0_q^F9xEFZ88%u(H2TOB~_ zyz!f$IpEHL2ma!oGLe#NprFzj*m1rInGUnR6q_B>J4o+@e;+5rgy06 zW_d+f*|goZ+y;{eCHzc2F#m*BRX^O5RGT~JenpV%mm}!~5G@iZ4WJC^Ey&OB5md(N z5i?15yKW8cWk#{%xOfFJv3>|S-$dVX$=d#$U>YS=Sb6{cj3Xn?hn_qwfF#qHaVu`_ zBUkW)+-A?7J-vC^*=p<7s!5wZRgKMg@(oEc9r#kwTh%u$D1=M)rhYAlc(!@yf`*8c zLGav5NcR8e=;+wpY#%Rd=JYR+`HqJw{)$I#ghK?Ok{fBD-suA|c!=m0ft8XQ?n1$3 zT9evXAgqFvLa`brL~!Rt-Y&32Tfp$Bs`iUx#6l-^Ss^^$Gx0NYCxs=^0dm@0(bi;E zM#eflCpBwjD=Y5kuR~3J)|5?$JwUs}{D`v#u<>XpBN@l<$`j&X)ZErgS#WHFd|T0H}}UgkQB+p_pb%l?d-iUd)(2vV7W#V0!MvPO%R^BR)~cdFJ6c?fOjJ0+t~^O zD_l-erQ`941Ux%$^r93xS$ZzrvRhx2+{RT3O2i-9LieqcjL83V9aUPCnDh8K$$5lPnGcI)o`8fm+Pou5gK83 z5^RM?+cZlpr0(WFl8DE5b4W;iFCUaKJ2YyP+NxxEe+JQkF!xckSlbRfx+`N*KC$Od2t|C{=!T~a;`t%&q&~LcTPQe2;A%Qe8l9FlET_88r z^#;A8>&%VUj3JZJi4IiW;@K-4$~+4p8`3sFy8oWzH6;HkenGpS^j+DOpiK#2OF?Zc3H7o< zN$2Iblpbb+=L)o^PfsqativKkU ziS@(7sXqbb4vyhRI{7E|u0V0HSV`h(zyUgQ^mGj4`e6N8po*@%Y&9oU$*#1& zQ(_t9_P&fuP@Xs>D!j-3bysO_k6$}o)1^@=@MVIlCu*X3t3UJVcD`8w=oz0^0z6Ge z;1EdAS1--7o9EZ{(i5BesguV@uRW&FP{%d0dExC*0QUc`URT7 zyN^dGwe;o+By=Qwvidwen4eZj@V;eMD><%_l<;~xKZ(z?BE-V1QdxiIIPe%ct8n)W zqt!dXC6V3o|Bu@fM>r9?!b2vsq2^n@t+MpNm?~ub;Y7jNNbvXa6gR69(^@xApxfD6TmQM&%gf8)_~N!gIcI77wEGOsMv+ z4cZh>sJ*i0-=}J$RzsOlbFZ+=s$pPypwIJGN{Z-aY1|hR6SKp^!{Y+YS}3f6F>?Fs zLc2%G03^!jy8=K!9SKJ9 Date: Thu, 9 Jul 2020 16:37:48 -0700 Subject: [PATCH 004/356] Initial Commit (#3) --- flytectl/.github/workflows/release.yml | 25 + flytectl/.gitignore | 6 + flytectl/.goreleaser.yml | 172 +++++++ flytectl/CODEOWNERS | 3 + flytectl/Makefile | 2 + flytectl/cmd/config/config.go | 21 + flytectl/cmd/config/config_flags.go | 47 ++ flytectl/cmd/config/config_flags_test.go | 146 ++++++ flytectl/cmd/core/cmd.go | 36 ++ flytectl/cmd/core/cmd_ctx.go | 21 + flytectl/cmd/core/types.go | 5 + flytectl/cmd/get/get.go | 59 +++ flytectl/cmd/root.go | 59 +++ flytectl/cmd/testdata/config.yaml | 3 + flytectl/cmd/version.go | 17 + flytectl/config.yaml | 6 + flytectl/go.mod | 19 + flytectl/go.sum | 551 +++++++++++++++++++++++ flytectl/main.go | 9 + 19 files changed, 1207 insertions(+) create mode 100644 flytectl/.github/workflows/release.yml create mode 100644 flytectl/.gitignore create mode 100644 flytectl/.goreleaser.yml create mode 100644 flytectl/CODEOWNERS create mode 100644 flytectl/Makefile create mode 100644 flytectl/cmd/config/config.go create mode 100755 flytectl/cmd/config/config_flags.go create mode 100755 flytectl/cmd/config/config_flags_test.go create mode 100644 flytectl/cmd/core/cmd.go create mode 100644 flytectl/cmd/core/cmd_ctx.go create mode 100644 flytectl/cmd/core/types.go create mode 100644 flytectl/cmd/get/get.go create mode 100644 flytectl/cmd/root.go create mode 100644 flytectl/cmd/testdata/config.yaml create mode 100644 flytectl/cmd/version.go create mode 100644 flytectl/config.yaml create mode 100644 flytectl/go.mod create mode 100644 flytectl/go.sum create mode 100644 flytectl/main.go diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml new file mode 100644 index 0000000000..eae1b92b0b --- /dev/null +++ b/flytectl/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: goreleaser + +on: + pull_request: + push: + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/flytectl/.gitignore b/flytectl/.gitignore new file mode 100644 index 0000000000..8d862b62ca --- /dev/null +++ b/flytectl/.gitignore @@ -0,0 +1,6 @@ +dist/ +.idea +vendor +bin +.DS_Store +_test diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml new file mode 100644 index 0000000000..6f8f237da5 --- /dev/null +++ b/flytectl/.goreleaser.yml @@ -0,0 +1,172 @@ +before: + hooks: + - go mod download +builds: + - env: + - CGO_ENABLED=0 + main: ./main.go + binary: flytectl + goos: + - linux + - windows + - darwin + ldflags: + - -s -w -X github.com/lyft/flytestdlib/version.Version={{.Version}} -X github.com/lyft/flytestdlib/version.Build={{.ShortCommit}} -X github.com/lyft/flytestdlib/version.BuildTime={{.Date}} +archives: + - replacements: + darwin: macOS + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 + format_overrides: + - goos: windows + format: zip +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +scoop: + # Default is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" + # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" + + # Repository to push the app manifest to. + bucket: + owner: lyft + name: flytectl + + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: goreleaserbot + email: goreleaser@carlosbecker.com + + # Your app's homepage. + # Default is empty. + homepage: "https://godoc.org/github.com/lyft/flytectl" + + # Your app's description. + # Default is empty. + description: "FlyteCtl is a command line tool to interact with a Flyte cluster." + + # Your app's license + # Default is empty. + license: Apache-2.0 + + # Persist data between application updates + persist: + - "data" + - "config.toml" +brews: + - # Name template of the recipe + # Default to project name + name: flytectl + + # IDs of the archives to use. + # Defaults to all. + # ids: + # - foo + # - bar + + # GOARM to specify which 32-bit arm version to use if there are multiple versions + # from the build section. Brew formulas support atm only one 32-bit version. + # Default is 6 for all artifacts or each id if there a multiple versions. + goarm: 6 + + # NOTE: make sure the url_template, the token and given repo (github or gitlab) owner and name are from the + # same kind. We will probably unify this in the next major version like it is done with scoop. + + # Github repository to push the tap to. + github: + owner: github-user + name: homebrew-tap + + # OR Gitlab + # gitlab: + # owner: gitlab-user + # name: homebrew-tap + + # Gitea is not supported yet, but the support coming + + # Template for the url which is determined by the given Token (github or gitlab) + # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" + # Default for gitlab is "https://gitlab.com///uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}" + url_template: "http://github.com/lyft/flytectl/releases/{{ .Tag }}/{{ .ArtifactName }}" + + # Allows you to set a custom download strategy. Note that you'll need + # to implement the strategy and add it to your tap repository. + # Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly + # Default is empty. + download_strategy: CurlDownloadStrategy. + + # Allows you to add a custom require_relative at the top of the formula template + # Default is empty + custom_require: custom_download_strategy + + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: goreleaserbot + email: goreleaser@carlosbecker.com + + # Folder inside the repository to put the formula. + # Default is the root folder. + folder: Formula + + # Caveats for the user of your binary. + # Default is empty. + caveats: "How to use this binary" + + # Your app's homepage. + # Default is empty. + homepage: "https://godoc.org/github.com/lyft/flytectl" + + # Your app's description. + # Default is empty. + description: "FlyteCtl is a command line tool to interact with a Flyte cluster." + + # Setting this will prevent goreleaser to actually try to commit the updated + # formula - instead, the formula file will be stored on the dist folder only, + # leaving the responsibility of publishing it to the user. + # If set to auto, the release will not be uploaded to the homebrew tap + # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 + # Default is false. + skip_upload: auto + + # Custom block for brew. + # Can be used to specify alternate downloads for devel or head releases. + # Default is empty. + # custom_block: | + # head "https://github.com/some/package.git" + # ... + + # Packages your package depends on. + # dependencies: + # - name: git + # - name: zsh + # type: optional + + # Packages that conflict with your package. + # conflicts: + # - svn + # - bash + + # Specify for packages that run as a service. + # Default is empty. + # plist: | + # + # ... + + # So you can `brew test` your formula. + # Default is empty. + test: system "#{bin}/program --version" + + # Custom install script for brew. + # Default is 'bin.install "program"'. + install: bin.install "program" diff --git a/flytectl/CODEOWNERS b/flytectl/CODEOWNERS new file mode 100644 index 0000000000..78dadcf414 --- /dev/null +++ b/flytectl/CODEOWNERS @@ -0,0 +1,3 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence. +* @kumare3 @enghabu @wild-endeavor diff --git a/flytectl/Makefile b/flytectl/Makefile new file mode 100644 index 0000000000..73c7355ac8 --- /dev/null +++ b/flytectl/Makefile @@ -0,0 +1,2 @@ +generate: + go test github.com/lyft/flytectl/cmd --update \ No newline at end of file diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go new file mode 100644 index 0000000000..69643ddb8b --- /dev/null +++ b/flytectl/cmd/config/config.go @@ -0,0 +1,21 @@ +package config + +import ( + "github.com/lyft/flytestdlib/config" +) + +//go:generate pflags Config + +var ( + defaultConfig = &Config{} + section = config.MustRegisterSection("root", defaultConfig) +) + +type Config struct { + Project string `json:"project" pflag:",Specifies the project to work on."` + Domain string `json:"domain" pflag:",Specified the domain to work on."` +} + +func GetConfig() *Config { + return section.GetConfig().(*Config) +} diff --git a/flytectl/cmd/config/config_flags.go b/flytectl/cmd/config/config_flags.go new file mode 100755 index 0000000000..a6986a23b2 --- /dev/null +++ b/flytectl/cmd/config/config_flags.go @@ -0,0 +1,47 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") + return cmdFlags +} diff --git a/flytectl/cmd/config/config_flags_test.go b/flytectl/cmd/config/config_flags_test.go new file mode 100755 index 0000000000..1297f83032 --- /dev/null +++ b/flytectl/cmd/config/config_flags_test.go @@ -0,0 +1,146 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_project", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("project"); err == nil { + assert.Equal(t, string(defaultConfig.Project), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("project", testValue) + if vString, err := cmdFlags.GetString("project"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Project) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_domain", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("domain"); err == nil { + assert.Equal(t, string(defaultConfig.Domain), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("domain", testValue) + if vString, err := cmdFlags.GetString("domain"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Domain) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go new file mode 100644 index 0000000000..0185772b4c --- /dev/null +++ b/flytectl/cmd/core/cmd.go @@ -0,0 +1,36 @@ +package core + +import ( + "context" + "fmt" + + "github.com/lyft/flyteidl/clients/go/admin" + "github.com/spf13/cobra" +) + +func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandFunc) { + for resource, getFunc := range cmdFuncs { + cmd := &cobra.Command{ + Use: resource, + Short: fmt.Sprintf("Retrieves %v resources.", resource), + RunE: generateCommandFunc(getFunc), + } + + rootCmd.AddCommand(cmd) + } +} + +func generateCommandFunc(cmdFunc CommandFunc) func(cmd *cobra.Command, args []string) error { + return func(cmd *cobra.Command, args []string) error { + ctx := context.Background() + adminClient, err := admin.InitializeAdminClientFromConfig(ctx) + if err != nil { + return err + } + + return cmdFunc(ctx, args, CommandContext{ + out: cmd.OutOrStdout(), + adminClient: adminClient, + }) + } +} diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go new file mode 100644 index 0000000000..4c4b8d3b21 --- /dev/null +++ b/flytectl/cmd/core/cmd_ctx.go @@ -0,0 +1,21 @@ +package core + +import ( + "io" + + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/service" +) + +type CommandContext struct { + adminClient service.AdminServiceClient + in io.Reader + out io.Writer +} + +func (c CommandContext) AdminClient() service.AdminServiceClient { + return c.adminClient +} + +func (c CommandContext) OutputPipe() io.Writer { + return c.out +} diff --git a/flytectl/cmd/core/types.go b/flytectl/cmd/core/types.go new file mode 100644 index 0000000000..f6c3cfacc7 --- /dev/null +++ b/flytectl/cmd/core/types.go @@ -0,0 +1,5 @@ +package core + +import "context" + +type CommandFunc func(ctx context.Context, args []string, cmdCtx CommandContext) error diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go new file mode 100644 index 0000000000..a0d9f56faa --- /dev/null +++ b/flytectl/cmd/get/get.go @@ -0,0 +1,59 @@ +package get + +import ( + "context" + + "github.com/lyft/flytectl/cmd/core" + + "github.com/lyft/flytestdlib/logger" + + "github.com/landoop/tableprinter" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/spf13/cobra" +) + +func CreateGetCommand() *cobra.Command { + getCmd := &cobra.Command{ + Use: "get", + Short: "Retrieve various resource.", + } + + getResourcesFuncs := map[string]core.CommandFunc{ + "projects": getProjectsFunc, + } + + core.AddCommands(getCmd, getResourcesFuncs) + + return getCmd +} + +func getProjectsFunc(ctx context.Context, args []string, cmdCtx core.CommandContext) error { + projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) + if err != nil { + return err + } + + logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) + printer := tableprinter.New(cmdCtx.OutputPipe()) + printer.Print(toPrintableProjects(projects.Projects)) + return nil +} + +func toPrintableProjects(projects []*admin.Project) []interface{} { + type printableProject struct { + Id string `header:"Id"` + Name string `header:"Name"` + Description string `header:"Description"` + } + + res := make([]interface{}, 0, len(projects)) + for _, p := range projects { + res = append(res, printableProject{ + Id: p.Id, + Name: p.Name, + Description: p.Description, + }) + } + + return res +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go new file mode 100644 index 0000000000..c0cc9d100e --- /dev/null +++ b/flytectl/cmd/root.go @@ -0,0 +1,59 @@ +package cmd + +import ( + "context" + + "github.com/lyft/flytectl/cmd/get" + + "github.com/lyft/flytectl/cmd/config" + stdConfig "github.com/lyft/flytestdlib/config" + "github.com/lyft/flytestdlib/config/viper" + "github.com/spf13/cobra" +) + +var ( + cfgFile string + configAccessor = viper.NewAccessor(stdConfig.Options{StrictMode: true}) +) + + +func newRootCmd() *cobra.Command { + rootCmd := &cobra.Command{ + PersistentPreRunE: initConfig, + } + + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", + "config file (default is $HOME/config.yaml)") + + configAccessor.InitializePflags(rootCmd.PersistentFlags()) + + // Due to https://github.com/lyft/flyte/issues/341, project flag will have to be specified as + // --root.project, this adds a convenience on top to allow --project to be used + rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") + rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") + + rootCmd.AddCommand(viper.GetConfigCommand()) + rootCmd.AddCommand(versionCmd) + rootCmd.AddCommand(get.CreateGetCommand()) + config.GetConfig() + + return rootCmd +} + +func initConfig(_ *cobra.Command, _ []string) error { + configAccessor = viper.NewAccessor(stdConfig.Options{ + StrictMode: true, + SearchPaths: []string{cfgFile}, + }) + + err := configAccessor.UpdateConfig(context.TODO()) + if err != nil { + return err + } + + return nil +} + +func ExecuteCmd() error { + return newRootCmd().Execute() +} diff --git a/flytectl/cmd/testdata/config.yaml b/flytectl/cmd/testdata/config.yaml new file mode 100644 index 0000000000..5aa315c512 --- /dev/null +++ b/flytectl/cmd/testdata/config.yaml @@ -0,0 +1,3 @@ +admin: + endpoint: http://localhost:30082 + insecure: true diff --git a/flytectl/cmd/version.go b/flytectl/cmd/version.go new file mode 100644 index 0000000000..b24cc3a63f --- /dev/null +++ b/flytectl/cmd/version.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/lyft/flytestdlib/version" + "github.com/spf13/cobra" +) + +var ( + versionCmd = &cobra.Command{ + Use: "version", + Short: "Displays version information for the client and server.", + Run: func(cmd *cobra.Command, args []string) { + version.LogBuildInformation("flytectl") + // TODO: Log Admin version + }, + } +) diff --git a/flytectl/config.yaml b/flytectl/config.yaml new file mode 100644 index 0000000000..117944914b --- /dev/null +++ b/flytectl/config.yaml @@ -0,0 +1,6 @@ +admin: + endpoint: http://localhost:30082 + insecure: true +logger: + show-source: true + level: 1 diff --git a/flytectl/go.mod b/flytectl/go.mod new file mode 100644 index 0000000000..309f5188b6 --- /dev/null +++ b/flytectl/go.mod @@ -0,0 +1,19 @@ +module github.com/lyft/flytectl + +go 1.13 + +require ( + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 // indirect + github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 + github.com/lyft/flyteidl v0.17.32 + github.com/lyft/flytestdlib v0.3.0 + github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mitchellh/mapstructure v1.1.2 + github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/cobra v0.0.5 + github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 // indirect + k8s.io/apimachinery v0.18.3 // indirect +) diff --git a/flytectl/go.sum b/flytectl/go.sum new file mode 100644 index 0000000000..3a0298d3a3 --- /dev/null +++ b/flytectl/go.sum @@ -0,0 +1,551 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +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-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.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o= +github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.7.9/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= +github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP0VaCYafgUw+iS1EfJTDbtAeBcByEFqFrY= +github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/lyft/flyteidl v0.17.32 h1:Iio3gYjTyPhAiOMWJ/H/4YtfWIZm5KZSlWMULT1Ef6U= +github.com/lyft/flyteidl v0.17.32/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= +github.com/lyft/flytestdlib v0.3.0 h1:nIkX4MlyYdcLLzaF35RI2P5BhARt+qMgHoFto8eVNzU= +github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +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= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/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-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= +gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= +k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= +k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= +k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/flytectl/main.go b/flytectl/main.go new file mode 100644 index 0000000000..d6dbf7f4ad --- /dev/null +++ b/flytectl/main.go @@ -0,0 +1,9 @@ +package main + +import "github.com/lyft/flytectl/cmd" + +func main() { + if err := cmd.ExecuteCmd(); err != nil { + panic(err) + } +} From c17ee3badb26149e480523f22b3c8dffffce3910 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Thu, 16 Jul 2020 21:15:56 -0700 Subject: [PATCH 005/356] GH workflow change - publish binary when tag is pushed (#5) --- flytectl/.github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml index eae1b92b0b..db015f442f 100644 --- a/flytectl/.github/workflows/release.yml +++ b/flytectl/.github/workflows/release.yml @@ -1,8 +1,9 @@ name: goreleaser on: - pull_request: push: + tags: + - '*' jobs: goreleaser: From 8774f00dbba78ea084e51b3511919cb3007f7943 Mon Sep 17 00:00:00 2001 From: brucearctor <5032356+brucearctor@users.noreply.github.com> Date: Mon, 3 Aug 2020 09:39:28 -0700 Subject: [PATCH 006/356] initial contributing (#8) --- flytectl/README.md | 3 +++ flytectl/docs/CONTRIBUTING.md | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 flytectl/docs/CONTRIBUTING.md diff --git a/flytectl/README.md b/flytectl/README.md index 4e55a2acea..dfe4413421 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -1,2 +1,5 @@ # flytectl Flyte CLI + + +[Contribution guidelines for this project](docs/CONTRIBUTING.md) diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md new file mode 100644 index 0000000000..0249359719 --- /dev/null +++ b/flytectl/docs/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Developing FlyteCtl + +A local cluster can be setup via --> https://lyft.github.io/flyte/administrator/install/getting_started.html#getting-started + +Then, if having trouble connecting to local cluster see the following: + +#1) Find/Set/Verify gRPC port for your local Flyte service: + +FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec.ports[] | select(.name=="grpc").port'` +#2) Setup Port forwarding: kubectl port-forward -n flyte service/flyteadmin 8081:$FLYTECTL_GRPC_PORT + +and #3) Update config line in https://github.com/lyft/flytectl/blob/master/config.yaml to dns:///localhost:8081 + + + From 2811f53f24238895d9c4ea9351437797058cae34 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Wed, 23 Sep 2020 02:53:03 +0530 Subject: [PATCH 007/356] Feature/get workflow,Task,Domain,Project (#9) --- flytectl/.golangci.yml | 30 ++ flytectl/cmd/config/config.go | 1 + flytectl/cmd/config/config_flags.go | 1 + flytectl/cmd/core/cmd.go | 3 +- flytectl/cmd/core/cmd_ctx.go | 2 +- flytectl/cmd/core/types.go | 2 +- flytectl/cmd/get/get.go | 45 +-- flytectl/cmd/get/project.go | 56 +++ flytectl/cmd/get/task.go | 78 ++++ flytectl/cmd/get/types.go | 23 ++ flytectl/cmd/get/workflow.go | 72 ++++ flytectl/cmd/root.go | 2 +- flytectl/go.mod | 6 +- flytectl/go.sum | 551 ---------------------------- flytectl/pkg/printer/printer.go | 78 ++++ 15 files changed, 352 insertions(+), 598 deletions(-) create mode 100644 flytectl/.golangci.yml create mode 100644 flytectl/cmd/get/project.go create mode 100644 flytectl/cmd/get/task.go create mode 100644 flytectl/cmd/get/types.go create mode 100644 flytectl/cmd/get/workflow.go delete mode 100644 flytectl/go.sum create mode 100644 flytectl/pkg/printer/printer.go diff --git a/flytectl/.golangci.yml b/flytectl/.golangci.yml new file mode 100644 index 0000000000..80deaf81f6 --- /dev/null +++ b/flytectl/.golangci.yml @@ -0,0 +1,30 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +run: + skip-dirs: + - pkg/client + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gas + - goconst + - goimports + - golint + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - staticcheck + - structcheck + - typecheck + - unconvert + - unparam + - unused + - varcheck \ No newline at end of file diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 69643ddb8b..59fd7d8701 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -14,6 +14,7 @@ var ( type Config struct { Project string `json:"project" pflag:",Specifies the project to work on."` Domain string `json:"domain" pflag:",Specified the domain to work on."` + Output string `json:"output" pflag:",Specified the output type."` } func GetConfig() *Config { diff --git a/flytectl/cmd/config/config_flags.go b/flytectl/cmd/config/config_flags.go index a6986a23b2..2722dde8f8 100755 --- a/flytectl/cmd/config/config_flags.go +++ b/flytectl/cmd/config/config_flags.go @@ -43,5 +43,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Domain, "Specified the output type.") return cmdFlags } diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 0185772b4c..6be3653c34 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -1,4 +1,4 @@ -package core +package cmdcore import ( "context" @@ -27,7 +27,6 @@ func generateCommandFunc(cmdFunc CommandFunc) func(cmd *cobra.Command, args []st if err != nil { return err } - return cmdFunc(ctx, args, CommandContext{ out: cmd.OutOrStdout(), adminClient: adminClient, diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 4c4b8d3b21..7fb1541251 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -1,4 +1,4 @@ -package core +package cmdcore import ( "io" diff --git a/flytectl/cmd/core/types.go b/flytectl/cmd/core/types.go index f6c3cfacc7..dbb0b9d42a 100644 --- a/flytectl/cmd/core/types.go +++ b/flytectl/cmd/core/types.go @@ -1,4 +1,4 @@ -package core +package cmdcore import "context" diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index a0d9f56faa..c4071ee6d5 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -1,14 +1,8 @@ package get import ( - "context" - "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytestdlib/logger" - - "github.com/landoop/tableprinter" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/spf13/cobra" ) @@ -18,42 +12,13 @@ func CreateGetCommand() *cobra.Command { Short: "Retrieve various resource.", } - getResourcesFuncs := map[string]core.CommandFunc{ - "projects": getProjectsFunc, + getResourcesFuncs := map[string]cmdcore.CommandFunc{ + "projects": getProjectsFunc, + "tasks": getTaskFunc, + "workflows": getWorkflowFunc, } - core.AddCommands(getCmd, getResourcesFuncs) + cmdcore.AddCommands(getCmd, getResourcesFuncs) return getCmd } - -func getProjectsFunc(ctx context.Context, args []string, cmdCtx core.CommandContext) error { - projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) - if err != nil { - return err - } - - logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) - printer := tableprinter.New(cmdCtx.OutputPipe()) - printer.Print(toPrintableProjects(projects.Projects)) - return nil -} - -func toPrintableProjects(projects []*admin.Project) []interface{} { - type printableProject struct { - Id string `header:"Id"` - Name string `header:"Name"` - Description string `header:"Description"` - } - - res := make([]interface{}, 0, len(projects)) - for _, p := range projects { - res = append(res, printableProject{ - Id: p.Id, - Name: p.Name, - Description: p.Description, - }) - } - - return res -} diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go new file mode 100644 index 0000000000..a576f3f20b --- /dev/null +++ b/flytectl/cmd/get/project.go @@ -0,0 +1,56 @@ +package get + +import ( + "context" + "github.com/lyft/flytectl/cmd/config" + "encoding/json" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flytestdlib/logger" +) + +type PrintableProject struct { + Id string `header:"Id"` + Name string `header:"Name"` + Description string `header:"Description"` +} + +var tableStructure = map[string]string{ + "Id" : "$.id", + "Name" : "$.name", + "Description" : "$.description", +} + + +func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + adminPrinter := printer.Printer{} + + transformProject := func(jsonbody [] byte)(interface{},error){ + results := PrintableProject{} + if err := json.Unmarshal(jsonbody, &results); err != nil { + return results,err + } + return results,nil + } + if len(args) == 1 { + projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) + for _, v := range projects.Projects { + if v.Name == args[0] { + adminPrinter.Print(config.GetConfig().Output, projects.Projects,tableStructure,transformProject) + } + } + return nil + } + projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) + adminPrinter.Print(config.GetConfig().Output, projects.Projects,tableStructure,transformProject) + return nil +} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go new file mode 100644 index 0000000000..70f5126add --- /dev/null +++ b/flytectl/cmd/get/task.go @@ -0,0 +1,78 @@ +package get + +import ( + "context" + "encoding/json" + "fmt" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" +) + +type PrintableTask struct { + Version string `header:"Version"` + Name string `header:"Name"` + Type string `header:"Type"` + Discoverable bool `header:"Discoverable"` + DiscoveryVersion string `header:"DiscoveryVersion"` +} + +var taskStructure = map[string]string{ + "Version" : "$.id.version", + "Name" : "$.id.name", + "Type" : "$.closure.compiledTask.template.type", + "Discoverable" : "$.closure.compiledTask.template.metadata.discoverable", + "DiscoveryVersion" : "$.closure.compiledTask.template.metadata.discovery_version", +} + +var transformTask = func(jsonbody [] byte)(interface{},error){ + results := PrintableTask{} + if err := json.Unmarshal(jsonbody, &results); err != nil { + return results,err + } + return results,nil +} + +func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + if config.GetConfig().Project == "" { + return fmt.Errorf("Please set project name to get domain") + } + if config.GetConfig().Domain == "" { + return fmt.Errorf("Please set project name to get workflow") + } + taskPrinter := printer.Printer{ + } + + if len(args) == 1 { + task, err := cmdCtx.AdminClient().ListTasks(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: args[0], + }, + Limit: 10, + }) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved Task", task.Tasks) + + taskPrinter.Print(config.GetConfig().Output, task.Tasks,taskStructure,transformTask) + return nil + } + + tasks, err := cmdCtx.AdminClient().ListTaskIds(ctx, &admin.NamedEntityIdentifierListRequest{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Limit: 3, + }) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v Task", len(tasks.Entities)) + taskPrinter.Print(config.GetConfig().Output, tasks.Entities,entityStructure,transformTaskEntity) + return nil +} diff --git a/flytectl/cmd/get/types.go b/flytectl/cmd/get/types.go new file mode 100644 index 0000000000..a73547bf81 --- /dev/null +++ b/flytectl/cmd/get/types.go @@ -0,0 +1,23 @@ +package get + +import "encoding/json" + +type PrintableNamedEntityIdentifier struct { + Name string `header:"Name"` + Project string `header:"Project"` + Domain string `header:"Domain"` +} + +var entityStructure = map[string]string{ + "Domain" : "$.domain", + "Name" : "$.name", + "Project" : "$.project", +} + +var transformTaskEntity = func(jsonbody [] byte)(interface{},error){ + results := PrintableNamedEntityIdentifier{} + if err := json.Unmarshal(jsonbody, &results); err != nil { + return results,err + } + return results,nil +} diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go new file mode 100644 index 0000000000..6ef2fe77dd --- /dev/null +++ b/flytectl/cmd/get/workflow.go @@ -0,0 +1,72 @@ +package get + +import ( + "context" + "encoding/json" + "fmt" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" +) + +var workflowStructure = map[string]string{ + "Version" : "$.id.version", + "Name" : "$.id.name", +} + +type PrintableWorkflow struct { + Name string `header:"Name"` + Version string `header:"Version"` +} + +var transformWorkflow = func(jsonbody [] byte)(interface{},error){ + results := PrintableWorkflow{} + if err := json.Unmarshal(jsonbody, &results); err != nil { + return results,err + } + return results,nil +} + + +func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + if config.GetConfig().Project == "" { + return fmt.Errorf("Please set project name to get domain") + } + if config.GetConfig().Domain == "" { + return fmt.Errorf("Please set project name to get workflow") + } + adminPrinter := printer.Printer{ + } + if len(args) > 0 { + workflows, err := cmdCtx.AdminClient().ListWorkflows(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: args[0], + }, + Limit: 10, + }) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Workflows)) + + adminPrinter.Print(config.GetConfig().Output, workflows.Workflows,workflowStructure,transformWorkflow) + return nil + } + workflows, err := cmdCtx.AdminClient().ListWorkflowIds(ctx, &admin.NamedEntityIdentifierListRequest{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Limit: 10, + }) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Entities)) + + adminPrinter.Print(config.GetConfig().Output, workflows.Entities,entityStructure,transformTaskEntity) + return nil +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index c0cc9d100e..a266ca9856 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -16,7 +16,6 @@ var ( configAccessor = viper.NewAccessor(stdConfig.Options{StrictMode: true}) ) - func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, @@ -31,6 +30,7 @@ func newRootCmd() *cobra.Command { // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") + rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", "table", "Specifies the output type") rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) diff --git a/flytectl/go.mod b/flytectl/go.mod index 309f5188b6..468b3ef403 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,16 +4,18 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect + github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 // indirect github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 - github.com/lyft/flyteidl v0.17.32 - github.com/lyft/flytestdlib v0.3.0 + github.com/lyft/flyteidl v0.18.1 + github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.1.2 github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 + github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 // indirect k8s.io/apimachinery v0.18.3 // indirect ) diff --git a/flytectl/go.sum b/flytectl/go.sum deleted file mode 100644 index 3a0298d3a3..0000000000 --- a/flytectl/go.sum +++ /dev/null @@ -1,551 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -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-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -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-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.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o= -github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.7.9/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= -github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -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/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP0VaCYafgUw+iS1EfJTDbtAeBcByEFqFrY= -github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lyft/flyteidl v0.17.32 h1:Iio3gYjTyPhAiOMWJ/H/4YtfWIZm5KZSlWMULT1Ef6U= -github.com/lyft/flyteidl v0.17.32/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= -github.com/lyft/flytestdlib v0.3.0 h1:nIkX4MlyYdcLLzaF35RI2P5BhARt+qMgHoFto8eVNzU= -github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad h1:Jh8cai0fqIK+f6nG0UgPW5wFk8wmiMhM3AyciDBdtQg= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -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= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= -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= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -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= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/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-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= -gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= -k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= -k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go new file mode 100644 index 0000000000..8462625875 --- /dev/null +++ b/flytectl/pkg/printer/printer.go @@ -0,0 +1,78 @@ +package printer + +import ( + "bytes" + "encoding/json" + "fmt" + "github.com/landoop/tableprinter" + "github.com/yalp/jsonpath" + "os" +) + +type Printer struct{} + +const ( + empty = "" + tab = "\t" +) + +func (p Printer) PrintOutput(output string, i interface{}) { + // Factory Method for all printer + switch output { + case "json": // Print protobuf to json + buffer := new(bytes.Buffer) + encoder := json.NewEncoder(buffer) + encoder.SetIndent(empty, tab) + + err := encoder.Encode(i) + if err != nil { + os.Exit(1) + } + + fmt.Println(buffer.String()) + break + default: // Print table + + printer := tableprinter.New(os.Stdout) + printer.Print(i) + break + } +} + +func(p Printer) BuildOutput(input []interface{},column map[string]string,printTransform func(data []byte)(interface{},error)) ([]interface{},error) { + responses := make([]interface{}, 0, len(input)) + for _, data := range input { + tableData := make(map[string]interface{}) + + for k := range column { + out, _ := jsonpath.Read(data, column[k]) + tableData[k] = out.(string) + } + jsonbody, err := json.Marshal(tableData) + if err != nil { + return responses,err + } + response,err := printTransform(jsonbody) + if err != nil { + return responses,err + } + responses = append(responses, response) + } + return responses,nil +} + +func (p Printer) Print(output string, i interface{},column map[string]string,printTransform func(data []byte)(interface{},error)) { + + var data interface{} + byte, _ := json.Marshal(i) + _ = json.Unmarshal(byte, &data) + if data == nil { + os.Exit(1) + } + input := data.([]interface{}) + response,err := p.BuildOutput(input,column,printTransform) + if err != nil { + os.Exit(1) + } + p.PrintOutput(output, response) +} From 3414946e100c3b7f08818f77a554bf68ce42cfbe Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 30 Sep 2020 21:20:13 -0700 Subject: [PATCH 008/356] Devflow, boilerplate, improved code, formatting and bug fixes (#11) --- flytectl/.github/workflows/release.yml | 26 - flytectl/.gitignore | 1 + flytectl/.golangci.yml | 4 +- flytectl/Makefile | 12 +- flytectl/adminutils/config.go | 22 + flytectl/adminutils/config_flags.go | 47 ++ flytectl/adminutils/config_flags_test.go | 146 +++++ flytectl/adminutils/iterator.go | 62 ++ .../lyft/golang_support_tools/go.mod | 12 + .../lyft/golang_support_tools/go.sum | 558 ++++++++++++++++++ .../lyft/golang_support_tools/tools.go | 10 + .../lyft/golang_test_targets/Makefile | 53 ++ .../lyft/golang_test_targets/Readme.rst | 31 + .../golang_test_targets/download_tooling.sh | 36 ++ .../lyft/golang_test_targets/goimports | 8 + .../lyft/golangci_file/.golangci.yml | 30 + .../boilerplate/lyft/golangci_file/Readme.rst | 8 + .../boilerplate/lyft/golangci_file/update.sh | 14 + .../lyft/pull_request_template/Readme.rst | 8 + .../pull_request_template.md | 26 + .../lyft/pull_request_template/update.sh | 12 + flytectl/boilerplate/update.cfg | 4 + flytectl/boilerplate/update.sh | 54 ++ flytectl/cmd/config/config.go | 17 + flytectl/cmd/core/cmd.go | 30 +- flytectl/cmd/core/cmd_ctx.go | 4 + flytectl/cmd/get/get.go | 10 +- flytectl/cmd/get/project.go | 42 +- flytectl/cmd/get/project_test.go | 25 + flytectl/cmd/get/task.go | 52 +- flytectl/cmd/get/types.go | 12 +- flytectl/cmd/get/workflow.go | 46 +- flytectl/cmd/root.go | 7 +- flytectl/config.yaml | 2 + flytectl/go.mod | 5 +- flytectl/go.sum | 516 ++++++++++++++++ flytectl/pkg/printer/printer.go | 78 --- flytectl/printer/outputformat_enumer.go | 86 +++ flytectl/printer/printer.go | 110 ++++ flytectl/pull_request_template.md | 26 + 40 files changed, 2048 insertions(+), 204 deletions(-) delete mode 100644 flytectl/.github/workflows/release.yml create mode 100644 flytectl/adminutils/config.go create mode 100755 flytectl/adminutils/config_flags.go create mode 100755 flytectl/adminutils/config_flags_test.go create mode 100644 flytectl/adminutils/iterator.go create mode 100644 flytectl/boilerplate/lyft/golang_support_tools/go.mod create mode 100644 flytectl/boilerplate/lyft/golang_support_tools/go.sum create mode 100644 flytectl/boilerplate/lyft/golang_support_tools/tools.go create mode 100644 flytectl/boilerplate/lyft/golang_test_targets/Makefile create mode 100644 flytectl/boilerplate/lyft/golang_test_targets/Readme.rst create mode 100755 flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh create mode 100755 flytectl/boilerplate/lyft/golang_test_targets/goimports create mode 100644 flytectl/boilerplate/lyft/golangci_file/.golangci.yml create mode 100644 flytectl/boilerplate/lyft/golangci_file/Readme.rst create mode 100755 flytectl/boilerplate/lyft/golangci_file/update.sh create mode 100644 flytectl/boilerplate/lyft/pull_request_template/Readme.rst create mode 100644 flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md create mode 100755 flytectl/boilerplate/lyft/pull_request_template/update.sh create mode 100644 flytectl/boilerplate/update.cfg create mode 100755 flytectl/boilerplate/update.sh create mode 100644 flytectl/cmd/get/project_test.go create mode 100644 flytectl/go.sum delete mode 100644 flytectl/pkg/printer/printer.go create mode 100644 flytectl/printer/outputformat_enumer.go create mode 100644 flytectl/printer/printer.go create mode 100644 flytectl/pull_request_template.md diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml deleted file mode 100644 index db015f442f..0000000000 --- a/flytectl/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: goreleaser - -on: - push: - tags: - - '*' - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Unshallow - run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.14 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/flytectl/.gitignore b/flytectl/.gitignore index 8d862b62ca..fb3907b444 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -4,3 +4,4 @@ vendor bin .DS_Store _test +./config.yaml diff --git a/flytectl/.golangci.yml b/flytectl/.golangci.yml index 80deaf81f6..a414f33f79 100644 --- a/flytectl/.golangci.yml +++ b/flytectl/.golangci.yml @@ -1,6 +1,6 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. # ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: -# +# # TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst run: @@ -27,4 +27,4 @@ linters: - unconvert - unparam - unused - - varcheck \ No newline at end of file + - varcheck diff --git a/flytectl/Makefile b/flytectl/Makefile index 73c7355ac8..5a8e04ea54 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -1,2 +1,12 @@ +export REPOSITORY=flytectl +include boilerplate/lyft/golang_test_targets/Makefile + generate: - go test github.com/lyft/flytectl/cmd --update \ No newline at end of file + go test github.com/lyft/flytectl/cmd --update + +compile: + go build -o bin/flytectl main.go + +.PHONY: update_boilerplate +update_boilerplate: + @boilerplate/update.sh diff --git a/flytectl/adminutils/config.go b/flytectl/adminutils/config.go new file mode 100644 index 0000000000..3b362b310b --- /dev/null +++ b/flytectl/adminutils/config.go @@ -0,0 +1,22 @@ +package adminutils + +import "github.com/lyft/flytestdlib/config" + +//go:generate pflags Config + +var ( + defaultConfig = &Config{ + MaxRecords: 500, + BatchSize: 100, + } + section = config.MustRegisterSection("adminutils", defaultConfig) +) + +type Config struct { + MaxRecords int `json:"maxRecords" pflag:",Maximum number of records to retrieve."` + BatchSize int `json:"batchSize" pflag:",Maximum number of records to retrieve per call."` +} + +func GetConfig() *Config { + return section.GetConfig().(*Config) +} diff --git a/flytectl/adminutils/config_flags.go b/flytectl/adminutils/config_flags.go new file mode 100755 index 0000000000..5a3c9a2c4d --- /dev/null +++ b/flytectl/adminutils/config_flags.go @@ -0,0 +1,47 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package adminutils + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "maxRecords"), defaultConfig.MaxRecords, "Maximum number of records to retrieve.") + cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "batchSize"), defaultConfig.BatchSize, "Maximum number of records to retrieve per call.") + return cmdFlags +} diff --git a/flytectl/adminutils/config_flags_test.go b/flytectl/adminutils/config_flags_test.go new file mode 100755 index 0000000000..1f7cf5ec73 --- /dev/null +++ b/flytectl/adminutils/config_flags_test.go @@ -0,0 +1,146 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package adminutils + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_maxRecords", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("maxRecords"); err == nil { + assert.Equal(t, int(defaultConfig.MaxRecords), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("maxRecords", testValue) + if vInt, err := cmdFlags.GetInt("maxRecords"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.MaxRecords) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_batchSize", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vInt, err := cmdFlags.GetInt("batchSize"); err == nil { + assert.Equal(t, int(defaultConfig.BatchSize), vInt) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("batchSize", testValue) + if vInt, err := cmdFlags.GetInt("batchSize"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt), &actual.BatchSize) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/adminutils/iterator.go b/flytectl/adminutils/iterator.go new file mode 100644 index 0000000000..8057491dd9 --- /dev/null +++ b/flytectl/adminutils/iterator.go @@ -0,0 +1,62 @@ +package adminutils + +import ( + "context" + + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "google.golang.org/grpc" +) + +type NamedEntityIDLister func(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) (*admin.NamedEntityIdentifierList, error) + +type NamedEntityVisitor func(entities []*admin.NamedEntityIdentifier) error + +type ListRequest struct { + Project string + Domain string + Filters string +} + +func IterateThroughAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, visitor NamedEntityVisitor, req ListRequest, opts ...grpc.CallOption) error { + adminReq := &admin.NamedEntityIdentifierListRequest{ + Project: req.Project, + Domain: req.Domain, + Filters: req.Filters, + SortBy: &admin.Sort{ + Key: "name", + Direction: admin.Sort_ASCENDING, + }, + Limit: uint32(GetConfig().BatchSize), + } + + i := 0 + for i < GetConfig().MaxRecords { + res, err := lister(ctx, adminReq, opts...) + if err != nil { + return err + } + if len(res.Entities) != 0 { + if err := visitor(res.Entities); err != nil { + return err + } + } + i = i + len(res.Entities) + if len(res.Entities) == 0 || res.Token == "" { + break + } + adminReq.Token = res.Token + } + return nil +} + +func GetAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, req ListRequest, opts ...grpc.CallOption) ([]*admin.NamedEntityIdentifier, error) { + var allEntities []*admin.NamedEntityIdentifier + err := IterateThroughAllNamedEntities(ctx, lister, func(entities []*admin.NamedEntityIdentifier) error { + allEntities = append(allEntities, entities...) + return nil + }, req) + if err != nil { + return nil, err + } + return allEntities, nil +} diff --git a/flytectl/boilerplate/lyft/golang_support_tools/go.mod b/flytectl/boilerplate/lyft/golang_support_tools/go.mod new file mode 100644 index 0000000000..6816461a59 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_support_tools/go.mod @@ -0,0 +1,12 @@ +module github.com/lyft/boilerplate + +go 1.13 + +require ( + github.com/alvaroloes/enumer v1.1.2 + github.com/golangci/golangci-lint v1.22.2 + github.com/lyft/flytestdlib v0.2.31 + github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 +) + +replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytectl/boilerplate/lyft/golang_support_tools/go.sum b/flytectl/boilerplate/lyft/golang_support_tools/go.sum new file mode 100644 index 0000000000..81e0469630 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_support_tools/go.sum @@ -0,0 +1,558 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= +cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= +github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= +github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= +github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= +github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= +github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= +github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= +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/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= +github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.4.0 h1:sXD3pix0wDemuPuSlrXpJNNYXlUiKiysLrtPVQmxkzI= +github.com/go-critic/go-critic v0.4.0/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0= +github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= +github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= +github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.22.2 h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ= +github.com/golangci/golangci-lint v1.22.2/go.mod h1:2Bj42k6hPQFTRxkDb7S3TQ+EsnumZXOmIYNqlQrp0FI= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= +github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +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.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +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 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lyft/flytestdlib v0.2.31 h1:JAOSGwy/wLprhq1KR9zxekBqnKdSlAQQG1x4KQe+hlI= +github.com/lyft/flytestdlib v0.2.31/go.mod h1:/fqNXKCGChEvMzcRapVq6vDM69Vlusl+bCj7foToaUQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= +github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= +github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= +github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= +github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d h1:BzRvVq1EHuIjxpijCEKpAxzKUUMurOQ4sknehIATRh8= +github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= +github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= +github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= +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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= +github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tommy-muehle/go-mnd v1.1.1 h1:4D0wuPKjOTiK2garzuPGGvm4zZ/wLYDOH8TJSABC7KU= +github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= +github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= +github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +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= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= +golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= +golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/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-20180525024113-a5b4c53f6e8b/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-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= +golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= +google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= +google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= +k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= +k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= +mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/flytectl/boilerplate/lyft/golang_support_tools/tools.go b/flytectl/boilerplate/lyft/golang_support_tools/tools.go new file mode 100644 index 0000000000..4310b39d79 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_support_tools/tools.go @@ -0,0 +1,10 @@ +// +build tools + +package tools + +import ( + _ "github.com/golangci/golangci-lint/cmd/golangci-lint" + _ "github.com/lyft/flytestdlib/cli/pflags" + _ "github.com/vektra/mockery/cmd/mockery" + _ "github.com/alvaroloes/enumer" +) diff --git a/flytectl/boilerplate/lyft/golang_test_targets/Makefile b/flytectl/boilerplate/lyft/golang_test_targets/Makefile new file mode 100644 index 0000000000..5abd2ed607 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_test_targets/Makefile @@ -0,0 +1,53 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + + +.PHONY: download_tooling +download_tooling: #download dependencies (including test deps) for the package + @boilerplate/lyft/golang_test_targets/download_tooling.sh + +.PHONY: lint +lint: download_tooling #lints the package for common code smells + GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v + +# If code is failing goimports linter, this will fix. +# skips 'vendor' +.PHONY: goimports +goimports: + @boilerplate/lyft/golang_test_targets/goimports + +.PHONY: mod_download +mod_download: #download dependencies (including test deps) for the package + go mod download + +.PHONY: install +install: download_tooling mod_download + +.PHONY: show +show: + go list -m all + +.PHONY: test_unit +test_unit: + go test -cover ./... -race + +.PHONY: test_benchmark +test_benchmark: + go test -bench . ./... + +.PHONY: test_unit_cover +test_unit_cover: + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -func /tmp/cover.out + +.PHONY: test_unit_visual +test_unit_visual: + go test ./... -coverprofile /tmp/cover.out -covermode=count + go tool cover -html=/tmp/cover.out + +.PHONY: test_unit_codecov +test_unit_codecov: + go test ./... -race -coverprofile=coverage.txt -covermode=atomic + curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh diff --git a/flytectl/boilerplate/lyft/golang_test_targets/Readme.rst b/flytectl/boilerplate/lyft/golang_test_targets/Readme.rst new file mode 100644 index 0000000000..3466e30c55 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_test_targets/Readme.rst @@ -0,0 +1,31 @@ +Golang Test Targets +~~~~~~~~~~~~~~~~~~~ + +Provides an ``install`` make target that uses ``go mod`` to install golang dependencies. + +Provides a ``lint`` make target that uses golangci to lint your code. + +Provides a ``test_unit`` target for unit tests. + +Provides a ``test_unit_cover`` target for analysing coverage of unit tests, which will output the coverage of each function and total statement coverage. + +Provides a ``test_unit_visual`` target for visualizing coverage of unit tests through an interactive html code heat map. + +Provides a ``test_benchmark`` target for benchmark tests. + +**To Enable:** + +Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. + +Make sure you're using ``go mod`` for dependency management. + +Provide a ``.golangci`` configuration (the lint target requires it). + +Add ``include boilerplate/lyft/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable + +:: + + REPOSITORY= + include boilerplate/lyft/golang_test_targets/Makefile + +(this ensures the extra make targets get included in your main Makefile) diff --git a/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh new file mode 100755 index 0000000000..ab56c7e481 --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Everything in this file needs to be installed outside of current module +# The reason we cannot turn off module entirely and install is that we need the replace statement in go.mod +# because we are installing a mockery fork. Turning it off would result installing the original not the fork. +# We also want to version all the other tools. We also want to be able to run go mod tidy without removing the version +# pins. To facilitate this, we're maintaining two sets of go.mod/sum files - the second one only for tooling. This is +# the same approach that go 1.14 will take as well. +# See: +# https://github.com/lyft/flyte/issues/129 +# https://github.com/golang/go/issues/30515 for some background context +# https://github.com/go-modules-by-example/index/blob/5ec250b4b78114a55001bd7c9cb88f6e07270ea5/010_tools/README.md + +set -e + +# List of tools to go get +# In the format of ":" or ":" if no cli +tools=( + "github.com/vektra/mockery/cmd/mockery" + "github.com/lyft/flytestdlib/cli/pflags" + "github.com/golangci/golangci-lint/cmd/golangci-lint" + "github.com/alvaroloes/enumer" +) + +tmp_dir=$(mktemp -d -t gotooling-XXX) +echo "Using temp directory ${tmp_dir}" +cp -R boilerplate/lyft/golang_support_tools/* $tmp_dir +pushd "$tmp_dir" + +for tool in "${tools[@]}" +do + echo "Installing ${tool}" + GO111MODULE=on go install $tool +done + +popd diff --git a/flytectl/boilerplate/lyft/golang_test_targets/goimports b/flytectl/boilerplate/lyft/golang_test_targets/goimports new file mode 100755 index 0000000000..160525a8cc --- /dev/null +++ b/flytectl/boilerplate/lyft/golang_test_targets/goimports @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") diff --git a/flytectl/boilerplate/lyft/golangci_file/.golangci.yml b/flytectl/boilerplate/lyft/golangci_file/.golangci.yml new file mode 100644 index 0000000000..a414f33f79 --- /dev/null +++ b/flytectl/boilerplate/lyft/golangci_file/.golangci.yml @@ -0,0 +1,30 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +run: + skip-dirs: + - pkg/client + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gas + - goconst + - goimports + - golint + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - staticcheck + - structcheck + - typecheck + - unconvert + - unparam + - unused + - varcheck diff --git a/flytectl/boilerplate/lyft/golangci_file/Readme.rst b/flytectl/boilerplate/lyft/golangci_file/Readme.rst new file mode 100644 index 0000000000..ba5d2b61ce --- /dev/null +++ b/flytectl/boilerplate/lyft/golangci_file/Readme.rst @@ -0,0 +1,8 @@ +GolangCI File +~~~~~~~~~~~~~ + +Provides a ``.golangci`` file with the linters we've agreed upon. + +**To Enable:** + +Add ``lyft/golangci_file`` to your ``boilerplate/update.cfg`` file. diff --git a/flytectl/boilerplate/lyft/golangci_file/update.sh b/flytectl/boilerplate/lyft/golangci_file/update.sh new file mode 100755 index 0000000000..9e9e6c1f46 --- /dev/null +++ b/flytectl/boilerplate/lyft/golangci_file/update.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +# Clone the .golangci file +echo " - copying ${DIR}/.golangci to the root directory." +cp ${DIR}/.golangci.yml ${DIR}/../../../.golangci.yml diff --git a/flytectl/boilerplate/lyft/pull_request_template/Readme.rst b/flytectl/boilerplate/lyft/pull_request_template/Readme.rst new file mode 100644 index 0000000000..b85a4ea121 --- /dev/null +++ b/flytectl/boilerplate/lyft/pull_request_template/Readme.rst @@ -0,0 +1,8 @@ +Pull Request Template +~~~~~~~~~~~~~~~~~~~~~ + +Provides a Pull Request template. + +**To Enable:** + +Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. diff --git a/flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md b/flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md new file mode 100644 index 0000000000..d2becf38b7 --- /dev/null +++ b/flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md @@ -0,0 +1,26 @@ +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/lyft/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/lyft/flyte/issues/_ diff --git a/flytectl/boilerplate/lyft/pull_request_template/update.sh b/flytectl/boilerplate/lyft/pull_request_template/update.sh new file mode 100755 index 0000000000..13f0c3b57d --- /dev/null +++ b/flytectl/boilerplate/lyft/pull_request_template/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/pull_request_template.md ${DIR}/../../../pull_request_template.md diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg new file mode 100644 index 0000000000..a1b1bff989 --- /dev/null +++ b/flytectl/boilerplate/update.cfg @@ -0,0 +1,4 @@ +lyft/golang_test_targets +lyft/golangci_file +lyft/golang_support_tools +lyft/pull_request_template diff --git a/flytectl/boilerplate/update.sh b/flytectl/boilerplate/update.sh new file mode 100755 index 0000000000..a8c05705e3 --- /dev/null +++ b/flytectl/boilerplate/update.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +OUT="$(mktemp -d)" +git clone git@github.com:lyft/boilerplate.git "${OUT}" + +echo "Updating the update.sh script." +cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" +echo "" + + +CONFIG_FILE="${DIR}/update.cfg" +README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" + +if [ ! -f "$CONFIG_FILE" ]; then + echo "$CONFIG_FILE not found." + echo "This file is required in order to select which features to include." + echo "See $README for more details." + exit 1 +fi + +if [ -z "$REPOSITORY" ]; then + echo '$REPOSITORY is required to run this script' + echo "See $README for more details." + exit 1 +fi + +while read directory; do + # TODO: Skip empty lines, whitespace only lines, and comment lines + echo "***********************************************************************************" + echo "$directory is configured in update.cfg." + echo "-----------------------------------------------------------------------------------" + echo "syncing files from source." + dir_path="${OUT}/boilerplate/${directory}" + rm -rf "${DIR}/${directory}" + mkdir -p $(dirname "${DIR}/${directory}") + cp -r "$dir_path" "${DIR}/${directory}" + if [ -f "${DIR}/${directory}/update.sh" ]; then + echo "executing ${DIR}/${directory}/update.sh" + "${DIR}/${directory}/update.sh" + fi + echo "***********************************************************************************" + echo "" +done < "$CONFIG_FILE" + +rm -rf "${OUT}" diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 59fd7d8701..406279ec71 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -1,7 +1,12 @@ package config import ( + "fmt" + "strings" + "github.com/lyft/flytestdlib/config" + + "github.com/lyft/flytectl/printer" ) //go:generate pflags Config @@ -17,6 +22,18 @@ type Config struct { Output string `json:"output" pflag:",Specified the output type."` } +func (cfg Config) OutputFormat() (printer.OutputFormat, error) { + return printer.OutputFormatString(strings.ToUpper(cfg.Output)) +} + +func (cfg Config) MustOutputFormat() printer.OutputFormat { + f, err := cfg.OutputFormat() + if err != nil { + panic(fmt.Sprintf("unsupported output format [%s], supported types %s", cfg.Output, printer.OutputFormats())) + } + return f +} + func GetConfig() *Config { return section.GetConfig().(*Config) } diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 6be3653c34..96e62950ba 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -6,28 +6,48 @@ import ( "github.com/lyft/flyteidl/clients/go/admin" "github.com/spf13/cobra" + + "github.com/lyft/flytectl/cmd/config" ) -func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandFunc) { - for resource, getFunc := range cmdFuncs { +type CommandEntry struct { + ProjectDomainNotRequired bool + CmdFunc CommandFunc +} + +func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { + for resource, cmdEntry := range cmdFuncs { cmd := &cobra.Command{ Use: resource, Short: fmt.Sprintf("Retrieves %v resources.", resource), - RunE: generateCommandFunc(getFunc), + RunE: generateCommandFunc(cmdEntry), } rootCmd.AddCommand(cmd) } } -func generateCommandFunc(cmdFunc CommandFunc) func(cmd *cobra.Command, args []string) error { +func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args []string) error { return func(cmd *cobra.Command, args []string) error { ctx := context.Background() + + if !cmdEntry.ProjectDomainNotRequired { + if config.GetConfig().Project == "" { + return fmt.Errorf("project and domain are required parameters") + } + if config.GetConfig().Domain == "" { + return fmt.Errorf("project and domain are required parameters") + } + } + if _, err := config.GetConfig().OutputFormat(); err != nil { + return err + } + adminClient, err := admin.InitializeAdminClientFromConfig(ctx) if err != nil { return err } - return cmdFunc(ctx, args, CommandContext{ + return cmdEntry.CmdFunc(ctx, args, CommandContext{ out: cmd.OutOrStdout(), adminClient: adminClient, }) diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 7fb1541251..c39a0d902a 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -19,3 +19,7 @@ func (c CommandContext) AdminClient() service.AdminServiceClient { func (c CommandContext) OutputPipe() io.Writer { return c.out } + +func (c CommandContext) InputPipe() io.Reader { + return c.in +} diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index c4071ee6d5..19e80a4a64 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -1,7 +1,7 @@ package get import ( - "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/lyft/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -12,10 +12,10 @@ func CreateGetCommand() *cobra.Command { Short: "Retrieve various resource.", } - getResourcesFuncs := map[string]cmdcore.CommandFunc{ - "projects": getProjectsFunc, - "tasks": getTaskFunc, - "workflows": getWorkflowFunc, + getResourcesFuncs := map[string]cmdcore.CommandEntry{ + "projects": {CmdFunc: getProjectsFunc, ProjectDomainNotRequired: true}, + "tasks": {CmdFunc: getTaskFunc}, + "workflows": {CmdFunc: getWorkflowFunc}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index a576f3f20b..84f701d36f 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -2,46 +2,53 @@ package get import ( "context" - "github.com/lyft/flytectl/cmd/config" "encoding/json" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/printer" ) type PrintableProject struct { - Id string `header:"Id"` + ID string `header:"Id"` Name string `header:"Name"` Description string `header:"Description"` } var tableStructure = map[string]string{ - "Id" : "$.id", - "Name" : "$.name", - "Description" : "$.description", + "ID": "$.id", + "Name": "$.name", + "Description": "$.description", } +func transformProject(jsonbody []byte) (interface{}, error) { + results := PrintableProject{} + if err := json.Unmarshal(jsonbody, &results); err != nil { + return results, err + } + return results, nil +} func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} - transformProject := func(jsonbody [] byte)(interface{},error){ - results := PrintableProject{} - if err := json.Unmarshal(jsonbody, &results); err != nil { - return results,err - } - return results,nil - } if len(args) == 1 { + name := args[0] projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) for _, v := range projects.Projects { - if v.Name == args[0] { - adminPrinter.Print(config.GetConfig().Output, projects.Projects,tableStructure,transformProject) + if v.Name == name { + err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), v, tableStructure, transformProject) + if err != nil { + return err + } + return nil } } return nil @@ -51,6 +58,5 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) - adminPrinter.Print(config.GetConfig().Output, projects.Projects,tableStructure,transformProject) - return nil + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projects.Projects, tableStructure, transformProject) } diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go new file mode 100644 index 0000000000..3ec6479ca3 --- /dev/null +++ b/flytectl/cmd/get/project_test.go @@ -0,0 +1,25 @@ +package get + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_transformProject(t *testing.T) { + t.Run("happy", func(t *testing.T) { + v, err := json.Marshal(map[string]string{ + "Id": "id", + "Name": "name", + "Description": "description", + }) + assert.NoError(t, err) + row, err := transformProject(v) + assert.NoError(t, err) + typedRow, ok := row.(PrintableProject) + assert.True(t, ok) + assert.NotNil(t, typedRow) + assert.Equal(t, "id", typedRow.Id) + }) +} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 70f5126add..84f0c84993 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,11 +3,14 @@ package get import ( "context" "encoding/json" - "fmt" + + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flytectl/adminutils" + "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" - "github.com/lyft/flytestdlib/logger" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) @@ -21,30 +24,24 @@ type PrintableTask struct { } var taskStructure = map[string]string{ - "Version" : "$.id.version", - "Name" : "$.id.name", - "Type" : "$.closure.compiledTask.template.type", - "Discoverable" : "$.closure.compiledTask.template.metadata.discoverable", - "DiscoveryVersion" : "$.closure.compiledTask.template.metadata.discovery_version", + "Version": "$.id.version", + "Name": "$.id.name", + "Type": "$.closure.compiledTask.template.type", + "Discoverable": "$.closure.compiledTask.template.metadata.discoverable", + "DiscoveryVersion": "$.closure.compiledTask.template.metadata.discovery_version", } -var transformTask = func(jsonbody [] byte)(interface{},error){ +var transformTask = func(jsonbody []byte) (interface{}, error) { results := PrintableTask{} if err := json.Unmarshal(jsonbody, &results); err != nil { - return results,err + return results, err } - return results,nil + return results, nil } func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - if config.GetConfig().Project == "" { - return fmt.Errorf("Please set project name to get domain") - } - if config.GetConfig().Domain == "" { - return fmt.Errorf("Please set project name to get workflow") - } - taskPrinter := printer.Printer{ - } + + taskPrinter := printer.Printer{} if len(args) == 1 { task, err := cmdCtx.AdminClient().ListTasks(ctx, &admin.ResourceListRequest{ @@ -53,26 +50,19 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte Domain: config.GetConfig().Domain, Name: args[0], }, - Limit: 10, + Limit: 1, }) if err != nil { return err } logger.Debugf(ctx, "Retrieved Task", task.Tasks) - taskPrinter.Print(config.GetConfig().Output, task.Tasks,taskStructure,transformTask) - return nil + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), task.Tasks, taskStructure, transformTask) } - - tasks, err := cmdCtx.AdminClient().ListTaskIds(ctx, &admin.NamedEntityIdentifierListRequest{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Limit: 3, - }) + tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) if err != nil { return err } - logger.Debugf(ctx, "Retrieved %v Task", len(tasks.Entities)) - taskPrinter.Print(config.GetConfig().Output, tasks.Entities,entityStructure,transformTaskEntity) - return nil + logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), tasks, entityStructure, transformTaskEntity) } diff --git a/flytectl/cmd/get/types.go b/flytectl/cmd/get/types.go index a73547bf81..3cde02d01d 100644 --- a/flytectl/cmd/get/types.go +++ b/flytectl/cmd/get/types.go @@ -9,15 +9,15 @@ type PrintableNamedEntityIdentifier struct { } var entityStructure = map[string]string{ - "Domain" : "$.domain", - "Name" : "$.name", - "Project" : "$.project", + "Domain": "$.domain", + "Name": "$.name", + "Project": "$.project", } -var transformTaskEntity = func(jsonbody [] byte)(interface{},error){ +var transformTaskEntity = func(jsonbody []byte) (interface{}, error) { results := PrintableNamedEntityIdentifier{} if err := json.Unmarshal(jsonbody, &results); err != nil { - return results,err + return results, err } - return results,nil + return results, nil } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 6ef2fe77dd..90f34b1c1c 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,18 +3,20 @@ package get import ( "context" "encoding/json" - "fmt" + + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flytectl/adminutils" "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" - "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytectl/printer" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) var workflowStructure = map[string]string{ - "Version" : "$.id.version", - "Name" : "$.id.name", + "Version": "$.id.version", + "Name": "$.id.name", } type PrintableWorkflow struct { @@ -22,24 +24,16 @@ type PrintableWorkflow struct { Version string `header:"Version"` } -var transformWorkflow = func(jsonbody [] byte)(interface{},error){ +var transformWorkflow = func(jsonbody []byte) (interface{}, error) { results := PrintableWorkflow{} if err := json.Unmarshal(jsonbody, &results); err != nil { - return results,err + return results, err } - return results,nil + return results, nil } - func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - if config.GetConfig().Project == "" { - return fmt.Errorf("Please set project name to get domain") - } - if config.GetConfig().Domain == "" { - return fmt.Errorf("Please set project name to get workflow") - } - adminPrinter := printer.Printer{ - } + adminPrinter := printer.Printer{} if len(args) > 0 { workflows, err := cmdCtx.AdminClient().ListWorkflows(ctx, &admin.ResourceListRequest{ Id: &admin.NamedEntityIdentifier{ @@ -47,26 +41,20 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC Domain: config.GetConfig().Domain, Name: args[0], }, - Limit: 10, + Limit: 1, }) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Workflows)) - adminPrinter.Print(config.GetConfig().Output, workflows.Workflows,workflowStructure,transformWorkflow) - return nil + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows.Workflows, workflowStructure, transformWorkflow) } - workflows, err := cmdCtx.AdminClient().ListWorkflowIds(ctx, &admin.NamedEntityIdentifierListRequest{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Limit: 10, - }) + + workflows, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListWorkflowIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) if err != nil { return err } - logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Entities)) - - adminPrinter.Print(config.GetConfig().Output, workflows.Entities,entityStructure,transformTaskEntity) - return nil + logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows, entityStructure, transformTaskEntity) } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index a266ca9856..f099db0117 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -2,13 +2,16 @@ package cmd import ( "context" + "fmt" "github.com/lyft/flytectl/cmd/get" + "github.com/lyft/flytectl/printer" - "github.com/lyft/flytectl/cmd/config" stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" "github.com/spf13/cobra" + + "github.com/lyft/flytectl/cmd/config" ) var ( @@ -30,7 +33,7 @@ func newRootCmd() *cobra.Command { // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") - rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", "table", "Specifies the output type") + rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s", printer.OutputFormats())) rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index 117944914b..7bc38d9c18 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,5 +1,7 @@ admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: http://localhost:30082 + # endpoint: dns:///flyte.lyft.net insecure: true logger: show-source: true diff --git a/flytectl/go.mod b/flytectl/go.mod index 468b3ef403..4dac235d14 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,8 +4,9 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect + github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.3.2 - github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 // indirect + github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 github.com/lyft/flyteidl v0.18.1 github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa @@ -16,6 +17,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 + go.uber.org/zap v1.10.0 golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 // indirect + google.golang.org/grpc v1.26.0 k8s.io/apimachinery v0.18.3 // indirect ) diff --git a/flytectl/go.sum b/flytectl/go.sum new file mode 100644 index 0000000000..d43baa8c3c --- /dev/null +++ b/flytectl/go.sum @@ -0,0 +1,516 @@ +<<<<<<< Updated upstream +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= +github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +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-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.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o= +github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.7.9/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= +github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/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/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP0VaCYafgUw+iS1EfJTDbtAeBcByEFqFrY= +github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/lyft/flyteidl v0.18.1 h1:COKkZi5k6bQvUYOk5gE70+FJX9/NUn0WOQ1uMrw3Qio= +github.com/lyft/flyteidl v0.18.1/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= +github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= +github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa h1:anYLG/feMdMv321AfhHGBRd0S3cPLFFTZvJYssjhxFo= +github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +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= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/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-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +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= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= +gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= +k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go deleted file mode 100644 index 8462625875..0000000000 --- a/flytectl/pkg/printer/printer.go +++ /dev/null @@ -1,78 +0,0 @@ -package printer - -import ( - "bytes" - "encoding/json" - "fmt" - "github.com/landoop/tableprinter" - "github.com/yalp/jsonpath" - "os" -) - -type Printer struct{} - -const ( - empty = "" - tab = "\t" -) - -func (p Printer) PrintOutput(output string, i interface{}) { - // Factory Method for all printer - switch output { - case "json": // Print protobuf to json - buffer := new(bytes.Buffer) - encoder := json.NewEncoder(buffer) - encoder.SetIndent(empty, tab) - - err := encoder.Encode(i) - if err != nil { - os.Exit(1) - } - - fmt.Println(buffer.String()) - break - default: // Print table - - printer := tableprinter.New(os.Stdout) - printer.Print(i) - break - } -} - -func(p Printer) BuildOutput(input []interface{},column map[string]string,printTransform func(data []byte)(interface{},error)) ([]interface{},error) { - responses := make([]interface{}, 0, len(input)) - for _, data := range input { - tableData := make(map[string]interface{}) - - for k := range column { - out, _ := jsonpath.Read(data, column[k]) - tableData[k] = out.(string) - } - jsonbody, err := json.Marshal(tableData) - if err != nil { - return responses,err - } - response,err := printTransform(jsonbody) - if err != nil { - return responses,err - } - responses = append(responses, response) - } - return responses,nil -} - -func (p Printer) Print(output string, i interface{},column map[string]string,printTransform func(data []byte)(interface{},error)) { - - var data interface{} - byte, _ := json.Marshal(i) - _ = json.Unmarshal(byte, &data) - if data == nil { - os.Exit(1) - } - input := data.([]interface{}) - response,err := p.BuildOutput(input,column,printTransform) - if err != nil { - os.Exit(1) - } - p.PrintOutput(output, response) -} diff --git a/flytectl/printer/outputformat_enumer.go b/flytectl/printer/outputformat_enumer.go new file mode 100644 index 0000000000..b10b45143f --- /dev/null +++ b/flytectl/printer/outputformat_enumer.go @@ -0,0 +1,86 @@ +// Code generated by "enumer --type=OutputFormat -json -yaml -trimprefix=OutputFormat"; DO NOT EDIT. + +// +package printer + +import ( + "encoding/json" + "fmt" +) + +const _OutputFormatName = "TABLEJSONYAML" + +var _OutputFormatIndex = [...]uint8{0, 5, 9, 13} + +func (i OutputFormat) String() string { + if i >= OutputFormat(len(_OutputFormatIndex)-1) { + return fmt.Sprintf("OutputFormat(%d)", i) + } + return _OutputFormatName[_OutputFormatIndex[i]:_OutputFormatIndex[i+1]] +} + +var _OutputFormatValues = []OutputFormat{0, 1, 2} + +var _OutputFormatNameToValueMap = map[string]OutputFormat{ + _OutputFormatName[0:5]: 0, + _OutputFormatName[5:9]: 1, + _OutputFormatName[9:13]: 2, +} + +// OutputFormatString retrieves an enum value from the enum constants string name. +// Throws an error if the param is not part of the enum. +func OutputFormatString(s string) (OutputFormat, error) { + if val, ok := _OutputFormatNameToValueMap[s]; ok { + return val, nil + } + return 0, fmt.Errorf("%s does not belong to OutputFormat values", s) +} + +// OutputFormatValues returns all values of the enum +func OutputFormatValues() []OutputFormat { + return _OutputFormatValues +} + +// IsAOutputFormat returns "true" if the value is listed in the enum definition. "false" otherwise +func (i OutputFormat) IsAOutputFormat() bool { + for _, v := range _OutputFormatValues { + if i == v { + return true + } + } + return false +} + +// MarshalJSON implements the json.Marshaler interface for OutputFormat +func (i OutputFormat) MarshalJSON() ([]byte, error) { + return json.Marshal(i.String()) +} + +// UnmarshalJSON implements the json.Unmarshaler interface for OutputFormat +func (i *OutputFormat) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return fmt.Errorf("OutputFormat should be a string, got %s", data) + } + + var err error + *i, err = OutputFormatString(s) + return err +} + +// MarshalYAML implements a YAML Marshaler for OutputFormat +func (i OutputFormat) MarshalYAML() (interface{}, error) { + return i.String(), nil +} + +// UnmarshalYAML implements a YAML Unmarshaler for OutputFormat +func (i *OutputFormat) UnmarshalYAML(unmarshal func(interface{}) error) error { + var s string + if err := unmarshal(&s); err != nil { + return err + } + + var err error + *i, err = OutputFormatString(s) + return err +} diff --git a/flytectl/printer/printer.go b/flytectl/printer/printer.go new file mode 100644 index 0000000000..6ed17d4ef3 --- /dev/null +++ b/flytectl/printer/printer.go @@ -0,0 +1,110 @@ +package printer + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + + "github.com/ghodss/yaml" + "github.com/kataras/tablewriter" + "github.com/landoop/tableprinter" + "github.com/yalp/jsonpath" +) + +//go:generate enumer --type=OutputFormat -json -yaml -trimprefix=OutputFormat +type OutputFormat uint8 + +const ( + OutputFormatTABLE OutputFormat = iota + OutputFormatJSON + OutputFormatYAML +) + +func OutputFormats() []string { + var v []string + for _, o := range OutputFormatValues() { + v = append(v, o.String()) + } + return v +} + +type Printer struct{} + +const ( + empty = "" + tab = "\t" +) + +func (p Printer) projectColumns(input []interface{}, column map[string]string, printTransform func(data []byte) (interface{}, error)) ([]interface{}, error) { + responses := make([]interface{}, 0, len(input)) + for _, data := range input { + tableData := make(map[string]interface{}) + + for k := range column { + out, err := jsonpath.Read(data, column[k]) + if err != nil { + out = nil + } + tableData[k] = out + } + jsonbody, err := json.Marshal(tableData) + if err != nil { + return responses, err + } + response, err := printTransform(jsonbody) + if err != nil { + return responses, err + } + responses = append(responses, response) + } + return responses, nil +} + +func (p Printer) Print(format OutputFormat, i interface{}, column map[string]string, printTransform func(data []byte) (interface{}, error)) error { + + buf := new(bytes.Buffer) + encoder := json.NewEncoder(buf) + encoder.SetIndent(empty, tab) + + err := encoder.Encode(i) + if err != nil { + return err + } + + // Factory Method for all printer + switch format { + case OutputFormatJSON: // Print protobuf to json + fmt.Println(buf.String()) + case OutputFormatYAML: + v, err := yaml.JSONToYAML(buf.Bytes()) + if err != nil { + return err + } + fmt.Println(string(v)) + default: // Print table + var rows []interface{} + err := json.Unmarshal(buf.Bytes(), &rows) + if err != nil { + return err + } + if rows == nil { + return nil + } + response, err := p.projectColumns(rows, column, printTransform) + if err != nil { + return err + } + printer := tableprinter.New(os.Stdout) + printer.AutoWrapText = false + printer.BorderLeft = true + printer.BorderRight = true + printer.ColumnSeparator = "|" + printer.HeaderBgColor = tablewriter.BgHiWhiteColor + if printer.Print(response) == -1 { + return fmt.Errorf("failed to print table data") + } + fmt.Printf("%d rows\n", len(rows)) + } + return nil +} diff --git a/flytectl/pull_request_template.md b/flytectl/pull_request_template.md new file mode 100644 index 0000000000..d2becf38b7 --- /dev/null +++ b/flytectl/pull_request_template.md @@ -0,0 +1,26 @@ +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/lyft/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/lyft/flyte/issues/_ From 79e8fddf56351ba76f7743af69ba42e6099f7aa8 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Sat, 10 Oct 2020 12:11:12 -0700 Subject: [PATCH 009/356] Auto rendering of JSON entities using path (#13) --- flytectl/cmd/get/named_entity.go | 11 ++++ flytectl/cmd/get/project.go | 27 ++------ flytectl/cmd/get/project_test.go | 25 -------- flytectl/cmd/get/task.go | 33 +++------- flytectl/cmd/get/types.go | 23 ------- flytectl/cmd/get/workflow.go | 24 ++----- flytectl/config.yaml | 6 +- flytectl/go.mod | 2 +- flytectl/go.sum | 2 + flytectl/printer/printer.go | 105 ++++++++++++++++++------------- flytectl/printer/printer_test.go | 41 ++++++++++++ 11 files changed, 140 insertions(+), 159 deletions(-) create mode 100644 flytectl/cmd/get/named_entity.go delete mode 100644 flytectl/cmd/get/project_test.go delete mode 100644 flytectl/cmd/get/types.go create mode 100644 flytectl/printer/printer_test.go diff --git a/flytectl/cmd/get/named_entity.go b/flytectl/cmd/get/named_entity.go new file mode 100644 index 0000000000..5b0e513778 --- /dev/null +++ b/flytectl/cmd/get/named_entity.go @@ -0,0 +1,11 @@ +package get + +import ( + "github.com/lyft/flytectl/printer" +) + +var entityColumns = []printer.Column{ + {"Domain", "$.domain"}, + {"Name", "$.name"}, + {"Project", "$.project"}, +} diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 84f701d36f..483d310df6 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -2,7 +2,6 @@ package get import ( "context" - "encoding/json" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/lyft/flytestdlib/logger" @@ -12,24 +11,10 @@ import ( "github.com/lyft/flytectl/printer" ) -type PrintableProject struct { - ID string `header:"Id"` - Name string `header:"Name"` - Description string `header:"Description"` -} - -var tableStructure = map[string]string{ - "ID": "$.id", - "Name": "$.name", - "Description": "$.description", -} - -func transformProject(jsonbody []byte) (interface{}, error) { - results := PrintableProject{} - if err := json.Unmarshal(jsonbody, &results); err != nil { - return results, err - } - return results, nil +var projectColumns = []printer.Column{ + {"ID", "$.id"}, + {"Name", "$.name"}, + {"Description", "$.description"}, } func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -44,7 +29,7 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) for _, v := range projects.Projects { if v.Name == name { - err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), v, tableStructure, transformProject) + err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), v, projectColumns) if err != nil { return err } @@ -58,5 +43,5 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projects.Projects, tableStructure, transformProject) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projects.Projects, projectColumns) } diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go deleted file mode 100644 index 3ec6479ca3..0000000000 --- a/flytectl/cmd/get/project_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package get - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_transformProject(t *testing.T) { - t.Run("happy", func(t *testing.T) { - v, err := json.Marshal(map[string]string{ - "Id": "id", - "Name": "name", - "Description": "description", - }) - assert.NoError(t, err) - row, err := transformProject(v) - assert.NoError(t, err) - typedRow, ok := row.(PrintableProject) - assert.True(t, ok) - assert.NotNil(t, typedRow) - assert.Equal(t, "id", typedRow.Id) - }) -} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 84f0c84993..a61a7f8e34 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -2,7 +2,6 @@ package get import ( "context" - "encoding/json" "github.com/lyft/flytestdlib/logger" @@ -15,28 +14,12 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) -type PrintableTask struct { - Version string `header:"Version"` - Name string `header:"Name"` - Type string `header:"Type"` - Discoverable bool `header:"Discoverable"` - DiscoveryVersion string `header:"DiscoveryVersion"` -} - -var taskStructure = map[string]string{ - "Version": "$.id.version", - "Name": "$.id.name", - "Type": "$.closure.compiledTask.template.type", - "Discoverable": "$.closure.compiledTask.template.metadata.discoverable", - "DiscoveryVersion": "$.closure.compiledTask.template.metadata.discovery_version", -} - -var transformTask = func(jsonbody []byte) (interface{}, error) { - results := PrintableTask{} - if err := json.Unmarshal(jsonbody, &results); err != nil { - return results, err - } - return results, nil +var taskColumns = []printer.Column{ + {"Version", "$.id.version"}, + {"Name", "$.id.name"}, + {"Type", "$.closure.compiledTask.template.type"}, + {"Discoverable", "$.closure.compiledTask.template.metadata.discoverable"}, + {"DiscoveryVersion", "$.closure.compiledTask.template.metadata.discovery_version"}, } func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -57,12 +40,12 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte } logger.Debugf(ctx, "Retrieved Task", task.Tasks) - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), task.Tasks, taskStructure, transformTask) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), task.Tasks, taskColumns) } tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), tasks, entityStructure, transformTaskEntity) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), tasks, entityColumns) } diff --git a/flytectl/cmd/get/types.go b/flytectl/cmd/get/types.go deleted file mode 100644 index 3cde02d01d..0000000000 --- a/flytectl/cmd/get/types.go +++ /dev/null @@ -1,23 +0,0 @@ -package get - -import "encoding/json" - -type PrintableNamedEntityIdentifier struct { - Name string `header:"Name"` - Project string `header:"Project"` - Domain string `header:"Domain"` -} - -var entityStructure = map[string]string{ - "Domain": "$.domain", - "Name": "$.name", - "Project": "$.project", -} - -var transformTaskEntity = func(jsonbody []byte) (interface{}, error) { - results := PrintableNamedEntityIdentifier{} - if err := json.Unmarshal(jsonbody, &results); err != nil { - return results, err - } - return results, nil -} diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 90f34b1c1c..7f45b1ac90 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -2,7 +2,6 @@ package get import ( "context" - "encoding/json" "github.com/lyft/flytestdlib/logger" @@ -14,22 +13,9 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) -var workflowStructure = map[string]string{ - "Version": "$.id.version", - "Name": "$.id.name", -} - -type PrintableWorkflow struct { - Name string `header:"Name"` - Version string `header:"Version"` -} - -var transformWorkflow = func(jsonbody []byte) (interface{}, error) { - results := PrintableWorkflow{} - if err := json.Unmarshal(jsonbody, &results); err != nil { - return results, err - } - return results, nil +var workflowColumns = []printer.Column{ + {"Version", "$.id.version"}, + {"Name", "$.id.name"}, } func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -48,7 +34,7 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Workflows)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows.Workflows, workflowStructure, transformWorkflow) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows.Workflows, workflowColumns) } workflows, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListWorkflowIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) @@ -56,5 +42,5 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows, entityStructure, transformTaskEntity) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows, entityColumns) } diff --git a/flytectl/config.yaml b/flytectl/config.yaml index 7bc38d9c18..82a73dac7d 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,8 +1,8 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: http://localhost:30082 - # endpoint: dns:///flyte.lyft.net - insecure: true + # endpoint: http://localhost:30082 + endpoint: dns:///flyte.lyft.net + insecure: false logger: show-source: true level: 1 diff --git a/flytectl/go.mod b/flytectl/go.mod index 4dac235d14..593de7c5cf 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -7,7 +7,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 - github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 + github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/lyft/flyteidl v0.18.1 github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa github.com/mattn/go-runewidth v0.0.9 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index d43baa8c3c..729c0ddc2e 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -186,6 +186,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= +github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP0VaCYafgUw+iS1EfJTDbtAeBcByEFqFrY= github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lyft/flyteidl v0.18.1 h1:COKkZi5k6bQvUYOk5gE70+FJX9/NUn0WOQ1uMrw3Qio= diff --git a/flytectl/printer/printer.go b/flytectl/printer/printer.go index 6ed17d4ef3..a92c234152 100644 --- a/flytectl/printer/printer.go +++ b/flytectl/printer/printer.go @@ -29,6 +29,11 @@ func OutputFormats() []string { return v } +type Column struct { + Header string + JSONPath string +} + type Printer struct{} const ( @@ -36,32 +41,69 @@ const ( tab = "\t" ) -func (p Printer) projectColumns(input []interface{}, column map[string]string, printTransform func(data []byte) (interface{}, error)) ([]interface{}, error) { - responses := make([]interface{}, 0, len(input)) - for _, data := range input { - tableData := make(map[string]interface{}) - - for k := range column { - out, err := jsonpath.Read(data, column[k]) - if err != nil { - out = nil - } - tableData[k] = out - } - jsonbody, err := json.Marshal(tableData) - if err != nil { - return responses, err - } - response, err := printTransform(jsonbody) +// Projects the columns in one row of data from the given JSON using the []Column map +func extractRow(data interface{}, columns []Column) []string { + if columns == nil || data == nil { + return nil + } + tableData := make([]string, 0, len(columns)) + + for _, c := range columns { + out, err := jsonpath.Read(data, c.JSONPath) if err != nil { - return responses, err + out = "" } - responses = append(responses, response) + tableData = append(tableData, fmt.Sprintf("%s", out)) + } + return tableData +} + +// Projects the columns from the given list of JSON elements using the []Column map +// Potential performance problem, as it returns all the rows in memory. +// We could use the render row, but that may lead to misalignment. +// TODO figure out a more optimal way +func projectColumns(input []interface{}, column []Column) ([][]string, error) { + responses := make([][]string, 0, len(input)) + for _, data := range input { + responses = append(responses, extractRow(data, column)) } return responses, nil } -func (p Printer) Print(format OutputFormat, i interface{}, column map[string]string, printTransform func(data []byte) (interface{}, error)) error { +func JSONToTable(b []byte, columns []Column) error { + var jsonRows []interface{} + err := json.Unmarshal(b, &jsonRows) + if err != nil { + return err + } + if jsonRows == nil { + return nil + } + rows, err := projectColumns(jsonRows, columns) + if err != nil { + return err + } + printer := tableprinter.New(os.Stdout) + // TODO make this configurable + printer.AutoWrapText = false + printer.BorderLeft = true + printer.BorderRight = true + printer.ColumnSeparator = "|" + printer.HeaderBgColor = tablewriter.BgHiWhiteColor + headers := make([]string, 0, len(columns)) + positions := make([]int, 0, len(columns)) + for _, c := range columns { + headers = append(headers, c.Header) + positions = append(positions, 30) + } + if r := printer.Render(headers, rows, positions, true); r == -1 { + return fmt.Errorf("failed to render table") + } + fmt.Printf("%d rows\n", len(rows)) + return nil +} + +func (p Printer) Print(format OutputFormat, i interface{}, columns []Column) error { buf := new(bytes.Buffer) encoder := json.NewEncoder(buf) @@ -83,28 +125,7 @@ func (p Printer) Print(format OutputFormat, i interface{}, column map[string]str } fmt.Println(string(v)) default: // Print table - var rows []interface{} - err := json.Unmarshal(buf.Bytes(), &rows) - if err != nil { - return err - } - if rows == nil { - return nil - } - response, err := p.projectColumns(rows, column, printTransform) - if err != nil { - return err - } - printer := tableprinter.New(os.Stdout) - printer.AutoWrapText = false - printer.BorderLeft = true - printer.BorderRight = true - printer.ColumnSeparator = "|" - printer.HeaderBgColor = tablewriter.BgHiWhiteColor - if printer.Print(response) == -1 { - return fmt.Errorf("failed to print table data") - } - fmt.Printf("%d rows\n", len(rows)) + return JSONToTable(buf.Bytes(), columns) } return nil } diff --git a/flytectl/printer/printer_test.go b/flytectl/printer/printer_test.go new file mode 100644 index 0000000000..1876688d85 --- /dev/null +++ b/flytectl/printer/printer_test.go @@ -0,0 +1,41 @@ +package printer + +import ( + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +type Inner struct { + X string `json:"x"` + Y *time.Time `json:"y"` +} + +func TestJSONToTable(t *testing.T) { + d := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) + j := []struct { + A string `json:"a"` + B int `json:"b"` + S *Inner `json:"s"` + }{ + {"hello", 0, &Inner{"x-hello", nil}}, + {"hello", 0, &Inner{"x-hello", &d}}, + {"hello", 0, nil}, + } + + b, err := json.Marshal(j) + assert.NoError(t, err) + assert.NoError(t, JSONToTable(b, []Column{ + {"A", "$.a"}, + {"S", "$.s.y"}, + })) + // Output: + // | A | S | + // ------- ---------------------- + // | hello | %!s() | + // | hello | 2020-01-01T00:00:00Z | + // | hello | | + // 3 rows +} From 09013f7682521040e207c036f492acbb3c12f967 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Mon, 12 Oct 2020 09:25:53 -0700 Subject: [PATCH 010/356] Fix small bug in rendering table (#14) - Missing entities are rendered as nil, instead of empty --- flytectl/printer/printer.go | 2 +- flytectl/printer/printer_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flytectl/printer/printer.go b/flytectl/printer/printer.go index a92c234152..edee1a1df1 100644 --- a/flytectl/printer/printer.go +++ b/flytectl/printer/printer.go @@ -50,7 +50,7 @@ func extractRow(data interface{}, columns []Column) []string { for _, c := range columns { out, err := jsonpath.Read(data, c.JSONPath) - if err != nil { + if err != nil || out == nil { out = "" } tableData = append(tableData, fmt.Sprintf("%s", out)) diff --git a/flytectl/printer/printer_test.go b/flytectl/printer/printer_test.go index 1876688d85..92fb80c0cf 100644 --- a/flytectl/printer/printer_test.go +++ b/flytectl/printer/printer_test.go @@ -13,6 +13,7 @@ type Inner struct { Y *time.Time `json:"y"` } +// TODO Convert this to a Testable Example. For some reason the comparison fails func TestJSONToTable(t *testing.T) { d := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) j := []struct { @@ -34,7 +35,7 @@ func TestJSONToTable(t *testing.T) { // Output: // | A | S | // ------- ---------------------- - // | hello | %!s() | + // | hello | | // | hello | 2020-01-01T00:00:00Z | // | hello | | // 3 rows From 1d96987e886c5eb2344b936f46892f24885c5f50 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Mon, 12 Oct 2020 17:33:51 -0700 Subject: [PATCH 011/356] Task details in table and using jsonpb to print data (#15) --- flytectl/adminutils/iterator.go | 9 ++++ flytectl/cmd/get/project.go | 13 ++++- flytectl/cmd/get/task.go | 23 +++++++-- flytectl/cmd/get/workflow.go | 21 ++++++-- flytectl/printer/printer.go | 85 +++++++++++++++++++++++---------- 5 files changed, 116 insertions(+), 35 deletions(-) diff --git a/flytectl/adminutils/iterator.go b/flytectl/adminutils/iterator.go index 8057491dd9..18368dc012 100644 --- a/flytectl/adminutils/iterator.go +++ b/flytectl/adminutils/iterator.go @@ -3,6 +3,7 @@ package adminutils import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "google.golang.org/grpc" ) @@ -60,3 +61,11 @@ func GetAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, req Li } return allEntities, nil } + +func NamedEntityToProtoMessage(l []*admin.NamedEntityIdentifier) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} \ No newline at end of file diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 483d310df6..46868b4932 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -3,6 +3,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/lyft/flytestdlib/logger" @@ -17,6 +18,14 @@ var projectColumns = []printer.Column{ {"Description", "$.description"}, } +func ProjectToProtoMessages(l []*admin.Project) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} @@ -29,7 +38,7 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) for _, v := range projects.Projects { if v.Name == name { - err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), v, projectColumns) + err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), projectColumns, v) if err != nil { return err } @@ -43,5 +52,5 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projects.Projects, projectColumns) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projectColumns, ProjectToProtoMessages(projects.Projects)...) } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index a61a7f8e34..08344462ba 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,6 +3,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" "github.com/lyft/flytectl/adminutils" @@ -19,7 +20,16 @@ var taskColumns = []printer.Column{ {"Name", "$.id.name"}, {"Type", "$.closure.compiledTask.template.type"}, {"Discoverable", "$.closure.compiledTask.template.metadata.discoverable"}, - {"DiscoveryVersion", "$.closure.compiledTask.template.metadata.discovery_version"}, + {"Discovery Version", "$.closure.compiledTask.template.metadata.discoveryVersion"}, + {"Created At", "$.closure.createdAt"}, +} + +func TaskToProtoMessages(l []*admin.Task) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages } func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -33,19 +43,24 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte Domain: config.GetConfig().Domain, Name: args[0], }, - Limit: 1, + // TODO Sorting and limits should be parameters + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, }) if err != nil { return err } logger.Debugf(ctx, "Retrieved Task", task.Tasks) - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), task.Tasks, taskColumns) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(task.Tasks)...) } tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), tasks, entityColumns) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(tasks)...) } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 7f45b1ac90..e20e9be560 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,6 +3,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" "github.com/lyft/flytectl/adminutils" @@ -16,6 +17,15 @@ import ( var workflowColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, + {"Created At", "$.closure.createdAt"}, +} + +func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages } func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -27,14 +37,19 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC Domain: config.GetConfig().Domain, Name: args[0], }, - Limit: 1, + // TODO Sorting and limits should be parameters + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, }) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Workflows)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows.Workflows, workflowColumns) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows.Workflows)...) } workflows, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListWorkflowIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) @@ -42,5 +57,5 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflows, entityColumns) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(workflows)...) } diff --git a/flytectl/printer/printer.go b/flytectl/printer/printer.go index edee1a1df1..e1d57d3266 100644 --- a/flytectl/printer/printer.go +++ b/flytectl/printer/printer.go @@ -7,8 +7,11 @@ import ( "os" "github.com/ghodss/yaml" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" "github.com/landoop/tableprinter" + "github.com/lyft/flytestdlib/errors" "github.com/yalp/jsonpath" ) @@ -62,24 +65,23 @@ func extractRow(data interface{}, columns []Column) []string { // Potential performance problem, as it returns all the rows in memory. // We could use the render row, but that may lead to misalignment. // TODO figure out a more optimal way -func projectColumns(input []interface{}, column []Column) ([][]string, error) { - responses := make([][]string, 0, len(input)) - for _, data := range input { - responses = append(responses, extractRow(data, column)) +func projectColumns(rows []interface{}, column []Column) ([][]string, error) { + responses := make([][]string, 0, len(rows)) + for _, row := range rows { + responses = append(responses, extractRow(row, column)) } return responses, nil } -func JSONToTable(b []byte, columns []Column) error { - var jsonRows []interface{} - err := json.Unmarshal(b, &jsonRows) - if err != nil { - return err +func JSONToTable(jsonRows []byte, columns []Column) error { + var rawRows []interface{} + if err := json.Unmarshal(jsonRows, &rawRows); err != nil { + return errors.Wrapf("JSONUnmarshalFailure", err, "failed to unmarshal into []interface{} from json") } - if jsonRows == nil { - return nil + if rawRows == nil { + return errors.Errorf("JSONUnmarshalNil", "expected one row or empty rows, received nil") } - rows, err := projectColumns(jsonRows, columns) + rows, err := projectColumns(rawRows, columns) if err != nil { return err } @@ -103,29 +105,60 @@ func JSONToTable(b []byte, columns []Column) error { return nil } -func (p Printer) Print(format OutputFormat, i interface{}, columns []Column) error { - - buf := new(bytes.Buffer) - encoder := json.NewEncoder(buf) - encoder.SetIndent(empty, tab) +func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto.Message) error { - err := encoder.Encode(i) - if err != nil { - return err + printableMessages := make([]*PrintableProto, 0, len(messages)) + for _, m := range messages { + printableMessages = append(printableMessages, &PrintableProto{Message: m}) } // Factory Method for all printer switch format { - case OutputFormatJSON: // Print protobuf to json - fmt.Println(buf.String()) - case OutputFormatYAML: - v, err := yaml.JSONToYAML(buf.Bytes()) + case OutputFormatJSON, OutputFormatYAML: // Print protobuf to json + buf := new(bytes.Buffer) + encoder := json.NewEncoder(buf) + encoder.SetIndent(empty, tab) + var err error + if len(printableMessages) == 1 { + err = encoder.Encode(printableMessages[0]) + } else { + err = encoder.Encode(printableMessages) + } if err != nil { return err } - fmt.Println(string(v)) + if format == OutputFormatJSON { + fmt.Println(buf.String()) + } else { + v, err := yaml.JSONToYAML(buf.Bytes()) + if err != nil { + return err + } + fmt.Println(string(v)) + } default: // Print table - return JSONToTable(buf.Bytes(), columns) + rows, err := json.Marshal(printableMessages) + if err != nil { + return errors.Wrapf("ProtoToJSONFailure", err, "failed to marshal proto messages") + } + return JSONToTable(rows, columns) } return nil } + +type PrintableProto struct { + proto.Message +} + +var marshaller = jsonpb.Marshaler{ + Indent: tab, +} + +func (p PrintableProto) MarshalJSON() ([]byte, error) { + buf := new(bytes.Buffer) + err := marshaller.Marshal(buf, p.Message) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} From 73aa8188c43145dd456f0ea2c2c245d2be3b03d7 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Fri, 23 Oct 2020 04:15:23 +0530 Subject: [PATCH 012/356] launch plan command added (#10) --- flytectl/.github.com/PULL_REQUEST_TEMPLATE.md | 26 ++ .../.github.com/workflow/pull_request.yaml | 0 flytectl/README.md | 6 +- flytectl/cmd/config/config.go | 6 +- flytectl/cmd/core/cmd.go | 8 +- flytectl/cmd/get/get.go | 8 +- flytectl/cmd/get/launch_plan.go | 61 +++ flytectl/cmd/get/named_entity.go | 2 +- flytectl/cmd/get/project.go | 12 +- flytectl/cmd/get/task.go | 7 +- flytectl/cmd/get/workflow.go | 7 +- flytectl/cmd/root.go | 3 +- flytectl/config.yaml | 4 +- flytectl/go.mod | 1 + flytectl/install.sh | 392 ++++++++++++++++++ flytectl/{ => pkg}/adminutils/config.go | 0 flytectl/{ => pkg}/adminutils/config_flags.go | 0 .../{ => pkg}/adminutils/config_flags_test.go | 0 flytectl/{ => pkg}/adminutils/iterator.go | 0 .../{ => pkg}/printer/outputformat_enumer.go | 0 flytectl/{ => pkg}/printer/printer.go | 0 flytectl/{ => pkg}/printer/printer_test.go | 0 22 files changed, 515 insertions(+), 28 deletions(-) create mode 100644 flytectl/.github.com/PULL_REQUEST_TEMPLATE.md create mode 100644 flytectl/.github.com/workflow/pull_request.yaml create mode 100644 flytectl/cmd/get/launch_plan.go create mode 100644 flytectl/install.sh rename flytectl/{ => pkg}/adminutils/config.go (100%) rename flytectl/{ => pkg}/adminutils/config_flags.go (100%) rename flytectl/{ => pkg}/adminutils/config_flags_test.go (100%) rename flytectl/{ => pkg}/adminutils/iterator.go (100%) rename flytectl/{ => pkg}/printer/outputformat_enumer.go (100%) rename flytectl/{ => pkg}/printer/printer.go (100%) rename flytectl/{ => pkg}/printer/printer_test.go (100%) diff --git a/flytectl/.github.com/PULL_REQUEST_TEMPLATE.md b/flytectl/.github.com/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..d2becf38b7 --- /dev/null +++ b/flytectl/.github.com/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/lyft/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/lyft/flyte/issues/_ diff --git a/flytectl/.github.com/workflow/pull_request.yaml b/flytectl/.github.com/workflow/pull_request.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/flytectl/README.md b/flytectl/README.md index dfe4413421..28f29f2a50 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -1,5 +1,9 @@ # flytectl -Flyte CLI +Install Flyte CLI +```bash +curl -s https://github.com/lyft/flytectl/blob/master/install.sh | bash +``` [Contribution guidelines for this project](docs/CONTRIBUTING.md) + diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 406279ec71..bb691b52c0 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -6,7 +6,7 @@ import ( "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/printer" ) //go:generate pflags Config @@ -16,16 +16,19 @@ var ( section = config.MustRegisterSection("root", defaultConfig) ) +// Config hold configration for flytectl flag type Config struct { Project string `json:"project" pflag:",Specifies the project to work on."` Domain string `json:"domain" pflag:",Specified the domain to work on."` Output string `json:"output" pflag:",Specified the output type."` } +// OutputFormat will return output formate func (cfg Config) OutputFormat() (printer.OutputFormat, error) { return printer.OutputFormatString(strings.ToUpper(cfg.Output)) } +// MustOutputFormat will validate the supported output formate and return output formate func (cfg Config) MustOutputFormat() printer.OutputFormat { f, err := cfg.OutputFormat() if err != nil { @@ -34,6 +37,7 @@ func (cfg Config) MustOutputFormat() printer.OutputFormat { return f } +// GetConfig will return the config func GetConfig() *Config { return section.GetConfig().(*Config) } diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 96e62950ba..07d57bb14c 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -13,14 +13,16 @@ import ( type CommandEntry struct { ProjectDomainNotRequired bool CmdFunc CommandFunc + Aliases []string } func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { for resource, cmdEntry := range cmdFuncs { cmd := &cobra.Command{ - Use: resource, - Short: fmt.Sprintf("Retrieves %v resources.", resource), - RunE: generateCommandFunc(cmdEntry), + Use: resource, + Short: fmt.Sprintf("Retrieves %v resources.", resource), + Aliases: cmdEntry.Aliases, + RunE: generateCommandFunc(cmdEntry), } rootCmd.AddCommand(cmd) diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 19e80a4a64..097206c2ff 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -6,6 +6,7 @@ import ( "github.com/spf13/cobra" ) +// CreateGetCommand will return get command func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ Use: "get", @@ -13,9 +14,10 @@ func CreateGetCommand() *cobra.Command { } getResourcesFuncs := map[string]cmdcore.CommandEntry{ - "projects": {CmdFunc: getProjectsFunc, ProjectDomainNotRequired: true}, - "tasks": {CmdFunc: getTaskFunc}, - "workflows": {CmdFunc: getWorkflowFunc}, + "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true}, + "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}}, + "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}}, + "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go new file mode 100644 index 0000000000..0f31e5106b --- /dev/null +++ b/flytectl/cmd/get/launch_plan.go @@ -0,0 +1,61 @@ +package get + +import ( + "context" + "github.com/golang/protobuf/proto" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/adminutils" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flytestdlib/logger" +) + +var launchplanColumns = []printer.Column{ + {"Version", "$.id.version"}, + {"Name", "$.id.name"}, + {"Type", "$.closure.compiledTask.template.type"}, + {"State", "$.spec.state"}, + {"Schedule", "$.spec.entityMetadata.schedule"}, +} + +func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + +func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + launchPlanPrinter := printer.Printer{} + + if len(args) == 1 { + name := args[0] + launchPlan, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ + Limit: 10, + Id: &admin.NamedEntityIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: name, + }, + }) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v excutions", len(launchPlan.LaunchPlans)) + err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, LaunchplanToProtoMessages(launchPlan.LaunchPlans)...) + if err != nil { + return err + } + return nil + } + + launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) + if err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) + return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(launchPlans)...) + return nil +} diff --git a/flytectl/cmd/get/named_entity.go b/flytectl/cmd/get/named_entity.go index 5b0e513778..a8bc1e60c9 100644 --- a/flytectl/cmd/get/named_entity.go +++ b/flytectl/cmd/get/named_entity.go @@ -1,7 +1,7 @@ package get import ( - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/printer" ) var entityColumns = []printer.Column{ diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 46868b4932..93c3395d8e 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -9,7 +9,7 @@ import ( "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/printer" ) var projectColumns = []printer.Column{ @@ -28,10 +28,12 @@ func ProjectToProtoMessages(l []*admin.Project) []proto.Message { func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} - + projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) + if err != nil { + return err + } if len(args) == 1 { name := args[0] - projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) if err != nil { return err } @@ -47,10 +49,6 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } return nil } - projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) - if err != nil { - return err - } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projectColumns, ProjectToProtoMessages(projects.Projects)...) } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 08344462ba..a29d690660 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -2,12 +2,11 @@ package get import ( "context" - "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/adminutils" - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/adminutils" + "github.com/lyft/flytectl/pkg/printer" "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" @@ -45,7 +44,7 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte }, // TODO Sorting and limits should be parameters SortBy: &admin.Sort{ - Key: "created_at", + Key: "created_at", Direction: admin.Sort_DESCENDING, }, Limit: 100, diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index e20e9be560..71b08f4c7b 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -2,14 +2,13 @@ package get import ( "context" - "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/adminutils" "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/adminutils" + "github.com/lyft/flytectl/pkg/printer" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) @@ -39,7 +38,7 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC }, // TODO Sorting and limits should be parameters SortBy: &admin.Sort{ - Key: "created_at", + Key: "created_at", Direction: admin.Sort_DESCENDING, }, Limit: 100, diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index f099db0117..11593ba3c0 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/lyft/flytectl/cmd/get" - "github.com/lyft/flytectl/printer" + "github.com/lyft/flytectl/pkg/printer" stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" @@ -34,7 +34,6 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s", printer.OutputFormats())) - rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index 82a73dac7d..a6b72e5741 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,8 +1,8 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com - # endpoint: http://localhost:30082 endpoint: dns:///flyte.lyft.net - insecure: false + # endpoint: dns:///flyte.lyft.net + insecure: true logger: show-source: true level: 1 diff --git a/flytectl/go.mod b/flytectl/go.mod index 593de7c5cf..e7872d901a 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -12,6 +12,7 @@ require ( github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.1.2 + github.com/sirupsen/logrus v1.4.2 github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 diff --git a/flytectl/install.sh b/flytectl/install.sh new file mode 100644 index 0000000000..bee7affdf3 --- /dev/null +++ b/flytectl/install.sh @@ -0,0 +1,392 @@ +#!/bin/sh +set -e +# Code generated by godownloader on 2020-10-10T20:07:34Z. DO NOT EDIT. +# + +usage() { + this=$1 + cat </dev/null +} +echoerr() { + echo "$@" 1>&2 +} +log_prefix() { + echo "$0" +} +_logp=6 +log_set_priority() { + _logp="$1" +} +log_priority() { + if test -z "$1"; then + echo "$_logp" + return + fi + [ "$1" -le "$_logp" ] +} +log_tag() { + case $1 in + 0) echo "emerg" ;; + 1) echo "alert" ;; + 2) echo "crit" ;; + 3) echo "err" ;; + 4) echo "warning" ;; + 5) echo "notice" ;; + 6) echo "info" ;; + 7) echo "debug" ;; + *) echo "$1" ;; + esac +} +log_debug() { + log_priority 7 || return 0 + echoerr "$(log_prefix)" "$(log_tag 7)" "$@" +} +log_info() { + log_priority 6 || return 0 + echoerr "$(log_prefix)" "$(log_tag 6)" "$@" +} +log_err() { + log_priority 3 || return 0 + echoerr "$(log_prefix)" "$(log_tag 3)" "$@" +} +log_crit() { + log_priority 2 || return 0 + echoerr "$(log_prefix)" "$(log_tag 2)" "$@" +} +uname_os() { + os=$(uname -s | tr '[:upper:]' '[:lower:]') + case "$os" in + cygwin_nt*) os="windows" ;; + mingw*) os="windows" ;; + msys_nt*) os="windows" ;; + esac + echo "$os" +} +uname_arch() { + arch=$(uname -m) + case $arch in + x86_64) arch="amd64" ;; + x86) arch="386" ;; + i686) arch="386" ;; + i386) arch="386" ;; + aarch64) arch="arm64" ;; + armv5*) arch="armv5" ;; + armv6*) arch="armv6" ;; + armv7*) arch="armv7" ;; + esac + echo ${arch} +} +uname_os_check() { + os=$(uname_os) + case "$os" in + darwin) return 0 ;; + dragonfly) return 0 ;; + freebsd) return 0 ;; + linux) return 0 ;; + android) return 0 ;; + nacl) return 0 ;; + netbsd) return 0 ;; + openbsd) return 0 ;; + plan9) return 0 ;; + solaris) return 0 ;; + windows) return 0 ;; + esac + log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib" + return 1 +} +uname_arch_check() { + arch=$(uname_arch) + case "$arch" in + 386) return 0 ;; + amd64) return 0 ;; + arm64) return 0 ;; + armv5) return 0 ;; + armv6) return 0 ;; + armv7) return 0 ;; + ppc64) return 0 ;; + ppc64le) return 0 ;; + mips) return 0 ;; + mipsle) return 0 ;; + mips64) return 0 ;; + mips64le) return 0 ;; + s390x) return 0 ;; + amd64p32) return 0 ;; + esac + log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" + return 1 +} +untar() { + tarball=$1 + case "${tarball}" in + *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; + *.tar) tar --no-same-owner -xf "${tarball}" ;; + *.zip) unzip "${tarball}" ;; + *) + log_err "untar unknown archive format for ${tarball}" + return 1 + ;; + esac +} +http_download_curl() { + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") + else + code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") + fi + if [ "$code" != "200" ]; then + log_debug "http_download_curl received HTTP status $code" + return 1 + fi + return 0 +} +http_download_wget() { + local_file=$1 + source_url=$2 + header=$3 + if [ -z "$header" ]; then + wget -q -O "$local_file" "$source_url" + else + wget -q --header "$header" -O "$local_file" "$source_url" + fi +} +http_download() { + log_debug "http_download $2" + if is_command curl; then + http_download_curl "$@" + return + elif is_command wget; then + http_download_wget "$@" + return + fi + log_crit "http_download unable to find wget or curl" + return 1 +} +http_copy() { + tmp=$(mktemp) + http_download "${tmp}" "$1" "$2" || return 1 + body=$(cat "$tmp") + rm -f "${tmp}" + echo "$body" +} +github_release() { + owner_repo=$1 + version=$2 + test -z "$version" && version="latest" + giturl="https://github.com/${owner_repo}/releases/${version}" + json=$(http_copy "$giturl" "Accept:application/json") + test -z "$json" && return 1 + version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') + test -z "$version" && return 1 + echo "$version" +} +hash_sha256() { + TARGET=${1:-/dev/stdin} + if is_command gsha256sum; then + hash=$(gsha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command sha256sum; then + hash=$(sha256sum "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command shasum; then + hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 + echo "$hash" | cut -d ' ' -f 1 + elif is_command openssl; then + hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 + echo "$hash" | cut -d ' ' -f a + else + log_crit "hash_sha256 unable to find command to compute sha-256 hash" + return 1 + fi +} +hash_sha256_verify() { + TARGET=$1 + checksums=$2 + if [ -z "$checksums" ]; then + log_err "hash_sha256_verify checksum file not specified in arg2" + return 1 + fi + BASENAME=${TARGET##*/} + want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) + if [ -z "$want" ]; then + log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" + return 1 + fi + got=$(hash_sha256 "$TARGET") + if [ "$want" != "$got" ]; then + log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" + return 1 + fi +} +cat /dev/null < Date: Thu, 22 Oct 2020 15:49:09 -0700 Subject: [PATCH 013/356] Proposal update: Additional details on some commands & aux commands (#12) * More updates * Updated readme * more updates * more updates --- flytectl/proposal/README.md | 103 ++++++++++++++++++++++++++++++++---- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index 8b776350b4..e325777082 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -85,45 +85,126 @@ This is a lower priority option as most entities in flyte are immutable and do n # Details of each resource ## Projects -Support +Projects are top level entity in Flyte. You can fetch multiple projects or one project using the CLI. Think about projects like namespaces. + - create +```bash +$ flytectl create projects --name "Human readable Name of project" --id project-id --labels key=value --labels key=value --description "long string" +Alternatively +$ flytectl create project -f project.yaml +``` + +```yaml +project.yaml +name: Human readable project name +id: project-x +labels: + - k: v + - k1: v1 +description: | + Long description +``` - get +```bash +$ flytectl get projects [project-name] [-o yaml | -o json | default -o table] +``` - update +```bash +$ flytectl update projects --id project-x ... +# You can only update one project at a time +``` ## Tasks -Support - - create - get +```bash +$ flytectl get tasks [task-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] +``` + - get specific version and get a template to launch + Create an execution is complicated as the user needs to know all the input types and way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc) +```bash +$ flytectl get task task-name --execution-template -o YAML +yaml.template (TBD) +This is a special version of get launch-plan which can be executed by passing it to create execution. + +``` + - create + - create - update ## Workflows Support - - create - get +```bash +$ flytectl get workflows [workflow-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] +``` + - create - update ## Launch Plans Support - - create - get +```bash +$ flytectl get launch-plans [launchplan-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] +``` + - get specific version and get a template to launch + Create an execution is complicated as the user needs to know all the input types and way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc) +```bash +$ flytectl get launch-plans launch-plan-name --execution-template -o YAML +yaml.template (TBD) +This is a special version of get launch-plan which can be executed by passing it to create execution. + +``` + - create - update ## Execution -Support - - create +Create or retrieve an execution. - get - - update +Get all executions or get a single execution. +```bash +$ flytectl get execution [exec-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] +``` +An interesting feature in get-execution might be to filter within the execution only the execution of a node, or quickly find the ones that have failed. +Visualizing the execution is also challenging. We may want to visualize +We could use https://graphviz.org/ to visualize the DAG. +Within the DAG, NodeExecutions and corresponding task executions need to be fetched. + - create + Create an execution for a LaunchPlan or a Task. This is very interesting as it should accept inputs for the execution. +```bash +$ flytectl create execution -f template.yaml (see get-template command) +OR +$ flytectl create execution --launch-plan "name" --inputs "key=value" +``` - delete - here refers to terminate ## MatchableEntity -Support - - create +Ability to retrieve matchable entity and edit its details - get + - create - update ## Outputs Support - - create - get + - create - update +# No resource interactions + +## Install all examples +Today Flytesnacks houses a few examples for Flyte usage in python. When a user wants to get started with Flyte quickly it would be preferable that all Flytesnacks examples are serialized and stored as artifacts in flytesnacks for every checkin. This can be done for python flytekit using `pyflyte serialize` command. Once they are posted as serialized blobs, flytectl could easily retrieve them and register them in a specific project as desired by the user. + +```bash +$ flytectl examples register-all [cookbook|plugins|--custom-path=remote-path] [--semver semantic-version-of-flytesnacks-examples] --target-project --target-domain +``` +The remote has to follow a protocol. It should be an archive - `tar.gz` with two folders `example-set/ -tasks/*.pb -workflows/*.pb` All the workflows in this path will be installed to the target project / domain + +## Setup a repository with dockerfile for writing code for Flyte +Maybe we should look at `boilr` or some other existing framework to do this +```bash +$ flytectl init project --archetype tensorflow-2.0 +$ flytectl init project --archetype spark-3.0 +$ flytectl init project --archetype xgboost +... +``` +For this to work, all these archetypes should be available in a separate repository. An archetype is essentially a template with dockerfile and folder setup with flytekit.config From 34ed4b0d7d771244a4e3a6c7c8f4e18bd1ee53d0 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:53:04 -0700 Subject: [PATCH 014/356] correct the install command (#16) --- flytectl/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/README.md b/flytectl/README.md index 28f29f2a50..617827a591 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -2,7 +2,7 @@ Install Flyte CLI ```bash -curl -s https://github.com/lyft/flytectl/blob/master/install.sh | bash +curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash ``` [Contribution guidelines for this project](docs/CONTRIBUTING.md) From f24f3a6830afa92b168a9972c9c544ca5fe6fac4 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 4 Jan 2021 14:50:24 -0800 Subject: [PATCH 015/356] Update proposal for create (#18) * addendums * Update README.md --- flytectl/proposal/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index e325777082..c9c2acedd4 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -74,6 +74,35 @@ Eventually we may want to simplify the json and yaml representations but that is The create for Task and Workflow is essential what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that pyflyte, jflyte (other native cli's or code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **flytectl**. Thus flytectl is essential in every flow for the user. + +#### Create Templatization +User-facing SDKs can serialize workflow code to protobuf representations but these will be incomplete. Specifically, the _project_, _domain_, and _version_ parameters must be supplied at create time since these are attributes of the registerable, rather than serialized object. Placeholder template variables including: + +* `{{ .project }}` +* `{{ .domain }}` +* `{{ .version }}` +* [auth](https://github.com/lyft/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L241): including the assumable_iam_role and/or kubernetes_service_account +* the [output_location_prefix](https://github.com/lyft/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L250) + +will be included in the serialized protobuf that must be substituted at **create** time. Eventually the hope is that substitution will be done server-side. + +Furthermore, to reproduce the equivalent **fast-register** code path for the flyte-cli defined in flytekit an equivalent _fast-create_ command must fill in additional template variables in the [task container args](https://github.com/lyft/flyteidl/blob/master/protos/flyteidl/core/tasks.proto#L142). These serialized, templatized args will appear like so: + +``` +"pyflyte-fast-execute", +"--additional-distribution", +"{{ .remote_package_path }}", +"--dest-dir", +"{{ .dest_dir }}", +"--", +"pyflyte-execute", +... +``` + +The `remote package path` is determined by uploading the compressed user code (produced in the serialize step) to a user-specified remote directory (called `additional-distribution-dir` in flytekit). In the case of fast-create the code _version_ arg can be deterministcally assigned when serializing the code. Compressed code archives uploaded as individual files to the remote directory can assume the version name to guarantee uniqueness. + +The `dest dir` is an optional argument specified by the user to designate where code is downloaded at execution time. + ![Registration process](flytectl_interaction.png) ### update From 48e15a66678e89844640f73faa1dadc6e1ac5b59 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Sat, 6 Feb 2021 23:06:23 +0530 Subject: [PATCH 016/356] Register file and Get executions functionality (#22) --- flytectl/cmd/core/cmd.go | 15 +- flytectl/cmd/core/cmd_ctx.go | 4 + flytectl/cmd/get/execution.go | 68 ++++++ flytectl/cmd/get/execution_test.go | 219 ++++++++++++++++++ flytectl/cmd/get/get.go | 1 + flytectl/cmd/get/get_test.go | 36 +++ flytectl/cmd/register/files.go | 61 +++++ flytectl/cmd/register/register.go | 23 ++ flytectl/cmd/register/register_test.go | 24 ++ flytectl/cmd/register/register_util.go | 206 ++++++++++++++++ .../cmd/register/registerfilesconfig_flags.go | 46 ++++ .../registerfilesconfig_flags_test.go | 146 ++++++++++++ flytectl/cmd/root.go | 2 + flytectl/go.mod | 2 +- flytectl/go.sum | 2 + flytectl/pkg/printer/printer.go | 7 +- 16 files changed, 854 insertions(+), 8 deletions(-) create mode 100644 flytectl/cmd/get/execution.go create mode 100644 flytectl/cmd/get/execution_test.go create mode 100644 flytectl/cmd/get/get_test.go create mode 100644 flytectl/cmd/register/files.go create mode 100644 flytectl/cmd/register/register.go create mode 100644 flytectl/cmd/register/register_test.go create mode 100644 flytectl/cmd/register/register_util.go create mode 100755 flytectl/cmd/register/registerfilesconfig_flags.go create mode 100755 flytectl/cmd/register/registerfilesconfig_flags_test.go diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 07d57bb14c..8e2463aad2 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -3,6 +3,7 @@ package cmdcore import ( "context" "fmt" + "github.com/spf13/pflag" "github.com/lyft/flyteidl/clients/go/admin" "github.com/spf13/cobra" @@ -10,10 +11,15 @@ import ( "github.com/lyft/flytectl/cmd/config" ) +type PFlagProvider interface { + GetPFlagSet(prefix string) *pflag.FlagSet +} + type CommandEntry struct { ProjectDomainNotRequired bool CmdFunc CommandFunc Aliases []string + PFlagProvider PFlagProvider } func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { @@ -24,7 +30,9 @@ func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { Aliases: cmdEntry.Aliases, RunE: generateCommandFunc(cmdEntry), } - + if cmdEntry.PFlagProvider != nil { + cmd.Flags().AddFlagSet(cmdEntry.PFlagProvider.GetPFlagSet("")) + } rootCmd.AddCommand(cmd) } } @@ -49,9 +57,6 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] if err != nil { return err } - return cmdEntry.CmdFunc(ctx, args, CommandContext{ - out: cmd.OutOrStdout(), - adminClient: adminClient, - }) + return cmdEntry.CmdFunc(ctx, args, NewCommandContext(adminClient, cmd.OutOrStdout())) } } diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index c39a0d902a..bf593b2b4c 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -12,6 +12,10 @@ type CommandContext struct { out io.Writer } +func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext { + return CommandContext{adminClient: adminClient, out : out} +} + func (c CommandContext) AdminClient() service.AdminServiceClient { return c.adminClient } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go new file mode 100644 index 0000000000..b0a51deade --- /dev/null +++ b/flytectl/cmd/get/execution.go @@ -0,0 +1,68 @@ +package get + +import ( + "context" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/golang/protobuf/proto" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flytestdlib/logger" + + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" +) + +var executionColumns = []printer.Column{ + {"Name", "$.id.name"}, + {"Workflow Name", "$.closure.workflowId.name"}, + {"Type", "$.closure.workflowId.resourceType"}, + {"Phase", "$.closure.phase"}, + {"Started", "$.closure.startedAt"}, + {"Elapsed Time", "$.closure.duration"}, +} + +func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + +func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + adminPrinter := printer.Printer{} + var executions []* admin.Execution + if len(args) > 0 { + name := args[0] + execution, err := cmdCtx.AdminClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: name, + }, + }) + if err != nil { + return err + } + executions = append(executions, execution) + } else { + executionList, err := cmdCtx.AdminClient().ListExecutions(ctx, &admin.ResourceListRequest{ + Limit: 100, + Id: &admin.NamedEntityIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + }) + if err != nil { + return err + } + executions = executionList.Executions + } + logger.Infof(ctx, "Retrieved %v executions", len(executions)) + err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) + if err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go new file mode 100644 index 0000000000..b7a83cbef6 --- /dev/null +++ b/flytectl/cmd/get/execution_test.go @@ -0,0 +1,219 @@ +package get + +import ( + "context" + "errors" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/clients/go/admin/mocks" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" + "io" + "testing" +) + +const projectValue = "dummyProject" +const domainValue = "dummyDomain" +const executionNameValue = "e124" +const launchPlanNameValue = "lp_name" +const launchPlanVersionValue = "lp_version" +const workflowNameValue = "wf_name" +const workflowVersionValue = "wf_version" + +func TestListExecutionFunc(t *testing.T) { + ctx := context.Background() + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = "json" + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + execListRequest := &admin.ResourceListRequest{ + Limit: 100, + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + }, + } + executionResponse := &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: launchPlanNameValue, + Version: launchPlanVersionValue, + }, + }, + Closure: &admin.ExecutionClosure{ + WorkflowId: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: workflowNameValue, + Version: workflowVersionValue, + }, + Phase: core.WorkflowExecution_SUCCEEDED, + }, + } + var executions []*admin.Execution + executions = append(executions, executionResponse) + executionList := &admin.ExecutionList{ + Executions: executions, + } + mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(executionList, nil) + err := getExecutionFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) +} + +func TestListExecutionFuncWithError(t *testing.T) { + ctx := context.Background() + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = "json" + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + execListRequest := &admin.ResourceListRequest{ + Limit: 100, + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + }, + } + executionResponse := &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: launchPlanNameValue, + Version: launchPlanVersionValue, + }, + }, + Closure: &admin.ExecutionClosure{ + WorkflowId: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: workflowNameValue, + Version: workflowVersionValue, + }, + Phase: core.WorkflowExecution_SUCCEEDED, + }, + } + var executions []*admin.Execution + executions = append(executions, executionResponse) + mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(nil, errors.New("Executions NotFound.")) + err := getExecutionFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, err, errors.New("Executions NotFound.")) + mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) +} + +func TestGetExecutionFunc(t *testing.T) { + ctx := context.Background() + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = "json" + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + execGetRequest := &admin.WorkflowExecutionGetRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + } + executionResponse := &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: launchPlanNameValue, + Version: launchPlanVersionValue, + }, + }, + Closure: &admin.ExecutionClosure{ + WorkflowId: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: workflowNameValue, + Version: workflowVersionValue, + }, + Phase: core.WorkflowExecution_SUCCEEDED, + }, + } + var executions []*admin.Execution + executions = append(executions, executionResponse) + args := []string{executionNameValue} + mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(executionResponse, nil) + err := getExecutionFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) +} + +func TestGetExecutionFuncWithError(t *testing.T) { + ctx := context.Background() + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = "json" + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + execGetRequest := &admin.WorkflowExecutionGetRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + } + executionResponse := &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: launchPlanNameValue, + Version: launchPlanVersionValue, + }, + }, + Closure: &admin.ExecutionClosure{ + WorkflowId: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: workflowNameValue, + Version: workflowVersionValue, + }, + Phase: core.WorkflowExecution_SUCCEEDED, + }, + } + var executions []*admin.Execution + executions = append(executions, executionResponse) + args := []string{executionNameValue} + mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(nil, errors.New("Execution NotFound.")) + err := getExecutionFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, err, errors.New("Execution NotFound.")) + mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) +} diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 097206c2ff..ed86e5d0d0 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -18,6 +18,7 @@ func CreateGetCommand() *cobra.Command { "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}}, "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}}, "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}}, + "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go new file mode 100644 index 0000000000..8602d161c7 --- /dev/null +++ b/flytectl/cmd/get/get_test.go @@ -0,0 +1,36 @@ +package get + +import ( + "fmt" + "github.com/stretchr/testify/assert" + "sort" + "testing" +) + +func TestCreateGetCommand(t *testing.T) { + getCommand := CreateGetCommand() + assert.Equal(t, getCommand.Use , "get") + assert.Equal(t, getCommand.Short , "Retrieve various resource.") + fmt.Println(getCommand.Commands()) + assert.Equal(t, len(getCommand.Commands()), 5) + cmdNouns := getCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "execution") + assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) + assert.Equal(t, cmdNouns[0].Short, "Retrieves execution resources.") + assert.Equal(t, cmdNouns[1].Use, "launchplan") + assert.Equal(t, cmdNouns[1].Aliases, []string{"launchplans"}) + assert.Equal(t, cmdNouns[1].Short, "Retrieves launchplan resources.") + assert.Equal(t, cmdNouns[2].Use, "project") + assert.Equal(t, cmdNouns[2].Aliases, []string{"projects"}) + assert.Equal(t, cmdNouns[2].Short, "Retrieves project resources.") + assert.Equal(t, cmdNouns[3].Use, "task") + assert.Equal(t, cmdNouns[3].Aliases, []string{"tasks"}) + assert.Equal(t, cmdNouns[3].Short, "Retrieves task resources.") + assert.Equal(t, cmdNouns[4].Use, "workflow") + assert.Equal(t, cmdNouns[4].Aliases, []string{"workflows"}) + assert.Equal(t, cmdNouns[4].Short, "Retrieves workflow resources.") +} diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go new file mode 100644 index 0000000000..4787a69b27 --- /dev/null +++ b/flytectl/cmd/register/files.go @@ -0,0 +1,61 @@ +package register + +import ( + "context" + "encoding/json" + "fmt" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flytestdlib/logger" + "io/ioutil" + "sort" +) + +func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + files := args + sort.Strings(files) + logger.Infof(ctx, "Parsing files... Total(%v)", len(files)) + logger.Infof(ctx, "Params version %v", filesConfig.version) + var registerResults [] RegisterResult + adminPrinter := printer.Printer{} + fastFail := !filesConfig.skipOnError + logger.Infof(ctx, "Fail fast %v", fastFail) + var _err error + for i := 0; i< len(files) && !(fastFail && _err != nil) ; i++ { + absFilePath := files[i] + var registerResult RegisterResult + logger.Infof(ctx, "Parsing %v", absFilePath) + fileContents, err := ioutil.ReadFile(absFilePath) + if err != nil { + registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)} + registerResults = append(registerResults, registerResult) + _err = err + continue + } + spec, err := unMarshalContents(ctx, fileContents, absFilePath) + if err != nil { + registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} + registerResults = append(registerResults, registerResult) + _err = err + continue + } + if err := hydrateSpec(spec); err != nil { + registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} + registerResults = append(registerResults, registerResult) + _err = err + continue + } + logger.Debugf(ctx, "Hydrated spec : %v", getJsonSpec(spec)) + if err := register(ctx, spec, cmdCtx); err != nil { + registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} + registerResults = append(registerResults, registerResult) + _err = err + continue + } + registerResult = RegisterResult{Name: absFilePath, Status: "Success", Info: "Successfully registered file"} + registerResults = append(registerResults, registerResult) + } + payload, _ := json.Marshal(registerResults) + adminPrinter.JSONToTable(payload, projectColumns) + return nil +} diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go new file mode 100644 index 0000000000..f6381521e4 --- /dev/null +++ b/flytectl/cmd/register/register.go @@ -0,0 +1,23 @@ +package register + +import ( + cmdcore "github.com/lyft/flytectl/cmd/core" + "github.com/spf13/cobra" +) + +// RegisterCommand will return register command +func RegisterCommand() *cobra.Command { + registerCmd := &cobra.Command{ + Use: "register", + Short: "Registers tasks/workflows/launchplans from list of generated serialized files.", + Long: "Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin.\n" + + "Currently these input files are protobuf files generated as output from flytekit serialize.\n" + + "Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1\n" + + "If the entities are already registered with flyte for the same version then registration would fail.\n", + } + registerResourcesFuncs := map[string]cmdcore.CommandEntry{ + "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig}, + } + cmdcore.AddCommands(registerCmd, registerResourcesFuncs) + return registerCmd +} diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go new file mode 100644 index 0000000000..99e4a6964f --- /dev/null +++ b/flytectl/cmd/register/register_test.go @@ -0,0 +1,24 @@ +package register + +import ( + "fmt" + "github.com/stretchr/testify/assert" + "sort" + "testing" +) + +func TestRegisterCommand(t *testing.T) { + registerCommand := RegisterCommand() + assert.Equal(t, registerCommand.Use, "register") + assert.Equal(t, registerCommand.Short, "Registers tasks/workflows/launchplans from list of generated serialized files.") + fmt.Println(registerCommand.Commands()) + assert.Equal(t, len(registerCommand.Commands()), 1) + cmdNouns := registerCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "files") + assert.Equal(t, cmdNouns[0].Aliases, []string{"file"}) + assert.Equal(t, cmdNouns[0].Short, "Retrieves files resources.") +} diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go new file mode 100644 index 0000000000..5149fd1e21 --- /dev/null +++ b/flytectl/cmd/register/register_util.go @@ -0,0 +1,206 @@ +package register + +import ( + "context" + "errors" + "fmt" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flytectl/pkg/printer" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + "github.com/lyft/flytestdlib/logger" +) + +//go:generate pflags RegisterFilesConfig + +var ( + filesConfig = &RegisterFilesConfig{ + version: "v1", + skipOnError: false, + } +) + +const registrationProjectPattern = "{{ registration.project }}" +const registrationDomainPattern = "{{ registration.domain }}" +const registrationVersionPattern = "{{ registration.version }}" + +type RegisterFilesConfig struct { + version string `json:"version" pflag:",version of the entity to be registered with flyte."` + skipOnError bool `json:"skipOnError" pflag:",fail fast when registering files."` +} + +type RegisterResult struct { + Name string + Status string + Info string +} + +var projectColumns = []printer.Column{ + {"Name", "$.Name"}, + {"Status", "$.Status"}, + {"Additional Info", "$.Info"}, +} + +func unMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { + workflowSpec := &admin.WorkflowSpec{} + if err := proto.Unmarshal(fileContents, workflowSpec); err == nil { + return workflowSpec, nil + } + logger.Debugf(ctx, "Failed to unmarshal file %v for workflow type", fname) + taskSpec := &admin.TaskSpec{} + if err := proto.Unmarshal(fileContents, taskSpec); err == nil { + return taskSpec, nil + } + logger.Debugf(ctx, "Failed to unmarshal file %v for task type", fname) + launchPlan := &admin.LaunchPlan{} + if err := proto.Unmarshal(fileContents, launchPlan); err == nil { + return launchPlan, nil + } + logger.Debugf(ctx, "Failed to unmarshal file %v for launch plan type", fname) + return nil, errors.New(fmt.Sprintf("Failed unmarshalling file %v", fname)) + +} + +func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext) error { + switch message.(type) { + case *admin.LaunchPlan: + launchPlan := message.(*admin.LaunchPlan) + _, err := cmdCtx.AdminClient().CreateLaunchPlan(ctx, &admin.LaunchPlanCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: launchPlan.Id.Name, + Version: filesConfig.version, + }, + Spec: launchPlan.Spec, + }) + return err + case *admin.WorkflowSpec: + workflowSpec := message.(*admin.WorkflowSpec) + _, err := cmdCtx.AdminClient().CreateWorkflow(ctx, &admin.WorkflowCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_WORKFLOW, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: workflowSpec.Template.Id.Name, + Version: filesConfig.version, + }, + Spec: workflowSpec, + }) + return err + case *admin.TaskSpec: + taskSpec := message.(*admin.TaskSpec) + _, err := cmdCtx.AdminClient().CreateTask(ctx, &admin.TaskCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: taskSpec.Template.Id.Name, + Version: filesConfig.version, + }, + Spec: taskSpec, + }) + return err + default: + return errors.New(fmt.Sprintf("Failed registering unknown entity %v", message)) + } +} + +func hydrateNode(node *core.Node) error { + targetNode := node.Target + switch targetNode.(type) { + case *core.Node_TaskNode: + taskNodeWrapper := targetNode.(*core.Node_TaskNode) + taskNodeReference := taskNodeWrapper.TaskNode.Reference.(*core.TaskNode_ReferenceId) + hydrateIdentifier(taskNodeReference.ReferenceId) + case *core.Node_WorkflowNode: + workflowNodeWrapper := targetNode.(*core.Node_WorkflowNode) + switch workflowNodeWrapper.WorkflowNode.Reference.(type) { + case *core.WorkflowNode_SubWorkflowRef: + subWorkflowNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_SubWorkflowRef) + hydrateIdentifier(subWorkflowNodeReference.SubWorkflowRef) + case *core.WorkflowNode_LaunchplanRef: + launchPlanNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_LaunchplanRef) + hydrateIdentifier(launchPlanNodeReference.LaunchplanRef) + default: + errors.New(fmt.Sprintf("Unknown type %T", workflowNodeWrapper.WorkflowNode.Reference)) + } + case *core.Node_BranchNode: + branchNodeWrapper := targetNode.(*core.Node_BranchNode) + hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode) + if len(branchNodeWrapper.BranchNode.IfElse.Other) > 0 { + for _, ifBlock := range branchNodeWrapper.BranchNode.IfElse.Other { + hydrateNode(ifBlock.ThenNode) + } + } + switch branchNodeWrapper.BranchNode.IfElse.Default.(type) { + case *core.IfElseBlock_ElseNode: + elseNodeReference := branchNodeWrapper.BranchNode.IfElse.Default.(*core.IfElseBlock_ElseNode) + hydrateNode(elseNodeReference.ElseNode) + case *core.IfElseBlock_Error: + // Do nothing. + default: + return errors.New(fmt.Sprintf("Unknown type %T", branchNodeWrapper.BranchNode.IfElse.Default)) + } + default: + return errors.New(fmt.Sprintf("Unknown type %T", targetNode)) + } + return nil +} + +func hydrateIdentifier(identifier *core.Identifier) { + if identifier.Project == "" || identifier.Project == registrationProjectPattern { + identifier.Project = config.GetConfig().Project + } + if identifier.Domain == "" || identifier.Domain == registrationDomainPattern { + identifier.Domain = config.GetConfig().Domain + } + if identifier.Version == "" || identifier.Version == registrationVersionPattern { + identifier.Version = filesConfig.version + } +} + +func hydrateSpec(message proto.Message) error { + switch message.(type) { + case *admin.LaunchPlan: + launchPlan := message.(*admin.LaunchPlan) + hydrateIdentifier(launchPlan.Spec.WorkflowId) + case *admin.WorkflowSpec: + workflowSpec := message.(*admin.WorkflowSpec) + for _, Noderef := range workflowSpec.Template.Nodes { + if err := hydrateNode(Noderef); err != nil { + return err + } + } + hydrateIdentifier(workflowSpec.Template.Id) + for _, subWorkflow := range workflowSpec.SubWorkflows { + for _, Noderef := range subWorkflow.Nodes { + if err := hydrateNode(Noderef); err != nil { + return err + } + } + hydrateIdentifier(subWorkflow.Id) + } + case *admin.TaskSpec: + taskSpec := message.(*admin.TaskSpec) + hydrateIdentifier(taskSpec.Template.Id) + default: + return errors.New(fmt.Sprintf("Unknown type %T", message)) + } + return nil +} + +func getJsonSpec(message proto.Message) string { + marshaller := jsonpb.Marshaler{ + EnumsAsInts: false, + EmitDefaults: true, + Indent: " ", + OrigName: true, + } + jsonSpec, _ := marshaller.MarshalToString(message) + return jsonSpec +} diff --git a/flytectl/cmd/register/registerfilesconfig_flags.go b/flytectl/cmd/register/registerfilesconfig_flags.go new file mode 100755 index 0000000000..97c5884485 --- /dev/null +++ b/flytectl/cmd/register/registerfilesconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package register + +import ( + "encoding/json" + "fmt" + "reflect" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (RegisterFilesConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (RegisterFilesConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in RegisterFilesConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg RegisterFilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("RegisterFilesConfig", pflag.ExitOnError) + cmdFlags.StringVarP(&(filesConfig.version),fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") + cmdFlags.BoolVarP(&(filesConfig.skipOnError), fmt.Sprintf("%v%v", prefix, "skipOnError"), "s", *new(bool), "fail fast when registering files.") + return cmdFlags +} diff --git a/flytectl/cmd/register/registerfilesconfig_flags_test.go b/flytectl/cmd/register/registerfilesconfig_flags_test.go new file mode 100755 index 0000000000..9c055e83e4 --- /dev/null +++ b/flytectl/cmd/register/registerfilesconfig_flags_test.go @@ -0,0 +1,146 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package register + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsRegisterFilesConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementRegisterFilesConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsRegisterFilesConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookRegisterFilesConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementRegisterFilesConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_RegisterFilesConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookRegisterFilesConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_RegisterFilesConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_RegisterFilesConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_RegisterFilesConfig(val, result)) +} + +func testDecodeSlice_RegisterFilesConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_RegisterFilesConfig(vStringSlice, result)) +} + +func TestRegisterFilesConfig_GetPFlagSet(t *testing.T) { + val := RegisterFilesConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestRegisterFilesConfig_SetFlags(t *testing.T) { + actual := RegisterFilesConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_version", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("version"); err == nil { + assert.Equal(t, string("v1"), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_RegisterFilesConfig(t, fmt.Sprintf("%v", vString), &actual.version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_skipOnError", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("skipOnError"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("skipOnError", testValue) + if vBool, err := cmdFlags.GetBool("skipOnError"); err == nil { + testDecodeJson_RegisterFilesConfig(t, fmt.Sprintf("%v", vBool), &actual.skipOnError) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 11593ba3c0..39f5d25e8d 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/register" "github.com/lyft/flytectl/cmd/get" "github.com/lyft/flytectl/pkg/printer" @@ -37,6 +38,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) + rootCmd.AddCommand(register.RegisterCommand()) config.GetConfig() return rootCmd diff --git a/flytectl/go.mod b/flytectl/go.mod index e7872d901a..b2617470b1 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,7 +8,7 @@ require ( github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/lyft/flyteidl v0.18.1 + github.com/lyft/flyteidl v0.18.11 github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.1.2 diff --git a/flytectl/go.sum b/flytectl/go.sum index 729c0ddc2e..b89512e672 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -192,6 +192,8 @@ github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lyft/flyteidl v0.18.1 h1:COKkZi5k6bQvUYOk5gE70+FJX9/NUn0WOQ1uMrw3Qio= github.com/lyft/flyteidl v0.18.1/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= +github.com/lyft/flyteidl v0.18.11 h1:24NaFYWxANhRbwKfvkgu8axGTWUcl1tgZBqNJutKNJ8= +github.com/lyft/flyteidl v0.18.11/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa h1:anYLG/feMdMv321AfhHGBRd0S3cPLFFTZvJYssjhxFo= github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index e1d57d3266..a41d6bcb92 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -73,7 +73,7 @@ func projectColumns(rows []interface{}, column []Column) ([][]string, error) { return responses, nil } -func JSONToTable(jsonRows []byte, columns []Column) error { +func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error { var rawRows []interface{} if err := json.Unmarshal(jsonRows, &rawRows); err != nil { return errors.Wrapf("JSONUnmarshalFailure", err, "failed to unmarshal into []interface{} from json") @@ -90,6 +90,9 @@ func JSONToTable(jsonRows []byte, columns []Column) error { printer.AutoWrapText = false printer.BorderLeft = true printer.BorderRight = true + printer.BorderBottom = true + printer.BorderTop = true + printer.RowLine = true printer.ColumnSeparator = "|" printer.HeaderBgColor = tablewriter.BgHiWhiteColor headers := make([]string, 0, len(columns)) @@ -141,7 +144,7 @@ func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto. if err != nil { return errors.Wrapf("ProtoToJSONFailure", err, "failed to marshal proto messages") } - return JSONToTable(rows, columns) + return p.JSONToTable(rows, columns) } return nil } From a0561024f6edc82699f004410508c91208fbc0f5 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Sun, 7 Feb 2021 20:43:43 +0530 Subject: [PATCH 017/356] Archive and Update project command (#24) --- flytectl/cmd/root.go | 2 + flytectl/cmd/update/project.go | 52 +++++++ flytectl/cmd/update/project_test.go | 130 ++++++++++++++++ flytectl/cmd/update/projectconfig_flags.go | 47 ++++++ .../cmd/update/projectconfig_flags_test.go | 146 ++++++++++++++++++ flytectl/cmd/update/update.go | 22 +++ flytectl/cmd/update/update_test.go | 21 +++ flytectl/docs/CONTRIBUTING.md | 7 +- 8 files changed, 424 insertions(+), 3 deletions(-) create mode 100644 flytectl/cmd/update/project.go create mode 100644 flytectl/cmd/update/project_test.go create mode 100755 flytectl/cmd/update/projectconfig_flags.go create mode 100755 flytectl/cmd/update/projectconfig_flags_test.go create mode 100644 flytectl/cmd/update/update.go create mode 100644 flytectl/cmd/update/update_test.go diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 39f5d25e8d..7dca669327 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/update" "github.com/lyft/flytectl/cmd/register" "github.com/lyft/flytectl/cmd/get" @@ -38,6 +39,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) + rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RegisterCommand()) config.GetConfig() diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go new file mode 100644 index 0000000000..b00d91bf59 --- /dev/null +++ b/flytectl/cmd/update/project.go @@ -0,0 +1,52 @@ +package update + +import ( + "context" + "fmt" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" +) + +//go:generate pflags ProjectConfig + +// Config hold configuration for project update flags. +type ProjectConfig struct { + ActivateProject bool `json:"activateProject" pflag:",Activates the project specified as argument."` + ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` +} + +var ( + projectConfig = &ProjectConfig{} + errProjectNotFound = "Project %v not found\n" + errInvalidUpdate = "Invalid state passed. Specify either activate or archive\n" + errFailedUpdate = "Project %v failed to get updated to %v state due to %v\n" +) + +func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + id := config.GetConfig().Project + if id == "" { + fmt.Printf(errProjectNotFound, id) + return nil + } + archiveProject := projectConfig.ArchiveProject + activateProject := projectConfig.ActivateProject + if activateProject == archiveProject { + fmt.Printf(errInvalidUpdate) + return nil + } + projectState := admin.Project_ACTIVE + if archiveProject { + projectState = admin.Project_ARCHIVED + } + _, err := cmdCtx.AdminClient().UpdateProject(ctx, &admin.Project{ + Id: id, + State: projectState, + }) + if err != nil { + fmt.Printf(errFailedUpdate, id, projectState, err) + return nil + } + fmt.Printf("Project %v updated to %v state\n", id, projectState) + return nil +} diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go new file mode 100644 index 0000000000..cf9fe7678b --- /dev/null +++ b/flytectl/cmd/update/project_test.go @@ -0,0 +1,130 @@ +package update + +import ( + "bytes" + "context" + "errors" + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/clients/go/admin/mocks" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "io" + "log" + "os" + "testing" +) + +const projectValue = "dummyProject" + +var ( + reader *os.File + writer *os.File + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + mockOutStream io.Writer + args []string + cmdCtx cmdCore.CommandContext + projectUpdateRequest *admin.Project + stdOut *os.File + stderr *os.File +) + +func setup() { + reader, writer, err = os.Pipe() + if err != nil { + panic(err) + } + stdOut = os.Stdout + stderr = os.Stderr + os.Stdout = writer + os.Stderr = writer + log.SetOutput(writer) + config.GetConfig().Project = projectValue + mockClient = new(mocks.AdminServiceClient) + mockOutStream = writer + cmdCtx = cmdCore.NewCommandContext(mockClient, mockOutStream) + projectUpdateRequest = &admin.Project{ + Id: projectValue, + State: admin.Project_ACTIVE, + } +} + +func teardownAndVerify(t *testing.T, expectedLog string) { + writer.Close() + os.Stdout = stdOut + os.Stderr = stderr + var buf bytes.Buffer + io.Copy(&buf, reader) + assert.Equal(t, expectedLog, buf.String()) +} + +func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProject *bool, newActivateVal bool) { + *archiveProject = newArchiveVal + *activateProject = newActivateVal +} + +func TestActivateProjectFunc(t *testing.T) { + setup() + defer teardownAndVerify(t, "Project dummyProject updated to ACTIVE state\n") + modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + updateProjectsFunc(ctx, args, cmdCtx) + mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} + +func TestActivateProjectFuncWithError(t *testing.T) { + setup() + defer teardownAndVerify(t, "Project dummyProject failed to get updated to ACTIVE state due to Error Updating Project\n") + modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) + updateProjectsFunc(ctx, args, cmdCtx) + mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} + +func TestArchiveProjectFunc(t *testing.T) { + setup() + defer teardownAndVerify(t, "Project dummyProject updated to ARCHIVED state\n") + modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) + projectUpdateRequest := &admin.Project{ + Id: projectValue, + State: admin.Project_ARCHIVED, + } + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} + +func TestArchiveProjectFuncWithError(t *testing.T) { + setup() + defer teardownAndVerify(t, "Project dummyProject failed to get updated to ARCHIVED state due to Error Updating Project\n") + modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) + projectUpdateRequest := &admin.Project{ + Id: projectValue, + State: admin.Project_ARCHIVED, + } + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) + updateProjectsFunc(ctx, args, cmdCtx) + mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} + +func TestEmptyProjectInput(t *testing.T) { + setup() + defer teardownAndVerify(t, "Project not found\n") + config.GetConfig().Project = "" + modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + updateProjectsFunc(ctx, args, cmdCtx) + mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} + +func TestInvalidInput(t *testing.T) { + setup() + defer teardownAndVerify(t, "Invalid state passed. Specify either activate or archive\n") + modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), false) + mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + updateProjectsFunc(ctx, args, cmdCtx) + mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) +} diff --git a/flytectl/cmd/update/projectconfig_flags.go b/flytectl/cmd/update/projectconfig_flags.go new file mode 100755 index 0000000000..e214a4fe1f --- /dev/null +++ b/flytectl/cmd/update/projectconfig_flags.go @@ -0,0 +1,47 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package update + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ProjectConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ProjectConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) + cmdFlags.BoolVarP(&(projectConfig.ActivateProject), fmt.Sprintf("%v%v", prefix, "activateProject"),"t", *new(bool), "Activates the project specified as argument.") + cmdFlags.BoolVarP(&(projectConfig.ArchiveProject), fmt.Sprintf("%v%v", prefix, "archiveProject"), "a", *new(bool), "Archives the project specified as argument.") + return cmdFlags +} diff --git a/flytectl/cmd/update/projectconfig_flags_test.go b/flytectl/cmd/update/projectconfig_flags_test.go new file mode 100755 index 0000000000..4a13ad3aff --- /dev/null +++ b/flytectl/cmd/update/projectconfig_flags_test.go @@ -0,0 +1,146 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package update + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsProjectConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementProjectConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsProjectConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookProjectConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementProjectConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_ProjectConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookProjectConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_ProjectConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_ProjectConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ProjectConfig(val, result)) +} + +func testDecodeSlice_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ProjectConfig(vStringSlice, result)) +} + +func TestProjectConfig_GetPFlagSet(t *testing.T) { + val := ProjectConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestProjectConfig_SetFlags(t *testing.T) { + actual := ProjectConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_activateProject", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("activateProject"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activateProject", testValue) + if vBool, err := cmdFlags.GetBool("activateProject"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.ActivateProject) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_archiveProject", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("archiveProject"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archiveProject", testValue) + if vBool, err := cmdFlags.GetBool("archiveProject"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.ArchiveProject) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go new file mode 100644 index 0000000000..ac83b69200 --- /dev/null +++ b/flytectl/cmd/update/update.go @@ -0,0 +1,22 @@ +package update + +import ( + cmdcore "github.com/lyft/flytectl/cmd/core" + + "github.com/spf13/cobra" +) + +// CreateUpdateCommand will return update command +func CreateUpdateCommand() *cobra.Command { + updateCmd := &cobra.Command{ + Use: "update", + Short: "Update various resources.", + } + + updateResourcesFuncs := map[string]cmdcore.CommandEntry{ + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig}, + } + + cmdcore.AddCommands(updateCmd, updateResourcesFuncs) + return updateCmd +} diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go new file mode 100644 index 0000000000..749d00a6a0 --- /dev/null +++ b/flytectl/cmd/update/update_test.go @@ -0,0 +1,21 @@ +package update + +import ( + "github.com/stretchr/testify/assert" + "sort" + "testing" +) + +func TestUpdateCommand(t *testing.T) { + updateCommand := CreateUpdateCommand() + assert.Equal(t, updateCommand.Use , "update") + assert.Equal(t, updateCommand.Short , "Update various resources.") + assert.Equal(t, len(updateCommand.Commands()), 1) + cmdNouns := updateCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "project") + assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) +} diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md index 0249359719..391bee6d82 100644 --- a/flytectl/docs/CONTRIBUTING.md +++ b/flytectl/docs/CONTRIBUTING.md @@ -4,12 +4,13 @@ A local cluster can be setup via --> https://lyft.github.io/flyte/administrator/ Then, if having trouble connecting to local cluster see the following: + #1) Find/Set/Verify gRPC port for your local Flyte service: FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec.ports[] | select(.name=="grpc").port'` -#2) Setup Port forwarding: kubectl port-forward -n flyte service/flyteadmin 8081:$FLYTECTL_GRPC_PORT - -and #3) Update config line in https://github.com/lyft/flytectl/blob/master/config.yaml to dns:///localhost:8081 +#2) Setup Port forwarding: kubectl port-forward -n flyte service/flyteadmin 8081:$FLYTECTL_GRPC_PORT +#3) Update config line in https://github.com/lyft/flytectl/blob/master/config.yaml to dns:///localhost:8081 +#4) All new flags introduced for flytectl commands and subcommands should be camelcased. eg: bin/flytectl update project -p flytesnacks --activateProject From 62dfd32081cbec23f100210225defccd4fdad012 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:51:09 -0800 Subject: [PATCH 018/356] Documentation setup for FlyteCTL (#26) * Documentation setup for FlyteCTL * Conf updated --- flytectl/.gitignore | 1 + flytectl/.readthedocs.yml | 16 ++ flytectl/Makefile | 12 ++ flytectl/doc-requirements.in | 5 + flytectl/doc-requirements.txt | 88 +++++++++ flytectl/docs/Makefile | 20 ++ flytectl/docs/make.bat | 36 ++++ flytectl/docs/source/conf.py | 181 ++++++++++++++++++ flytectl/docs/source/delete.rst | 3 + .../source/flyte_circle_gradient_1_4x4.png | Bin 0 -> 70985 bytes flytectl/docs/source/get.rst | 3 + flytectl/docs/source/index.rst | 76 ++++++++ flytectl/docs/source/launchplan.rst | 3 + flytectl/docs/source/register.rst | 3 + flytectl/docs/source/tasks.rst | 4 + flytectl/docs/source/update.rst | 3 + flytectl/docs/source/workflow.rst | 4 + 17 files changed, 458 insertions(+) create mode 100644 flytectl/.readthedocs.yml create mode 100644 flytectl/doc-requirements.in create mode 100644 flytectl/doc-requirements.txt create mode 100644 flytectl/docs/Makefile create mode 100644 flytectl/docs/make.bat create mode 100644 flytectl/docs/source/conf.py create mode 100644 flytectl/docs/source/delete.rst create mode 100644 flytectl/docs/source/flyte_circle_gradient_1_4x4.png create mode 100644 flytectl/docs/source/get.rst create mode 100644 flytectl/docs/source/index.rst create mode 100644 flytectl/docs/source/launchplan.rst create mode 100644 flytectl/docs/source/register.rst create mode 100644 flytectl/docs/source/tasks.rst create mode 100644 flytectl/docs/source/update.rst create mode 100644 flytectl/docs/source/workflow.rst diff --git a/flytectl/.gitignore b/flytectl/.gitignore index fb3907b444..45283c9a91 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -5,3 +5,4 @@ bin .DS_Store _test ./config.yaml +docs/build/* diff --git a/flytectl/.readthedocs.yml b/flytectl/.readthedocs.yml new file mode 100644 index 0000000000..1c0f039d3a --- /dev/null +++ b/flytectl/.readthedocs.yml @@ -0,0 +1,16 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.8 + install: + - requirements: doc-requirements.txt diff --git a/flytectl/Makefile b/flytectl/Makefile index 5a8e04ea54..edf00f07ea 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -1,6 +1,10 @@ export REPOSITORY=flytectl include boilerplate/lyft/golang_test_targets/Makefile +define PIP_COMPILE +pip-compile $(1) --upgrade --verbose +endef + generate: go test github.com/lyft/flytectl/cmd --update @@ -10,3 +14,11 @@ compile: .PHONY: update_boilerplate update_boilerplate: @boilerplate/update.sh + +.PHONY: install-piptools +install-piptools: + pip install -U pip-tools + +.PHONY: doc-requirements.txt +doc-requirements.txt: doc-requirements.in install-piptools + $(call PIP_COMPILE,doc-requirements.in) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in new file mode 100644 index 0000000000..cdb6725a1b --- /dev/null +++ b/flytectl/doc-requirements.in @@ -0,0 +1,5 @@ +sphinx +sphinx-prompt +sphinx-material +sphinx-code-include +sphinx-copybutton diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt new file mode 100644 index 0000000000..d5a288dbd0 --- /dev/null +++ b/flytectl/doc-requirements.txt @@ -0,0 +1,88 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile doc-requirements.in +# +alabaster==0.7.12 + # via sphinx +babel==2.9.0 + # via sphinx +beautifulsoup4==4.9.3 + # via + # sphinx-code-include + # sphinx-material +certifi==2020.12.5 + # via requests +chardet==4.0.0 + # via requests +css-html-js-minify==2.5.5 + # via sphinx-material +docutils==0.16 + # via sphinx +idna==2.10 + # via requests +imagesize==1.2.0 + # via sphinx +jinja2==2.11.3 + # via sphinx +lxml==4.6.2 + # via sphinx-material +markupsafe==1.1.1 + # via jinja2 +packaging==20.9 + # via sphinx +pygments==2.7.4 + # via + # sphinx + # sphinx-prompt +pyparsing==2.4.7 + # via packaging +python-slugify[unidecode]==4.0.1 + # via sphinx-material +pytz==2021.1 + # via babel +requests==2.25.1 + # via sphinx +six==1.15.0 + # via sphinx-code-include +snowballstemmer==2.1.0 + # via sphinx +soupsieve==2.1 + # via beautifulsoup4 +sphinx-code-include==1.1.1 + # via -r doc-requirements.in +sphinx-copybutton==0.3.1 + # via -r doc-requirements.in +sphinx-material==0.0.32 + # via -r doc-requirements.in +sphinx-prompt==1.3.0 + # via -r doc-requirements.in +sphinx==3.4.3 + # via + # -r doc-requirements.in + # sphinx-code-include + # sphinx-copybutton + # sphinx-material + # sphinx-prompt +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==1.0.3 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.4 + # via sphinx +text-unidecode==1.3 + # via python-slugify +unidecode==1.2.0 + # via python-slugify +urllib3==1.26.3 + # via requests + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/flytectl/docs/Makefile b/flytectl/docs/Makefile new file mode 100644 index 0000000000..e61723ad76 --- /dev/null +++ b/flytectl/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = flytekit +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/flytectl/docs/make.bat b/flytectl/docs/make.bat new file mode 100644 index 0000000000..47d656bb74 --- /dev/null +++ b/flytectl/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=simpleble + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py new file mode 100644 index 0000000000..29fba17e72 --- /dev/null +++ b/flytectl/docs/source/conf.py @@ -0,0 +1,181 @@ +# -*- coding: utf-8 -*- +# +# Configuration file for the Sphinx documentation builder. +# +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/stable/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import re + + +# -- Project information ----------------------------------------------------- + +project = "Flytectl" +copyright = "2021, Flyte" +author = "Flyte" + +# The full version, including alpha/beta/rc tags +release = re.sub('^v', '', os.popen('git describe').read().strip()) +version = release + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autosummary", + "sphinx.ext.autosectionlabel", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinx.ext.doctest", + "sphinx.ext.coverage", + "sphinx-prompt", + "sphinx_copybutton", +] + +# build the templated autosummary files +autosummary_generate = True + +# autosectionlabel throws warnings if section names are duplicated. +# The following tells autosectionlabel to not throw a warning for +# duplicated section names that are in different documents. +autosectionlabel_prefix_document = True + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = ".rst" + +# The master toctree document. +master_doc = "index" + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path . +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_material" +html_logo = "flyte_circle_gradient_1_4x4.png" +html_theme_options = { + # Set the name of the project to appear in the navigation. + "nav_title": "Flyte", + # Set you GA account ID to enable tracking + "google_analytics_account": "G-YQL24L5CKY", + # Specify a base_url used to generate sitemap.xml. If not + # specified, then no sitemap will be built. + "base_url": "https://github.com/flyteorg/flytectl", + # Set the color and the accent color + "color_primary": "deep-purple", + "color_accent": "blue", + # Set the repo location to get a badge with stats + "repo_url": "https://github.com/flyteorg/flyte/", + "repo_name": "flyte", + # Visible levels of the global TOC; -1 means unlimited + "globaltoc_depth": 1, + # If False, expand all TOC entries + "globaltoc_collapse": False, + # If True, show hidden TOC entries + "globaltoc_includehidden": False, +} + +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]} + + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = [] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# + + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "flytectldoc" + + +# -- Options for LaTeX output ------------------------------------------------ + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, "flytectl.tex", "flytectl Documentation", "Flyte", "manual"), +] + + +# -- Options for manual page output ------------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [(master_doc, "flytectl", "flytectl Documentation", [author], 1)] + + +# -- Options for Texinfo output ---------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + master_doc, + "flytectl", + "flytectl Documentation", + author, + "flytectl", + "The one CLI for flyte.", + "Miscellaneous", + ), +] diff --git a/flytectl/docs/source/delete.rst b/flytectl/docs/source/delete.rst new file mode 100644 index 0000000000..3fbaf86d4c --- /dev/null +++ b/flytectl/docs/source/delete.rst @@ -0,0 +1,3 @@ +######################### +Get - Retrieve Entities +######################### diff --git a/flytectl/docs/source/flyte_circle_gradient_1_4x4.png b/flytectl/docs/source/flyte_circle_gradient_1_4x4.png new file mode 100644 index 0000000000000000000000000000000000000000..49cdbbbc3419c1c65ceeb3f11596762e0c60faa4 GIT binary patch literal 70985 zcmb5WcRbbY{|9bm6dkKl$}x@=vWm<@_B@qJB_p%4OUXJ1$*#jWi0p_o2xVrKbtGFz zMw~J;j$<6o_+3Z${rTLV@B00IfAqL}bk{lWab3^Xb6sN2S{iZfJ+ha9fq~1!SpPf& z1CtK@7dtBh1B1)c5f$(s4jSucM zic01w^(C)fz8bf(9ebbOKUXDn?wP)H$1#-uQ2ZUQ2Q~ttDz1@nhlj3|va=xX#lWrkz37$rWWKR|OFKUiAC=6a8$0kW2TQ zWU>#(oKKRnf+aE-#3+RkNP^3zm%Lohhxd!03JJgC;v#xZk|gbTd;2O5(w5MWrEOA^ z*Ka~Yu=nMb?DV>gix@uBk5T%{%W*bI%IP?5wO+$5P(~Hku%5XjR zK(KGd6Lpa0@js#*8I;)8-;JuN4%uiuH8Va>SYAMB79Ry)|M<_x2#-#nW+KOrcWsY5 zy~1yHAn}>9ij3jHmFh`)qURFH#zNcPJS2|tkSe3tih|}B(@R_O@Wa;e&-8EB>ND|+ zn|^lQVO#n>JR1DneysZZQs4Ld?+hega{+VCmQZTjWAfx(@u0`*UbthFUM{Xa^^guSL(!x%nLNO&{Ec8AHz@<}TdVl; zrf%?=U(4*vY-DSOz$5TF#CC6ht7Fl^-)oj9i`qa`ywu}t-x-H*vmYlyhD3krAbyHl z-Vl8Mz7`RweysBDbhoCMwt5`zbCDPpDbpm8j>qYT*b#;0I`_-Y@Rh&>h2gP`9~}_$ zR86A&BQkp=(NFIDe&PkYsfY?jn};7h6=RpgO=+Iw5##7*`iE0?Z~sx*^nnXo2gJ7PSrwk-_TUtr1nlz2u`;)m^aG~`YdA`*j=->#Y@Y5d>)E1*yD^W%n?l=6SByMC?|E0u@XI!!^t0hV4&HH zOMWRZ=h@Z>?vUwMSwi+rXx``f^vmf8y*(3k&tvw@lE=LFRUtnDUr0aR$ir=2P8@!z za~AauZ={e9*^oziS+t*Rt9~O-B^9;}=1QGoO)w69rq7X}0e_d*@Ua|sH}I9FRxS?h zCD+>@fxx#lPUaui<#s)dH^L;6lNz@u&d4Q8>qvF4g*bZ(QLse^ywlseFGSd%qGuYY za#wxM6yd*CWUyCfti$ zFr=@+r+@(p0uoe#IrsgC9JY%g+A2Q^$eUx}^ zFdB!3jnICKXXP44KGVk;!*tFS*q!g24$LpaYS}$It9+8Q+Ki3*gg3&bDoZqc#X!Zn zc#e7Pb>Y;UE21z@^M`P^PEawNn{Y&AeSjHE?_7ZmxCEu-+newut`3=&;`ogfx)SZQERw)%&7gO7n`fmp|Y z3H@pem#8a`*Ndksh?j!C_QIyfScBz4)cGxs}(He`G8x&71elC|zx2z#)5?KE(RRVDb0`cjSa-Pz|2_YKHhXOm)*!P_>^|Gt)Z z4A;w-zLTEz$=Z$_aB`I+l8A3eRn3*GjdIHQFgJmc3orTba*ro-1!4V#c9m$_IOc!O8^SFbZ8U$%p>y%>q3!eZ!WszPdN7zOeB zM*;PN1Lsz5mAOsC4|Qb^$q9j)Vx!2Zm*8^fi!Z*8emR1DM%TJ*r(cIP+|NBZ42dBd z^Gb-zxRzPmJHU*E4jM?)R(<+?h2bt9n?!H3_MS>A;lS$W{&THY=?|vjcDK7!a(?F`i|w1cW*7VzQrQD+0wH?vRvdvNpKGmTUhvP0N6hreV5aLims#`z`%#(`pQCaKU9-$ghpV!N zA?u7~G6DQmngG~u0y^<5>Qz`?Tcnm<=WFrY6OYMl6=n?pNJZbDV1s zB68dl_cq2G5pD-IK&9=HL-jJb(#X#HB)rkKJD%Rxpqm^9H#6y1d+PSGk=u;DlYiRK z@I!^pg}A-Th@iKSR5FX6B7ixViEm%C+jUct_soxia7a^p_m6_tQS~Y(3De;mD`a=# z1hsX2_0+c1o847&?H|+gY`>N$Hfk>h z+C(2PYg1r<5(-eX_w4oax44LmO$l|z$egp!2irbr@%p{t2jj{WOwEq7F5sVID{G3s z)D0%zWq)x0+>N)%<7N*$&2Wgfo;4@hBAS{x7vVx)>Mu}-zOjANM|PeT9NSE;*QRAQ zRGg^ShPvFKUq)_w7y3C=;ll~aW61s&0p0qc;B&If9{f&dN5ih4FLRU_^{BkT0N$hW zTd>IHPA6n5RT!XsA3O91S!Z+S%30I4YqoS-q~4nW7`m0b9%AIH?OFOpb*N=-87 z+|s3KCgvgD$^;Cs9mhhXpW@bbipn!%k?krY$(r$ZSa#|^Iw8#n(INfs7p4TA&Y995 zhw0~#%6!3$5;Oao-qIxBR=km|J<(6=>wAXCsid<~UH7Y`_d4cK!>|T;Jbka z6yq#Z7{HfrMLL=I(}%z__{3gN)znB@lD;i2-}C&kycX7UGcgQhJQIY=-;c$xumw!( z{F&%|`4?vL?TC6muj(UV@`al_iBlIjP7hp3Z$~>ABPgBC_fg|dk7kewmCY30bF5hK zj9ESxznPmZUMSlMzTty`aZXi>er-eq_QTCh4WCE`EjApXk9!lo?1$1np%UVJ%*b|B zFC_UDmYft*E=o$opH6^Uhclp4$j%3F)Eqf^lv%LsL2>ge-UVsX=*4g9>5FS=?s6oa zD%5!;MISA^J&S^~HHKeu7sHh^B%kwOp=Rt>pX*CPKU5s^GX1!IfjB}g@W=4JLJ#?= zdo9&9)CcWLjpr4Y^xY#BD_vXB<>k{Q-aTBh*duJ0NWQ!=e5qGw1I%$=^F6e#RC1&N zGF%Zq5q$@YMzt3u?mKSd{#Xt12Qm7=cK7#hx2J=Cs;b$#!`lf&M zs?@naupjtKh(iA2JHd9-u@B--T}jXu@{0Yb&~;Pu`-S-{<}dC3Pq2t}AGC(SF)Xx) z8#E~H^oDH%>D|_4*;qOi(g$xYxJ3;EJ=grnqA6-_0-m@JIcf5qJqmDIj4FVUju?|c zGc6as9=6$)DusHy|)SoWC5x0*@#%MUsDx&t!~}V=G$+ zbEIrz(sT0i`)ts0?7_5|)wC|o9 z9WFy(iR^I;WzB5?tgs`(H+^oiGQRxKX~~?ub!g}%L}-zMbbihDZ=gXr$+J3g!t)E= z6L04f5_l!waSdbs#ahxPEtW%hv|2k;bF>pG(_gcCl9na{uWFumiWM(ruqa*p_7sUD zJr*TN$0|naoM9vEse_6+P3Pd-2zr5s^(iseg}k1sGDL*UKZ~a+3EZ?%%nPhJD9sjV z_5$)Qntb^q)#mNo7zBER#M6}8WTZxz4s;qnwu}UKWX1_tOUStOXf0@94lZ~BFWqZWhmO@)qk-ZEc9s-yHksKpp&Rkwu3bRd__DtL2IM?uFC5{ zcRbF^k>4X-zLhUDsnz3Z-?rz7E5mEg@i7e3bm*Sf&WPpjofA!Nrqhy ze5E_Frr~?)#t|5JC1IUo>a~gi<65@~pL~Q8oVndo$qGlO0R&otoAGIf(J=WYMO`MD zKNkBx^09uiSICc2ie25|+2T)tn!SY!ZW#hzCkfL`_4DqTs9)VDC@$I240tc!i93~D z683lMpZCup2YMt$@J9KZq{Bpci?jhY=oagyx2E0amyb^KAg~5f5eyv}GOp*7wR}rRDC7q!c)=RXjgb2$_lJGJalUS^T_C7u8 zqtm|UkMorS7Oz#%&Bzg#ko^+Iqe$I&;yidST%9kQdC01Cl3k_F`tb<*W;B_9r*S6Z zPI~>OfA$gkC)qkNGCF)xIK!Foh2LT#aM47vGp}JL51k9`U(=8eV5Y`=CvsG9C_k30 zjcW|iyC*k#4bc)VHcT8>An}NdI#^GBW5XyCA2%Q=6yFC#7Sn5tPleM)D?(cDrof=5 zJ`|uX4ty|1UYiyE$QSUl;bdDFS>UIFr4v@c(UcSw)7>n9lwwV7FQSU0iD$HPJUa&X z962!tbYb*g*%AOi^e>-&;n7ox*;Cz>;!p&+ej?=7cVR6NUXGrK_U{$H1^e!NP&X@H zwC6eXdjR`yr4*HZD+?jd2ix80Kv4)uv%LLtXZldSqz>3~sh`1hs^+6Vm}XQfZxMW37)|J+ z06=5CA%V{$z4)`@bp=J{9aSMCVb+dxDrHD?>pb?>#($#J>QGt=9~PAgTiO}QTt&45(9HhC0{>tWh+UB&40C*n87O#1eOs9Etm2fPv9hQVAtH@Pvt{jd-YrYL`_1bUJ<5&27MH^I9?GF zBDr>P#zgeLV`2t=`GbR6PkKc;{80rXoylqBLD-!q10DYsba}&@r+(qv9&RvxzBGIp zyR>h+3I0KIY2U4CeWroiBXyoTk(PwmApf-Ywm=6DT_QL+NYT+YA23~(ttYVcFm=iG zXVBwAqQKZttD8XcXEPDR1p2Jt%8KLJ1*m!EsdA-KW_WG|tDyUSjTsf{B-Bo*;n09% zOi<`m+1g6aiSNEk8`l${JT!~=dvP20bygN^IS69BI0*mC*@oGujzJToEa%)KlT#&8 zNQpgcMEL-!`m1DeQWF^K0;v@kXkt^_Q|HclN(u5u*w)kFIKZJ(I+i>~OBPQ1Q-b|; zOk;UXk>MN&RYMld-eAOgQ= zBI-z{nCD;6B2hS#$(%LY)_~5PUq?r(V6!`%zJy<+Jt+y9RPQys`LNl@K@RI&e&=?+ zL0k2!8L{$|54s4|x3EuMj_=wkVp+@J*LA`dFdrs$Ims-;$*`82i&$MwlIqk^oWI@M z_%KPW_b7*qXONFuqxKlC1ZW9YcGkCvWMMdOVb!IOn9>4Eu(JghV}oXyoy``L54)2q z#%I*M)*!b20pE{~iN>(JFz6G5+h|a}bQQA_rjOJ1C?CVO0lTQ;hlYH#BKa(*LZTJL zOla<5u+HeaB;eP6S9P{t$yc3@(AN1a@B1%qI6zJLotp^#EOZ^_N*kUlP4;*^E?{yt z2mqLS%;J)eYoO6%GJk~EhDstdQ34S6M##vij_Vm%a^|7qPCrcO7zy+$B zc~%+6Eb{;r+=t5gB_Yxi*jC|2C2&5?t^!P_<;5%y6B=0=^$*81AILdqj3#^hCaP*| zK4h);;He24yU`ADA~R!vI-te{SR_E{vhghE?8FUJGawBOw5u%e+5F>w!Lky*@M|Dp zhv)v!T~V7Vu%btm+a;Cpx1YB@%@Ep7<7csPX+0AA*&Z<`=m-zC4c7A*0Q|yGwzgKX zdcrQ59NlAaO_EME*;>^~Ugq<4pWBe}jSpCPgc3T)&vDd0 zJo5sAR}3%#R|i_F9cQynKtKFiTqpzL9^Iq{Q>_Wymv34H`*il!yA1sH`d|3UPLe)Q z4z>FHqu`R}S|Do2OsTQK_%K0ls63&H`n%*Y>_!q8a?x~zQYGRLJ&jM~9C>0U8**4} z>XXm1io;W&eQXd%Y8awb?5)K;gJ^}bwn+qgikLqv7ta>Lig-Da-J=ru2E23e#fClU z1q-6Zu02n?|VA(BZq z@woEJPhlUvev27Xu-)ro_K4x56vC);fj6f1y{DUZ5xJHGEC0?v)Ee@*e?rAm819Uw zAXW1f>Tl)ZY0Tp+m?=<09qyx+q=I~!wRsb zfUh(fQR4*q=pNwt4BovhYB*^1r`tKIo^Gfkp3ECP2b25_q1^3_>&?g)kOW&?-f5%K zUuIt$bNVjRr!H8h@!bp13$R4KYClm)4e7~)eG zPV_93sVLw65rRKq&%LdaiBX(vQqg0 zW%dBi|JONas1n8~(D&&VX1Igd;wfFAp%qwRcMQvTiFXoNxU2v@!7Ng@Hn@tXm)J$% ze&vuj`d&5%u)&qN+(JE63HWaROXZIVD6y`@;F*V0?tHq zUv;8%!+4aqrowlQDo-67^cs#HT(}N1zIF@u?R(|ouQ3zNfhdQ1cxm}~(fwbl+ zN5Xvhh}`)`$cmcrq0F08cj_N6_nIB9S#{v9^g!<;#YCka`A>>!nh22|@81bAF1rPd z01Vp!OnuBY!~2G2>EerYJD!(pwPRBeWr&mwibzbQIL*9mN86rACeFrNQ)y3H@|16- zR54vBPsJAs`;}M5(C^fv|yJR<7HtoA|82i!&! zgq^B+WDE97m$HwQoM4-G%_k#4K~eXv`#bn9RiWDjJth|=jOh?{K9W3e6@i2^m0a8X z;MXfZu6 zYICB|F~}I-##?cblfSs_BX<_@t20lmZ$cEc+Eaj8+nh#q=Lt?TImH%LQL1nO5t>NV z+z;+rlQk*rf*cLs_HoPh8A=3x*6Z@_;ttae^&Qkf`bA2|<&$rcJEFMLAv? zO-ang_5}@Ujbv05drRM#{Cu!9nq};0_)X-rkRub>48sZ&`x9nFzECR;$+BnvKz-kh3eB3ZJ0?#NBk)@nqgo?E>%z6JqX zgQ>k|_uztO3Qv-xP5A(S_BvS=CJyny%9-?qvH)@BY^|sx0OH}hZRY=S9n95$)o}We zB7@>}YAHk@^(9qM63*#n!&?r&P7-1E`2104G-0g8!{5c0aC)&DrH+(*5eweq`SXP7 zgW9)e@xMYX?GyIj^;`JWe(-Nlw(5MqVnMeu=Z0ih2Mi?r|Ly{?Kj2XwB~UNG0S~G@ zI;*FsuzDrDf>RUlOdLAt0Sn#GZb^)s!IAA=SEUH2L5wwplYbecW9Fo*Am`upJQ*bJ%Ac;qfSx ztibxsu+U&uVB)mS2gUm5M`LJu0 zJVxd*LsSJeGmroCvYVC8m*(Obl6tk>`E?~>cHc>q$UlnVEV1p7U z$TzG4w*7auV)K~-DQ4hsFt;zEy%Fu*gCP;8RuUsH(0Vm85?}BK=_!HbnGTc8wa@9c zvD#agZ;`s!2#qQum=77_6W#izgV+hkrjg=Y_XFhBy?nb^L3e?QfQg+Gk59DAa9wMJ z4D$wABxF0p_o_J8s*~nE527}(5Ch(mp&%rZ(jwfkXgFyR+%?<$Nfa*X0#j_=aP5C8c>7MA;cg7@eD zqSvhNFLvsI`I*FAclx2`yqj&c1SZD^*qb`{P{BLDauc&1)r>FWqr8oK(p4onjW2aR zXAN560}Fw_@SIz;2+c4f4ouKLygPlJr9#fUUf7}ik^((KmNnp|fB@DdecmM23i?(7 zA4L>zJu+GZ)pH63f0*LvX9!gg9&CH6>v>>}dwMhXr;fa(2zvX9T`{QvzS`s3YseGB za)XCXBX^!xb^Au01bpsGlj@;~1Y{liSo5XM1C%G~6LFpAGFk=CN0+ipon(VGN015^ zIEp3P^HlDLZ->sZiNiTd#@TYa@K2jmMh@iukpTu)-aivjCgG@CsLv`R@0~j!sxGyz z89m+P)CDn)tJkKUg1l)N@%B^)|CDQtj zcen|P8ElysT*B$y2#ocA84Ps0o<12a;?U=c2QL3L6<&2-*7HriDVf(*m0>S0(Dwuc zuivw`%FUJ&!q1%tev@$8THX0XZR=mhDH35ZN1b{&LAbMyQNXR}5a1Q{2d#U1D zLj`pX4d?IXVg}zNbn_F*&X1XGl$WmH5eoSwY2*ub+6B1okDQAr7PE0zwH~X07`|_; z9wv4QtmL!T3gkXs2qH=c#`Cp?#)6!)9g?i-wBdA1?Ryd(pMT4nlwFi0l`ihVK)(~s z0pRi%p8A?#M=6|%q~Nn{k92d%7++&NZhUMe=px|c@92^w)VbNb;=w`;J2O4mZVinP z@cnt<$W{T6qaUe8=176@s|2w#Kij=>Ja3^)Fmi8SrT&8Ro$=lK;W`1Eco*OTx&_yF&sNXmv9_F0%!_7}+GNUyH<@8mc=YGx34>*AE-d3?y~93yB@ZAy|*KM|Cc z=T;3z@S=?Kv80+Hu(VuC-hfWb*Jxp2>j(O6*Lor^ZGxF9H^Z~7;C10rXXA5Yr@m(l1N z+iENMt~}@+X|cKYY@6*6YC29rduBmjNNY?7!}%cw$1qx^pdj3I*Tim8xb+Wv|KnC4 z?qWWlmMRyvpcoSF`4NOwT%$dR+Sp#NK({|aft!2M#Cx&`k|0-V?fUxgz$Hb9Vh3SV-ZfKH&w~gg%sYL_ zsfZ1TUft=ropY!#!D!dR4?Mw7#w!kySAS{QheY%;abDmujcqJ$jfM$n=+g z4(NiT5Dah^{nk)alBaFLLmcJx9WyI&rQ;t!>ZyZ2S?bmG_Z=FpQ{WiM!~`zsE_ z|6sh?!*M3IfBmw+N9_1h*)xj!2|YCSln>AG4iyH_9yS)ejeq2dE|^q{MuD@g=if(= zFDpVWSH3^$b*n|WWOGxQUR@IqGDrIKE4N$$Agy$g;MDT#dope2sg~7xSaXqx4&C+q zFkCPL+E`{U{fUbRCmr4gLRv{YaD^3I6&D@ty&UPz_bd4TY{Y)!Sw3Z6`RfGUIDnC`9*AvEx7t;*0JLH1l`xW+*M3mo)e{BJqn{x5<}!M(%73+sO@mQ9WwXm&m2H+hlWAQTmWha zaK8h#&EJm9kMVc(xEiv%TTQio{%yp^^$NHfLn=HtE4geTBfMcdk&C9lXQJQ3dU>E@ z)?+lxk|_3e48#w&yC_;*!C#+05rs2?If!vy5mp(tr#>rOC@tQjusf41`~24)M)d%z|1AbTF{UwkMX3}-jV7V@yho9q zk~?+K>0ceDQluY`zmi+E_@;&BeYl-yaihRoH&K22P=v-g!&qeAnS!bk`Yg$DJ%W7U z4dA{p2)ey)R+Sa2ZB#p#3Do0LqY#D;W1+d0n<@};=>I-6P|T>4#Ba0?8buFcFT*OK zBeBGD`F59ep?{b4@vj)w+2@>o`;RosjZU9I8v0h}pxyy_MVn*Qi_Q#Qj|DykC zF{{+1eFpH*q8PHXvOV!-!&QxQGY>8J8BOg1mi@X(S5-@nuBg3E3hUB+P~}p)ZGU!m zf{p|82$VgKo+2qKMnYp5Sz%2O&7y-pdQ`x>1o3%O3cd;CvU?DLMTH(r+YGi(c5SFn zMoTaDgGtANrPCGPXga~WEFW>L`yFLQ5^!1#7qY3oqiac7I8KeOq>+I>y7alGH zVrc4!BB_+6je&WBg;bi)L^5%E3>U<~`#Kq|yk_ z1I!N>7~=;HCw*#)`LWKck@uH31g6qO$&0hh5|Q&93Vqo|y2#_$W)G%ThFwGIe=>*C zJOv{;N`XP8w;icc*MHgSge$HqX>Bu1h&oSOXNGw5_JCW}WLnVLetL&eS#Qc|JfQX> zub1nnhuMD#VIPh)haVoM&yO$vLrLU^`YSuc6|Hzi7m159tOUKEUs5TlSNE%mo1d@* z-aW>H9(e_Y;n`HR=~q3ieuq&~$`iqrldvDN_H% z(Gjk97Iamz=iY(oWoF((w%u>ryB$}zh+i-31xksPhC##lBzjOBgz0S~m*{((E{hyJ z*EW+jm-0$@C+u>%bX7C=)y3fGGz$q07pd#*_0>@VwLIX+&?lG@)jc}RQQ#oh_y5dp zgKyxCSe#g)xuBhKHPwShpu1UU1d~dk?}y&?1XP$FaFldL^DBX>gy9+#zk+t9az-0N zt33tYK>JY&KZSe^4g0cQzmcKTcLeTde5@a&Wf)nYGOR`#8u|}mL6mx&)yr|8ULe7q z*v~+ceya1I1(!=Qj0JyJ@ODjplx)}LOJnfZJzm`q-r@Texp=}go%o=bdhzem5*^7x z?tLZt4coTvZ5uMZ)AdY#V`p(-&g>#P-){Y7o(Mdx|2}B`;Cr67!{h^x!@y^_TY>#c z>-3}k=_nm4k^~m2jLAp55jPP_GEEFz@6KPM0cheG4a2X zy*elM3feH8qf9 zckAn4iPLT!XAS_uLC|;rg&El*b8Q{(N2h$~_SSs-qG?}^3PxfhX1}_(%TDC+5S&K#2{n_Cod;2*3oERV^AY)SDg!9i zFcyKt=RZ1u&*yQ=Q9F65#F=v$r#u1+1>VB-0&s!{NgVIwQZo=Me7D?L@KK6}qZf(` zJwC4JZJ)oZLEee{X1|i({Y34%uNTFg8b}`BD>!r@M-W(j02x??}NVO%%|OYZA!wY~KKNPB4$4`w)T0ux%S}-j<5# z%;lAIVP1)U5(9~b#?yv8W67|`2fyD0#oD;}79lQU7sm?nr}fL)ChTJP!dqIpLKeXo zk5C}e|LzRFe1!(RbjK#{e^^VPcG159-%C)Qt?Qa@9i&YMwJo0;zO2P$1`WBJg74aX zwi0FVuSLlUt2%)L53&&fYEtJj@{ohoQ~4(X6ok{Xn^dmf5`pUq0QmSjR}lPd+QhTC z^YUmp@RoGmdcKue%7w5;Ebt+5t(+hC`84>4boqph@VRx!) zu+YOtLwnD<;oc{=BTA3L^7BG}8>m09pOx_9qf1SevBoBW&+uk74CojfW<~@`@f|7L zHI}?VqY_Y;5W^|{xR>6uV*d06QsgCVIOIsr_0fmGCZ$K3a-;iV?q)6>)lyMXk

o zHGDF~D>wW3D@>3;`p~#!H%#vWb}W!ESp!3ZPW>PCF#|)*JnUfkRuYPy_h;L7bWGUCR`K7ZvpcoCz)Q+jJhZd$#l-zwg)dNQ4rSHkrO zpfq?t=>Tmi^F;Ge4y`#X!hjL60=)(PIFiWa3HsTtojCMD zNVd1Evn+cLXwcbUmbp&n^~P?;a-FVv;}GAV4E|;cs%F>F`aCvBe$|!iWJvRoV`9=A zNj|;Xn%v_!44>t)S)6!L-T_lg4>c+3%)dpFgdc2O=H0FF47-M{_6P{$BtRJd00;33 zEI17qm)Y?W?YGC2~`=>95Nq;3uhVD)N+v?Y)vA(~vi|rnoyCJA6QX{6R<=p2_IjQCp8&gIUk^J-_W)@u-hrwL z_;>F?1ms}`45M~*v%!!abQN7OIfXuqa?exYg9q5iwEZ}D z`IU9(FR#q8*^Jtjy`_4OG++cVoD#^VlPNnIA&MqoAvsP;6sMDW^7RE|T>Aw1)c&00 z_+yTtipvApY;K_V=z=&B3cAcssQ?*rR7Vf~HA%P@cgk9iG$+tRC9J(zmcUx6_&BH$%hBUI612`(v8Xg;Nt!R&?C9_`a4ll;MwmdX@{FQ5Wh-9P6QykR0u zuqtMx;2L$~IgO)$=7ZSA@hG=&|xBQ7?er{)wZ>@NfD<+}dQ%wD$t3`xFD zv+ouc{>L!_nJyTX(dC`17pcX(1Ia~9h<)qj2Lfh|@JEa(o-b{rwP(Lq3tLlACBwB> z-pM6i(q=MK(e_s#d(@2?;ir42pr){28fk3rs>AdrKRLO2<$oC_7e_hfUt8>EXuBw9 zK^tHLM|B+8K)C)VKxsXy+E{#8aw``Ud1v=1|20V<#WpA?HO)OQqgIQhaccVQ9anW+mjYx2hlTTRJtJf;hmLe-Da3W|VkMF{Uy z)S}$dghnO${MGkN@7&!t-)}w>!l9?T&Mnw0G(BMFG&Vd?F4r)gECM%Fi!bMz2+*Y; zQVnH{nYSkx%j2296_{&@ve{EM!Rp(cv-I($*a9TnM`|@Wt*aHn_M0q@0$My6*tsvEcr3=G3ArkPaxwNU* zfMFMX*f!p@Xi?MsOxgi`Y|R=KW~lS$#vp|^YNB}uSZ)k`9l`6FENss?x&$77yHy^@ zY}&;AXDXgGB%dvWyt7z`DO%1OE#?2)n+sQ*jG9vNhq-*? zSQ3o2dik-eE?Qdvq_04Yrh{{fbd|LaGUTfB7Fg&wvAPBd_F_&VHYc&3wZVO1(VX!6 z6V*DKO#ocf))7t!dA0UaE-a108ctlKi$v-QXM! z1e#MfZ%hmAH|Ac8-Pd)`?ZodBmc^IvR%lGWR_>c{%UVx5xx5vI^;)vpS-Bd!(NoBy z?C3DX$2q6b^@h^7)`yZ5()ew8R81@U?n+bJAtc=A;{w~Y7tlVlPCgL209MD|9PqWQ zuqw^$N!Mu2*5S{;)>2N`OkJ`KOi8`E7GG{)ZLnW^D?(#^3#+ydGI8fNb+eaZ?`H%F zR-}YXhDmbN<2kj9-Ff2U3lwnY8*jXrf|Sa!%qK z1{Z785fOMw-K4Jhk+X`)lqkxek*}%L?&&3o#s-)&GOLUzy_6x8YZ7fCI%EGqQx3IJ zZ8kPC6S2D5wxPXLftn2qx1z0|&G56uSStgsg)($)@+<1gap?tYe_@uN(PpOUoyVGi zeVN*%{2)ycOLXQvG<-vUyJ71}GwlqRa*-y;<0Y3d^%i)^o(c!0GDp`U4Y$F=UUP)P zs*6wjOw7;trJM+g)o>?SeeV=E+oNoW;Vy{atWJ`>yR(^9i#RbGr5|cwUyymE%KIv^ zs>s@dMqQYLCT)LS7W{I&N6I?10@Ml;!BJdMt24+hb+;moh40U$o7C>i9bWnn_oP-i zMcXB7Wk5s{t$B{U9i_!DY5N4<3r@>{?%P4E^Pu~$vL*X<3M~%vT2wrLw!Qv@uIVMT zWj6U)&|;$1`FkQNsLVlAWQT*H1(MS|6F<{go{cH)dVTqBB)E~ZG?ZJ_0p&cqRA@a6 z=JmV0#_0@=#wD-eJ?>rR=;uefSxKWx_8rKN;1_3+mT}qE84ul@5%nBZAeFA>QU33{1u|y2X@kHhIMO{dgepE2|;(AzI1_d#=0{@pQx`Ap+L|1G1~~BY08+k zbIPB;2e_xymIvialExx5ecBlPX~%ZHEGRDAOmxTAya?#ud1#$6T~DwX+UqKC+j&CT zf2vfnkA~K~eO%n64T9>0ULC_nNr->E0M2|F0TZM%Pn*F7)~!~#9qS@pq~`X^T=fp_ z%3N&Myv%$E%P9*CcOLU5Jdrmqg8MgWlEZ&~_{?*&Am?<~NyX|LjqtCjsf?8LHHKku zV)@;#^n}xTxbDf#FYTAY4A%==Q~nSJL#LCLNPPyqd*UX(SMM683XQ0Ff7x3Z{A-a& z^Rw^jI~c4B{KxXFoN*52_)iwti%$#i9|ql?(=NfMGcwwolV?kXMAUs~9GhD|`gM7H zwGQmF?DDs}!P#zl#?SSugiN;WGpyz_Qz2`EBI~ZY$#~*KfAO_nSqn8XhPe5&rqN64 zKR3SL?K?I?Gg!S6V!nYsHQ>fF&H}plx@X7d2BqWBghux5l&|LMK62MlHI%S$?%nxZ^%|E zT^YP0XnnU;x2tZ2bMy6~*TyvQzL0D8I=+nE6BXC*x`C3UNGw`h;hle=bfHI+0aQ>c z+8&Ur#`$tvt;3GkGS(~~q@~*z#e;HE>qO|ElYi$5C2I}U%JTxertrRBA1-ufqu!me z?6YUwTP%5#1#S1IHWt-FV2ds&4b>ouFkkZTrBp1TmAmtg{FtJKrSy zO3Rfr?#%aY&x8ChG_jF1O_On@^jbA0Y;CMz!K*F~|FhAT^4& zM-7X=(t+OaI`CrdK+YG+V0H$0gyD+6!GWawx*L5rQdcllPoe@I!g%Y__!Z^2~hlUqwA`T7q@KCY$IBHU^rvBXpM(34Ay z8ElQkcrN#)lPl3h%gQ1)PhmQbw3up_Q;5x*3qPKHVTG}3fVA>DC?Nu-ifw`EyZwAV zQ+=x2?$kYWXCfIEGAU@k?$?X1g?VGNR!DhE)NbhS z`iqw$-#Lv%VzVPw@}1qr%18&Yq|TiYA5kWfAkaItUK%m>Z-fpJ`d3JHPpu2G)R&S= z8g72!VmcCj(j*kKOzngQst>S6uw4JLOj}~4^TV$zuOx20Z<7pRidbjy zlmKP1NOL4_nm$ufas<29%CgZIRX(E;=??0{r9j`ZcYl+=(krfc$mk>A^O}sn57YO? z?tKjT)hf2sUf)?+o&$*$YV~@`#)1IR3;q!^Y1Qdo1GV7P!k*JCHzOFv{68-iShi8> zHpAl{zETl}u`6>#rJt}Z9k3<194csbI|38YiQ3RydIPzco>Oz`8|!X-w>QM0kK?R8 zFO%P98{|1{$OMVGm}yq;{IFIbApiXd?Y>y0YXP%eR?<9yK2fxV`M&Jyiz+jWRgylh z6T`s|4oLy^w_hh{>lcLKA?u$feEOe)AD;51uU#l-{MGWB^)FIU04T9dbZ5X`X+E*7 zcD)siu&>H`{sQjZjAs+{WBU2AQ0|WWR?~ZF#&6U_<~h~KMQ|wM;Jj>r1r0O47d#W& zA1PVKCVFD~GOleucdK3w{`Am`b|}k-M*ZQm)P;t3)n8w%Xl1DRb45`edjM3p#b=&M zfDVoBJL$)Cl6W8|6Pi9YnNh1{F>4Tb09?;<_qFkPw>P)l8y26%AO{QxP@LFX=RGe# zhZX$5hxN5baQHD99fRs+EA(@jGl-0ylIw?Xh_Vi>=GUt`;-9CT-blT{h@p{+wmhcM z+>bbbLkVV$V76S7vF~6U3LJ}+!!esvYf>~fxl~K)^*9HmEM7Bs_R7eB5*IX)Co$XE zYOTNi7jI?o&!lY03!rEP8U{MZf-70n4{KvqC7MGa+hgb|uqT}7i*`_F?w<(Qh^^}2 z13w#M+`z5s5M?WVr{hV+wDzhs`Y!ZQ)3Dr{&I!bYmw(OiyiVwjS{2G%8JrYnCHZPC zy}c4YD5Yo1_>ELL;w;u*oU0-{XVG~d9N^WQHx&x7n0|@4ME!kiv%0_V;3e)CV=ufO zk}pu)*%hhCly+6}z&0^|^Ja>(xYQM%nynF;zBU{8>^jGn3t}Bxre#L6*))RU=IoNB z2f-@fXA5BMj2j(Vb1UeZpmrR}v-NTP+G=FFb$3kfQ|Do^m0#*d5;)(=?NhFgO1FEv zL@ttq$HXTAjK6{}?ALf6^6lpc&84+&CF*O<46@B2k*t5%-DHD3q}xXRwsr9O$H?Hc z{^KPdw)lWNe*`7{KV-dyTa;bY_DzR~2q>j8NE?VKAqotLN=XPRAQA!+l7fKbkSd{r zG?D_+At2q|-7Vb%3^7cu{sK00UHe*luXUckQ>B~Hh1zPebTh^_ZJg$j z!DGs)6cM@Es9w(1OvCJRIem|E&(VE3sAv%4Y?DU)Tp;>mS7uPvHRV?{Afd8Df34Ba z(nhbb7X$>P--u)yoWMm}p6o$JZW@4BNO$GDOV8j5*)DE!XKg;K;P~NZl3XJQCtszV zHsZHZYhST#R`bC`I0heFm45*JQIGNY6&c!# zvu)}^@Z08bSdBL{$kIysK6C|Dq%FLIgqN(uBetb zWfYz6EHn%Y=6Cq)(xoM{#j9GAVT2^d97xYzcuR(i?2K+WEb+cHf7*mG4u*`M(LxQ5 z!_XW<>8o7 z+U$YA^2lIv=y~0!!pqPP_r0lNqE{Zs)6*lzrAK!U0aPJ3P5_qx<$tU&)CnU*1uU z7F&7c!B%$AZol4cZ22tYViJDS;nF);*Ck%iJ5*1&Jnekld;11S>L!3oIYX<^J-(<=z(3;lH z_8-;oz29zQW9D3$0|AO3r=M>~yq_4Y;vDuu1N%#)-zuAs#;k}{$bc>TbvkqZ6ek+ z37q;c&M%Xu46k^2xVZodT5d!lvjzP(iRs|Gcvs$YQo91U3Daq#(>g>&{o93hDSXRT z0fq22mm)F|TkYIw-*DfMO#vm`E;VRJwYk15x&h7lmco`YBK*1nXq2i2WTT#iEx;Rd z>;T^ZHnTm{8*lR1eVPXQUa#0bhv{^SIN3CUNY>CEW2|iZMh0ACF%tEC$+?>^@(iv)5Ppgs7zRGw*wp%R`d(wU`=x+qGI9JSl$ z_-kFkA46LKO(tMJIQ?mIj;WE*G+w)fMXqidSUgLkqMzMf)1#!1ckn8w;%if{yCLm1 zOlmEen~ykn_teLeeip?DorhbsrL4%(5@sad{=vQ33kQBH>z(tbY?HNvt?OacE~!Pp za>a|Lk7$XPYK(Bey&VzZOwCd(qfi0}#mA zqP=TeqUSGzKJFo7@YsZku~XY<0xbvSxAHFgtMQIu>Mq_K#r-wzYO6H--a3qQa{qHT z<62R=`0VwS6`|V$ywHFM*I~`P5BKN1<=M!cs97#N^m+8R-Y~x}LTb#uVKb^`m-6$l zw<0~WD&0`8fFnXDDknO!dNvdL6K~T`*&P89-|Vy;rY~}I%MLIVnv-l7=fcuVZ1q`8A1F$TqOv&yioM|bNDknJe?M+9dY$~fJjh&p) zgaJLK*OTevw(&F>!oWGdYYK@fO{dkY0mp4+jHo_mwTwO|X5jr>t5>U|2SNQ;%^FFi z=!s|LwVCL93Jt%{1g6Z=M^|(E**Pf!;e7lo@WZw68wbcasC&Jwu=||w>9hiwsqSQK z-Jefki2QY8_PhRr${-6W9yNU_UG1xcwCqvo!zwdcjhY%cAAWr74r?{;ModkXkom^2 z@~6zlC%d1b<+r3nc%d<=1xvC~YQVZ&$-SQa)b~1+q6U>xy+9xt(pGVdlRAy{kjBKY z1&U@l9+zz%2QUN|mJ*4$9Plhk*6rNMN4L38&a(_YCN79wv0Te{cmD$tXm3zQ@C%ukwFxvQc7aO0!6WF7(VF^GGvIqnBw>zh&)rf)x z+{TmQyQ!nav{r}rxb3gEas|`u1oubu$3(T%g|A* z$?HtH6KVuyx2hA_)(dF4p!bI-$F?t|%PxH-kI0Z4#3tpRotxrQ>}m+)04S>!Q(x8%xL8lBer~nW~aO3p4*Y(iR zNGVYcorT5B71*@E+|ldo8S@vN6?gu`@hiPLQVE~3Xp`yMA+fvS+`f< zseR|edU^Wc!o!d|gc65aBW^iN-LtF4GO2_|-Y=0>h(BO%8h6#^%L?sDFE5HNT9s;J z9`<7n008x`akBgd?#8PYe*j4j2vtL_DfwXT>?)bweBkhA`^O8-Ne#jF1={SSo1QDM zvDNoXx+R-cqEqkAcwfpFrl+4iUA95OTS9_>dl%TT{LK3NXf?9THymKAS1WcgctpKs z2h_G*KZ0@a(9`!5F!Nju>rEPU=xX>bWr~cvV1Q0oz*z~fJP#&wxvy5+zsdVJTkO-6 z@Bh{4-vlg1727M&kHf-Z=wTswiw8On;yGZD-_yZ6--*I=MYmA8av?6*!EeYE_c$Si zda17N@DyNDD!Xfj^g$4D%LwCnm&Q7*I#U(QeL|taZT-W-!m@B^M2f$%@wQn$fr{oo zYfOwECl?T?%~y@|C_MbNWni+DcuPA%tJu|!>=TY%?Ejjz+Gl)CWk|l&)2&v`zYzoVG+#W>2J##$FnSW=>ry&$ z_1V(H?9Hx}VTwTa$a%~ik;t%Q$vSJcGSH-c6DLP zW`w^>H)WGsSy}B0|AqjxK~lDvH|qCFAjbD?-j<%uhLlod-$(_w%O3u#EMje8W*aQ7 z(sSvc(m1;S`PY@mH<#v*@jc4&m2uAJOleWC3rVdiy>SC}n9vQS$wSiJTz`Hm`PK!| z61tT77WK{P5CR;MFR2h#^L(x{c7o)yyjuQf^|;h)^+SqKwC7CEh{g-MG3eIFz%20^r)_e`+o@-My4vw`oq*2PY16@JX6Oe}gwgr~COSDIC|>gRCYzS9jHmN~^1S_W;k^Ls1IQ|of4ao8HEz4sNk1-$)w zLt91X69N1fWQ&pw-6Y48M0S+U13iY=Z#6k4x!=A4TW(wB4v6-qS~JG~R2}ifyXyd? znqk5Q!~6Crr4p99uW{!eD*J zG{gn9QkbCu)7RI?*BFRC&Gxzhtg_=C zOkp(m8V)(f>D|37p?m=s#Vh}IVo6Gc?78)mw_()iMNs}iJ|~3Cv#$Sf2$VbA$=Xm_ z0pAiZeE=8j0KXzDH}nN4#f+32%eLeL8h&_FGTQ%;%J^|IDg<#2StA#TUT$)BKwp^b z*P7?_{%RXcg*M)QzjYuqcLKknPAu>qpF+fU@s$)YJ}?kbl~$=I9(KN7tFgUJqdcPR z$%Q8ui+o?1b4u6#;aB{{RKl`ozWn;cgQ~%u0s8y1e-M##O~kJBtSpRP*vg|*((9*H z0mKlp@fH+ERu(X(?~n-tau$Ds0Dk_B5Q6IYGME^AdWud7GtFDhFU^C#7UOw}h(x3; zydSJPj6JE;tP?6c!>H!!Gu`krWqLt>*ZPBSYvZgn{q!BI86^;nT#eI)H+9QU%zU}H zf%C9@;SqXHDmo;{N%5V0pCWP2#@%-BNRFn(!@oM3oPOK&Jy7!EpZ-mYyQRVnJ4T)8 zt$>pY)|JsRW#+IROM$}e)yp3}CicIxWL-|db;j^h;yzEy#pj=ya~iF~PH?+I@R9h< zF+I_UU_u^>^_=;T{hkS>`7E&<6{|aIKl8LhH z7Yv;ssd9WA#1+dEA?0wGZno5Q-9Ol%fh0!=ei?s_vl_p~x5-y3JeF}v{z&b2(peeP zcATS5@nf^Bpl8Gu(A&kfJdot?7*sQ1`AU_E0Z>nRBD(3g5wFzN|EIHxJqWg9KUm>y zYY=##>DA_xcgt9CYJ|6|o;%Mz)NcRpjw3)C_$Q-e*(*z9JkLD~a%BUyFq++f7hq$4 zlfgW8!>Yrp8gN0fh-C-p#yOeWbCwJ-(dLJTUFq&DoJ>;3gbOL|lx2NM+w;gYB`IZc zMHH!K1Z={XthiQtOZz*=sOgW%-wA<#XlouN@l*Tt z&`+p8<~VAHoNF8$ulTWk^#@twm8EyqKR8i=1(K<+oBdv4<`~NZ&@^%d&rv`k8l^2cWk}97E>5QD@|h5d!d3ogpfy){ z=wHA5H5Lr^ZXL%gl^<(*oh$4p5ugB0qG{!MIG|WwoYBV*a{bmCX6K6k!L_?*-)pkvEY$8;E+ zedxm??Yb|{ZT75!AM(`eU?6`pf@e!gkslgX+(G6Lu{9pitmljpg4ZrMHp5#ns(nbP31Tau8}iwvTjKqq=ue?!jvAA*e9WiaN?#$dzOZaW@ zU6vlar1Adg-P=khu%S5*{8d!>gv^e;C-Dfus>%&Zy7%t+^Ow2bBu3o9q*ht<9YW-DQciyuxfcHzkij2gT$6At)e+H<5{!zI_tWok1n(UdqjwC2+*}%(^poTZu%8( zK@c-$v_Cx0#zYt4=NV=vd={vi?9@=XjXCE`W^F0aU294ArI%xV|F0I{Bm=vHg;%=O z5tvb;Fz1h3C-im=LG;q)LZby6KbgQi=g*#_4l~d_f57M0xGob?Cl(cTeI?7|af2&T zH-VRo1L@Ejob>*C9Fxx*4@khX|0%s%NX2qiytdiiFu&@__P~84W_wV#LS2rgr+b8W zD1D873wGnnOW1}{v|6T|@^WU75XltIW%IPRc_6YQpT+!6vBm6Vir+3p{zT# zoT&WO)4v~+W&;$rV0HTEjy}P-Mz%O2_Xw@;!Mb)`AcO_l+2k5Qx0VkFGf?j)kLxcg zZf5~iJMXUC?5OC5ap5mHiWMwb8r2+Nm7P7k3WjxI&L0>zM3f2eU1&Ua`282d5#Z!` zN`@Ez;y^q%UV6CADt$k#!^B%<{wy{##bEcPVGK+?x$rUYrdrR6_n?ns2IDM_`|c3j zz_g`~=mv3tobF+TBIxFPO6@5+JaU0A&cD2uFiD1f^RX|KcitxFGuhnO9I;f}-u^7u zTv7h|VGEiCpeifc$TPQQ!>v6p+3KG>KYkXTLIyqt=)5eOW6OovF2u5EZdRj889W}l zV+F;;ho?I9hx1gksnEQJJp=xRi!&K0O*YhiUt<2v)h#BzL?a>wBnIw5@htATcOvX)XjP(VRLHbxC^u| z&4487CZIFi4ixfc;QHMifl8iIWNG2=DLL#P#n5GErI{oF!Kt*^=2%LVZS@Ipryegn z!CI!TP!jhhg^`W7%LXZmZ3|sDjzp<&A_EeVbCRzEd2a5W<*WU}ze$F?M+ADFhouIG zc&2TY>t~Rk#NAY@UQ=N79TQU>)@QHH{t|ve^~K*lo7`HvIYi7>lLZK6yV5l?90Jv& z0U-MkAS_9}y_6d1Tw8*5{hb^tpKhOk6J9b!`tKR9)^8c~PsEkptB%P95SihL+VU{K z&d_>dN(t3J2CW`U5;za2`oPo8>Cca`j^(Wk&04=vcId4T2L$RaMFWaMEP3y3UC3Q( z8y@-ixzWGoE1wg(UsD2+tgQf0rR?|fPu4VY4QM^gG^|2!RLA5kLjSlSVL4BH5tz^O1jvX= zA0r(-FF?-$?e42FU!WqF{f)KqP{oO>#CtT~cX&5~4eY5SIz8I%%JofsZx-yCN)2x+ zK_0CaI4+#@u-E+RxvQAtB68bRTUOh*)L)|;!IDTa7vSzudsMgB}^&wIBv3G7wZ`F2f{EA0% zg<65}eMHaf4er(yEC|ZQf^=SXs7Rm_NJxQ9)+@tKUMFn)d@ANJ7`AMB_W!&q9T;6>MVWrY5aa%DHS^BmFB&1^Ux@+NW7fC7`MBl5}Xe2iv6O6+^V?< zU7fPqCZ_x7ffG`Q&O`E)dv3Q}8RhCmSx?EsD)m+ZzQ_c8NV<6wqGA#N+s-m+M2!Fq zX8b-V7M(DU4~<<%3*w!)y#2Q{-(Pbd`Ehj(pmp|{Tg?~X$JHKH)qQY@8aZcMAK0@5 ze)qE{5h=#I$p<*+FanvGya@20hpoFAY4aW#VCOy;KG^ssa~~tBCS>eWkJ1T(L(bhF z?@ZKMo(;B>oL1ixB+2Ihr;S4xMYq$>w5ykrn6v22!X!maTCCV@bCW@VJ=xNc;xm76 zwU4x(lA~381oPzWVk~7Gf;>0#bVU=djxV*S&ph#A z>%RH^LAfkqzWi+pcGMGIt<%96pcpY@-|dC2+Jd|S1KshFFkI3^~tYGeL3BJ3j9RRWurFNT<|wjC@4M*2zk;Xm+;|e>rwp; zRK2VBlYzJI68IC+jWJuHvm^EI;*F#X4SG76Fyv3Kz(WsH5wNb!L*hyDEoRl1pFWAq zcox;`Hb`y^0J3SPIk@qQa4a?Ggph%AHUkvQGXGbebGe1)Lad`~n}=%sS$wB#q`H5< zA)~{bG5|#p?%zGg5Y=F-YV}W9UDuQZHcoF%COO8$=PLg2s?9${F+Jmm4iiyKFvFa) zWO7YvhD{{HF$2&JCu0g$A$Sgsh(T#`to)u^$@N1`nAc<-s(^M_eWWFv)x7IwZf*a8B80MbPHM3HEXFh`k4@Vrx<5|4uf;5Q(_KH z)8|h695uE zmyzM70BL55p|_GhVVckmH^XXHw=ls6 z_{Fl1P-JhZXS#Ar6}p&O>L`c#8z@q0kE8LD@Mr3JpT%jEO9nNV2pu1fcP-^$LD-lH zqZN{$I0d(-AGW$A0=%IgB7_9pPd+*u0!(;47hnb6VN%J2(+dWjz^1>zX zzMy!MmEuh;afS3>mcOZF|%z!`tc*>Ofl$k`J z8Y%}-8}?#*E5!&xs$1O~SoNLfj|s;PaCdJ#0ys8t3|~65BeALBJ8454Xq0d$*4RR7DiWC*(uNOxun+Wo?wh z8TS4fogK0%8%fv~y_dnPJ<-l3v1V^%xtLw}Mpu2R!<^H1ERsE`XJSp>L7fdyuiIpR zHj4CxI+QV4T%6{P_iV0PmpWHz=KziHX?4_6xji)o&}X76mVe7vYco3sQuAPT2@ifI z#*TcX4|hhW!pUp3&gg->1wTUo7<%zkkx}_d#O;^885M#I$SJIBSHjO#_1jyPPcCWU zLrpv%Vl_``Hg>i&HM+wg`3Aqou-+3L9jKj}^*YmESW#%nb%95(HPc>+4}bGCZKP^mzai5o&qN%BX?Z?#+USMavQ#f}*Pb)0zv5I29Vd+p^+ZkY%Rr@6A#fpC6%19` zMk7tK?VW>mx=hm`F!W0pP?6jx%s1J%91nuRGnDzN5N!AlvL?K;H-BeS4n$BR zlW5n@cz?zC7A4oZk0y^Vf0^G~y&DM(^b6y2Fr7?$XMY!)$?GPFOOd)uDz_@Va%PS) zCG6*-dr||%zZa(%A?guM98gM+J zKUFcLR)xohD_p?Hx2$xi?-Np1#!yZ!43UqsMVJJqXji;1NIi*=q47M>G~P(Y?yhgU zjOaz?O|)&R9GT>a(;)mvy3;rZ7SqF`J-Ht&KWSwWGO&42z&>Mcq=HL;H`XFi-2PRZ zJn@4pV5>XIUR>@f`=MpiTAdce3zUAx|j@^G`0Yi5fF366tM;z$N@*h zfPiV{oqp(eXN7MR*>MB8x#3wVJ8D2Rh{A>MzITuZ5LozXWClFG^+oDiPKwdd#msR<$ZF@eSQs3Q2!3!y)PI0oQmHr1Hdi zu-(YryH{}-iOuM(>~YT{Ep2VV=NB$FZa$^tJ`$$)6R_+ILLw zaVZ0zoRm`KISbbL6zvLkN;42@<{o|?YF;$ree;B{AiFYu5Q-gHut2A!fPVV+rpH4m zN5y7f29~zEwEmLN&2X;Q{7oBFT`JD+8RbKsP^#q$gCqK2@GCYo9-GLj$cCznp?vmI z9!S1lpuT^&6C`DoO(3Bd9(t2udWY#BQ1D%qb3@JJa-(r{?d}ZIb~Wav+yQS_Z5k|p zVb@aXOcuZEJ?S1J@kwn+2II1CUHVU}1_EVHlpDpk0APZd%cirimEOaOXc8u{u~5m@ zdWu&Q9;L;_&0g0+eA{YVPZO|ec=H`}P~(8jvox6kncc@Sg`Wy&TQU;?eN#lu(?X_U zcA-#k<0C60QgQo>57&^gLnEjp7fU3WVk7RGVH`ym$oC zsUDVpJz)wN*@trkfUJo>FTUfxM8$u8vY%-SwDSPA3)b_bS+tg35Z;)91G|nc`tEfz zu5(fsajB8jjqJD`T&qtPL|3|^a#)*GJ~_fE?E6(bs0rT^n7Z@Uo|9^S#B?x1q-g^m zzeCA|0^hd?-PMLShha5a(RTrvpS1I^9bDEzVjDw>oR*|Txqq;uk?V}{Q+oRURQuA) z6<<5#PtTmEzNzhx3%9H9O!GUikuRs7;N@wIGz`AGAgP2(`QW*i9L9I2-*}hE^=FiJ zvsm_x{Fz#5q1B70%bzuBs%E}Xj~BqshW{h;JVP!IJ5Y!XtDRW1ie_CTxv$uXkx057ojqxui8a(vw2Tck(lX~AY9?X|D z7eMsUv;7LdvFMW7GHUwrEE1Pu#+2oy@5%1{&67DdQ#p}iu_7seShAZEb+xtw7;yuy;Vv4KL zOjdv5sdwXkS9vXTOtTFgvlMj#G0AsdK4k9)c|v4;%8hM}JPN?Gl-N%5sP5o|>z|Jo zq%lEGaX*9gsJCFu)&2j{PmaZ|iQ#4Q7h6L`uXI;fJVudq|n<=&3HdigWi#HT8I~~w}{Uxes}(p-J+U7?_;;* z*c=9Ko8A*1Ki50JV6ba*m&wZ!$x1R3iILzkdJlnL=&y5xhAaEEyW{5HT0g30Y9Sbc zqiHjC_TEUC{KuOE<@7%)X{8_aNaW|e`w{hA(0-@+cRsVNU?)w~>}{vHEaRy+R@8F| zTkxWRqaZ@}#uA=uAn2#u`$H<^UD)L>|4L>|7yf7hhsdUTrXIKLsfMi(awcJG2L*RuOHhVm&1-6RsFLEDp@Ea zI?n_1J&fa^amAbCy_m}UInOqO@k&v&#{lg^5@|tZvro+ZJ#;C(H!d+i5mpYkMKU?M zd{ExMk!xHxG>!)LpK;sgwuQyrZT9p9XFgsnPHwO4l3hr_6fD$?as#%Lhif#y{>YsI>#Sr~2mgaJ2@`KdpASVoubsZjqB^5gklT z8<}eV%kCXMV02$m``y!iaOpi;&c8=2MhX7?@nS3qRcI=loko)ya_{l^KB|+fCuXKJ zS6$OMMpQ3HmOsc&%4m4hH^?dXAmCY8X5YTc)62ZAbU!jA1Syv2=z{L>X`Kzaqx(!i z>xF!ubJMP63d(y=b{&Uun8PP;%C66sCev=s+3XQtdFolF5a%pYO3BR{hd_)N|EV~n z2n4&Vi*b4bL-iJ=8KvtlIel+O>J9f71ZpV=?O+te%4b{F%#aE;MBUbqhQk*Ph-?!+ zD)NV9og4c6sD$zKr(GvTVAXHe*RS8h%pE#iwBi@4`zwsXlX*IS=Lim&FI2cN5S8@4~9Sc&eO?fExOY30kDow!)JVa2)|Ov6W-Uo2Z*UL}f8 zgd64vZ7dqGel4cLU$RqpI@$0%$h5IJV=+8_ykT33CaYQW@~Z?iO?YE_Uf8|QPNSUo z#mqz{_M{t*%%O78^S>=TEu|ib%Dx%8iI38dKRbB3eh66R3uC%}M=qr(YR@cY3IM`c zKhevWnyU-;5zT^XM-_ayk>Vb>@@%2|xq=wk@>P!#bt$rSedf?>`Br-@ti5N)9r4$%ktCs0)$HG!wypYJ9kgt~(RS^z*fh5`Qd`ND76g!x}|gPYo!%5T9XU;4K14s;e|gI$)d{-S>NSZ51W zsD!HdTH(6KFccaaq-!KhlP$_mkB_<*G3@r9@(*$8a85T!s%hjh&qMs9iI;Lrg_>K= z#g?ZFjx$F5Ziml|KCFp#y&K$+5!>y>aRiz*UQWoC=JaZv&W!^{j}n2^JM?ijY1{N3 zRq(()DM1TcV*8BE7eAzhH20-D@^-BFr}xopT7;XweHR_ywjyLMgDPvseEx4&;V5f6 zfWFS(jH9*pl99fiu6C!6B5;|WRa*ra8G8%h3s;x+(?x$!@~hy@k2(7!IEgf$j>w70 zI4{rRSvh`}*9UnDmW0IvgnN-5?{XBrMdUK&9m#V@-uB*qO6w7b{i{Y;*@AMq(*?_j z{Ehi4$807TCEayC*Y!oR5)mta;;R$zBfs1+UP-`z+Hf!~e|%&Yd(^dmfpXNMt#@8C zLaHp)8QzFXFB)P`8F`q|dJ)V)>9ODCMA4tSlXQ0wx_(YhD@)V}q50b0B(ze8CQRl% z%Ssk>R{V72C>WJ+y(4GozK(RrU6q&4d%Zj4!wzJe(Or{CpDDk1yd#kSKghP2=?I|T zw{T2i=IRhbw61DK32*%C}o7FSoEsvQ};QktK(kv!l&JRBlcUU_#wdHgNp!%3r zXxgWf^X=Jpqtg#6#7HmLH@{H>6FG%wF+nj`mhl^zo?vA*WL=~H*GfbD zr8f%T0YTAgZxQSfW2qOuOSMai95_2|3AK_*avqCTy^%F}#|IS@M9izWWbe*f zpZ@gdKGnT1lm)XuB*jnsO_8EpyRk@(wPb%?|62;3eXg}A6G!<86L@HD z93VyW`#k!ms+%L(5cFR}MA$hK4nX-zkNcg{huU*BKps{UC^iR;@s`Dm?AcV+z6;XV9UGO+_+9Re%H3 zj6|C_CQZ-xl0dMC8q^O$sYp|qf;{#sCO=!IhBP_X+0*>s7N-A9&KHg^?<0yB-&9Na zZb0`y+Rr^-;4x4!dg4I4oD}P_{A_YDl&zZYTW?YzBVK|1hXBWbBEBT+gBf)v6oZ7w zJyn}wk{SyP8Y))l`5}6oCofiljQ?C?jB7lg=lmh3b5mfHNHROpU0#}MmiIi(H2Q}7 z;;UIbp?4g1thswlvRt8Tsi$9p)8I|m>;oNl*nV@t4KH!1u|M;5MU6-Q%8EXn8Dr|G zP)2NOTEB0 zjuXmgqKM)vpQz8A7$TN1ae&y&>h-ZxxpRl6(>Ltu=2aT-4uNjKV}zn(k(k&@%A%p{ ztoWDUN;f&E{CWU%D42h&>-HNeSrGsEY=GdX^X#!nbCYn_we|AZiLXj;(!J$pD{jte zZaz9Ks*e^bBOap$(?vtbt2Gjjl=ibsl)H;=X2F^-^QQft2$6D$;Zim*FG20~)nB ztt(vM;PVzsFSd9PYks}>BtoR?omN5{e1q!gmrpS_DM~}tG48>Y2O%y^n z5AGHgcyXIH%l(;^=dQAZA&o_syShYQugqiI@@5Z>tEjLqk8TszKB}Jg)jInpm~;+! z(=QSJ8yD`k;VG01Squ7KEr4k=;n(#Glx%{GpPzEwWxqtJ6QDkrrFPZHG|Eh9?vng_ z`du;XHQu5lvWNn!FtMu&rteN)PEN-_&lu2H`m5+(*fiiP+P##Dr)3&}*H?Q~T5Ija z#l1SNT~%9LhI$mYHQXT%8yjsIp@cfBUI<-b-kFInrh_*~Ydn$RvAC7A)4zWPbFDyX znskA_s2m$mEGB09?3lU>zAne`>%6pB_fOVOZWd$=-%|u>1|xV^EPH*B@MiAU=?>@1 z9>-9BYd!B*{uX&F30A2BUuU2(ST~9mF(3Ccy@eM#Oi_qxf?sDdwqxwPAQs45V3;-+f8N; z!gpOvz-RHR!CKH~y(@=*F@T#A#t*IB`@9w3vVdzNeEnU5#OdC0bs+pbKun4LsG_mL zB}r(oXoa(@_;dn_pHn^QVij;L(nsM@;JfG6k^>)#4+stq25jYdm8QXSKB91 zk54*Z%E1vJ?+Q5>)7b1oc6ZY=>ooAu2#`K<+cJhS8V6Kd?u#ThHy9+vY+e^Vw*7?D zl4sk^N-{Xde?!48D*ba&y3WjwkE+m8GD_5869udHTsLwW@Nr(ROA(lv~G{Q0(W1+_y2cAL4H{EXjFg5 z_S01^x!LE(r2`TeE}Yk8`B5E%43K%ZNe80ntnuCx_AUle{Z5I^RINpwS~J;(5mN1k z1WA_Eru3qYh=oV0iOiJXqyS>s!23p9cqupQZ2X&<$dqm9#JsniVH7)V))Z9^&v(j7 z^!WhPmqKcE;EeHZ>I{h50LbK8Pvz(64INvBBzB9Pw8-B^VqhPQ8c-^ec!7`4rV3c~ zG)~}mgUXC&W~+6V;RA{EF&O&Y2$_((jeiapf9FB*RuBC_IejSC+_ofCFF!j8poM4A z%*D1$s|cGD{)9Bo91S)RqrXOkOFgqQawWsEK>y&s{Al^v>SPG_?XvF>R#vyYjQgXm zd*V1P*|+C}A556YwxGnBTZl(z&Odmwi6Kjy|L6iCk#a*X%m0h{3SYt!_+6krz?lA<~C?4__LC`AmJE<{j1o5R}dtSME(FhVRCD0eby@cz8MW%3=+w z#_XihlgrUcgJ$Wsk zv^mXU?T>q8=8w6^kd;Z((VRe*H+}J$4kLSR-3skCEWj8BG>9d zZ{K(Lbm48vtG|gaQ~N*llwY>b^(anm>x@km2-W~6h)j9Ue-R&cGP56SiH?VA>@zj^ z@EUyH?j+Mn1D%K+$C3Y1JLOd(`uL*s9e~12LLZ{Qwy&11nq0+l%h0zzFsbbl3C;_Fp^CSz;%a z5@KR&t%I>+@FFKDA(WDL6l`a@vW|BQ|H`8yM83uyaO2{ta57}a;&@7nt5FK_u*z%e zLnf7z-kOt-c$SV&@)}|FU*wL5Gk4)m2RdpcY?yo0he8wdU%z~qbakI znZ206PSYJnCOjTbp5Y5pN?0kaRG5)E*3cjzT(-vbv1|B1wbqo+avJcBKlI=EcDNKgc+#iIcG+N1 zZ5C{J4x^bm9V$`*q(zDMWSLKU=!WAQliF~;WREE~)-2y#UU`=FLgv34rj(d(OkH6( z;^WbzRKLaa+sNBxqUw;YWJ>8MX`FKz>F*BvL8(0^cH4=XjJ zlRcl|0>X;q5K6mY7S|?g-?BUPV&y$itJq=d{mjiyvNoU`tNKqlHdYwtRJAXw-unBi z2Zry9Ex^>?A_`cs4mSNOIR8ScWw(W(yreF!zAd!=jWP0`t@e_x@3(u`-L}+%V8`l6 z#@h{x=x=H|o&~BAOq(I^!N9vCuGPdg-{Z;X=QXk}h7Cx)4Xor^b?lmXM~u+y7}3(r zQN}9Kg5g{>NwAg9A-?~y;pg^G5Pz1;%vac~FHYO(a!EsL=8^HqJUu-FE1Jvezgi4l z|D4*iH{q&;b+=D83kBFN0`C?V1b8A`h0_>92G4ur9{3F~( zu4cxro;dg?tHf*uB$%q;B*=EJhCQ>qZrMj3_C1YsM|x^-F&x6~#aO@me=m{Jsy-PY zsM=m`VBwDg78w(48=}#_nRc&-{#Yp+pO-8V&p4Qjv-R8n?O_Gkq@i0X?HXPtaJyB; z3|R9d$Fljfpm&%09@8ZFv2ef?-pcm-lGn;wn9b#(tK2W-Wf+y5=lz zjU?x&bPIX@$S1LuX5oPR(f?*qUF2*WCbancLoB*OFHnMm%%=u7Te-jXc&9^%%F~8i zqg7+?8=9~9CAVVAVs{-E3~QwHAh}sn7RsHivA16SWxD9}3bmMd_sl*(d)#Um1E(eR zlf8H+WAtEevLqMNkfO|aKpQjF%B7IQwy6KgB>f=0KG*L|nA^U^H(Kw5v%m?|9as}O zV+7Oz{=fJ7oMyjWwWa2ALYk7NORf>p9>c6xvWYGk?Ldb-Remg3|Dl)y-x}uu#y5Qu z&y{l4!!A$aGqBU2A#QcgMSWH+4=F!4FDp6yX;I-j9cJ!);WgDejJ?p@Qmo!di`z7bO0hVlvY%=^J50pGJQw>Wi&H+ z%359I?eBz~e`8|k>h|4vNrrc^D@~Vq+`rIoQ%4Sco+&IIdZ<%jhSXm9RziA_8+`X?SJ0Ri2`hz zhsXKLjw9h(2Cq*fP7#c$*9N&qgeC=hy`*QKQ}TlApnD1>lokcuEX2ktam`$~a=#?4 zcWb%ZGKl`g6(_WGLL}?_uUlFj8|5mBE!u=3d5lmm`F|-XR)u0>O(`415KY@YAHSN| zhfa&MG)1+#8a~%ghdqTA-U|XHbqXqSNYS7>0+OS7>Z1r6!C=aPd21|l9EF;T;w~cO{@b|Ie2~cH2SN}C0>OdXLx>gKks104T`|r zb5&RI?XhDOn``njJH?Cxl%Q}jlh~CWppj_m52a*G`krKv{6QC|NPOqTS%qE#AK)vr zf|@=^5HEBuv|SH8#o~jr^ff8NtIeoOO`tKWVz!1nBpV$81wIUxZ1W^M$ndg!le|1Y z0_k&D!>YsKqY_3a2zx?^#% zO;hSl%~?iXeCcHX(qAW|G|o?HghRtlj9vMKI#4X40p8G=KIA93{7bUTrH$dHw&?PfX+NH4m#; zetNU6n|Seg>wOT=(nUoIX!%(F7>WQl+jks|ON6g-H~w24&)|gD!86ok0JhcQMG3Ms zeKcoOdba=Qv?%|8VbG_vbm1tm_JA61KE^sD5J!h>*%uQm7K6HjYNn^njy@$o3`;;i>3ZDR-|L z9Aq^;=u{M9)k8}5_$7C%$^JA0ISXUrzU3m#98#gf_^5IA8PstBZ07a$_Cc2%Prmb3 z*0c2&?W)?GDn@R^qx5KS8~}ZTS)Yjeif6;;rnXpz4V)PPzj%}pN9UFOapM8)Y{f0x z6YNXF$f*;&-m>`P_alRuZeiph@w|jklQir#LqV^i@8;$+o$@2=p7b=f()StXU0Eb8 z>_XtjG!x z$v7k{;}l6{kBqEjuXB)$BC{ytke%$E>|HXGP4-@ggX65<^XR_c-}mP`e*fKn-1qHy z&Uw9_*L6MCm3}M7(ricrT|h8G=c$$1_}L9rr|K>}x6nyh=lGyTxS~Obtl^8Q*$GP7 zEX?0u)I?vOIN1FF9UEgsF)>qwz$%$>d2m3Ec^^by{ay7OW>1d!@NtU5ilv9*b~~lX z3>f4tDWbp%t|EXcuE!t*XlMZi{|Lr{V2VSR*kHLlf962)UQvo5zMm~S>a~8_kzL5p zM{qv?Fy-)3>o2`kcAZB|5LPq83)B{kVIqT4D+Q0}Ry2W{u+a$LD;ry+auCbhu;M*k zxUJZKxUfsYX|1m#X=$0y)01FY_In@w$f!3{xS6=2PF|OA1?lwe=cM@BguvX*md`@M zX-#6tg*Tw<9RX?b;JQ<80#fa$)yFg02bYshSF=H@9(Ttx6Hi9q?BBUNtd0;}e_X8k zN%$(er)RCO`I(@i0ZswlF2l#0i!TLy*6nPzYP_UInr63F}v`CLD-v(=^Tl% zHn1YoFh!HSorJCDfXrr@kx}2U>Pc_q1D(o8``ov>us#DtxazF5is@mXH6z|J|4W@868rn&e(TWbBPpLkF8R^x ze&D9WMNfUB=1dg=82)7th8|z%siR%vI5YT%M^N}UW}LKjSZf&Okswzc2Ex^ay|;fG zZ@$(1>|blG@5JL)-*cWqAA#$OL#|Nh*eA8}X~C<%Q&|?vPJ4UrHND(Kxh@?fe8Oih z6%i>Q>~D60Ev>sr60Y~KIFNQa0Ild~jwavC@$+wXy<`sX4;oiRIleC!wNxQaZ%&rm zES^nVY0Z7aCmy(je^8i5&g-vCVS5yi1flu}RCIv0=}v4#5!gJc8LA#0cxV&MezBk= z^mho5qu(%b5C~8T8V(BA06?qEoOixUon1~mRg|>lXX#wZZ>#WndJl&nJhulMU)04? zZM!4js&(F5-1HF*$E#+%uHCZ{oQuFlzTyH8R~^%8IKlO{zq(@#?;(t6(y4QYxzunR zWAZ69pxh7SUqUB-6+2QnDkn`jW121B#iYHkX$^xu>KWx0}giC|le&aa*Hte0t+qSu@{{QMDD?lvfU)N6Si3@49KJm^3fhV{Gt zApf$J(Tq|jF#;feytI`l5B#aVOYRmAgfozhyYSC8dKBuFpTrsbeaVls{DK@;`30uH znr&DRhp{O^IUL~1;`96>`d`RYVvxz_dEU>2fBSa?g@s8lG2vKkuO5$YxeO?)mQ1s2;l#d~%chLP^dP*|o+F~#4luePal%%bkpwT> zbf;Y4v*C>BI+RZBiROUkSS86PWyH}6d+U8rAOCH(2i75)90{ZZu%vlt$hTGG!Ir$w zxu7vgcjMCfpS`Vk9a9J!t!nVA!+(dN(pv<(U>qj@%(S4=y>$%;bPfWFEm<9`2dsvU zu)ZUs9fV^um2P4)9f4WPdDsm4o{9S}R`)=XiRS{yno)u(@uxeb4R^ z@JR(kB}?9hQz|H6n&2n8{p2U&>04nIe{#6bNgi@Ui%Zp1%5TKCS@1jz0}~s80(t{5 zrlnW9IyHpbfod4oUUzJ?wsTG%34qPDI`7yHccxE%{p0T%N9m2)U0{4A?WYF?S;gGv zDMETRlDFR7ID@l0T6!_#`!UR%4gJ9<1b@#|Jyz`f`4#?R`5U-%d(Q-db@+f%SmDF7C*tI^m}ddAynr3 zDtL-3^fz7$yek7^VXNPx;~5v!<-8!A7uZ|Vbo}EbEhxekvQqm>%rsG#E;ZgHw*UO( z2F*f?ap^0<#i+?72DU~$I*r|@vaMcag?(X0QtLUoni zQrW{MAEplAZg5xWN^b*!^qr%s&R+HX4fudR{B1NR48H8{S%$powAh&K8C!~wyhkEc zRVyRuNlQnBO&)wQy%|n^N1iH!#Oadm)?(sjT?Hr0YjTRX_Zy6mt6D+lER@k&coX** zB|{JxJUgoTWD>_qzhEZNCoae0*<2YcI-xDzr&$R5LQ2N`O2*vK`{HJYR)$Sr!6q## z&XY0R!r#8bRV->R8?jAMiQ4bSr`((7(xIN!tZ3b3v`5@Sa-*R4%mQ zVw+wLi1`5QqIc2+tZu=#-A8ZD4(e5I=gF(`FaRtUo`4Giwof;a=dH=|TmPd!iX%Kx zPnO^Mwx1m&;J0|9diJLe%U6F4Y9)cD@g{H`^tZv*yH40;^dR9k}3^9wP^Z=~@1D~xM) za&HysmHoLglfvhm3cS@`%(XsZ1g(x+hhNv_1E zykoid)zdSSGE%{f<>+@*`PrlQi97~@besLZ2ec*fQ*9S27H&TL!RMGi}5qtLJ z2+#N@fNd)5Z7k5O3l;D~mFVAj&e3xMSHQ0terO=FYp&QC{vr;WSJfWJi4bm=BtNBP z%O8O`%ojk-8Cbt(_pO#)tZt!hh?1QUk=Yl^>otnaffKv4(M(8)$-8m%2-9(n)BFA{ z{@4z!5AS%_4aHe6u<(DR5FXcSiR>rB_vcbLmE3_g9<)ql6evolaQsm%?VL(5 z=z^{1(!#h3v{b%luIOuL??Ljn&Xn!sjMyP|m>aI4E_fkv4!F>KKhr^s)*waRr8B0= z)0pJ|UirNgikTgCM(sQF1MHk$eOuG=oJvsa+KI+fCYr>K&TcR5r? z_K8?r{AedESKeFR?Nz*Torc0mirwtvenO@|F(ofTVpIA;Nbst_fljWCF-eIJveSRG zE510hK1lWM@iqZ-fYmdMpD(|5jaryE5E4CA{aB3eP;WP+0e?4odU|)DDn(3) z7R9@iE_<-3U2{d~H0*6-qW0@(?{Vt>VE6{S9+&^S`3@8bK;hQdhIw3pZKX(1+8*+a*e?#uWWS3>Ue!{b zHVIH*0;{>P0;a`y(l++KDh29FmDsc#V&7~q*#cI|8qNP2H*eLZ7xlc?YjZaE@XNA+ z*Ao#Qi@h(9)Vzg2c|BTzu~N8VL_Kzcg7&cn<*c|!W^dD^J97Npi2ust9}}P2+9SVN z+fiYRhAkscq{I(g_4>4Y??)7&~Z{Gps z#|J+XM_@~)!V0X1uAfTXyJsCuBYy8zUyB0JtK4fxA^93#c9=`iqNXvl=#9^D8+d5{ zyv_G3R!b|r^0zPvtNohN^PO#UvF|?ZJ&WO20awZOd5!+}?ld;)_ivs5Qp1cAdDR-WO6qGfA~I{qQx|1#P74v0JGDY7Nk=@Gei={_j}-#DoUAJmm!6-1MU~ zPI=tJ@fFGm+0Yk<#nI5yb1*8SGz%3$z4a2k>TB0L$VBYS$c8w~oBge4HAI0Ftx-j5 zBi84&{Xa{6 zEG^lT_A3ek4h>h)=%eL_yyH@Yy&OWG!N^!t$6&CC7j~r$ISD4}*#_Yz(pUdL61=(N zaaH?@s0)c#68x+}$Gtj~JjV1Oy$#Pky^FejM(4@Q53c?aMf648#Q~!iYocm%pgI8&+FX8n^%t86Zv-u zKDRr9M7oYY1I%mAgi070 za_#bKDw?eiMeEMT1fMC8|Fc==fR0-}xjmcqleBaK0lq}4- z2atR<@#hWcn6zjjc+BQNw@2G+6DvGfSqv%BKZ4W18y`+_jArj#bj@p>hTC}SifISP z@%We+c16v*gVk&MBM7>wCyHQu%&Hki33RqAh>3;qJTBT>@@heam>dzOxv{$N&5H!L z#X~wo->S$(=OjKTVXd#%XXc#e09}H*q0dUz-5nw21BR}9i&)tfF9m#o<|Lg-MRj>c zlIYZ2A)$M7{yv*=zMK5Q?xHZJ3rnJE$2PlQdv&|N8*1$_yT(q8eU;$1H$J^rl9-As zHj|$@(Srracu0#h?Rgtsg3Cx21m222Oft|Z+LHtQIW0K~>!~{1)w{6d;4#i|EAb3+ ziO`K|&S^Oq_)(3D(0i*zaBb<(JD4o)bu{wroAhm|5B~CnFyAxpG9*NzaSd+}?q6L| zGr9KMKQegFTMK+4S1MwVa>?IW56H{4T~lTx7N-PARB-Rh)-w|L$(CRC+g%bRgOuzm z@j>Fwj5HMgK|n%pjh3nrvH%fMIBzchA@MqC8IAcTF))sn?J-3#jQr&Hgu*)u6g zP4w+bdg}s}YkwBq;e(R!X-g^8?{BG4b^XWwcHHv0PJyr$LRaN-hao;`YB$-K{FJ`1 zLx9jANS5611JS0;^qi|%J(J_r9hGLshYN(?wP_jwi}Fr0rOq3<^jIGZHb`+Q@o<;h zjB|M&=*vzr5^*K+J1bf5W)FymL=#l|mBD;vX@p&rZ_k^HAM%w5*gK|}@f5)CN%%%A zKVg<;6H4NPUSlVCTY8)9F{XkOC4@ec*{;#yETz7 zfyj5STb!kCZ-9BHb?Ia8x`(GxJ!4Vew?7rHhu@12M^EuWf&;w=o6n;dT|b7?V$-i* z+lNzl?A}HvgFUml?4({HgQeIJzc)QuVN_31E~3{eb>_G7(_%{?=y*(_&N2W4d#X&T zdj+pRRm9@Jo~rDgNMC8c&5~eB43C%(YVe0qbpLQ}PIy#VQDFI>io3(_U-9EJ0r%*w zlLXdV{BMm(28-CXaz8Vt=rF6;&5_#rZYeR395ynx5v6CwTw#E}G zMprN~aszQhKaMuCc<@he1_P6iBz{ch5nXDQeOI#RW~VQVKkrbgnmJAUJ)(4w4VAs- zU29+7Rr3&~?5Z7XtPuqJV9$BqR;OnagAHLz+4knqwLwmeLS# zWp^iJiJOHBgMV-|yuWJ&JU>yLKJ_5v)pRUlIL(LtWbY!hlnC2tBF2ORxib1%r)G?;oj|_iF2G>iY6|2gYd?(O% zh`KfuQZ!jrhzF7!~>iXqMa}+5B zfz9od@}!->>D`=+*JcL-Irh0o|I&K|NfNSZ_&I~^tv13>Mbz;EaWR2k_Q1FSiWzRY z@x0ynv_kAMB+zjhcP9&cgvCpxNmbfD_Jx7Lhg?cTRl_q(`=a`Rz)SSAg)6STo7I)y zyp;+xI6o$3y9z;TJlJf7UK?1!X(7Lzf|-fazZ0lL#p=wXNCFU_l^nMd*DRhT{L(W@ z@)3%{X`aIk9+FlnUO7hr9?cUwlzf=$d(qqTu&0d16gIfU(s^w$(XI}rj3V-iD?T;# zW`$g}-s71xhOfkbRcdi%h=h?tbOYULwv+j`ONg95TbiN*S*H;d2R&al+?uOB+Yj^> zM~dXgpQw?Jau(1HEOt?1V8*5DV#IJoJYEu0%F%_Kn3-E|Fva(L=?$%FLC*3kgMe(H=J@oP{7b}5XA3eBUj_!VWa4wAos760 zSoW!{euct#59}`tHvWVFxpb#Hgi949xzGcedb1FF43DVX%&1q#`t)Lq94FMN{KWa@ zZVMq^z*3JoNnivFZLS$?G6;Oh_$9HfCT4!f;!g+Xc8qbHW#bNU>`M|-R623z9XTR) zbc9T|?<32$G8*i)${rw>Tm|~_1z`v-^Ua-MnFu?uUb${hHzDGoH;&a5K8IS?M_+f< z4#Rn|I!5sMav7$71G~3RPC7ri18?Q$1sYCq3k6|G&nK04r?(mzM|8jCJ}|{+d-5ql zJ$@fJ)^6f_D`l6mr^&OwhZ&!`l$)qd1EMe28+@HbPKH<<*Lb$X#1~e>%~q>+X9i7t z@*c@`v0i?*N_;mGd~>K;pFS2@LBlNZrr@55-aO6HrN+MufAWoCG1b>0ySHw`v$-7x z58u>Suv=n7w;rcrrp%Y!6Fx{ZMSOprr387i0`euAd@eDavzW!{(LVwx9elFz~oy*5g8O&j5P_RVQr87>@7RHhxXGzUy6 z%)Zb(qWaX5%7m=SS49##C?-AzLj?=n33&J;$*et6?#~@`nSsNh#6$@xD;8=11YL&U z3C%{dFamSco(nLDvJ#GZGR-rLL9vZT&E+kvHGe0wasUrw!5;NYXxB^KVH@_ z^eGv>ElL{ej0(5gkskO2AT(44_{RRg}^VnpIqEv;>vG~~czF)1^H*x(Z0d%Z7xk&uvM?NwL=ku+t4zYq?5CyXmUq48!q6tx&R5+HxctI7Htl9tO5BX{U{s!h=w zHTQ`lux?&tx@vK3ca!x~^Scji8u!is!QuDH0-v{U1nvm`Z6LT`fp?-(?1N7bGPwXw zm75S9q25~+ni*;-CYPh(a3R^=qBH8vV>~(W&IL-~6te_ts3OC;z;<_;pS)V;&HzW}spU%$5OK4hJzgauKn$`A!$s8k z8IpiRIOe9Dl&)H-qxnD^C-v>hN`><~39h2Mw>gXvS069zL{$$YB`Uk{xL9j6)$qN? zRW}kK-yW{`Bo-)e`IB=4eKN2`duyqhGGStlB)5aK>FQ%tH}Zh9F32$z<8ObGgHKV9 zPEOCqWC|(+3Y~!loO^f7qg0mmKyS*%-B~29KK+U_*m7^hwtkA;BEZ3WbiYrjYSvCI ztiWWkUMnuud4mptq?rYIbY2CD6R+V~sJRzHir{PedE=pci&I}t_l;;y=%<|h2ZtZd z1nSYB$({!~C_q4D^;o#%GFGX?n!N$7oCLPs3f;j)e(AhIK7jFcKl-Wfq}Qi2!rY(F zabTUTyT(b$=|}HZmm^rjIK%6V4H?mtwjAMzZxxF|zUKzw*x5f`c+HkbfePAjpfd02 zJ)F0(M(0E$KH3kce3ALE_uGhqc1JmgKw`GnO+VijH!~l2-kB-x+CHK27wP9o<+?9G zTFFth$>Y@IMR~F-N}qh-BCBF4bEMsJi=N0>HUG8OdyaQFFbTYeIXhKgSDfbebu3Cq zvG?W;Ldc-zL2Fzpw&BLaU>S!3i@FP7Yl1Jdl~HodgNMLmvu29WXEBA4H0Sgmg+Aak zx5#z;a2r%W3WdxQD=!%8%qU!QUa?L$?6`&OnQ1!aFtyi}IY2@4z-CXie8t(nXVqT8 z+qv-`ppCjHsiVg%W08QU1yeD-2OXvgcc%S|D+^DQ0uO0nz17|s8(lF6`!!E@3Omus zgflBj>D7TUinrg)J`OsA0{rBvA4Z><~070tIBtct7`ty+PRgipQuJ{Y@EFOG@;$(vQ0S1<`%LB zB6Vs77<_8ah9shAepBaLI1T}t)j^OlxAI4NAlJxJbfkRG%CqgwU9`KC4`Up}#((@w zQ8E3=6qW(fqD<`8lp$SEU;uB#a!C(0UpD(_1-L4%i(d}KMYMu26Utme)bh*Fi2~Ef zlrQ`1)AGCW{I6L--+P|>?AsfqPc;DYbfu^Pa`FgCiD{~#7R$mL7}*G_9bD3oa^Dh` z;n(x+{C9wSiVg3I%D_W=z-M2wPKz@#7VAs1G*kqd_TyvBo;xwn9FLw3kMz~GSptIJ zhUt@&GiSU-4y3dmudVyc`}7?I?H*l)}O#X!?B#t4NZdF zl=O;(Sky_OEGn1SC(6!&_wTzbjtDlONEnuKY-bY;al#QgEEq{)y z9mrnM_k2V%4*Wtila7S5!`j$Mf;{YWhXlJ#6EH2Aooe}NCis{dK;jAz{=a9Vz{mFlm6Z71Zf=dA+*6>ljziGzPY}dMc-xBh58rV# zRCPc%zX$V0G|)x51Hu&L?Vhr=(ACRET(1U;i%!+xOZ}Cg{Xlrp^?u0uqclmNM!XjU z_|?T-lADRPac#bvzIWb=d`nXe9ua{mIC9_$46S3h-a|TcTWZ9J}25=uWV+i@w_b$EMVM! zkn49j+7z?qZ64CUV3B4cKk72|?)jKcn3>w>saYty$x4V|Z#-!jo6s-4xAE$9eMNvz zVyhznNfz(ZE3$&!pEtFa0wKj$_CMi7pR;X_ESY#^S8rwU?Fh-G?j15ih)L}l>Ka+n z`YnuI!Cg_Bb%eLl?imWXqKdrR?Kb9sj{;i4wp(V`k4XG80gM~>=~=ugsgCY+vy2e> zu?g>dC>KNMpB;%mYV6v!>7o_5UIdu&ZRMko_us-vn}dsmo`;c_UfJgscRKP_gjHYZ z;NbJFd%zE`SSrk?ril(|&(J*{$qu=EEsvn+r)sqlQzcs8(6TFUc=9032TwKe%HSGc=iFVh_zK!El0vA=iZy+8I5>^x zNK5N8V#>8FcKkc9RsC1-JY&PBD*V}G(O}!sto^|GOJXbsJb%OOQ@gJXAA@+B#}6jX z2FB&2rR;rjlEssOK5dLALOdXgLOvyTvw&*P`F|hYxOy@z470(}&`xjHAN!R=kixw>Hsy#bW6)Yle9S~ zz1$vitzi&BjtZjfXzY9sz9xRfozl%k|IJEG50GN)ok%p?0$m-a*H>RX1xq5SITn60)~_;I&-3b4(X< zwujj`8M;$0=fKf2_VwO9e~gO3jG|neigujH2q+hOiuar;pbBRIds+rwnDxeiIOQo~ zAL6{YXqROno#$6~>5h~}9iQQ|D9iAULuXv_PS3Nqm0>ZpMMj!X$9nbI6FdcQb~v)}etL+QxJhaI zU8K5C#`C?;e8_KAI3Q|aca>@fqRAp3z_HkX+$RzUB?O@4tpy+x{c>NUtmDw*hv8 zYQ0>lp+anv*FxTe$3Nyx3n$d77W8qWJQ2TSo zTmQmGE@;o|vdXWgYpt~hC4t`@MBnilyAYq?GIYLccc+Z>0{y|fnM zJGOSbmkaSfg}pUp!pOII{?=a6W}+bRBX;y>-J;Hm-U^y-pVx2>aN)luFJ-e!8e50} z&sxM5q8Y%8(I$)YZl^5BK)b1%Si*s*38J)hPbE`%AZ(bKH_T|b_d7^Ey^G_Y*|fLt zpV?IGzPeKJQ}a&7p?pQ?q<7mjkZF=tYZ{`%1mVY%4{Ps@govL5YD_bOf66TXAp$TS zH3r{YF|A-8uE(pO&-;&Jm_ee*k(6HNvRdo^PpxG?W8C{3c>K2fL^bAdQRu@T%-)oX z)KN{9kvgF{cjHETIGkRizqpY-hQR^E#eZ}WMX>;yp;+PDa8BxC6DmB!d++wa*nz?o zOqFKr8KmgC8>2tXepH{kUMy}t?%45imHHX*`(*42@oi@tsN+UWkzUx}iam(DJ^MQFLJVYwmKI37q?F(+Q%_Jlq!z&9^Z1@Z zdzMmXH?G;a zh|2!R-sYRijQ($2$wuDE6$_P+lR`Ye%JKE!mI-@812dEVpb&4;7Ia===d?dg#jy-a zl1&ziW%3ifNhW0V@n6@v=(@>2IRm};>tc~3RRy<`bI6Wph4qHMIZ*@PY`793RB?)u znQid~@p!r573NoGGXK>AFs{iofEU#Kx_fdGn7<(ze(dlk>AKr5=2VWZym*#02|DXHP^J^`+|=s?hB!zJK+(;b z8}hmp`-Q=HSD9WAasCP31q9dpdGp5Rr)~-1`5^eon_5(~z~b{nt;<5G(ICO-x;q&? z2<-^(9j`n1D!++=R&`&Nm=RU>ot-oA+vI>ZMvtkwT!?fD;Q+!gGR@Zo3L(dh!w)Ih z(D_aKh$5)kf!>qpy53+?HB8ce?pZx2T{rpy15>W2m3II|Op&6K&@JYu5x&|6;g zs(gU7N&mJ2Ip!2umvh`M0CM&nuX$$bAO7DDW5Pw}AY!103GQfTN?RgM=LnX@nd ztl{>Xe4qhOK5HMG?xDfaO&%Niw_M8u=I<&s;2bF9hMb9qM;1{HMqO%VI#S9xnV=LI zQBl3@Zg0)iT00pC3}(MXjB|gNP-$gr zdEx%XgmF=~(v%kzB&F=WV7u&pb`oYM-<<^Bg?e6K;Ub>T=?S~he6N<55qKh%wH}Ek zMkq{N02XGT+_y;6MKOhw6NB#i&kR8f-jiu(fk;R60=3vuOQRbAw|)&CqZulvz-;Ge zejQB-HPc+bp#=XV-aewm&>4m}zn=`Tw?_W~X7*}(Xl={okzL-ZpO(@>= z+OJtJeFGrW!e+hHUjKIorOljjj`r#1>QS^s)MEJw_w4J1e*k@q1~t3FAy6S^RjTe~ z{dsah^vUiY%#aV5tDo}CNUF41oh5hDi429bz?*@Q`x;i@6AOmnO)l!r_aj2rcOvbD zkfAIrM5CH39gxMT=N@%SFXjCXfZ7G>q<&c+dZBr3HpeeAJ^x0M&n=WLLE&$(B=6-eD?;EaJK;>6hT zbjg1+wf?U|aoR1^+_>&Dbcg<(fF3qK=C2cEr$TNOyaaeUu~QBu3WR2)ldL}(7;4de zd31v9zzH*;bMSq-@GTie&3@S5Lk-oLzqe{>tU0B7+JX$wxnSNj8>1jPVoP@&W*hKj z8!`N)S%AeU5N%jVp}!LcX$4&%3ukT6**BjPFw8iX#2q}FPG+2C%z5P)>i&fJ4DbPrT z-#!&2LZ=MRHK97n6UOX>t8GqgdB~^M-e-=Nt*;;VUqm>)<%i1HS#=qHSE3IvK1&+n z8}m|Irr~9~2>jZdtP1?w#B=k_ap=<}1EAtr1s%`-YeF8v1G4qRV!*Ob$PY~ucm7&7 zh1mTs#KV`G9SS%}QT>$pn`P&3(4zD_$RxtssiSwT`!(Gg|3#n${ub@Uk#=(nhq%cb zrV}&Y!w?hhP1wrnHHBLF(Rm|642O~Qm9D7wbRA@)@8q5ts?2vFCbkU-aQ!uD*`+I^ zIKQ7>Q3_eTvVgLG5ZFr!0W*O zO8sFTip&H*U96g;#P-M_y5Fs7{hBIu%a3PobS zv_e4GS^3|ijji!KwHNsGdbg>BNed&HnckA;U98BthN3{%Jnhy`L)-7y(Dh8k`VI4E zr`Fu1pgykYz(-(wjh*E1&2@fS3UM98ZdXlj4QBo9@vfN(nwcx&=8du7?1OPN)icC1 z0E{I<#Hyd&tkn|pE`cP8dZClOAALN|yKiD&Ux8+U0-Lz+y4C?P`l@s4V)W;S0TW>{ z_jyE`-dLY@n0QGpDSkX%zdF+~GNy+$CSo@b_g5|FrRltA=jMUZg zRzH47=*X1DVf|6D4)C{|Ic}ePk+lCw<_ej6{J&s#N&vTjD3|@u`^0KN+P)uC-YBWh zEH~nBjV_$X0)fCF-pBl(NtZNt|Cv2e8_Nrh#tc*cCo{|;ys=fy;|gnkC3sJTs!z>J z%OF;YAW2j65gXq@)`0|Jq;!x4P#NfgMjjHq=iQWlp;kKC-+})Cn|Y-HGYX1C{XYi; zHC>E)FPm5lq0o)M{c_)u1mpKzY{Jdj?PLbcD%#w%2Y7y6ly+JPzai~c;1Fo6v?6;6 zI82sn*NTNSnjh(A{*5{T)ACbGGY7$Cewfp5xPO&zQ!iuB$z7|?9DGw2*IC24eMjY} zH+JW$9Q3B|?znWp?&5fg48GOjm%Q6v^FzT7yGuga**lru5+nxVe6uk4{sX2&y-R$Kbvcygy5s1v13($LTnp7hPd{_{4bBfMynT(|Q_|`+e z-{kpyQW*r(BvSA)0x;u$z|Rlv!r8a5dBmw20{BK@=gesHEZeu);t8JiU9hv=nO#wV zD_x9qmJuaf<5U*gjhlJ%NeYBSdOE!^#2}c*;z*4Ks|8MIGpEkoZVBR@wa_%qsPh&? z=P#Ah#z8c5Q^B?LUZjtI07wBfo+csHbQk!RW0C=PSHcSy@c2YwYeurZUbDE$bnPex6G$xdy8J|?y9doB7c#dCAeM=Scpc#PjY&oHeMhN z*Ofz6yt^P3tK9xK(`+{h|4Qm-G`owvNXlS*%C<;0IQ8pK%rIMzf|Jh1fyNKVgmr09 zvz@I6Ygv24Xt4>O?*Sc&B>Q!N$`ox2%=uL4FLlzMg!I<7`ke^h9*7n zZWj0){p4g{FYb4jJ#P5Y%gDgA;r;9%K(~KxdF74}^*yw8N(+lU^UJ>k@c$UH^)=wa zO|)H&(jfCP{4#$;;DEILHW$GLj_ojVMaLLCajJgat0lOfeUg@miTS0f9M9jN6wV&4 zh)0qn0TOGK=tP&6#W(4-Fpe?>4RFwm6>+= zQL$lX!@_?wNQER?KNzP-Z&ue`64}y9Qb}?71COE0tk46Jo9o|dOpYpBZLPtA*9fEy zEDw2>fjS&1`TwlLi{%5n;zeXo3Edy7QTcN>4$F;>qz|w*0Q6_3tn(7Rylf}$=0Fwr zmYkNQ-!i2o@$S?UPOa?Jnef}OR{3`UlJh1NWR-yNJyy*Jh3ut(W)-mkWf{QFNzo*g z8q+--6gjC12U93+%r-brey;$vFo+6e=LcaWEdadzTa<&y|OqKGAzsJRcV%EGJ*Y<$0>igu`6-6j^oWF>z?i|z<=CSmKY463$ z;5T&Zug~!5sm<+NT45kY%!EhL7mLtQkUVN-+D9%1#Jj*E-5gE)hSaM0NE&N5SVxa$ z3`BG~drS30H9ph`5?T+?RhQ}aJ2>z6){6@0>^PV=G6HP40l;Q>3HDxY(1rnc5VV;5 zpudl+@k~W*wr8#JX56-$H6Cct=%LY+raxEarrJjayg2|j8btUzW3B#g#S;W>-qP`4 zTxA>CQ$U`UMn`=!!P5xE#!W0GO+0Th;pin%6{`YsP;yiYOJ5Qx14UgNr8k@bdkKc$ zazt2}SoZG@)51VCvrQYs()aQ(;g z+~>~o+?KIId++=|)sOAaeCpkj)0d^8gK|mq4e{Q2os84Tl0be{@mE}xJ#R=C2Ufk? zfiJT^A!QxRyv4|Yr_FPsUL?qrR{S|Bg7u2CTzlQ0r3;!^u(6feJfu8?&&ffXYm>v9|p_WU&jn(p*Dc;4sfg1U~2v20xLY^~SF}s=JN;}vM zvj6-zj9c%if~_MugWi8=9K!1WrZGZMrveANHE*oh9g?*18x4U~{#Fixb$OTIAs{cI zB~Hy`*RBW#@{UqpAkbrKOd{=%IV3l4E{LnT>_ zyR`3C{I_Djez4`sqf;`wwz?WRWDYdyKD7)y1VlXy-l~7k2VjA_a1bzYsHdUPGQZR@ z^*jPwA}xFt?-ysa6}9JB-COQ_Mfyu9OQY8{O?allWuW&$lIHrqe~A7d50tIQ6 z<7<+cS%5(WEF!y!5qIcSh2x&}B92}%cO|4O)gBHZ8Hp%Mr>!2hoEv2;lMyzp!FYB3 ztJEhgjTtlltFjqM|D6SMod3sTd|%SARy2*kNrGGA;|OI++{%)V3bmMFF`ne* z8l-X<&3^N8b@>Sxq(o3W$l(uXt(Wc1$<&v5$e(s2eO7qEATp z=7Hd|!bbB*@BtlcaR$J-w`}Ahz z#~NPIuboGam^Sp{G~1rl>ji3`!#Y>r!Kj7_%6+mL z3Ha9I@$NcB7TdlOM;65|Wr5)WY91n_vI#aiSkbKu^7)xA$xgldg1WHpU~_qcDesCIDkp$AzaxG6d>@-M#v8ycuQRQ{!1LlEuT zt!mUG?_ULi(X?zdRRt0mPU?J@B|s&U}C)i5yUyru!iRMF9$?|Z8-Wo*4zDjlw05gjjMMj}xE zm*Tf@2nuTCFRAjUn9!SLVvj$JtVSjMIu)H@Kp;G4K1tK!#U99V6&aV^3G+A?2x|9T z;GK`>gQOKjgXA1!jIqWOM;<$iX#?eH?{tj`pg9q0(|Zl^$Lo@kJlDHmnMRnENvG+a z52XWD0s;+3CwGkg$Djr>SCM2GAl9l1UMvp+E0$h>5B`GcYRoUeGscZNx8x7YYRG|Z zcHW<)kn*!PKL^e)Cbihg2;!E4ARr5slH}71RLBLo2>M;Q8SfRt_h^VDyK<$oPxIvV zRvy#zZl8;D=Hd;q9eNLu|At@#yp9prdJYgdc@h)e8h`+Hm)Y*-TrIcbLv;QSBAOMS zvO?d_r;f(4B^G|G=mU}j{lZ8f!Qg(6cJ_+oU>iu1)?d0H@_1QC*8YRJ(y9r?he_$6nC<~U_TBO2-A{JCs`6N%?ht3l!;7o7Sn z-Uga9m#z?$Hz$Y+5*<-&6rV^{DfOv?GE3g6pMPmkpjz<`D_IpT3_VsoRRU$k5V}N9 zV0u9MY0JR!2UA{0jGmL1E^Y$TLq`g>V(_3keNp@`AN$Xw<$Z95LSGbO!{8PGLXdSE z5(?zH>u}QVYjX~;ey4t1flSIXI3^#1q~FW|?D~JWPV%(3Cb^-7T};y=c5UEs6Gc3q z+!MT)PhH&EW*!YGHD<$xMLJsG>U)hPS^Q_*ZrA@ym$$s;;>h_RGJH}YdY37DF7 zv(o+qTm1p>+k358+@W@lC=tEj1Oh-Qr+;|8*fCunZ~=>wNhkz>hrsr|qD`CQ3GU8V z<(S+x%-Ih>KG@>xFO+#hNYSKzui6vCo1*JiwYNs35)V%e$sD>q`isK7sEiYpA^H%j^98}cjo+k0 z)G%45-9<4)k#+=xN#se6|10ikYOCxhR;jcHK||Dwqnjy0%>NKKfursP#e-;@^U z#c!V+DMrAX@P*O1krYTS_N@YV#()h>@#D>>XBNGhj)-s2jzNa7`!mP+TzTNza`WM*{Yj#hd`sq?^_YU?{|P9@R368h-fQ1;j)8!DjG~vgLw|+Ty}hW~&j}kzAk7W_ ztT$p3grl6*Qb_$&IKItpW|?Vw6XZkL2sTUoB)2FO)`<8EXo}&^Cp;`5R9Av#&wGd{ z*VVwVKNU`I7D%>ATHosJ(mVnJvmAOqMYZ1n44UcAEIAcm6}S&_2VmYDEs)3)44^T|D#|mP|epZIROZDDDK@u_<;NOCZ#;p z&;*Xg&Nn~dTl{)}ntq?@h~2_` z14-VS^A|;~pQ(#~S6e9a=l8Ua*iD`5zq#Zih>GMp4i?Suo0a@9I17c(AYvqnTtF4R z9F+z}wUZSLj*kgkJ;L4V*LQeC)t{g*JbF@pxU@Dkn?1p=CYb+GI|jMVd*bhD{=dTB zJRZvS{TsJssVtGD$k->5rDVx6wnAk|-Qkv zo&6S?BBg!iqO5_BnNjfWjlmSm&m7lEbH%lIJO$nzhM%tS3VxzOO_ORnjZGw8)+lpV z|3j#KfjPAV1MRyL%u-~e_3ldiG>%SC(sP?1c_2VdLEFdkDs%teOvI@KNKVkn{O7}e zllgAiDjh+C4&(rsg-Rd%f~hQNB73d{m^FEjT3l0lfb+XGIi$=8L;9h8IwY*UG41gn z1NPP4OymF2&!cCPAW#AT!~M2L50Dwx8rSo)YtXlH8U)Pq?14WBeOSz?G3jQH?E!kF zDxf26B-+@ky*nfD4n#AgW;Lw#g)(U-lwSr$ZMeil2m&$--sdxLaO#)V?<6&zbDM`x zv3!)0n{};{A*hbBJ>MPFUZ37Uf)D19|R#;D}SJQqBl&1UUU8er8oHq*UZYgED%2x|6%Luj#$83^=ODd{yy|K!QQ&+mpYD!K0f) zKY)C3bTp8-&t%>{s;4V#vnZqHX?EXpAmilG6`+cb2KreX%kw)VoEq8n#L3wbN}cd8 z5G+j{e6rH`9I<-TC1kgvET4ACxTJ~7cZB&!q0m3S>Xe6oR~F@Zba)gTNx`v4{z3A4 zu%bf}pbrxe{y@C(%;4*_)8do35IQ!ubqX}-4`w2=N_95r-+OvSDAR~h%7k6)cd??1 zUeLkpl7%;n|1DUc%8882lWVpEkify+Ed|{CQ^Yw3!;62k0MwC=yLF+OrKcwKcm?T% z+l_VgKL7uVkkzy7zq(;++-jc^@RYF+gX1gx9N=-H((KG`f7etTkQ4zHGQbD4)lht2 zbJhcK*wsp=ZC8z_{;pO^K!WyJ(+vJ#PK2f*&!)_9_p|?Y)1rS$1x#wwevWVV6Z&1n zS)MayAYIZKk^iAu)sg=q+A1&%a8FKX$-gZtIfq00YHDkTJ9vJ`0l9U}kl1L0}A+ zP0{wg)x3E*lJ&x>i@k`Q*05c)jLr-DFZsaC#dD40M>%TWkCVGYsvvjMPy2ZK`x%xu zfU8Bu!vg!c?1UZX(or?7g}{EI5nMl#a0w{eAu)sJ5r-8|e9fi}mCYVvUXf|#v^{@p z4howe-5Ck7KYK3Re!Bw~GwT|Z1n#_V=aepd78-^o$}Sm>`x39L&3PA@eqqP6YZ zT}iLc`{e0Evn60?7Wl=59V5E0uGEK(PJtE=WAmzIo>U5^LZ`q*xm`Ui(@yy*{a~HM zJU$M(L^M(;M{NaR>_Y+b5jpAPQM)0q`zt_wWVMS!3Id(FKgC7!qLDboQOK=1<7s252YHzIy(pKNAtM#5Iq9t^ab}Z(pef))wMU^9+DHE|S z?+A6Q^ElGS|FCBUVJtwTY52^`ql?V#cf+YYd$Bddf2KHtW%kUHj-M^2ReAQhHCph$ znX}3BWoEUR;MtS-3n-BSCub7?lgzjbEA483Z< z(YV3;dTm0}=Wh@uXeI>Y4P43WgwFV)kf7;HlYWwExpf=dNR~Ii`B? z(RG&X*8SLt68==kToeGt#tN(o)Y-eWE?s<pl!ln-o_R3c@+Xk!dxiJ$=UXzcJUF;#H*Y~OWbi$oBVA z3ZM(7{xo3-cwyuFTTKC3nItsyc0K&v&wzJrcNIwlD}-p>lEuChdvSW^C^N@_8B8TM zV^L@8A>gwM@H1!?&u#X<`)<4WD3w6KZ~kqCe9B=mXca#8C@h!|q_B1^CsB??3RD{V z&A>Rt+c;d-(2GUIxA116gV*2xa{QgWL7(Gc=G?c(fB}0PecHjP`kqC9;VrAl1Gw_+ zg?qIKFGzCitT-!>7)dH0*`25{=Jiao!@ZclxMV5nTmYQY_>$5gyR-9JeRnUNH4l&B zh07%}bxOb{D;weluiDe0%v<@R80yzO5h@@ZIrttRId(E*oi8-;@I{J zl1n^(BLHV~@5lYr@9IZLi8)`)Pe@MD`&<9Tx&7Ns0_iF(s2FnP?ACyl{WJ^X*%j@m z+Lq&SU=St?NZI2{|E(>sX3j#)-;GvXQQmOJ9-o+O&tc5OH*(+r0$<2j+&r_43Mwj}Q69%p+-LtIb79 z>|&rp6q%uL7T~1+w1_UsRQa~F{O-wsiLP$lWhkD44HF2!b8daRvpcfH7JsN|X=WmX z>N^blrP%kz(+MBRvX5%U!NFbE-IZZqthT;A`6Jzk-%oZlllx}AXC2e_^s`Uslv_6s zSlMl+b>D5A^byBcyr6o1qlM74@oM_TmJ)h%Kmz6lc@a?On~M~xxojQ)9X=6sMUYOe0WxQg)cQ>5 zi9VdY7BJN}XgqzGar42(N4QuO7|7wt=sus!3x-~A|5L`wA;T4*0z?b=p^?g0KSIJi=>;X+I(O4b#7+8O(o`d$;p00`1v zqJqJ6*ZjYk;;}T$TS0sCDDJu~qkq%#IG>fdY2C(!cH`r{vroEaOs0(?nBVOm2^{yE zSlR&*1qHguR>AQXk7Wx^IZfMv>LJ?4SMxU)H)?6~?;wH;aKWY@)K_6Gc+(cl!*mzt zKaC(+)=L1!eds;|8te~ijcRUk@dSWleExK1uB0?QTl4Jbmk;FY-96G zcioIBv3y^(QOy%*)pAl#bw>@EwI4P?kN|9!Ola#&2=c&hCMyq!=VJWl%pr^Rq-3`z z=oEs(CcRwO@Y8k-s@*AVhNnUulaw%24>r_hBFGB0a?i4Op$we+59e^LhK z{dTGJvqMOYt3oA1-C*AK#{=IoHN!G%n2Kte9OZ5KK-(oE;e~%XJ7Uk}w$<caVdU2JXg9y*Ha)s&{DFgsQp>kVL;t&l7n!>`8+tKHM}J#x{#C&qy&Ut zN`mD(l5K_Bu2#js?FFQiqf)S$o~Ksh2B%6ndM#)+PPG>tGxH5UH2!9?78Qm5k9?B% zErkMztAlMzVRf@TGkBC!KJEHybKaAC{27o#LQrr(UEB4HD*kqMYDDk=2$t_*!w(zI zcbZGF(hkI|9(ETfX&4(>i!yU@?FJd9ap}=$Nr}Ia+of z!zBEJmBx>#=M%92GlE$??d9mL4|uY$MSv;r7`;r4eU~_?5e%|f8W6EA)1w#JcJLqIPh1`1Ih%;9CtxW`8s+@0B24Va-zq+8w_$W$jf2MrsG> zUN&1xOmvGieOhW`I???wGjN~6hu#sT+hBI@LMB}Fz(Gp$FKm_h{~v>R4!>6oBIfN9yJo-`5IvxD#V=zQfZ5XZ6e1&r@n zAN+x9;%5fSHcr_aUP&u=`&p-`dBO9J4WLr{LC>W|f;s`-Ow#@HV79iadC2(b@LdbV zo#qrI2Xv^Z%K1VtrMw2Xt}`DT_3Y|Ip=LsoT)PoVv99AU8IoLYEt^I)AANfSG~+KF zw&d}&5h5F`Jq9*CEKn(ChhS=s3dX%e?-LzqFYKc8n zI8`jH1h$$sOsE0l{wUORIX~!BNjDg!7&^ypc zw=b&95Vx-Pl0bhKd4xB%BBMYx^}p2nI_D2YqK$1`|Kz+sHHwT80^zQZzrruM;>~UG zx6Vc^cfQ)0sqXZHlT2As`-0P&Hc#!W#D6zmR}^~tw)3ZFjY07I4ZThM(A%kymcz^D zd%1V>n#`86T4S~}EN#63(U-pOXSR;-OU((J*oz3%Q{X$4h~jnnlYHhS-aEhOyq-bg z{_T3Eq5JXSVyQLxNUc8)yMkOkx%bf1;rn?HpXk@;eWvS|`oXsC^5Z8K#jj0AR?iH{sAqjhbV)ef-6`0bcy_Kd zy3gr^52wlJ;s=i{gm{|otRvQgs^9Idyvq+*8f^^04~EHPXb;}0m_O^jv2bUnr|#ay zOXB|Cv(=u9lE@P&=EhE9AayWNO}<=)%UaTOvK!>q#E`b@y=rsWSd(S92+zmqXbT=> z6O58Kyn97&r)Kb&73{P&`3g7pzWN(aij*CxkC~`t^97D0y+MDUB){T?XukfZUrtv; zXJf+WC%ZTiuQep#%yDx(Vw{mG9=7n}X91jD&5Dn#=XLO=nqM}t6s2m!t$~bk=!z|XQ#uauEgNCZnT4^efeOkf)WG2yT*y7kRIL*dJYE;yvz=K*f3S-BpmmGY zie4lA$VjZL6>8-?pDsbN$x9lf8BPE68-Th>!xv|ajXjyw zvM;5QB3F}?usin0XyfKwmcT2iBtY)#j5G{+HXf3QOM!FTQq|xHUfw_-nTqP8j@z5! z%}iK4 zEp@rIEUW%4rJC_LrPi*K;)=~`L?lSWNs{%AP%Q+5`ONNK)jaDO&tWkPOu6Grf1C-z88!Ge;2!CJ`ok#L8b+_=JI zETgb86m@}iADonm>8zY>zkqnDF6AIk)wul8E14I*?|5XakNTU&`==MGA7y!q)N2r@ z6U`B!X^?lKozll=J*t(!kL|yl$gEmEDU8g8C*;C6=nK)Mz=(VW!dw}IA6Txo;;Ox8 zz4On?j5l007q;aBesCFV;Qo2keUY2{lOhI)lJ>CT4Q{ z?K}mj`+Y{059j>FrncdtSlM^c*aJ9rAm zISoYJmQ1>Vzg&lnRWC7Zcux|%ggA&_=<4NMOH#T0(o4bzd7w?$VW&5M#Vq`w7On6K zb)K{bim(x!zmmvs~w?Uks=heiG$ z7*Uku51%MX`L^iNdIo~E>bHp*&}++O@QRFu1>W+>dcdZ3tIyP7u$ee0P33q4nn<0M zL#c2AvD6-G!a<8q-mGaMx*yAKSk{5vGFGlC=!!hYpIoO3JE-O|NPm9?(Rv8eS{EB% zEkp!h!63j_Vv4s)oyNrU8~}OA#KTP$QR;cSU#-g6Oho8UATx8fdjfBk0gT&g3 zcjP?9oNf65fhlyuG_q$9C)DH7>i0}E>9j1D9s;#(1&C<@kcA=i~o-1{Z z*kQwQ#$1}zdkzZ;ovnx~RL7AauoaWj(ji@HZ$3YkH&$3o6g-|BErwzxDbpitU)@7j zm=e`w)d;h9W2?Y6k{i|BSxt4zL_Vx*zRxzFGiCcT_oOl}fo)M{Bi0iR zQ#sozN3YK5@v=2NVQ%W5VXS!z(v1xaK7OF)RAFeCD!eJq}u9a%q_igH7HB{!rLOHmGg@p^*DJ&Em-;ioT7Nf+6=J z{l3(PPo_{r<_xs=h=?{(iVJa$4g7Hlha;1TzT4*piCUNOXAwW=tFyJ$8rGw1TWbV$ zjNmU_T)xhr!;W)3<7`Yr*C)@}42C(9T}H#l5+NxDn7N(K+Rh&-1^JyRvstk;N-Wn* zbQrrI;-gNchYZGI;NgKj0}~0xKulekcx=E$lQE_|TV+TNjhz)VH=gD7XUa!sIBep5 zXHWJ-H*I}+HPKQBNf-><9bJmmtOzOr!#4$_1{0Kvs+Jiz4=>J?mNWN~BbOG)vfJy# zOxbV2thKr`9Lt;XfJY%4Yo$NxcJ~7Os!_c5H>?C&4Y^uJv@7E?Cpeq?FUy@3V&-)j z=g_b4YJd?h20DU6p2!MwYMVe@2znuhs9;=!@5c?!-aZEOtrYa zazFuPt>xGLw z5_X8_K5p`cnQX9g-V~8FTX=8bqAfVMl1?Oozlt;&fxk!55npBh_N_xHNQb3+hn-uJjI!1oj6D~od`&d6Vd+vn`_;9`18hQ#n220aX&peowKL*3SIvD|6<8TS@ zesCDquAi~Of(em?m2kBO+)lR^)D`I}5e7G51UG3v!!}@SA#g!XFR%#ri9^lGoYb-)l{Wzb2;`3IxV0NZA$z8g* zCga2gr;JXQjPi~|CwKWyL1hiGqguS~^^vO=S9?PwQN)$26?_nPOHY-uEbd7^tQFs> zzbja`#T{-bN<7@4_J-`IIt8?5_r=J_m3;eNoPpl?UfH}6*92es(JxqZ+fR)2#y*H6 z2L9bDPnu=ef>sYEEv5WG_*j+;&2QPUKTj*{?BRihUbr*IJuE~j%fG%mKxFoW2V7}| zbjtb+co~l?Q>y|wC-BrCM=(rZB**=I*W+mw@-IT=57DFlnv7XEjlDC5FgW>dv=H zkI96-RLX3L;6Xi*E00?|F|Mg181NQJc}H}Y=h$XAyv%ENjqra~L^>y&9c5ZcWOL?P z&l8+8k5av&Ikl-6PWy+m^Am-n9%FKvd^%#gF_)%3Fu~%%(6E*q$@1`8p2EO z<_lxq1W|ul1ZG9wWQ=S&bL}~}_(!WJ$pkhR@;vYhEVz5&ikOTU9JMAclfA;?_x`-T zF6w6Pei^`*_J&GM_d)dooHK1-SMAsCzl)k#_tt^V8u2OR+R|kAs015WHSun4#3%_D61?IYsY~Ps`K9XZL-d z4aryM)gO{9#e8;sr&W3Ofb5Sz%QFNl9GP@ArRyen-ZzqGMLKx)*j9hRr>jsEF<8H7 z`sX#ZkzqkAYA*NeZ5*&OWy@o zD6GmrTADcn5|M%SILHVVRd8;+$Ywt{WZ)0J{;?^%h^1W1jn^6%l+}lm4M4xhbKqW&`<99E^b~HaV(&t){0wuymT+vF$?|?C@@#*9#4}Vqmsy za;(SV9{_+vuM0o(c@talh+zatdise_l`0IPr;7w^zYsGWApN66e$|8PApnRHF%&Y} zFDWi(oSJ6%5|!*tun*I8cyIKxKJRLmYP+l6Vl?H6Fj%zoQ2$ENgD*wVv{2b`IP;U9 z$)J33GUM{?k*fsZFqKr11v`$wH@i6{z=KIRoPBl|_8Ro1M%-O(S5^>5&jM@N_C-iH~ zNH{48Q^1K;ns2L2Qo%1Lk%KsV{ZZ0^;y$}`I$H{Y-#2{-nkUpITZKGA^XHi2T!vpq z`FJVwQug<<|FcnXvB=h)WwO0Bnq}>r5w7ob1a^iP>*Yw`6HXTX_ zsDrS-ZYUr1J<&*MAK7KjQOg`nqYMa0f+{MBog1@-Oe#Me={I>nbE0)x%BRSAKzVF4_fj z=|4@`htTZI05fb>dpaHr49c7H`@81R9B$3WROfxW8nB{{7?XhI*+V6{hF`Zfx0cr0 z;~%LRx%)DyIBWTS+#Z(zIS8Wj;5k}#gOtjG{aCV z@w-(Zb1K^L5(1!y^B)WIw_0}8sd^v^$$U?NC%~DuLXt9R6qG$*IE-1vzhNY@=JliYGN6_1VEU%! z%(Y#JLFTrIq$j5FDT+C$V*Cfuod$k1W5f3NMToYyK$M@D*C`s_c4Rsf((=W#V4&8zZjtUlF4m6>_yB8s)8O6PrEzXGuAT%0*r zRW1dKLFt>{v{#eKPPK0-QQ)hJ@|3x}2ER`azIn`@Y&8Wb(-M?YL#+0i8OwoyA7+M# z3Ho_piyq;$->ON&4?9BFOhS+LY#ApymMKVaGK{Jl{QA@ddcDA}Ys+=O;cY(ht^z1~yKJM_wk8a&o_ zDfn#i#+!?t<5EqfF(e~q+=O*#_JLI9Uo^m*y0S9^s%bqDMVO4O*AsHOd>wB#n$(*Z zH$G)K$s(;ekh~7g{=Q_%8|4h)DH0h}v}p z@HKb|JGXll^2=G>1o6B@Sg2LlIM!WC`4RzaWF#^6T3D}@EjeR01^)GSM9p?%c5yT$ zmUAJu%lb;$)}K8?1@j+=pAMb2BB z+?NoZ!l@|Iq+h4iHwaar&d2+4Jc&@tcdLK)Qx3ACs0zxW9|Zp`tf=6lheUT2Pb zrXQc)t5*e05m*r!=`JAC$f#Gg0i}brvLE4<=W!j>O7ZKx;#DK&lj#*g1|VyMW;1D0 zBf9V^aSbBF=NkdUI^Wm~^w+3LhH|B!-?oV3@(0-FP|quh4pDyuo@JnrTb{6KAO$z8$uC3`(Jx1tHlR;SMPUrZ-}_6MlXd)8vjeYBmw z_{l4S{qTTPA*p!Q5~2DmQST1~%X&!j%}_46Bw$gXE>XHenJ&4h`jGM`3{j^`1P0J+ zpnz{#<`?TYxUo=2@wB+bTV!ZvaDhlf0W9la+d@F0{DqY;eS(0%Pc7*cnhmrpM;VCx zlg0xIKp!xr;jexTlz<>xs%@PL{5(4L1zghey;Zo#>Ff6b7l#X8u6m|E#QIuBN=f@QhLU!i#6) zGG-It8|M+1goS!e_GEOv6Nf<)+(UCI>L<{Wnt*nQUO$QyuI6>{C zDiuq4a@!n%v3|Kp>0acD<`XmG<+2M{-{fi8selzcLpJT6RLG@SW1fI8!9+9yjEuYk z$aRLXs=nLvs!~g-G@*K$_{=tam53dUEnX#RJ!I@8Ag2Z6Cji^H8s1AKIgA94IU!N?70jY)9r;XdVYS` z{qUjM_uNMTzUNovM_0`ek;>GhESivVXu#)Si{7M%G$A@07aCS+K^uF6-&pehcmO;^ z``eXI?i&IUumjJR#{&bm@H&4n5T*LTj-rJqqUahJ)(K*lZB*;qE{*iswNC;<#P6 zln7l8006YKZV6S?)?=4)Q99PeOr6m`FkW-~^*Y>QX9TXqE0u;8J$nVoBAeR$iZW@?ix?BeEFeI^DvB0oA^!W=eb z123c(Sj}(J&c9lEcAa1#@>$0II|VG37@u{w+4ia?tDPHz5nJY7-xR?LcLA^UU<|WW z-e|s}yWp;B*qw2q$G6^dbcp#f5rstDBr@He@)sVWv(3NuZzSkgm8k}FfG7l9P=%)ehwZpp zs!0A^oF`!fVoY9cslWKq4rGdp6S#u4kaw8N&2z`2_zRC7*W22$&#Ig)H2de|=%uwd zd1F6zumi+mDb2Io)aQV*58Q71#zRLE{&9+D8+|~G65s-x=E3B;+WUA5PAxr6s*^*X zK@ymelstQsIja(Q^*=EXe!FuARB4hhGq^}m1fN)kM=D>T{DF`Irvh#2>~eZRC7yK! zRQci{`TpVPOLP(XDJ=J^h|sVXa!?&3aI1DEaI4FN8vNPXT1o-IEwi^(D+7XSE&(_U zyZXs=UQaJu_YZ`?vd~k$B7Vo7dJhgxCN&Mq`=+b|zCq&A+MVgTZ*B3t{HL0miADy0 z6CDkR&^bvNsKfb>ZX;uX@&EgVwoF6Qx<0Y}+$srs->Ym7E^&#e7PB+f9m&4P(N1*d zbicHoLrKC#5{X@LNO~Q@;}G9f|LWb8Pw`&l1N#>%qX0WveNuy@q3}>7Ijxx^)y4Ad z+S<%rSEsJ=Bp(i^>Pn^zZ5f11wOE~rPA8qJDY;C`U*AaQ@COCh8>#<6Y~Kva8-RG~ z_~UUG;Te`4uJom91HZL#W!`Ys|F)1zbtx8duqE}oRXh(L6c7f4L9Y}3vwO5NAv%I~ zA;frG8dSdjsV;u+R{PE#B&~UR%gmn8v!O1-0bV$6GHX!#FKW=sgO}DbDN%YtytE64 zoImX6I~)uMPgAXA6*sU<=UCVQZ*r230}jeYDgs94hqrgIiUX-`gLIMRuFz2oc7K)1 z+o?O|Q+U1+FzuJo_=w_EecbA%i4;8GvvG*?|809-@(%c%F%Jv)wndTNIr`2;7W~kv zObXFQ>&*)>gLmbXm!N#C>7NaG(S|Z6h=pL?3&nj4nkTX;JRPr*g6bF_@4pk!u+bG` zz2IaM1CeB8D|qu|B-~*4wFh?v9UfsC#s-^l=Gtb@Io~i&3Um7waeh&oXOsn7+9%VB zrYAC+eHd558y1N|JtjG6mFAW5wHY0NkiLp`oT6XKZF#0L=#~*_W$5Qi+S8l(F%^6K zOF^i#r3%=<;I$;~Bxcca0FYl?39PnW)bQ<5qnRpn+mNVo6{x0oYr(i*8epaIIgwX@>zsd$cxm?2=DM^yR6Y)1et=Z zgf(h*-GF6yr52u&0h!qkFo=d~;C}!Nz>m#@cQrFN5##`ITiYK&#QaJJg2TB-39$1>k9vRJlcY~IJ2&!#byW}w$%A3^FyO;TE`7@@jc zY~LrF{+2M9Qp3%Cy=h7QWO`_|v-vc56(wkX$j)I+@wBGM3V5TfeN2#$ zub)R>$uFEhoEYV=J}Ladz~6nskd>UZm-FVL`Ne;4r0sMx?arFZ?PB+fX2CQ~Z7w4N zu(8$8V$pWg^1L>4w|6ZgO>f*|110$4M4)i|ur^o*Fu*qMt?i#-n;+3r8d+|q`vVp# zD!o_!5{)gAq+cKyi=K`?J_^=m^(BW_+*KTDGBoLtVeKy*Jg@mCZRrSC=$G{1TPpg< z1joJ!ja7cA7MGC&{gnZcBF5S4!81zj6;&_J_Gr*5crAO(@>rQ5^k9vt-I25d)Npl2 zN%77SUc9xFgoenACI3QYP9g|G7CM=om_ybf4bv<-Q7 zw$pG9pk+D*2$`BLp&E2`B!qSRgnOcVG$(xJ+0DX1T$(6xpkCWK*w>v<>~Zl9pOqK~ z;DiX=1l^`$WANxjLu0Ghv%|P*Us`uZ4fQS`S4SLJhZ8vr>r0#Ki3i8<=iOB1-MVj9fg;J$064_Dv@Lfu zS-%u1PkUf@ZfWIf(c-)ml0E970@yod(VpjT4RDwpAIE&~qpj}_{gl(->ex?zr4w<4 z6vV`%MR8QQ$R~@2@|xtuHiMD*dLBC`CNkfp78dfG$u<7Rr;^==vsR>0F48NLwV^m< gQtQMs@#y7Uv!)>Zi#8(%8Nfd#=gbT%^c^Gr7wlBUUjP6A literal 0 HcmV?d00001 diff --git a/flytectl/docs/source/get.rst b/flytectl/docs/source/get.rst new file mode 100644 index 0000000000..3fbaf86d4c --- /dev/null +++ b/flytectl/docs/source/get.rst @@ -0,0 +1,3 @@ +######################### +Get - Retrieve Entities +######################### diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst new file mode 100644 index 0000000000..2863700592 --- /dev/null +++ b/flytectl/docs/source/index.rst @@ -0,0 +1,76 @@ +.. flytectl doc + +########################################## +Welcome to ``Flytectl``'s documentation! +########################################## + + +Installation +============= +Flytectl is a Golang binary and can be installed on any platform supported by +golang. To install simply copy paste the following into the command-line + +.. prompt:: bash + + curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + + +Configuration +============== +Flytectl allows configuring using a YAML file or pass every configuration value +on command-line. The follow configuration is useful to setup. + +Basic Configuration +-------------------- + +.. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///flyte.lyft.net + # Change insecure flag to ensure that you use the right setting for your environment + insecure: true + # Logger settings to control logger output. Useful to debug + #logger: + #show-source: true + #level: 1 + + + +.. toctree:: + :maxdepth: 1 + :caption: Flyte Core docs + + Flyte Documentation + +.. toctree:: + :maxdepth: 2 + :caption: Flytectl docs - Entities + + tasks + workflow + launchplan + + +.. toctree:: + :maxdepth: 2 + :caption: Flytectl verbs + + get + update + delete + register + +.. toctree:: + :maxdepth: 2 + :caption: Contribute + + contribute + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst new file mode 100644 index 0000000000..399976e6a9 --- /dev/null +++ b/flytectl/docs/source/launchplan.rst @@ -0,0 +1,3 @@ +################################# +Interacting with LaunchPlans +################################# diff --git a/flytectl/docs/source/register.rst b/flytectl/docs/source/register.rst new file mode 100644 index 0000000000..3fbaf86d4c --- /dev/null +++ b/flytectl/docs/source/register.rst @@ -0,0 +1,3 @@ +######################### +Get - Retrieve Entities +######################### diff --git a/flytectl/docs/source/tasks.rst b/flytectl/docs/source/tasks.rst new file mode 100644 index 0000000000..a5df10ff75 --- /dev/null +++ b/flytectl/docs/source/tasks.rst @@ -0,0 +1,4 @@ +####################### +Interacting with Tasks +####################### + diff --git a/flytectl/docs/source/update.rst b/flytectl/docs/source/update.rst new file mode 100644 index 0000000000..3fbaf86d4c --- /dev/null +++ b/flytectl/docs/source/update.rst @@ -0,0 +1,3 @@ +######################### +Get - Retrieve Entities +######################### diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst new file mode 100644 index 0000000000..c75064ce2b --- /dev/null +++ b/flytectl/docs/source/workflow.rst @@ -0,0 +1,4 @@ +############################ +Interacting with Workflows +########################### + From 460920a6cd326b3c3e6d110d2086f200c4592683 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Mon, 8 Feb 2021 15:12:37 -0800 Subject: [PATCH 019/356] flytectl docs (#28) --- flytectl/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/flytectl/README.md b/flytectl/README.md index 617827a591..a85eecb3ab 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -1,9 +1,28 @@ # flytectl -Install Flyte CLI + +[![Docs](https://readthedocs.org/projects/flytectl/badge/?version=latest&style=plastic)](https://flytectl.rtfd.io) +[![Current Release](https://img.shields.io/github/release/flyteorg/flytectl.svg)](https://github.com/flyteorg/flytectl/releases/latest) +![Master](https://github.com/flyteorg/flytectl/workflows/Master/badge.svg) +[![GoDoc](https://godoc.org/github.com/lyft/flytectl?status.svg)](https://pkg.go.dev/mod/github.com/lyft/flytectl) +[![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) +[![CodeCoverage](https://img.shields.io/codecov/c/github/flyteorg/flytectl.svg)](https://codecov.io/gh/flyteorg/flytectl) +[![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytectl)](https://goreportcard.com/report/github.com/lyft/flytectl) +![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytectl.svg?style=plastic) +![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) + +Flytectl is designed to be a portable, lightweight, CLI for working with Flyte. It is written in Golang and can access FlyteAdmin + +## Docs + +Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https://flytectl.rtfd.io) + +## Installation ```bash curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash ``` +## Contributing + [Contribution guidelines for this project](docs/CONTRIBUTING.md) From 3fb50804feb3b6e8011bd3412ff5a3361ba4a2f1 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Thu, 11 Feb 2021 22:19:25 +0530 Subject: [PATCH 020/356] Autodoc generation for cobra commands (#29) --- flytectl/README.md | 3 + flytectl/cmd/core/cmd.go | 5 +- flytectl/cmd/get/execution.go | 35 ++++++ flytectl/cmd/get/get.go | 30 ++++- flytectl/cmd/get/launch_plan.go | 36 ++++++ flytectl/cmd/get/project.go | 35 ++++++ flytectl/cmd/get/task.go | 35 ++++++ flytectl/cmd/get/workflow.go | 35 ++++++ flytectl/cmd/register/files.go | 36 ++++++ flytectl/cmd/register/register.go | 21 +++- flytectl/cmd/root.go | 30 ++++- flytectl/cmd/update/project.go | 48 ++++++++ flytectl/cmd/update/update.go | 25 +++- flytectl/docs/Makefile | 12 ++ flytectl/docs/source/delete.rst | 3 - flytectl/docs/source/gen/flytectl.rst | 57 +++++++++ flytectl/docs/source/gen/flytectl_config.rst | 61 ++++++++++ .../source/gen/flytectl_config_discover.rst | 63 ++++++++++ .../source/gen/flytectl_config_validate.rst | 65 +++++++++++ flytectl/docs/source/gen/flytectl_get.rst | 67 +++++++++++ .../source/gen/flytectl_get_execution.rst | 91 +++++++++++++++ .../source/gen/flytectl_get_launchplan.rst | 91 +++++++++++++++ .../docs/source/gen/flytectl_get_project.rst | 91 +++++++++++++++ .../docs/source/gen/flytectl_get_task.rst | 91 +++++++++++++++ .../docs/source/gen/flytectl_get_workflow.rst | 91 +++++++++++++++ .../docs/source/gen/flytectl_register.rst | 63 ++++++++++ .../source/gen/flytectl_register_files.rst | 94 +++++++++++++++ flytectl/docs/source/gen/flytectl_update.rst | 67 +++++++++++ .../source/gen/flytectl_update_project.rst | 108 ++++++++++++++++++ flytectl/docs/source/gen/flytectl_version.rst | 61 ++++++++++ flytectl/docs/source/generate_docs.go | 10 ++ flytectl/docs/source/get.rst | 3 - flytectl/docs/source/index.rst | 31 +++-- flytectl/docs/source/launchplan.rst | 3 - flytectl/docs/source/register.rst | 3 - flytectl/docs/source/tasks.rst | 4 - flytectl/docs/source/update.rst | 3 - flytectl/docs/source/workflow.rst | 4 - flytectl/go.sum | 2 + 39 files changed, 1558 insertions(+), 55 deletions(-) delete mode 100644 flytectl/docs/source/delete.rst create mode 100644 flytectl/docs/source/gen/flytectl.rst create mode 100644 flytectl/docs/source/gen/flytectl_config.rst create mode 100644 flytectl/docs/source/gen/flytectl_config_discover.rst create mode 100644 flytectl/docs/source/gen/flytectl_config_validate.rst create mode 100644 flytectl/docs/source/gen/flytectl_get.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_execution.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_launchplan.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_project.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_task.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_workflow.rst create mode 100644 flytectl/docs/source/gen/flytectl_register.rst create mode 100644 flytectl/docs/source/gen/flytectl_register_files.rst create mode 100644 flytectl/docs/source/gen/flytectl_update.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_project.rst create mode 100644 flytectl/docs/source/gen/flytectl_version.rst create mode 100644 flytectl/docs/source/generate_docs.go delete mode 100644 flytectl/docs/source/get.rst delete mode 100644 flytectl/docs/source/launchplan.rst delete mode 100644 flytectl/docs/source/register.rst delete mode 100644 flytectl/docs/source/tasks.rst delete mode 100644 flytectl/docs/source/update.rst delete mode 100644 flytectl/docs/source/workflow.rst diff --git a/flytectl/README.md b/flytectl/README.md index a85eecb3ab..fd022104df 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -15,6 +15,8 @@ Flytectl is designed to be a portable, lightweight, CLI for working with Flyte. ## Docs Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https://flytectl.rtfd.io) +Generating docs locally can be accomplished by running make gendocs from within the docs folder + ## Installation @@ -26,3 +28,4 @@ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash [Contribution guidelines for this project](docs/CONTRIBUTING.md) + diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 8e2463aad2..c625fd2072 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -19,6 +19,8 @@ type CommandEntry struct { ProjectDomainNotRequired bool CmdFunc CommandFunc Aliases []string + Short string + Long string PFlagProvider PFlagProvider } @@ -26,7 +28,8 @@ func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { for resource, cmdEntry := range cmdFuncs { cmd := &cobra.Command{ Use: resource, - Short: fmt.Sprintf("Retrieves %v resources.", resource), + Short: cmdEntry.Short, + Long: cmdEntry.Long, Aliases: cmdEntry.Aliases, RunE: generateCommandFunc(cmdEntry), } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index b0a51deade..4491ef03dc 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -13,6 +13,41 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) +const( + executionShort = "Gets execution resources" + executionLong = ` +Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +:: + + bin/flytectl get execution -p flytesnacks -d development + +Retrieves execution by name within project and domain. + +:: + + bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + +Retrieves execution by filters +:: + + Not yet implemented + +Retrieves all the execution within project and domain in yaml format + +:: + + bin/flytectl get execution -p flytesnacks -d development -o yaml + +Retrieves all the execution within project and domain in json format. + +:: + + bin/flytectl get execution -p flytesnacks -d development -o json + +Usage +` +) + var executionColumns = []printer.Column{ {"Name", "$.id.name"}, {"Workflow Name", "$.closure.workflowId.name"}, diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index ed86e5d0d0..c19a593280 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -6,19 +6,37 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + getCmdShort = `Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.` + getCmdLong = ` +Example get projects. +:: + + bin/flytectl get project +` +) + // CreateGetCommand will return get command func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ Use: "get", - Short: "Retrieve various resource.", + Short: getCmdShort, + Long: getCmdLong, } getResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true}, - "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}}, - "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}}, - "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}}, - "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}}, + "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, + Short: projectShort, + Long: projectLong}, + "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, + Long: taskLong}, + "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, + Long: workflowLong}, + "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, + Long: launchPlanLong}, + "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, + Long: executionLong}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 0f31e5106b..ff8e1ce912 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -11,6 +11,42 @@ import ( "github.com/lyft/flytestdlib/logger" ) +const( + + launchPlanShort = "Gets launch plan resources" + launchPlanLong = ` +Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +:: + + bin/flytectl get launchplan -p flytesnacks -d development + +Retrieves launch plan by name within project and domain. + +:: + + bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + +Retrieves launchplan by filters. +:: + + Not yet implemented + +Retrieves all the launchplan within project and domain in yaml format. + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o yaml + +Retrieves all the launchplan within project and domain in json format + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o json + +Usage +` +) + var launchplanColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 93c3395d8e..6b68011ea3 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -12,6 +12,41 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) +const( +projectShort = "Gets project resources" +projectLong = ` +Retrieves all the projects.(project,projects can be used interchangeably in these commands) +:: + + bin/flytectl get project + +Retrieves project by name + +:: + + bin/flytectl get project flytesnacks + +Retrieves project by filters +:: + + Not yet implemented + +Retrieves all the projects in yaml format + +:: + + bin/flytectl get project -o yaml + +Retrieves all the projects in json format + +:: + + bin/flytectl get project -o json + +Usage +` +) + var projectColumns = []printer.Column{ {"ID", "$.id"}, {"Name", "$.name"}, diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index a29d690660..ddc28fb0b9 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -14,6 +14,41 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) +const( + taskShort = "Gets task resources" + taskLong = ` +Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +:: + + bin/flytectl get task -p flytesnacks -d development + +Retrieves task by name within project and domain. + +:: + + bin/flytectl task -p flytesnacks -d development square + +Retrieves project by filters. +:: + + Not yet implemented + +Retrieves all the tasks within project and domain in yaml format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o yaml + +Retrieves all the tasks within project and domain in json format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o json + +Usage +` +) + var taskColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 71b08f4c7b..d6a8d9172b 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -13,6 +13,41 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) +const( + workflowShort = "Gets workflow resources" + workflowLong = ` +Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +:: + + bin/flytectl get workflow -p flytesnacks -d development + +Retrieves workflow by name within project and domain. + +:: + + bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + +Retrieves workflow by filters. +:: + + Not yet implemented + +Retrieves all the workflow within project and domain in yaml format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o yaml + +Retrieves all the workflow within project and domain in json format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o json + +Usage +` +) + var workflowColumns = []printer.Column{ {"Version", "$.id.version"}, {"Name", "$.id.name"}, diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 4787a69b27..821f034cd8 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -11,6 +11,42 @@ import ( "sort" ) +const( + registerFilesShort = "Registers file resources" + registerFilesLong = ` +Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks + +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in +the skipOnError flag. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks --skipOnError + +Using short format of skipOnError flag +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s + +Overriding the default version v1 using version string. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +Change the o/p format has not effect on registration. The O/p is currently available only in table format. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s -o yaml + +Usage +` +) + func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { files := args sort.Strings(files) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index f6381521e4..62263a3387 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -5,18 +5,27 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + registerCmdShort = "Registers tasks/workflows/launchplans from list of generated serialized files." + registercmdLong = ` +Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Currently these input files are protobuf files generated as output from flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 +If the entities are already registered with flyte for the same version then registration would fail. +` +) + // RegisterCommand will return register command func RegisterCommand() *cobra.Command { registerCmd := &cobra.Command{ Use: "register", - Short: "Registers tasks/workflows/launchplans from list of generated serialized files.", - Long: "Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin.\n" + - "Currently these input files are protobuf files generated as output from flytekit serialize.\n" + - "Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1\n" + - "If the entities are already registered with flyte for the same version then registration would fail.\n", + Short: registerCmdShort, + Long: registercmdLong, } registerResourcesFuncs := map[string]cmdcore.CommandEntry{ - "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig}, + "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig, Short: registerFilesShort, + Long: registerFilesLong}, } cmdcore.AddCommands(registerCmd, registerResourcesFuncs) return registerCmd diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 7dca669327..c92fb30d56 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,15 +3,15 @@ package cmd import ( "context" "fmt" - "github.com/lyft/flytectl/cmd/update" - "github.com/lyft/flytectl/cmd/register" - "github.com/lyft/flytectl/cmd/get" + "github.com/lyft/flytectl/cmd/register" + "github.com/lyft/flytectl/cmd/update" "github.com/lyft/flytectl/pkg/printer" - stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/spf13/cobra/doc" "github.com/lyft/flytectl/cmd/config" ) @@ -24,6 +24,9 @@ var ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, + Long : "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use : "flytectl", } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", @@ -60,6 +63,25 @@ func initConfig(_ *cobra.Command, _ []string) error { return nil } +func GenerateDocs() error { + rootCmd := newRootCmd() + err := GenReSTTree(rootCmd, "gen") + if err != nil { + logrus.Fatal(err) + return err + } + return nil +} + +func GenReSTTree(cmd *cobra.Command, dir string) error { + emptyStr := func(s string) string { return "" } + // Sphinx cross-referencing format + linkHandler := func(name, ref string) string { + return fmt.Sprintf(":doc:`%s`", ref) + } + return doc.GenReSTTreeCustom(cmd, dir, emptyStr, linkHandler) +} + func ExecuteCmd() error { return newRootCmd().Execute() } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index b00d91bf59..9ccbb4ee29 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -16,6 +16,54 @@ type ProjectConfig struct { ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` } +const( + projectShort = "Updates project resources" + projectLong = ` +Updates the project according the flags passed.Allows you to archive or activate a project. +Activates project named flytesnacks. +:: + + bin/flytectl update project -p flytesnacks --activateProject + +Archives project named flytesnacks. + +:: + + bin/flytectl get project flytesnacks --archiveProject + +Activates project named flytesnacks using short option -t. +:: + + bin/flytectl update project -p flytesnacks -t + +Archives project named flytesnacks using short option -a. + +:: + + bin/flytectl update project flytesnacks -a + +Incorrect usage when passing both archive and activate. + +:: + + bin/flytectl update project flytesnacks -a -t + +Incorrect usage when passing unknown-project. + +:: + + bin/flytectl update project unknown-project -a + +Incorrect usage when passing valid project using -p option. + +:: + + bin/flytectl update project unknown-project -a -p known-project + +Usage +` +) + var ( projectConfig = &ProjectConfig{} errProjectNotFound = "Project %v not found\n" diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index ac83b69200..791deb5c9d 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -6,15 +6,34 @@ import ( "github.com/spf13/cobra" ) +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + updateUse = "update" + updateShort = ` +Used for updating flyte resources eg: project. +` + updatecmdLong = ` +Currently this command only provides subcommands to update project. +Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. +Example update project to activate it. +:: + + bin/flytectl update project -p flytesnacks --activateProject +` +) + // CreateUpdateCommand will return update command func CreateUpdateCommand() *cobra.Command { updateCmd := &cobra.Command{ - Use: "update", - Short: "Update various resources.", + Use: updateUse, + Short: updateShort, + Long: updatecmdLong, } updateResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig}, + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, + Short: projectShort, + Long: projectLong}, } cmdcore.AddCommands(updateCmd, updateResourcesFuncs) diff --git a/flytectl/docs/Makefile b/flytectl/docs/Makefile index e61723ad76..c43bf3516c 100644 --- a/flytectl/docs/Makefile +++ b/flytectl/docs/Makefile @@ -14,6 +14,18 @@ help: .PHONY: help Makefile +gendocs: + go build -o ../bin/flytectl-docs $(SOURCEDIR)/generate_docs.go + rm -rf $(SOURCEDIR)/gen + mkdir gen + ../bin/flytectl-docs + mv gen $(SOURCEDIR) + make html + +clean: + rm -rf $(SOURCEDIR)/gen + rm -rf build/* + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile diff --git a/flytectl/docs/source/delete.rst b/flytectl/docs/source/delete.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/delete.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst new file mode 100644 index 0000000000..ea2cffb934 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl.rst @@ -0,0 +1,57 @@ +.. _flytectl: + +flytectl +-------- + +flyetcl CLI tool + +Synopsis +~~~~~~~~ + + +flytectl is CLI tool written in go to interact with flyteadmin service + +Options +~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -h, --help help for flytectl + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`flytectl_update` - +Used for updating flyte resources eg: project. + +* :doc:`flytectl_version` - Displays version information for the client and server. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst new file mode 100644 index 0000000000..7bace0e069 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -0,0 +1,61 @@ +.. _flytectl_config: + +flytectl config +--------------- + +Runs various config commands, look at the help of this command to get a list of available commands.. + +Synopsis +~~~~~~~~ + + +Runs various config commands, look at the help of this command to get a list of available commands.. + +Options +~~~~~~~ + +:: + + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + -h, --help help for config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. +* :doc:`flytectl_config_validate` - Validates the loaded config. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst new file mode 100644 index 0000000000..0173329f4e --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -0,0 +1,63 @@ +.. _flytectl_config_discover: + +flytectl config discover +------------------------ + +Searches for a config in one of the default search paths. + +Synopsis +~~~~~~~~ + + +Searches for a config in one of the default search paths. + +:: + + flytectl config discover [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for discover + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst new file mode 100644 index 0000000000..923bb9d794 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -0,0 +1,65 @@ +.. _flytectl_config_validate: + +flytectl config validate +------------------------ + +Validates the loaded config. + +Synopsis +~~~~~~~~ + + +Validates the loaded config. + +:: + + flytectl config validate [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for validate + --strict Validates that all keys in loaded config + map to already registered sections. + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst new file mode 100644 index 0000000000..75ebbba98c --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -0,0 +1,67 @@ +.. _flytectl_get: + +flytectl get +------------ + +Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +Synopsis +~~~~~~~~ + + + +Example get projects. +:: + + bin/flytectl get project + + +Options +~~~~~~~ + +:: + + -h, --help help for get + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_get_execution` - Gets execution resources +* :doc:`flytectl_get_launchplan` - Gets launch plan resources +* :doc:`flytectl_get_project` - Gets project resources +* :doc:`flytectl_get_task` - Gets task resources +* :doc:`flytectl_get_workflow` - Gets workflow resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst new file mode 100644 index 0000000000..450ffacf32 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_execution: + +flytectl get execution +---------------------- + +Gets execution resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +:: + + bin/flytectl get execution -p flytesnacks -d development + +Retrieves execution by name within project and domain. + +:: + + bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + +Retrieves execution by filters +:: + + Not yet implemented + +Retrieves all the execution within project and domain in yaml format + +:: + + bin/flytectl get execution -p flytesnacks -d development -o yaml + +Retrieves all the execution within project and domain in json format. + +:: + + bin/flytectl get execution -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get execution [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for execution + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst new file mode 100644 index 0000000000..a223801fb7 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_launchplan: + +flytectl get launchplan +----------------------- + +Gets launch plan resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +:: + + bin/flytectl get launchplan -p flytesnacks -d development + +Retrieves launch plan by name within project and domain. + +:: + + bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + +Retrieves launchplan by filters. +:: + + Not yet implemented + +Retrieves all the launchplan within project and domain in yaml format. + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o yaml + +Retrieves all the launchplan within project and domain in json format + +:: + + bin/flytectl get launchplan -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get launchplan [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for launchplan + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst new file mode 100644 index 0000000000..1c3d7490bf --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_project: + +flytectl get project +-------------------- + +Gets project resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the projects.(project,projects can be used interchangeably in these commands) +:: + + bin/flytectl get project + +Retrieves project by name + +:: + + bin/flytectl get project flytesnacks + +Retrieves project by filters +:: + + Not yet implemented + +Retrieves all the projects in yaml format + +:: + + bin/flytectl get project -o yaml + +Retrieves all the projects in json format + +:: + + bin/flytectl get project -o json + +Usage + + +:: + + flytectl get project [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for project + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst new file mode 100644 index 0000000000..dab9475f2e --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_task: + +flytectl get task +----------------- + +Gets task resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +:: + + bin/flytectl get task -p flytesnacks -d development + +Retrieves task by name within project and domain. + +:: + + bin/flytectl task -p flytesnacks -d development square + +Retrieves project by filters. +:: + + Not yet implemented + +Retrieves all the tasks within project and domain in yaml format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o yaml + +Retrieves all the tasks within project and domain in json format. + +:: + + bin/flytectl get task -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get task [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for task + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst new file mode 100644 index 0000000000..14d2d57fe0 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -0,0 +1,91 @@ +.. _flytectl_get_workflow: + +flytectl get workflow +--------------------- + +Gets workflow resources + +Synopsis +~~~~~~~~ + + + +Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +:: + + bin/flytectl get workflow -p flytesnacks -d development + +Retrieves workflow by name within project and domain. + +:: + + bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + +Retrieves workflow by filters. +:: + + Not yet implemented + +Retrieves all the workflow within project and domain in yaml format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o yaml + +Retrieves all the workflow within project and domain in json format. + +:: + + bin/flytectl get workflow -p flytesnacks -d development -o json + +Usage + + +:: + + flytectl get workflow [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for workflow + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst new file mode 100644 index 0000000000..27269b9856 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -0,0 +1,63 @@ +.. _flytectl_register: + +flytectl register +----------------- + +Registers tasks/workflows/launchplans from list of generated serialized files. + +Synopsis +~~~~~~~~ + + + +Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Currently these input files are protobuf files generated as output from flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 +If the entities are already registered with flyte for the same version then registration would fail. + + +Options +~~~~~~~ + +:: + + -h, --help help for register + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_register_files` - Registers file resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst new file mode 100644 index 0000000000..1f1b8bb7be --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -0,0 +1,94 @@ +.. _flytectl_register_files: + +flytectl register files +----------------------- + +Registers file resources + +Synopsis +~~~~~~~~ + + + +Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks + +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in +the skipOnError flag. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks --skipOnError + +Using short format of skipOnError flag +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s + +Overriding the default version v1 using version string. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +Change the o/p format has not effect on registration. The O/p is currently available only in table format. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -s -o yaml + +Usage + + +:: + + flytectl register files [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for files + -s, --skipOnError fail fast when registering files. + -v, --version string version of the entity to be registered with flyte. (default "v1") + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst new file mode 100644 index 0000000000..663e28f992 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -0,0 +1,67 @@ +.. _flytectl_update: + +flytectl update +--------------- + + +Used for updating flyte resources eg: project. + + +Synopsis +~~~~~~~~ + + + +Currently this command only provides subcommands to update project. +Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. +Example update project to activate it. +:: + + bin/flytectl update project -p flytesnacks --activateProject + + +Options +~~~~~~~ + +:: + + -h, --help help for update + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_update_project` - Updates project resources + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst new file mode 100644 index 0000000000..da7bcbb115 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -0,0 +1,108 @@ +.. _flytectl_update_project: + +flytectl update project +----------------------- + +Updates project resources + +Synopsis +~~~~~~~~ + + + +Updates the project according the flags passed.Allows you to archive or activate a project. +Activates project named flytesnacks. +:: + + bin/flytectl update project -p flytesnacks --activateProject + +Archives project named flytesnacks. + +:: + + bin/flytectl get project flytesnacks --archiveProject + +Activates project named flytesnacks using short option -t. +:: + + bin/flytectl update project -p flytesnacks -t + +Archives project named flytesnacks using short option -a. + +:: + + bin/flytectl update project flytesnacks -a + +Incorrect usage when passing both archive and activate. + +:: + + bin/flytectl update project flytesnacks -a -t + +Incorrect usage when passing unknown-project. + +:: + + bin/flytectl update project unknown-project -a + +Incorrect usage when passing valid project using -p option. + +:: + + bin/flytectl update project unknown-project -a -p known-project + +Usage + + +:: + + flytectl update project [flags] + +Options +~~~~~~~ + +:: + + -t, --activateProject Activates the project specified as argument. + -a, --archiveProject Archives the project specified as argument. + -h, --help help for project + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - +Used for updating flyte resources eg: project. + + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst new file mode 100644 index 0000000000..ad0f5f66fa --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -0,0 +1,61 @@ +.. _flytectl_version: + +flytectl version +---------------- + +Displays version information for the client and server. + +Synopsis +~~~~~~~~ + + +Displays version information for the client and server. + +:: + + flytectl version [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for version + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool + +*Auto generated by spf13/cobra on 11-Feb-2021* diff --git a/flytectl/docs/source/generate_docs.go b/flytectl/docs/source/generate_docs.go new file mode 100644 index 0000000000..458b597c8b --- /dev/null +++ b/flytectl/docs/source/generate_docs.go @@ -0,0 +1,10 @@ +package main + +import "github.com/lyft/flytectl/cmd" + +func main() { + if err := cmd.GenerateDocs(); err != nil { + panic(err) + } +} + diff --git a/flytectl/docs/source/get.rst b/flytectl/docs/source/get.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/get.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 2863700592..173c1a6759 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -41,25 +41,32 @@ Basic Configuration :maxdepth: 1 :caption: Flyte Core docs - Flyte Documentation + Flyte Documentation + gen/flytectl .. toctree:: :maxdepth: 2 - :caption: Flytectl docs - Entities + :caption: Flytectl verbs - tasks - workflow - launchplan - + gen/flytectl_get + gen/flytectl_update + gen/flytectl_delete + gen/flytectl_register + gen/flytectl_config .. toctree:: :maxdepth: 2 - :caption: Flytectl verbs - - get - update - delete - register + :caption: Flytectl nouns + + gen/flytectl_get_execution + gen/flytectl_get_project + gen/flytectl_get_workflow + gen/flytectl_get_task + gen/flytectl_get_launchplan + gen/flytectl_update_project + gen/flytectl_register_files + gen/flytectl_version + gen/flytectl_config_validate .. toctree:: :maxdepth: 2 diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst deleted file mode 100644 index 399976e6a9..0000000000 --- a/flytectl/docs/source/launchplan.rst +++ /dev/null @@ -1,3 +0,0 @@ -################################# -Interacting with LaunchPlans -################################# diff --git a/flytectl/docs/source/register.rst b/flytectl/docs/source/register.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/register.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/tasks.rst b/flytectl/docs/source/tasks.rst deleted file mode 100644 index a5df10ff75..0000000000 --- a/flytectl/docs/source/tasks.rst +++ /dev/null @@ -1,4 +0,0 @@ -####################### -Interacting with Tasks -####################### - diff --git a/flytectl/docs/source/update.rst b/flytectl/docs/source/update.rst deleted file mode 100644 index 3fbaf86d4c..0000000000 --- a/flytectl/docs/source/update.rst +++ /dev/null @@ -1,3 +0,0 @@ -######################### -Get - Retrieve Entities -######################### diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst deleted file mode 100644 index c75064ce2b..0000000000 --- a/flytectl/docs/source/workflow.rst +++ /dev/null @@ -1,4 +0,0 @@ -############################ -Interacting with Workflows -########################### - diff --git a/flytectl/go.sum b/flytectl/go.sum index b89512e672..2c4b1fcd70 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -66,6 +66,7 @@ github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHo github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -271,6 +272,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= From 4367c0b0a12934ea52eb0152e8b72e340d7cf4d5 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 11 Feb 2021 12:12:33 -0800 Subject: [PATCH 021/356] Index is too verbose for the docs, fix it (#30) --- flytectl/docs/source/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 173c1a6759..581884254d 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -45,7 +45,7 @@ Basic Configuration gen/flytectl .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Flytectl verbs gen/flytectl_get @@ -55,7 +55,7 @@ Basic Configuration gen/flytectl_config .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Flytectl nouns gen/flytectl_get_execution From 22c203bdd6b7d3037d1ea9db8d30b9a204db34ce Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Mon, 15 Feb 2021 23:02:51 +0530 Subject: [PATCH 022/356] Feature/goreleaser (#27) --- .../.github.com/workflow/pull_request.yaml | 0 .../PULL_REQUEST_TEMPLATE.md | 0 flytectl/.github/workflows/build.yaml | 31 +++++++++ flytectl/.github/workflows/release.yml | 38 +++++++++++ flytectl/.goreleaser.yml | 62 +++-------------- flytectl/README.md | 2 +- .../lyft/golang_support_tools/tools.go | 2 +- flytectl/cmd/core/cmd.go | 1 + flytectl/cmd/core/cmd_ctx.go | 2 +- flytectl/cmd/get/execution.go | 17 ++--- flytectl/cmd/get/execution_test.go | 36 +++++----- flytectl/cmd/get/get.go | 2 +- flytectl/cmd/get/get_test.go | 17 ++--- flytectl/cmd/get/launch_plan.go | 15 ++--- flytectl/cmd/get/named_entity.go | 6 +- flytectl/cmd/get/project.go | 12 ++-- flytectl/cmd/get/task.go | 15 +++-- flytectl/cmd/get/workflow.go | 9 +-- flytectl/cmd/register/files.go | 33 +++++----- ...esconfig_flags.go => filesconfig_flags.go} | 17 ++--- ...lags_test.go => filesconfig_flags_test.go} | 38 +++++------ flytectl/cmd/register/register.go | 4 +- flytectl/cmd/register/register_test.go | 7 +- flytectl/cmd/register/register_util.go | 66 +++++++++++-------- flytectl/cmd/root.go | 9 +-- flytectl/cmd/update/project.go | 6 +- flytectl/cmd/update/project_test.go | 29 ++++---- flytectl/cmd/update/projectconfig_flags.go | 2 +- flytectl/cmd/update/update.go | 4 +- flytectl/cmd/update/update_test.go | 7 +- flytectl/docs/source/generate_docs.go | 1 - flytectl/install.sh | 8 +-- flytectl/pkg/adminutils/iterator.go | 2 +- flytectl/pkg/printer/printer.go | 10 ++- flytectl/pkg/printer/printer_test.go | 3 +- flytectl/pull_request_template.md | 26 -------- 36 files changed, 280 insertions(+), 259 deletions(-) delete mode 100644 flytectl/.github.com/workflow/pull_request.yaml rename flytectl/{.github.com => .github}/PULL_REQUEST_TEMPLATE.md (100%) create mode 100644 flytectl/.github/workflows/build.yaml create mode 100644 flytectl/.github/workflows/release.yml rename flytectl/cmd/register/{registerfilesconfig_flags.go => filesconfig_flags.go} (55%) rename flytectl/cmd/register/{registerfilesconfig_flags_test.go => filesconfig_flags_test.go} (70%) delete mode 100644 flytectl/pull_request_template.md diff --git a/flytectl/.github.com/workflow/pull_request.yaml b/flytectl/.github.com/workflow/pull_request.yaml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/flytectl/.github.com/PULL_REQUEST_TEMPLATE.md b/flytectl/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from flytectl/.github.com/PULL_REQUEST_TEMPLATE.md rename to flytectl/.github/PULL_REQUEST_TEMPLATE.md diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml new file mode 100644 index 0000000000..4b78569361 --- /dev/null +++ b/flytectl/.github/workflows/build.yaml @@ -0,0 +1,31 @@ +name: build + +on: + pull_request: + push: + +jobs: + build: + name: Run tests and lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unit Tests + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make test_unit_codecov + - name: Push CodeCov + uses: codecov/codecov-action@v1 + with: + file: coverage.txt + flags: unittests + fail_ci_if_error: true + - name: Lint + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make lint \ No newline at end of file diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml new file mode 100644 index 0000000000..7d30bdb666 --- /dev/null +++ b/flytectl/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: releaser +on: + push: + tags: + - 'v*' + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unit Tests + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make test_unit_codecov + - name: Push CodeCov + uses: codecov/codecov-action@v1 + with: + file: coverage.txt + flags: unittests + fail_ci_if_error: true + - name: Lint + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make lint + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist --debug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 6f8f237da5..18ace3b56b 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -11,7 +11,7 @@ builds: - windows - darwin ldflags: - - -s -w -X github.com/lyft/flytestdlib/version.Version={{.Version}} -X github.com/lyft/flytestdlib/version.Build={{.ShortCommit}} -X github.com/lyft/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - replacements: darwin: macOS @@ -38,7 +38,7 @@ scoop: # Repository to push the app manifest to. bucket: - owner: lyft + owner: flyteorg name: flytectl # Git author used to commit to the repository. @@ -49,7 +49,7 @@ scoop: # Your app's homepage. # Default is empty. - homepage: "https://godoc.org/github.com/lyft/flytectl" + homepage: "https://godoc.org/github.com/flyteorg/flytectl" # Your app's description. # Default is empty. @@ -61,19 +61,12 @@ scoop: # Persist data between application updates persist: - - "data" - "config.toml" brews: - # Name template of the recipe # Default to project name name: flytectl - # IDs of the archives to use. - # Defaults to all. - # ids: - # - foo - # - bar - # GOARM to specify which 32-bit arm version to use if there are multiple versions # from the build section. Brew formulas support atm only one 32-bit version. # Default is 6 for all artifacts or each id if there a multiple versions. @@ -83,21 +76,14 @@ brews: # same kind. We will probably unify this in the next major version like it is done with scoop. # Github repository to push the tap to. - github: - owner: github-user - name: homebrew-tap - - # OR Gitlab - # gitlab: - # owner: gitlab-user - # name: homebrew-tap - - # Gitea is not supported yet, but the support coming + tap: + owner: flyteorg + name: flytectl # Template for the url which is determined by the given Token (github or gitlab) # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" # Default for gitlab is "https://gitlab.com///uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}" - url_template: "http://github.com/lyft/flytectl/releases/{{ .Tag }}/{{ .ArtifactName }}" + url_template: "http://github.com/flyteorg/flytectl/releases/{{ .Tag }}/{{ .ArtifactName }}" # Allows you to set a custom download strategy. Note that you'll need # to implement the strategy and add it to your tap repository. @@ -112,12 +98,8 @@ brews: # Git author used to commit to the repository. # Defaults are shown. commit_author: - name: goreleaserbot - email: goreleaser@carlosbecker.com - - # Folder inside the repository to put the formula. - # Default is the root folder. - folder: Formula + name: flytebot + email: flytebot@flyte.org # Caveats for the user of your binary. # Default is empty. @@ -125,7 +107,7 @@ brews: # Your app's homepage. # Default is empty. - homepage: "https://godoc.org/github.com/lyft/flytectl" + homepage: "https://flytectl.readthedocs.io/en/latest" # Your app's description. # Default is empty. @@ -139,30 +121,6 @@ brews: # Default is false. skip_upload: auto - # Custom block for brew. - # Can be used to specify alternate downloads for devel or head releases. - # Default is empty. - # custom_block: | - # head "https://github.com/some/package.git" - # ... - - # Packages your package depends on. - # dependencies: - # - name: git - # - name: zsh - # type: optional - - # Packages that conflict with your package. - # conflicts: - # - svn - # - bash - - # Specify for packages that run as a service. - # Default is empty. - # plist: | - # - # ... - # So you can `brew test` your formula. # Default is empty. test: system "#{bin}/program --version" diff --git a/flytectl/README.md b/flytectl/README.md index fd022104df..a1a2af7292 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -21,7 +21,7 @@ Generating docs locally can be accomplished by running make gendocs from within ## Installation ```bash -curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash +curl -s https://raw.githubusercontent.com/flyteorg/flytectl/master/install.sh | bash ``` ## Contributing diff --git a/flytectl/boilerplate/lyft/golang_support_tools/tools.go b/flytectl/boilerplate/lyft/golang_support_tools/tools.go index 4310b39d79..88ff645233 100644 --- a/flytectl/boilerplate/lyft/golang_support_tools/tools.go +++ b/flytectl/boilerplate/lyft/golang_support_tools/tools.go @@ -3,8 +3,8 @@ package tools import ( + _ "github.com/alvaroloes/enumer" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/lyft/flytestdlib/cli/pflags" _ "github.com/vektra/mockery/cmd/mockery" - _ "github.com/alvaroloes/enumer" ) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index c625fd2072..aa76d00112 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -3,6 +3,7 @@ package cmdcore import ( "context" "fmt" + "github.com/spf13/pflag" "github.com/lyft/flyteidl/clients/go/admin" diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index bf593b2b4c..347e75c3fe 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -13,7 +13,7 @@ type CommandContext struct { } func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext { - return CommandContext{adminClient: adminClient, out : out} + return CommandContext{adminClient: adminClient, out: out} } func (c CommandContext) AdminClient() service.AdminServiceClient { diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 4491ef03dc..0c22e5674e 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -2,6 +2,7 @@ package get import ( "context" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" @@ -13,7 +14,7 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) -const( +const ( executionShort = "Gets execution resources" executionLong = ` Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) @@ -49,12 +50,12 @@ Usage ) var executionColumns = []printer.Column{ - {"Name", "$.id.name"}, - {"Workflow Name", "$.closure.workflowId.name"}, - {"Type", "$.closure.workflowId.resourceType"}, - {"Phase", "$.closure.phase"}, - {"Started", "$.closure.startedAt"}, - {"Elapsed Time", "$.closure.duration"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Workflow Name", JSONPath: "$.closure.workflowId.name"}, + {Header: "Type", JSONPath: "$.closure.workflowId.resourceType"}, + {Header: "Phase", JSONPath: "$.closure.phase"}, + {Header: "Started", JSONPath: "$.closure.startedAt"}, + {Header: "Elapsed Time", JSONPath: "$.closure.duration"}, } func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { @@ -67,7 +68,7 @@ func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} - var executions []* admin.Execution + var executions []*admin.Execution if len(args) > 0 { name := args[0] execution, err := cmdCtx.AdminClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index b7a83cbef6..33cccd465f 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -3,14 +3,15 @@ package get import ( "context" "errors" + "io" + "testing" + "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flyteidl/clients/go/admin/mocks" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" - "io" - "testing" ) const projectValue = "dummyProject" @@ -20,12 +21,13 @@ const launchPlanNameValue = "lp_name" const launchPlanVersionValue = "lp_version" const workflowNameValue = "wf_name" const workflowVersionValue = "wf_version" +const output = "json" func TestListExecutionFunc(t *testing.T) { ctx := context.Background() config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue - config.GetConfig().Output = "json" + config.GetConfig().Output = output var args []string mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) @@ -61,8 +63,7 @@ func TestListExecutionFunc(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - var executions []*admin.Execution - executions = append(executions, executionResponse) + executions := []*admin.Execution{executionResponse} executionList := &admin.ExecutionList{ Executions: executions, } @@ -76,7 +77,7 @@ func TestListExecutionFuncWithError(t *testing.T) { ctx := context.Background() config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue - config.GetConfig().Output = "json" + config.GetConfig().Output = output var args []string mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) @@ -88,7 +89,7 @@ func TestListExecutionFuncWithError(t *testing.T) { Domain: domainValue, }, } - executionResponse := &admin.Execution{ + _ = &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, Domain: domainValue, @@ -112,12 +113,10 @@ func TestListExecutionFuncWithError(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - var executions []*admin.Execution - executions = append(executions, executionResponse) - mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(nil, errors.New("Executions NotFound.")) + mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(nil, errors.New("executions NotFound")) err := getExecutionFunc(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, err, errors.New("Executions NotFound.")) + assert.Equal(t, err, errors.New("executions NotFound")) mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) } @@ -125,7 +124,7 @@ func TestGetExecutionFunc(t *testing.T) { ctx := context.Background() config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue - config.GetConfig().Output = "json" + config.GetConfig().Output = output mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) @@ -160,8 +159,6 @@ func TestGetExecutionFunc(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - var executions []*admin.Execution - executions = append(executions, executionResponse) args := []string{executionNameValue} mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(executionResponse, nil) err := getExecutionFunc(ctx, args, cmdCtx) @@ -173,7 +170,7 @@ func TestGetExecutionFuncWithError(t *testing.T) { ctx := context.Background() config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue - config.GetConfig().Output = "json" + config.GetConfig().Output = output mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) @@ -184,7 +181,7 @@ func TestGetExecutionFuncWithError(t *testing.T) { Name: executionNameValue, }, } - executionResponse := &admin.Execution{ + _ = &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, Domain: domainValue, @@ -208,12 +205,11 @@ func TestGetExecutionFuncWithError(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - var executions []*admin.Execution - executions = append(executions, executionResponse) + args := []string{executionNameValue} - mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(nil, errors.New("Execution NotFound.")) + mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(nil, errors.New("execution NotFound")) err := getExecutionFunc(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, err, errors.New("Execution NotFound.")) + assert.Equal(t, err, errors.New("execution NotFound")) mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) } diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index c19a593280..2fd6806c5a 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -22,7 +22,7 @@ func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ Use: "get", Short: getCmdShort, - Long: getCmdLong, + Long: getCmdLong, } getResourcesFuncs := map[string]cmdcore.CommandEntry{ diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 8602d161c7..243a6a97da 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -2,15 +2,16 @@ package get import ( "fmt" - "github.com/stretchr/testify/assert" "sort" "testing" + + "github.com/stretchr/testify/assert" ) func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() - assert.Equal(t, getCommand.Use , "get") - assert.Equal(t, getCommand.Short , "Retrieve various resource.") + assert.Equal(t, getCommand.Use, "get") + assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) assert.Equal(t, len(getCommand.Commands()), 5) cmdNouns := getCommand.Commands() @@ -20,17 +21,17 @@ func TestCreateGetCommand(t *testing.T) { }) assert.Equal(t, cmdNouns[0].Use, "execution") assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) - assert.Equal(t, cmdNouns[0].Short, "Retrieves execution resources.") + assert.Equal(t, cmdNouns[0].Short, "Gets execution resources") assert.Equal(t, cmdNouns[1].Use, "launchplan") assert.Equal(t, cmdNouns[1].Aliases, []string{"launchplans"}) - assert.Equal(t, cmdNouns[1].Short, "Retrieves launchplan resources.") + assert.Equal(t, cmdNouns[1].Short, "Gets launch plan resources") assert.Equal(t, cmdNouns[2].Use, "project") assert.Equal(t, cmdNouns[2].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[2].Short, "Retrieves project resources.") + assert.Equal(t, cmdNouns[2].Short, "Gets project resources") assert.Equal(t, cmdNouns[3].Use, "task") assert.Equal(t, cmdNouns[3].Aliases, []string{"tasks"}) - assert.Equal(t, cmdNouns[3].Short, "Retrieves task resources.") + assert.Equal(t, cmdNouns[3].Short, "Gets task resources") assert.Equal(t, cmdNouns[4].Use, "workflow") assert.Equal(t, cmdNouns[4].Aliases, []string{"workflows"}) - assert.Equal(t, cmdNouns[4].Short, "Retrieves workflow resources.") + assert.Equal(t, cmdNouns[4].Short, "Gets workflow resources") } diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index ff8e1ce912..8706a36271 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -2,6 +2,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" @@ -11,8 +12,7 @@ import ( "github.com/lyft/flytestdlib/logger" ) -const( - +const ( launchPlanShort = "Gets launch plan resources" launchPlanLong = ` Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) @@ -48,11 +48,11 @@ Usage ) var launchplanColumns = []printer.Column{ - {"Version", "$.id.version"}, - {"Name", "$.id.name"}, - {"Type", "$.closure.compiledTask.template.type"}, - {"State", "$.spec.state"}, - {"Schedule", "$.spec.entityMetadata.schedule"}, + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, + {Header: "State", JSONPath: "$.spec.state"}, + {Header: "Schedule", JSONPath: "$.spec.entityMetadata.schedule"}, } func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { @@ -93,5 +93,4 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(launchPlans)...) - return nil } diff --git a/flytectl/cmd/get/named_entity.go b/flytectl/cmd/get/named_entity.go index a8bc1e60c9..b636145790 100644 --- a/flytectl/cmd/get/named_entity.go +++ b/flytectl/cmd/get/named_entity.go @@ -5,7 +5,7 @@ import ( ) var entityColumns = []printer.Column{ - {"Domain", "$.domain"}, - {"Name", "$.name"}, - {"Project", "$.project"}, + {Header: "Domain", JSONPath: "$.domain"}, + {Header: "Name", JSONPath: "$.name"}, + {Header: "Project", JSONPath: "$.project"}, } diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 6b68011ea3..8307a6e627 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -12,9 +12,9 @@ import ( "github.com/lyft/flytectl/pkg/printer" ) -const( -projectShort = "Gets project resources" -projectLong = ` +const ( + projectShort = "Gets project resources" + projectLong = ` Retrieves all the projects.(project,projects can be used interchangeably in these commands) :: @@ -48,9 +48,9 @@ Usage ) var projectColumns = []printer.Column{ - {"ID", "$.id"}, - {"Name", "$.name"}, - {"Description", "$.description"}, + {Header: "ID", JSONPath: "$.id"}, + {Header: "Name", JSONPath: "$.name"}, + {Header: "Description", JSONPath: "$.description"}, } func ProjectToProtoMessages(l []*admin.Project) []proto.Message { diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index ddc28fb0b9..96631d1741 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -2,6 +2,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" @@ -14,7 +15,7 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) -const( +const ( taskShort = "Gets task resources" taskLong = ` Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) @@ -50,12 +51,12 @@ Usage ) var taskColumns = []printer.Column{ - {"Version", "$.id.version"}, - {"Name", "$.id.name"}, - {"Type", "$.closure.compiledTask.template.type"}, - {"Discoverable", "$.closure.compiledTask.template.metadata.discoverable"}, - {"Discovery Version", "$.closure.compiledTask.template.metadata.discoveryVersion"}, - {"Created At", "$.closure.createdAt"}, + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, + {Header: "Discoverable", JSONPath: "$.closure.compiledTask.template.metadata.discoverable"}, + {Header: "Discovery Version", JSONPath: "$.closure.compiledTask.template.metadata.discoveryVersion"}, + {Header: "Created At", JSONPath: "$.closure.createdAt"}, } func TaskToProtoMessages(l []*admin.Task) []proto.Message { diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index d6a8d9172b..857df5bf5b 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -2,6 +2,7 @@ package get import ( "context" + "github.com/golang/protobuf/proto" "github.com/lyft/flytestdlib/logger" @@ -13,7 +14,7 @@ import ( "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" ) -const( +const ( workflowShort = "Gets workflow resources" workflowLong = ` Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) @@ -49,9 +50,9 @@ Usage ) var workflowColumns = []printer.Column{ - {"Version", "$.id.version"}, - {"Name", "$.id.name"}, - {"Created At", "$.closure.createdAt"}, + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Created At", JSONPath: "$.closure.createdAt"}, } func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 821f034cd8..b53ed63097 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -4,14 +4,15 @@ import ( "context" "encoding/json" "fmt" + "io/ioutil" + "sort" + cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flytectl/pkg/printer" "github.com/lyft/flytestdlib/logger" - "io/ioutil" - "sort" ) -const( +const ( registerFilesShort = "Registers file resources" registerFilesLong = ` Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. @@ -51,47 +52,49 @@ func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Co files := args sort.Strings(files) logger.Infof(ctx, "Parsing files... Total(%v)", len(files)) - logger.Infof(ctx, "Params version %v", filesConfig.version) - var registerResults [] RegisterResult + logger.Infof(ctx, "Params version %v", filesConfig.Version) + var registerResults []Result adminPrinter := printer.Printer{} - fastFail := !filesConfig.skipOnError + fastFail := !filesConfig.SkipOnError logger.Infof(ctx, "Fail fast %v", fastFail) var _err error - for i := 0; i< len(files) && !(fastFail && _err != nil) ; i++ { + for i := 0; i < len(files) && !(fastFail && _err != nil); i++ { absFilePath := files[i] - var registerResult RegisterResult + var registerResult Result logger.Infof(ctx, "Parsing %v", absFilePath) fileContents, err := ioutil.ReadFile(absFilePath) if err != nil { - registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)} + registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)} registerResults = append(registerResults, registerResult) _err = err continue } spec, err := unMarshalContents(ctx, fileContents, absFilePath) if err != nil { - registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} + registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} registerResults = append(registerResults, registerResult) _err = err continue } if err := hydrateSpec(spec); err != nil { - registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} + registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} registerResults = append(registerResults, registerResult) _err = err continue } - logger.Debugf(ctx, "Hydrated spec : %v", getJsonSpec(spec)) + logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) if err := register(ctx, spec, cmdCtx); err != nil { - registerResult = RegisterResult{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} + registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} registerResults = append(registerResults, registerResult) _err = err continue } - registerResult = RegisterResult{Name: absFilePath, Status: "Success", Info: "Successfully registered file"} + registerResult = Result{Name: absFilePath, Status: "Success", Info: "Successfully registered file"} registerResults = append(registerResults, registerResult) } payload, _ := json.Marshal(registerResults) - adminPrinter.JSONToTable(payload, projectColumns) + if err := adminPrinter.JSONToTable(payload, projectColumns); err != nil { + return err + } return nil } diff --git a/flytectl/cmd/register/registerfilesconfig_flags.go b/flytectl/cmd/register/filesconfig_flags.go similarity index 55% rename from flytectl/cmd/register/registerfilesconfig_flags.go rename to flytectl/cmd/register/filesconfig_flags.go index 97c5884485..a631183709 100755 --- a/flytectl/cmd/register/registerfilesconfig_flags.go +++ b/flytectl/cmd/register/filesconfig_flags.go @@ -5,15 +5,16 @@ package register import ( "encoding/json" - "fmt" "reflect" + "fmt" + "github.com/spf13/pflag" ) // If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. -func (RegisterFilesConfig) elemValueOrNil(v interface{}) interface{} { +func (FilesConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() @@ -27,7 +28,7 @@ func (RegisterFilesConfig) elemValueOrNil(v interface{}) interface{} { return v } -func (RegisterFilesConfig) mustMarshalJSON(v json.Marshaler) string { +func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { panic(err) @@ -36,11 +37,11 @@ func (RegisterFilesConfig) mustMarshalJSON(v json.Marshaler) string { return string(raw) } -// GetPFlagSet will return strongly types pflags for all fields in RegisterFilesConfig and its nested types. The format of the +// GetPFlagSet will return strongly types pflags for all fields in FilesConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (cfg RegisterFilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("RegisterFilesConfig", pflag.ExitOnError) - cmdFlags.StringVarP(&(filesConfig.version),fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") - cmdFlags.BoolVarP(&(filesConfig.skipOnError), fmt.Sprintf("%v%v", prefix, "skipOnError"), "s", *new(bool), "fail fast when registering files.") +func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "version"), *new(string), "version of the entity to be registered with flyte.") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "skipOnError"), *new(bool), "fail fast when registering files.") return cmdFlags } diff --git a/flytectl/cmd/register/registerfilesconfig_flags_test.go b/flytectl/cmd/register/filesconfig_flags_test.go similarity index 70% rename from flytectl/cmd/register/registerfilesconfig_flags_test.go rename to flytectl/cmd/register/filesconfig_flags_test.go index 9c055e83e4..163852ee41 100755 --- a/flytectl/cmd/register/registerfilesconfig_flags_test.go +++ b/flytectl/cmd/register/filesconfig_flags_test.go @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsRegisterFilesConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsFilesConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementRegisterFilesConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsRegisterFilesConfig[t] +func canGetElementFilesConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsFilesConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookRegisterFilesConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookFilesConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementRegisterFilesConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementFilesConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookRegisterFilesConfig(_, to reflect.Type, data interface{} return data, nil } -func decode_RegisterFilesConfig(input, result interface{}) error { +func decode_FilesConfig(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_RegisterFilesConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookRegisterFilesConfig, + jsonUnmarshalerHookFilesConfig, ), } @@ -70,7 +70,7 @@ func decode_RegisterFilesConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_RegisterFilesConfig(arr interface{}, sep string) string { +func join_FilesConfig(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_RegisterFilesConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_RegisterFilesConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_RegisterFilesConfig(val, result)) +func testDecodeJson_FilesConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_FilesConfig(val, result)) } -func testDecodeSlice_RegisterFilesConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_RegisterFilesConfig(vStringSlice, result)) +func testDecodeSlice_FilesConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_FilesConfig(vStringSlice, result)) } -func TestRegisterFilesConfig_GetPFlagSet(t *testing.T) { - val := RegisterFilesConfig{} +func TestFilesConfig_GetPFlagSet(t *testing.T) { + val := FilesConfig{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestRegisterFilesConfig_SetFlags(t *testing.T) { - actual := RegisterFilesConfig{} +func TestFilesConfig_SetFlags(t *testing.T) { + actual := FilesConfig{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -103,7 +103,7 @@ func TestRegisterFilesConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string("v1"), vString) + assert.Equal(t, string(*new(string)), vString) } else { assert.FailNow(t, err.Error()) } @@ -114,7 +114,7 @@ func TestRegisterFilesConfig_SetFlags(t *testing.T) { cmdFlags.Set("version", testValue) if vString, err := cmdFlags.GetString("version"); err == nil { - testDecodeJson_RegisterFilesConfig(t, fmt.Sprintf("%v", vString), &actual.version) + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.Version) } else { assert.FailNow(t, err.Error()) @@ -136,7 +136,7 @@ func TestRegisterFilesConfig_SetFlags(t *testing.T) { cmdFlags.Set("skipOnError", testValue) if vBool, err := cmdFlags.GetBool("skipOnError"); err == nil { - testDecodeJson_RegisterFilesConfig(t, fmt.Sprintf("%v", vBool), &actual.skipOnError) + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.SkipOnError) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 62263a3387..3a46653b12 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -16,8 +16,8 @@ If the entities are already registered with flyte for the same version then regi ` ) -// RegisterCommand will return register command -func RegisterCommand() *cobra.Command { +// RemoteRegisterCommand will return register command +func RemoteRegisterCommand() *cobra.Command { registerCmd := &cobra.Command{ Use: "register", Short: registerCmdShort, diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index 99e4a6964f..476e7b31bc 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -2,13 +2,14 @@ package register import ( "fmt" - "github.com/stretchr/testify/assert" "sort" "testing" + + "github.com/stretchr/testify/assert" ) func TestRegisterCommand(t *testing.T) { - registerCommand := RegisterCommand() + registerCommand := RemoteRegisterCommand() assert.Equal(t, registerCommand.Use, "register") assert.Equal(t, registerCommand.Short, "Registers tasks/workflows/launchplans from list of generated serialized files.") fmt.Println(registerCommand.Commands()) @@ -20,5 +21,5 @@ func TestRegisterCommand(t *testing.T) { }) assert.Equal(t, cmdNouns[0].Use, "files") assert.Equal(t, cmdNouns[0].Aliases, []string{"file"}) - assert.Equal(t, cmdNouns[0].Short, "Retrieves files resources.") + assert.Equal(t, cmdNouns[0].Short, "Registers file resources") } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 5149fd1e21..d9a5aaff52 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -2,8 +2,8 @@ package register import ( "context" - "errors" "fmt" + "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/lyft/flytectl/cmd/config" @@ -14,12 +14,12 @@ import ( "github.com/lyft/flytestdlib/logger" ) -//go:generate pflags RegisterFilesConfig +//go:generate pflags FilesConfig var ( - filesConfig = &RegisterFilesConfig{ - version: "v1", - skipOnError: false, + filesConfig = &FilesConfig{ + Version: "v1", + SkipOnError: false, } ) @@ -27,21 +27,22 @@ const registrationProjectPattern = "{{ registration.project }}" const registrationDomainPattern = "{{ registration.domain }}" const registrationVersionPattern = "{{ registration.version }}" -type RegisterFilesConfig struct { - version string `json:"version" pflag:",version of the entity to be registered with flyte."` - skipOnError bool `json:"skipOnError" pflag:",fail fast when registering files."` +// FilesConfig +type FilesConfig struct { + Version string `json:"version" pflag:",version of the entity to be registered with flyte."` + SkipOnError bool `json:"skipOnError" pflag:",fail fast when registering files."` } -type RegisterResult struct { +type Result struct { Name string Status string Info string } var projectColumns = []printer.Column{ - {"Name", "$.Name"}, - {"Status", "$.Status"}, - {"Additional Info", "$.Info"}, + {Header: "Name", JSONPath: "$.Name"}, + {Header: "Status", JSONPath: "$.Status"}, + {Header: "Additional Info", JSONPath: "$.Info"}, } func unMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { @@ -60,12 +61,12 @@ func unMarshalContents(ctx context.Context, fileContents []byte, fname string) ( return launchPlan, nil } logger.Debugf(ctx, "Failed to unmarshal file %v for launch plan type", fname) - return nil, errors.New(fmt.Sprintf("Failed unmarshalling file %v", fname)) + return nil, fmt.Errorf("failed unmarshalling file %v", fname) } func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext) error { - switch message.(type) { + switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) _, err := cmdCtx.AdminClient().CreateLaunchPlan(ctx, &admin.LaunchPlanCreateRequest{ @@ -74,7 +75,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: launchPlan.Id.Name, - Version: filesConfig.version, + Version: filesConfig.Version, }, Spec: launchPlan.Spec, }) @@ -87,7 +88,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: workflowSpec.Template.Id.Name, - Version: filesConfig.version, + Version: filesConfig.Version, }, Spec: workflowSpec, }) @@ -100,19 +101,19 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: taskSpec.Template.Id.Name, - Version: filesConfig.version, + Version: filesConfig.Version, }, Spec: taskSpec, }) return err default: - return errors.New(fmt.Sprintf("Failed registering unknown entity %v", message)) + return fmt.Errorf("Failed registering unknown entity %v", v) } } func hydrateNode(node *core.Node) error { targetNode := node.Target - switch targetNode.(type) { + switch v := targetNode.(type) { case *core.Node_TaskNode: taskNodeWrapper := targetNode.(*core.Node_TaskNode) taskNodeReference := taskNodeWrapper.TaskNode.Reference.(*core.TaskNode_ReferenceId) @@ -127,27 +128,34 @@ func hydrateNode(node *core.Node) error { launchPlanNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_LaunchplanRef) hydrateIdentifier(launchPlanNodeReference.LaunchplanRef) default: - errors.New(fmt.Sprintf("Unknown type %T", workflowNodeWrapper.WorkflowNode.Reference)) + return fmt.Errorf("unknown type %T", workflowNodeWrapper.WorkflowNode.Reference) } case *core.Node_BranchNode: branchNodeWrapper := targetNode.(*core.Node_BranchNode) - hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode) + if err := hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode); err != nil { + return fmt.Errorf("failed to hydrateNode") + } if len(branchNodeWrapper.BranchNode.IfElse.Other) > 0 { for _, ifBlock := range branchNodeWrapper.BranchNode.IfElse.Other { - hydrateNode(ifBlock.ThenNode) + if err := hydrateNode(ifBlock.ThenNode); err != nil { + return fmt.Errorf("failed to hydrateNode") + } } } switch branchNodeWrapper.BranchNode.IfElse.Default.(type) { case *core.IfElseBlock_ElseNode: elseNodeReference := branchNodeWrapper.BranchNode.IfElse.Default.(*core.IfElseBlock_ElseNode) - hydrateNode(elseNodeReference.ElseNode) + if err := hydrateNode(elseNodeReference.ElseNode); err != nil { + return fmt.Errorf("failed to hydrateNode") + } + case *core.IfElseBlock_Error: // Do nothing. default: - return errors.New(fmt.Sprintf("Unknown type %T", branchNodeWrapper.BranchNode.IfElse.Default)) + return fmt.Errorf("unknown type %T", branchNodeWrapper.BranchNode.IfElse.Default) } default: - return errors.New(fmt.Sprintf("Unknown type %T", targetNode)) + return fmt.Errorf("unknown type %T", v) } return nil } @@ -160,12 +168,12 @@ func hydrateIdentifier(identifier *core.Identifier) { identifier.Domain = config.GetConfig().Domain } if identifier.Version == "" || identifier.Version == registrationVersionPattern { - identifier.Version = filesConfig.version + identifier.Version = filesConfig.Version } } func hydrateSpec(message proto.Message) error { - switch message.(type) { + switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) hydrateIdentifier(launchPlan.Spec.WorkflowId) @@ -189,12 +197,12 @@ func hydrateSpec(message proto.Message) error { taskSpec := message.(*admin.TaskSpec) hydrateIdentifier(taskSpec.Template.Id) default: - return errors.New(fmt.Sprintf("Unknown type %T", message)) + return fmt.Errorf("Unknown type %T", v) } return nil } -func getJsonSpec(message proto.Message) string { +func getJSONSpec(message proto.Message) string { marshaller := jsonpb.Marshaler{ EnumsAsInts: false, EmitDefaults: true, diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index c92fb30d56..b666b29b90 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/get" "github.com/lyft/flytectl/cmd/register" "github.com/lyft/flytectl/cmd/update" @@ -24,9 +25,9 @@ var ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, - Long : "flytectl is CLI tool written in go to interact with flyteadmin service", - Short: "flyetcl CLI tool", - Use : "flytectl", + Long: "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use: "flytectl", } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", @@ -43,7 +44,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) - rootCmd.AddCommand(register.RegisterCommand()) + rootCmd.AddCommand(register.RemoteRegisterCommand()) config.GetConfig() return rootCmd diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 9ccbb4ee29..c421dddd2b 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -3,6 +3,7 @@ package update import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" @@ -16,7 +17,7 @@ type ProjectConfig struct { ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` } -const( +const ( projectShort = "Updates project resources" projectLong = ` Updates the project according the flags passed.Allows you to archive or activate a project. @@ -80,8 +81,7 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma archiveProject := projectConfig.ArchiveProject activateProject := projectConfig.ActivateProject if activateProject == archiveProject { - fmt.Printf(errInvalidUpdate) - return nil + return fmt.Errorf(errInvalidUpdate) } projectState := admin.Project_ACTIVE if archiveProject { diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index cf9fe7678b..c11986b6fa 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -4,15 +4,16 @@ import ( "bytes" "context" "errors" + "io" + "log" + "os" + "testing" + "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flyteidl/clients/go/admin/mocks" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" - "io" - "log" - "os" - "testing" ) const projectValue = "dummyProject" @@ -56,8 +57,9 @@ func teardownAndVerify(t *testing.T, expectedLog string) { os.Stdout = stdOut os.Stderr = stderr var buf bytes.Buffer - io.Copy(&buf, reader) - assert.Equal(t, expectedLog, buf.String()) + if _, err := io.Copy(&buf, reader); err != nil { + assert.Equal(t, expectedLog, buf.String()) + } } func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProject *bool, newActivateVal bool) { @@ -70,7 +72,8 @@ func TestActivateProjectFunc(t *testing.T) { defer teardownAndVerify(t, "Project dummyProject updated to ACTIVE state\n") modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -79,7 +82,8 @@ func TestActivateProjectFuncWithError(t *testing.T) { defer teardownAndVerify(t, "Project dummyProject failed to get updated to ACTIVE state due to Error Updating Project\n") modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -106,7 +110,8 @@ func TestArchiveProjectFuncWithError(t *testing.T) { State: admin.Project_ARCHIVED, } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -116,7 +121,8 @@ func TestEmptyProjectInput(t *testing.T) { config.GetConfig().Project = "" modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.Nil(t, err) mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -125,6 +131,7 @@ func TestInvalidInput(t *testing.T) { defer teardownAndVerify(t, "Invalid state passed. Specify either activate or archive\n") modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), false) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) } diff --git a/flytectl/cmd/update/projectconfig_flags.go b/flytectl/cmd/update/projectconfig_flags.go index e214a4fe1f..f56579fe9f 100755 --- a/flytectl/cmd/update/projectconfig_flags.go +++ b/flytectl/cmd/update/projectconfig_flags.go @@ -41,7 +41,7 @@ func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) - cmdFlags.BoolVarP(&(projectConfig.ActivateProject), fmt.Sprintf("%v%v", prefix, "activateProject"),"t", *new(bool), "Activates the project specified as argument.") + cmdFlags.BoolVarP(&(projectConfig.ActivateProject), fmt.Sprintf("%v%v", prefix, "activateProject"), "t", *new(bool), "Activates the project specified as argument.") cmdFlags.BoolVarP(&(projectConfig.ArchiveProject), fmt.Sprintf("%v%v", prefix, "archiveProject"), "a", *new(bool), "Archives the project specified as argument.") return cmdFlags } diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 791deb5c9d..f165512740 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -12,7 +12,7 @@ const ( updateShort = ` Used for updating flyte resources eg: project. ` - updatecmdLong = ` + updatecmdLong = ` Currently this command only provides subcommands to update project. Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. Example update project to activate it. @@ -27,7 +27,7 @@ func CreateUpdateCommand() *cobra.Command { updateCmd := &cobra.Command{ Use: updateUse, Short: updateShort, - Long: updatecmdLong, + Long: updatecmdLong, } updateResourcesFuncs := map[string]cmdcore.CommandEntry{ diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 749d00a6a0..816c094875 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -1,15 +1,16 @@ package update import ( - "github.com/stretchr/testify/assert" "sort" "testing" + + "github.com/stretchr/testify/assert" ) func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() - assert.Equal(t, updateCommand.Use , "update") - assert.Equal(t, updateCommand.Short , "Update various resources.") + assert.Equal(t, updateCommand.Use, "update") + assert.Equal(t, updateCommand.Short, "\nUsed for updating flyte resources eg: project.\n") assert.Equal(t, len(updateCommand.Commands()), 1) cmdNouns := updateCommand.Commands() // Sort by Use value. diff --git a/flytectl/docs/source/generate_docs.go b/flytectl/docs/source/generate_docs.go index 458b597c8b..4bfb6667ef 100644 --- a/flytectl/docs/source/generate_docs.go +++ b/flytectl/docs/source/generate_docs.go @@ -7,4 +7,3 @@ func main() { panic(err) } } - diff --git a/flytectl/install.sh b/flytectl/install.sh index bee7affdf3..8cd6b6ebd1 100644 --- a/flytectl/install.sh +++ b/flytectl/install.sh @@ -1,18 +1,18 @@ #!/bin/sh set -e -# Code generated by godownloader on 2020-10-10T20:07:34Z. DO NOT EDIT. +# Code generated by godownloader on 2021-02-08T20:29:16Z. DO NOT EDIT. # usage() { this=$1 cat < - -## Follow-up issue -_NA_ -OR -_https://github.com/lyft/flyte/issues/_ From 07fccb1dcc8c35f44ee1005942648357cfdf2cfc Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Tue, 16 Feb 2021 21:57:23 +0530 Subject: [PATCH 023/356] Added reading of archive files for registration to flyte (#31) * Added reading of archive files for registration to flyte * Supporting tgz files and also added filenames from archive in results instead of archive name * Using temp directory to unarchive files and use it for registering * Added unit tests * Fixed linter issues * Addressed review comments and regerated the docs Co-authored-by: pmahindrakar --- flytectl/cmd/register/files.go | 100 +++++---- flytectl/cmd/register/filesconfig_flags.go | 5 +- .../cmd/register/filesconfig_flags_test.go | 34 ++- flytectl/cmd/register/register_util.go | 186 ++++++++++++++-- flytectl/cmd/register/register_util_test.go | 198 ++++++++++++++++++ .../testdata/invalid-extension-register.zip | 1 + flytectl/cmd/register/testdata/invalid.tar | 1 + flytectl/cmd/register/testdata/invalid.tgz | 1 + .../testdata/valid-parent-folder-register.tar | Bin 0 -> 7168 bytes .../cmd/register/testdata/valid-register.tar | Bin 0 -> 6656 bytes .../cmd/register/testdata/valid-register.tgz | Bin 0 -> 892 bytes .../testdata/valid-unordered-register.tar | Bin 0 -> 6656 bytes flytectl/docs/source/gen/flytectl.rst | 67 +++--- flytectl/docs/source/gen/flytectl_config.rst | 65 +++--- .../source/gen/flytectl_config_discover.rst | 69 +++--- .../source/gen/flytectl_config_validate.rst | 69 +++--- flytectl/docs/source/gen/flytectl_get.rst | 65 +++--- .../source/gen/flytectl_get_execution.rst | 65 +++--- .../source/gen/flytectl_get_launchplan.rst | 65 +++--- .../docs/source/gen/flytectl_get_project.rst | 65 +++--- .../docs/source/gen/flytectl_get_task.rst | 65 +++--- .../docs/source/gen/flytectl_get_workflow.rst | 65 +++--- .../docs/source/gen/flytectl_register.rst | 65 +++--- .../source/gen/flytectl_register_files.rst | 95 ++++++--- flytectl/docs/source/gen/flytectl_update.rst | 65 +++--- .../source/gen/flytectl_update_project.rst | 65 +++--- flytectl/docs/source/gen/flytectl_version.rst | 65 +++--- flytectl/go.sum | 22 ++ 28 files changed, 1086 insertions(+), 477 deletions(-) create mode 100644 flytectl/cmd/register/register_util_test.go create mode 100644 flytectl/cmd/register/testdata/invalid-extension-register.zip create mode 100644 flytectl/cmd/register/testdata/invalid.tar create mode 100644 flytectl/cmd/register/testdata/invalid.tgz create mode 100644 flytectl/cmd/register/testdata/valid-parent-folder-register.tar create mode 100644 flytectl/cmd/register/testdata/valid-register.tar create mode 100644 flytectl/cmd/register/testdata/valid-register.tgz create mode 100644 flytectl/cmd/register/testdata/valid-unordered-register.tar diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b53ed63097..b413619008 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -3,15 +3,28 @@ package register import ( "context" "encoding/json" - "fmt" - "io/ioutil" - "sort" + "os" cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flytectl/pkg/printer" "github.com/lyft/flytestdlib/logger" ) +//go:generate pflags FilesConfig +var ( + filesConfig = &FilesConfig{ + Version: "v1", + ContinueOnError: false, + } +) + +// FilesConfig +type FilesConfig struct { + Version string `json:"version" pflag:",version of the entity to be registered with flyte."` + ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` + Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` +} + const ( registerFilesShort = "Registers file resources" registerFilesLong = ` @@ -21,17 +34,30 @@ If there are already registered entities with v1 version then the command will f bin/flytectl register file _pb_output/* -d development -p flytesnacks +Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. +Use --archive flag. + +:: + + bin/flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + +Using local tgz file. + +:: + + bin/flytectl register files _pb_output.tgz -d development -p flytesnacks --archive + If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in -the skipOnError flag. +the continueOnError flag. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --skipOnError + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -Using short format of skipOnError flag +Using short format of continueOnError flag :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -s + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c Overriding the default version v1 using version string. :: @@ -42,59 +68,31 @@ Change the o/p format has not effect on registration. The O/p is currently avail :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -s -o yaml + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -o yaml Usage ` ) func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - files := args - sort.Strings(files) - logger.Infof(ctx, "Parsing files... Total(%v)", len(files)) - logger.Infof(ctx, "Params version %v", filesConfig.Version) + dataRefs, tmpDir, _err := getSortedFileList(ctx, args) + if _err != nil { + logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", _err) + return _err + } + logger.Infof(ctx, "Parsing files... Total(%v)", len(dataRefs)) + fastFail := !filesConfig.ContinueOnError var registerResults []Result - adminPrinter := printer.Printer{} - fastFail := !filesConfig.SkipOnError - logger.Infof(ctx, "Fail fast %v", fastFail) - var _err error - for i := 0; i < len(files) && !(fastFail && _err != nil); i++ { - absFilePath := files[i] - var registerResult Result - logger.Infof(ctx, "Parsing %v", absFilePath) - fileContents, err := ioutil.ReadFile(absFilePath) - if err != nil { - registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)} - registerResults = append(registerResults, registerResult) - _err = err - continue - } - spec, err := unMarshalContents(ctx, fileContents, absFilePath) - if err != nil { - registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} - registerResults = append(registerResults, registerResult) - _err = err - continue - } - if err := hydrateSpec(spec); err != nil { - registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} - registerResults = append(registerResults, registerResult) - _err = err - continue - } - logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) - if err := register(ctx, spec, cmdCtx); err != nil { - registerResult = Result{Name: absFilePath, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} - registerResults = append(registerResults, registerResult) - _err = err - continue - } - registerResult = Result{Name: absFilePath, Status: "Success", Info: "Successfully registered file"} - registerResults = append(registerResults, registerResult) + for i := 0; i < len(dataRefs) && !(fastFail && _err != nil); i++ { + registerResults, _err = registerFile(ctx, dataRefs[i], registerResults, cmdCtx) } payload, _ := json.Marshal(registerResults) - if err := adminPrinter.JSONToTable(payload, projectColumns); err != nil { - return err + registerPrinter := printer.Printer{} + _ = registerPrinter.JSONToTable(payload, projectColumns) + if tmpDir != "" { + if _err = os.RemoveAll(tmpDir); _err != nil { + logger.Errorf(ctx, "unable to delete temp dir %v due to %v", tmpDir, _err) + } } return nil } diff --git a/flytectl/cmd/register/filesconfig_flags.go b/flytectl/cmd/register/filesconfig_flags.go index a631183709..b35de5beb8 100755 --- a/flytectl/cmd/register/filesconfig_flags.go +++ b/flytectl/cmd/register/filesconfig_flags.go @@ -41,7 +41,8 @@ func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "version"), *new(string), "version of the entity to be registered with flyte.") - cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "skipOnError"), *new(bool), "fail fast when registering files.") + cmdFlags.StringVarP(&(filesConfig.Version),fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") + cmdFlags.BoolVarP(&(filesConfig.ContinueOnError), fmt.Sprintf("%v%v", prefix, "continueOnError"), "c", *new(bool), "continue on error when registering files.") + cmdFlags.BoolVarP(&(filesConfig.Archive), fmt.Sprintf("%v%v", prefix, "archive"), "a", *new(bool), "pass in archive file either an http link or local path.") return cmdFlags } diff --git a/flytectl/cmd/register/filesconfig_flags_test.go b/flytectl/cmd/register/filesconfig_flags_test.go index 163852ee41..2a78db2a9a 100755 --- a/flytectl/cmd/register/filesconfig_flags_test.go +++ b/flytectl/cmd/register/filesconfig_flags_test.go @@ -103,7 +103,7 @@ func TestFilesConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string(*new(string)), vString) + assert.Equal(t, "v1", vString) } else { assert.FailNow(t, err.Error()) } @@ -121,10 +121,10 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_skipOnError", func(t *testing.T) { + t.Run("Test_continueOnError", func(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("skipOnError"); err == nil { + if vBool, err := cmdFlags.GetBool("continueOnError"); err == nil { assert.Equal(t, bool(*new(bool)), vBool) } else { assert.FailNow(t, err.Error()) @@ -134,9 +134,31 @@ func TestFilesConfig_SetFlags(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("skipOnError", testValue) - if vBool, err := cmdFlags.GetBool("skipOnError"); err == nil { - testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.SkipOnError) + cmdFlags.Set("continueOnError", testValue) + if vBool, err := cmdFlags.GetBool("continueOnError"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.ContinueOnError) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_archive", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + assert.Equal(t, bool(*new(bool)), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index d9a5aaff52..1b419912f4 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -1,44 +1,51 @@ package register import ( + "archive/tar" + "compress/gzip" "context" + "errors" "fmt" + "io" + "io/ioutil" + "net/http" + "os" + "sort" + "strings" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "github.com/lyft/flytectl/cmd/config" cmdCore "github.com/lyft/flytectl/cmd/core" "github.com/lyft/flytectl/pkg/printer" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" "github.com/lyft/flytestdlib/logger" -) - -//go:generate pflags FilesConfig - -var ( - filesConfig = &FilesConfig{ - Version: "v1", - SkipOnError: false, - } + "github.com/lyft/flytestdlib/storage" ) const registrationProjectPattern = "{{ registration.project }}" const registrationDomainPattern = "{{ registration.domain }}" const registrationVersionPattern = "{{ registration.version }}" -// FilesConfig -type FilesConfig struct { - Version string `json:"version" pflag:",version of the entity to be registered with flyte."` - SkipOnError bool `json:"skipOnError" pflag:",fail fast when registering files."` -} - type Result struct { Name string Status string Info string } +// HTTPClient interface +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} + +var Client HTTPClient + +func init() { + Client = &http.Client{} +} + var projectColumns = []printer.Column{ {Header: "Name", JSONPath: "$.Name"}, {Header: "Status", JSONPath: "$.Status"}, @@ -202,6 +209,155 @@ func hydrateSpec(message proto.Message) error { return nil } +func DownloadFileFromHTTP(ctx context.Context, ref storage.DataReference) (io.ReadCloser, error) { + req, err := http.NewRequestWithContext(ctx, http.MethodGet, ref.String(), nil) + if err != nil { + return nil, err + } + resp, err := Client.Do(req) + if err != nil { + return nil, err + } + return resp.Body, nil +} + +/* +Get file list from the args list. +If the archive flag is on then download the archives to temp directory and extract it. +The o/p of this function would be sorted list of the file locations. +*/ +func getSortedFileList(ctx context.Context, args []string) ([]string, string, error) { + if !filesConfig.Archive { + /* + * Sorting is required for non-archived case since its possible for the user to pass in a list of unordered + * serialized protobuf files , but flyte expects them to be registered in topologically sorted order that it had + * generated otherwise the registration can fail if the dependent files are not registered earlier. + */ + sort.Strings(args) + return args, "", nil + } + tempDir, err := ioutil.TempDir("/tmp", "register") + + if err != nil { + return nil, tempDir, err + } + dataRefs := args + var unarchivedFiles []string + for i := 0; i < len(dataRefs); i++ { + dataRefReaderCloser, err := getArchiveReaderCloser(ctx, dataRefs[i]) + if err != nil { + return unarchivedFiles, tempDir, err + } + archiveReader := tar.NewReader(dataRefReaderCloser) + if unarchivedFiles, err = readAndCopyArchive(archiveReader, tempDir, unarchivedFiles); err != nil { + return unarchivedFiles, tempDir, err + } + if err = dataRefReaderCloser.Close(); err != nil { + return unarchivedFiles, tempDir, err + } + } + /* + * Similarly in case of archived files, it possible to have an archive created in totally different order than the + * listing order of the serialized files which is required by flyte. Hence we explicitly sort here after unarchiving it. + */ + sort.Strings(unarchivedFiles) + return unarchivedFiles, tempDir, nil +} + +func readAndCopyArchive(src io.Reader, tempDir string, unarchivedFiles []string) ([]string, error) { + for { + tarReader := src.(*tar.Reader) + header, err := tarReader.Next() + switch { + case err == io.EOF: + return unarchivedFiles, nil + case err != nil: + return unarchivedFiles, err + } + // Location to untar. FilePath couldnt be used here due to, + // G305: File traversal when extracting zip archive + target := tempDir + "/" + header.Name + if header.Typeflag == tar.TypeDir { + if _, err := os.Stat(target); err != nil { + if err := os.MkdirAll(target, 0755); err != nil { + return unarchivedFiles, err + } + } + } else if header.Typeflag == tar.TypeReg { + dest, err := os.OpenFile(target, os.O_CREATE|os.O_RDWR, os.FileMode(header.Mode)) + if err != nil { + return unarchivedFiles, err + } + if _, err := io.Copy(dest, src); err != nil { + return unarchivedFiles, err + } + unarchivedFiles = append(unarchivedFiles, dest.Name()) + if err := dest.Close(); err != nil { + return unarchivedFiles, err + } + } + } +} + +func registerFile(ctx context.Context, fileName string, registerResults []Result, cmdCtx cmdCore.CommandContext) ([]Result, error) { + var registerResult Result + var fileContents []byte + var err error + if fileContents, err = ioutil.ReadFile(fileName); err != nil { + registerResults = append(registerResults, Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)}) + return registerResults, err + } + spec, err := unMarshalContents(ctx, fileContents, fileName) + if err != nil { + registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} + registerResults = append(registerResults, registerResult) + return registerResults, err + } + if err := hydrateSpec(spec); err != nil { + registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} + registerResults = append(registerResults, registerResult) + return registerResults, err + } + logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) + if err := register(ctx, spec, cmdCtx); err != nil { + registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} + registerResults = append(registerResults, registerResult) + return registerResults, err + } + registerResult = Result{Name: fileName, Status: "Success", Info: "Successfully registered file"} + logger.Debugf(ctx, "Successfully registered %v", fileName) + registerResults = append(registerResults, registerResult) + return registerResults, nil +} + +func getArchiveReaderCloser(ctx context.Context, ref string) (io.ReadCloser, error) { + dataRef := storage.DataReference(ref) + scheme, _, key, err := dataRef.Split() + segments := strings.Split(key, ".") + ext := segments[len(segments)-1] + if err != nil { + return nil, err + } + if ext != "tar" && ext != "tgz" { + return nil, errors.New("only .tar and .tgz extension archives are supported") + } + var dataRefReaderCloser io.ReadCloser + if scheme == "http" || scheme == "https" { + dataRefReaderCloser, err = DownloadFileFromHTTP(ctx, dataRef) + } else { + dataRefReaderCloser, err = os.Open(dataRef.String()) + } + if err != nil { + return nil, err + } + if ext == "tgz" { + if dataRefReaderCloser, err = gzip.NewReader(dataRefReaderCloser); err != nil { + return nil, err + } + } + return dataRefReaderCloser, err +} + func getJSONSpec(message proto.Message) string { marshaller := jsonpb.Marshaler{ EnumsAsInts: false, diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go new file mode 100644 index 0000000000..f551efc80c --- /dev/null +++ b/flytectl/cmd/register/register_util_test.go @@ -0,0 +1,198 @@ +package register + +import ( + "context" + "errors" + "fmt" + "net/http" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +type MockClient struct { + DoFunc func(req *http.Request) (*http.Response, error) +} + +func (m *MockClient) Do(req *http.Request) (*http.Response, error) { + return GetDoFunc(req) +} + +var ( + ctx context.Context + args []string + GetDoFunc func(req *http.Request) (*http.Response, error) +) + +func setup() { + ctx = context.Background() + Client = &MockClient{} + validTar, err := os.Open("testdata/valid-register.tar") + if err != nil { + fmt.Printf("unexpected error: %v", err) + os.Exit(-1) + } + response := &http.Response{ + Body: validTar, + } + GetDoFunc = func(*http.Request) (*http.Response, error) { + return response, nil + } +} + +func TestGetSortedFileList(t *testing.T) { + setup() + filesConfig.Archive = false + args = []string{"file2", "file1"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, "file1", fileList[0]) + assert.Equal(t, "file2", fileList[1]) + assert.Equal(t, tmpDir, "") + assert.Nil(t, err) +} + +func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/valid-parent-folder-register.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 4) + assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) + assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) + assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "016_recipes.core.basic.basic_workflow.my_wf_2.pb"), fileList[2]) + assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "017_recipes.core.basic.basic_workflow.my_wf_3.pb"), fileList[3]) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.Nil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedFileList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/valid-register.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 4) + assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) + assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) + assert.Equal(t, filepath.Join(tmpDir, "016_recipes.core.basic.basic_workflow.my_wf_2.pb"), fileList[2]) + assert.Equal(t, filepath.Join(tmpDir, "017_recipes.core.basic.basic_workflow.my_wf_3.pb"), fileList[3]) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.Nil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedFileUnorderedList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/valid-unordered-register.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 4) + assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) + assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) + assert.Equal(t, filepath.Join(tmpDir, "016_recipes.core.basic.basic_workflow.my_wf_2.pb"), fileList[2]) + assert.Equal(t, filepath.Join(tmpDir, "017_recipes.core.basic.basic_workflow.my_wf_3.pb"), fileList[3]) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.Nil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedCorruptedFileList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/invalid.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 0) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.NotNil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedTgzList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/valid-register.tgz"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 4) + assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) + assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) + assert.Equal(t, filepath.Join(tmpDir, "016_recipes.core.basic.basic_workflow.my_wf_2.pb"), fileList[2]) + assert.Equal(t, filepath.Join(tmpDir, "017_recipes.core.basic.basic_workflow.my_wf_3.pb"), fileList[3]) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.Nil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/invalid.tgz"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, 0, len(fileList)) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.NotNil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"testdata/invalid-extension-register.zip"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, 0, len(fileList)) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.NotNil(t, err) + assert.Equal(t, errors.New("only .tar and .tgz extension archives are supported"), err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, 0, len(fileList)) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.NotNil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"http://dummyhost:80/testdata/valid-register.tar"} + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 4) + assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) + assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) + assert.Equal(t, filepath.Join(tmpDir, "016_recipes.core.basic.basic_workflow.my_wf_2.pb"), fileList[2]) + assert.Equal(t, filepath.Join(tmpDir, "017_recipes.core.basic.basic_workflow.my_wf_3.pb"), fileList[3]) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.Nil(t, err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} + +func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) { + setup() + filesConfig.Archive = true + args = []string{"http://dummyhost:80/testdata/valid-register.tar"} + ctx = nil + fileList, tmpDir, err := getSortedFileList(ctx, args) + assert.Equal(t, len(fileList), 0) + assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) + assert.NotNil(t, err) + assert.Equal(t, errors.New("net/http: nil Context"), err) + // Clean up the temp directory. + assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) +} diff --git a/flytectl/cmd/register/testdata/invalid-extension-register.zip b/flytectl/cmd/register/testdata/invalid-extension-register.zip new file mode 100644 index 0000000000..6dec9fb7eb --- /dev/null +++ b/flytectl/cmd/register/testdata/invalid-extension-register.zip @@ -0,0 +1 @@ +invalid extension file for register diff --git a/flytectl/cmd/register/testdata/invalid.tar b/flytectl/cmd/register/testdata/invalid.tar new file mode 100644 index 0000000000..5c9d15ea1c --- /dev/null +++ b/flytectl/cmd/register/testdata/invalid.tar @@ -0,0 +1 @@ +invalid tar file diff --git a/flytectl/cmd/register/testdata/invalid.tgz b/flytectl/cmd/register/testdata/invalid.tgz new file mode 100644 index 0000000000..3f37575e6a --- /dev/null +++ b/flytectl/cmd/register/testdata/invalid.tgz @@ -0,0 +1 @@ +invalid tgz file diff --git a/flytectl/cmd/register/testdata/valid-parent-folder-register.tar b/flytectl/cmd/register/testdata/valid-parent-folder-register.tar new file mode 100644 index 0000000000000000000000000000000000000000..5d3091b6f65964cb117503896c51cd34c6effae3 GIT binary patch literal 7168 zcmeHL&2HO95T@iLRX5E~*%WZu0;Poj0R)g*F8>mqVzhSZ!m$IxIpjnv$z{w+A_;O8 zSrFU@=%r8BC+H<_kXzd!6#=&5%8V@q20{Y%a%X0jJ3snnXHuH6n1@L}U|CmK&4V$v zO;Z+%(Z=P7i7_34Ry?w1V2#+s(sf&e>guIj0#MEgjIKC=N2(gXuXB zh=t)f^cm^B9)*(d$TRYFAJfzR$C~A4%#Tu*tA3I()uVajPyf54Bj%yWueQ3*B5!^PYO~$+^}Muppu0C^scI79}TW(rR4RSPv_Ga)G7V?+PuoC2L7a zE$E#Q(At}7?X`ilddS3C(l_P#?r_bGV(unGo(_5Eei9}G{}le4hHcmQ|0&`Sy}hw&NL%>B z7H?0%St&4CS{Frt*IQWCEEP+)rmT+eRA}S>&kzMLi}z1ugtYn-57F6Mp$Jz+ zNG4~A*Dot*bym1s!5@tc^kc3&-EMyz@}hKLeQy|*&GuPYBHe%n*kUKu P+}Z-Q1!@bdzykjPM9j+Q literal 0 HcmV?d00001 diff --git a/flytectl/cmd/register/testdata/valid-register.tar b/flytectl/cmd/register/testdata/valid-register.tar new file mode 100644 index 0000000000000000000000000000000000000000..ecfad5102f04c20016c900b500a7ba36050b24e7 GIT binary patch literal 6656 zcmeHLUvJws5SN{{OWF0GngJO%ppH>sfC0%QC0nhY8f;0MB29`Qd)SjeNmQfS77dAx zV;I>7*vmfMKEYo04feL}B-h)LrupMGY1&GFP4Vt1-knaryCb2tmx>_ni_8pUDomee zaWMJ!hBEC$T{$!r^{CnRwb?F0NZYn+8jOxZijlC%97u#RLTl6pCTq1U=F|wY2w_@{ z%(mUxRt+-6Q&6qn<2!K@ro02wBQ6k&q9f>2Qf>)(ZCpNnBp3SY3L4K>bUYr{Qt>j* zRLWH>6SJSnS0Yfg{eArPVO}VEJWhaBe{h=EX}t09U6E$62|Pi+(I2TDnHY*^9lWUP zpvyI4(zZ$PwF#@CJ=W^0=ob1CRk;2Is)7jI*!est=5u-_Ko8JO2-7%Go*bzDKl|{U?nsG1%8m~|Hx#?ZL&tKQz>nJ87OjW}JYts3+CUCz7z9y^`Szo>&+zU3 zs90@?JrN9)z&DLTbE7B2L090V6a9g2yk3#;p1@T_@w{Qg2`HRlG#;D9EjazQVNC2W z`l*QGJ$x6K6UvK%05Xe)k@DeGF64?&g%?2>Seu0>egMXFOX zFeHEQ4upd{^Y`$%EhN-AHU3-Yga4#WkHCMY#Q%$kMF9V~4+{Q&S1v*R(dru0T(=zeCo&1QELsr-;gbp1ix4Mp0V9zfwMx`r>}RhN5|9wln4wv#rHCnnfnXl!U2 z4?IOq;;_&*t`e87s>TQ4g-^#P;Dv9%8{oK<%Yab^yCCwHS|>io$vLk3J2t|$m$D%4 zvCIs3%1obTaWMY&20U#?9X>Dx_ORLWwcQCJ)Uxer-Z~CaEh6LlT$mtS#kMq(X44{0 z6%k81XjQb!_x+aonV_i*rPrk!aT2DqEpLAy=@vyhJZGFs^>h1=2)sW6MwOBdN26-W zp2nF-sfc-E_EP?g1){pO1ut*6g}h7SM4D>Xr&&Ao?;ie~rI~Ey6ZDh4q1fPwA!ycy zv$`&0IfhK!G7&sBHr2J;T5S=W0jEHT>c>G@y2uMVzYo;?j9v=Bb#PiP(>M_x?~7hv z=oggdx1HqG3~-~)P_TgWwl6NKXpV7dmW0xHSd;yF+gfd1RL*;8*;&EVP~fEz~UdzaIjxkAfGK z@^1NmW6HI&V+qjU?Vri=^fj=o0M(9#Nt1*NDp+Wa z>xdWilOTV$ms8oC>g1v!4T3zBqcATsWa~f=OSN}-miRAcNmQ0+@+?ol<7yg9L7ufg z&f2fZuD#EE$8AFWiu%1T!3!$BZx40#b82w_SW&Yh9o>WeTm3Ua*qNID*52?RweS!4 z?-cys4@vmX94P!hlnz1t(P|peTDAxGC?jhT`r7 zv9u#tCNiIjU?YDYOXaRy9uJh!h-vt;GzYF_mfL7_hLOmR4y@z%<4(xZ#$*o-kK_Rq SDpaV@e(NI)FQ=dY8UO$|{=rWG literal 0 HcmV?d00001 diff --git a/flytectl/cmd/register/testdata/valid-unordered-register.tar b/flytectl/cmd/register/testdata/valid-unordered-register.tar new file mode 100644 index 0000000000000000000000000000000000000000..4b845118c347049d284d68bc14373c318e41a98a GIT binary patch literal 6656 zcmeHK&2HO95GLjPxSQsWO#ydXpt2C4fB;gvOG-?5iqYDs3&#!&_s|ouB$qKOi7Sw+ z$b#TLKrel|K0z;igWlQ>sR*bYSCN&VgLqc6Y6JatCxfRMxSOL$I zaQg3$WY&#)a%A<#{wVfsYY=ElEJ8@faq1deU6+(s!lpE^KuAfQIv`~2w$0o+VRnbO zTAeI$)}^-$bHy_-ZP4e(Ng8Fm3*-e0)Z+L8{)|<6^2#{^*AHZ&pVrq5Jekxp@gm7p z##JIyYmmtwMX2hhr}(q;vPkxMl7gu5)q;uBeC_!!MV7-k@DSrK9ZaabQxi0-H8iGq z+II)&8P8IWk8&^Jeb1w={Rk4X&0L3hne2&H+#4$q57V%S6YnXJt32Q;JT7WQWF|x| z8kRyc;nC0fCi*hBy;iF?j+NP$k>~}(q!)>-6-wC+;D@gnV8FXtgmxCLf3}+Xr?!1T z{kN<7zlxkdzg~Y2>hB5q0)341z_^KOfJb^zP`spc18(Z*4ys9Nte0ZAD``^Fx>1v) z@tclnDKQSwURj~tL|HsdrQ%9N)?loTW$Mq$)>l05T5kp~MVlJYFe*&Bj=?O>PSIpt zUlyz$E_CD^ux$KMcuD_bFInm3ox;nHFuVW=qaGGs2UD+u2C!D|Ih)renxDh_C&s7v zlhVH1iuy^ad^uEup=#bMlLKK$4~PyZdRI|8|BEvSZ7+cTiurU&@P{ZBBi@|(kJ7e% ze*PnrRrr4u35I^ZwrWV5TiC{}DL9)2CgTmm0C>GYEZVUMzA+UwwI^DG{CkHefZ4eB zkB+cbKmhw?4S8iRmVc za~<6L|BDV2*FS+L7|Uz%|A2x@jgU09KCCWMY-KFk#;{%_)w- z@F?Qs1m6eYl=Hk~fX;?#W_&c$i@4%5MVl)bd~te2z?FzNrnHHe3Q$mqd!-U|8(A9w Date: Wed, 17 Feb 2021 21:54:39 +0530 Subject: [PATCH 024/356] Added command delete along with subcommand executions for terminating (#34) --- flytectl/cmd/delete/delete.go | 32 +++++ flytectl/cmd/delete/delete_test.go | 25 ++++ flytectl/cmd/delete/execution.go | 81 ++++++++++++ flytectl/cmd/delete/execution_test.go | 82 ++++++++++++ flytectl/cmd/root.go | 7 +- flytectl/cmd/update/update.go | 6 +- flytectl/cmd/update/update_test.go | 7 +- flytectl/docs/source/gen/flytectl.rst | 6 +- flytectl/docs/source/gen/flytectl_config.rst | 1 - .../source/gen/flytectl_config_discover.rst | 1 - .../source/gen/flytectl_config_validate.rst | 1 - flytectl/docs/source/gen/flytectl_delete.rst | 75 +++++++++++ .../source/gen/flytectl_delete_execution.rst | 117 ++++++++++++++++++ flytectl/docs/source/gen/flytectl_get.rst | 1 - .../source/gen/flytectl_get_execution.rst | 1 - .../source/gen/flytectl_get_launchplan.rst | 1 - .../docs/source/gen/flytectl_get_project.rst | 1 - .../docs/source/gen/flytectl_get_task.rst | 1 - .../docs/source/gen/flytectl_get_workflow.rst | 1 - .../docs/source/gen/flytectl_register.rst | 1 - .../source/gen/flytectl_register_files.rst | 1 - flytectl/docs/source/gen/flytectl_update.rst | 3 - .../source/gen/flytectl_update_project.rst | 5 +- flytectl/docs/source/gen/flytectl_version.rst | 1 - flytectl/go.mod | 1 + flytectl/go.sum | 1 + 26 files changed, 429 insertions(+), 31 deletions(-) create mode 100644 flytectl/cmd/delete/delete.go create mode 100644 flytectl/cmd/delete/delete_test.go create mode 100644 flytectl/cmd/delete/execution.go create mode 100644 flytectl/cmd/delete/execution_test.go create mode 100644 flytectl/docs/source/gen/flytectl_delete.rst create mode 100644 flytectl/docs/source/gen/flytectl_delete_execution.rst diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go new file mode 100644 index 0000000000..47eaf657e5 --- /dev/null +++ b/flytectl/cmd/delete/delete.go @@ -0,0 +1,32 @@ +package delete + +import ( + cmdcore "github.com/lyft/flytectl/cmd/core" + + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + deleteCmdShort = `Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project.` + deleteCmdLong = ` +Example Delete executions. +:: + + bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks +` +) + +// RemoteDeleteCommand will return delete command +func RemoteDeleteCommand() *cobra.Command { + deleteCmd := &cobra.Command{ + Use: "delete", + Short: deleteCmdShort, + Long: deleteCmdLong, + } + terminateResourcesFuncs := map[string]cmdcore.CommandEntry{ + "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, Long: execCmdLong}, + } + cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) + return deleteCmd +} diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go new file mode 100644 index 0000000000..5543c88d28 --- /dev/null +++ b/flytectl/cmd/delete/delete_test.go @@ -0,0 +1,25 @@ +package delete + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDeleteCommand(t *testing.T) { + deleteCommand := RemoteDeleteCommand() + assert.Equal(t, deleteCommand.Use, "delete") + assert.Equal(t, deleteCommand.Short, deleteCmdShort) + assert.Equal(t, deleteCommand.Long, deleteCmdLong) + assert.Equal(t, len(deleteCommand.Commands()), 1) + cmdNouns := deleteCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "execution") + assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) + assert.Equal(t, cmdNouns[0].Short, execCmdShort) + assert.Equal(t, cmdNouns[0].Long, execCmdLong) +} diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go new file mode 100644 index 0000000000..90220e9a50 --- /dev/null +++ b/flytectl/cmd/delete/execution.go @@ -0,0 +1,81 @@ +package delete + +import ( + "context" + + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + "github.com/lyft/flytestdlib/logger" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + execCmdShort = `Terminate/Delete execution resources.` + execCmdLong = ` +Terminate executions.(execution,executions can be used interchangeably in these commands) + +Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then +calling terminate on them has no effect. + +Terminate a single execution with its name + +:: + + bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + +You can get executions to check its state. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Terminate multiple executions with there names +:: + + bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + +Similarly you can get executions to find the state of previously terminated executions. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Usage +` +) + +func terminateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + for i := 0; i < len(args); i++ { + name := args[i] + logger.Infof(ctx, "Terminating execution of %v execution ", name) + _, err := cmdCtx.AdminClient().TerminateExecution(ctx, &admin.ExecutionTerminateRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: name, + }, + }) + if err != nil { + logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) + return err + } + logger.Infof(ctx, "Terminated execution of %v execution ", name) + } + return nil +} diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go new file mode 100644 index 0000000000..41e5f04085 --- /dev/null +++ b/flytectl/cmd/delete/execution_test.go @@ -0,0 +1,82 @@ +package delete + +import ( + "context" + "errors" + "io" + "testing" + + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/clients/go/admin/mocks" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" +) + +var ( + ctx context.Context + args []string +) + +func setup() { + ctx = context.Background() + args = []string{} +} + +func TestTerminateExecutionFunc(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} + +func TestTerminateExecutionFuncWithError(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(nil, errors.New("failed to terminate")) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Equal(t, errors.New("failed to terminate"), err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertNotCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} + +func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(nil, errors.New("failed to terminate")) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Equal(t, errors.New("failed to terminate"), err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index b666b29b90..4ce6159973 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -4,17 +4,18 @@ import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/config" + "github.com/lyft/flytectl/cmd/delete" "github.com/lyft/flytectl/cmd/get" "github.com/lyft/flytectl/cmd/register" "github.com/lyft/flytectl/cmd/update" "github.com/lyft/flytectl/pkg/printer" stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" - - "github.com/lyft/flytectl/cmd/config" ) var ( @@ -28,6 +29,7 @@ func newRootCmd() *cobra.Command { Long: "flytectl is CLI tool written in go to interact with flyteadmin service", Short: "flyetcl CLI tool", Use: "flytectl", + DisableAutoGenTag: true, } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", @@ -45,6 +47,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) + rootCmd.AddCommand(delete.RemoteDeleteCommand()) config.GetConfig() return rootCmd diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index f165512740..f88d0ff3aa 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -8,10 +8,8 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - updateUse = "update" - updateShort = ` -Used for updating flyte resources eg: project. -` + updateUse = "update" + updateShort = `Used for updating flyte resources eg: project.` updatecmdLong = ` Currently this command only provides subcommands to update project. Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 816c094875..c54701f40a 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -9,8 +9,9 @@ import ( func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() - assert.Equal(t, updateCommand.Use, "update") - assert.Equal(t, updateCommand.Short, "\nUsed for updating flyte resources eg: project.\n") + assert.Equal(t, updateCommand.Use, updateUse) + assert.Equal(t, updateCommand.Short, updateShort) + assert.Equal(t, updateCommand.Long, updatecmdLong) assert.Equal(t, len(updateCommand.Commands()), 1) cmdNouns := updateCommand.Commands() // Sort by Use value. @@ -19,4 +20,6 @@ func TestUpdateCommand(t *testing.T) { }) assert.Equal(t, cmdNouns[0].Use, "project") assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) + assert.Equal(t, cmdNouns[0].Short, projectShort) + assert.Equal(t, cmdNouns[0].Long, projectLong) } diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 98c2e98d86..ee262c6ec4 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -60,11 +60,9 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -* :doc:`flytectl_update` - -Used for updating flyte resources eg: project. - +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_version` - Displays version information for the client and server. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index a8dcaff897..d3bf35e5bf 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -71,4 +71,3 @@ SEE ALSO * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. * :doc:`flytectl_config_validate` - Validates the loaded config. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index c8d945e1d5..2ce677324c 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -73,4 +73,3 @@ SEE ALSO * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index e7fd55fe82..ac0f848d42 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -75,4 +75,3 @@ SEE ALSO * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst new file mode 100644 index 0000000000..f9c3e5b589 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -0,0 +1,75 @@ +.. _flytectl_delete: + +flytectl delete +--------------- + +Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + +Synopsis +~~~~~~~~ + + + +Example Delete executions. +:: + + bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks + + +Options +~~~~~~~ + +:: + + -h, --help help for delete + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. + diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst new file mode 100644 index 0000000000..d606658174 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -0,0 +1,117 @@ +.. _flytectl_delete_execution: + +flytectl delete execution +------------------------- + +Terminate/Delete execution resources. + +Synopsis +~~~~~~~~ + + + +Terminate executions.(execution,executions can be used interchangeably in these commands) + +Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then +calling terminate on them has no effect. + +Terminate a single execution with its name + +:: + + bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + +You can get executions to check its state. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Terminate multiple executions with there names +:: + + bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + +Similarly you can get executions to find the state of previously terminated executions. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Usage + + +:: + + flytectl delete execution [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for execution + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index a1f3bf0958..ae7a6ae65d 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -77,4 +77,3 @@ SEE ALSO * :doc:`flytectl_get_task` - Gets task resources * :doc:`flytectl_get_workflow` - Gets workflow resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 1d920920ef..c623b62409 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index ec077f41b8..8ad77613a5 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 5bc2c48e40..17c5d35b3a 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index a5ea0f978c..01587b65ab 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 82d0b3edd1..e27166be70 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 1f031fec23..19179afdfc 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -73,4 +73,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_register_files` - Registers file resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 23135a982c..01074e4dc8 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -118,4 +118,3 @@ SEE ALSO * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index a0dd80e5fc..0424744484 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -3,10 +3,8 @@ flytectl update --------------- - Used for updating flyte resources eg: project. - Synopsis ~~~~~~~~ @@ -77,4 +75,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_update_project` - Updates project resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 0db111a1ab..5df7744a40 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -114,8 +114,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - -Used for updating flyte resources eg: project. +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. - -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 11247bb736..cbcf99db64 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -71,4 +71,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/go.mod b/flytectl/go.mod index b2617470b1..5f46438ddc 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -5,6 +5,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/ghodss/yaml v1.0.0 + github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 diff --git a/flytectl/go.sum b/flytectl/go.sum index 8716cb318d..41fc86466b 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -129,6 +129,7 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18h github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From d7e0624911b2830df6c092e806ca16a760bc7419 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Thu, 18 Feb 2021 01:04:21 +0530 Subject: [PATCH 025/356] Added Create command (#17) --- flytectl/cmd/create/create.go | 32 ++++ flytectl/cmd/create/create_test.go | 23 +++ flytectl/cmd/create/project.go | 95 ++++++++++ flytectl/cmd/create/project_test.go | 102 +++++++++++ flytectl/cmd/create/projectconfig_flags.go | 59 ++++++ .../cmd/create/projectconfig_flags_test.go | 172 ++++++++++++++++++ flytectl/cmd/create/type.go | 8 + flytectl/cmd/root.go | 2 + flytectl/docs/source/gen/flytectl.rst | 1 + flytectl/docs/source/gen/flytectl_create.rst | 75 ++++++++ .../source/gen/flytectl_create_project.rst | 98 ++++++++++ flytectl/docs/source/index.rst | 4 +- flytectl/go.mod | 3 +- flytectl/go.sum | 27 ++- flytectl/main.go | 8 +- 15 files changed, 697 insertions(+), 12 deletions(-) create mode 100644 flytectl/cmd/create/create.go create mode 100644 flytectl/cmd/create/create_test.go create mode 100644 flytectl/cmd/create/project.go create mode 100644 flytectl/cmd/create/project_test.go create mode 100755 flytectl/cmd/create/projectconfig_flags.go create mode 100755 flytectl/cmd/create/projectconfig_flags_test.go create mode 100644 flytectl/cmd/create/type.go create mode 100644 flytectl/docs/source/gen/flytectl_create.rst create mode 100644 flytectl/docs/source/gen/flytectl_create_project.rst diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go new file mode 100644 index 0000000000..51d487fc7b --- /dev/null +++ b/flytectl/cmd/create/create.go @@ -0,0 +1,32 @@ +package create + +import ( + cmdcore "github.com/lyft/flytectl/cmd/core" + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + createCmdShort = `Used for creating various flyte resources including tasks/workflows/launchplans/executions/project.` + createCmdLong = ` +Example create. +:: + + bin/flytectl create project --file project.yaml +` +) + +// CreateCommand will return create command +func RemoteCreateCommand() *cobra.Command { + createCmd := &cobra.Command{ + Use: "create", + Short: createCmdShort, + Long: createCmdLong, + } + createResourcesFuncs := map[string]cmdcore.CommandEntry{ + "project": {CmdFunc: createProjectsCommand, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, Short: projectShort, + Long: projectLong}, + } + cmdcore.AddCommands(createCmd, createResourcesFuncs) + return createCmd +} diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go new file mode 100644 index 0000000000..fb0d58a535 --- /dev/null +++ b/flytectl/cmd/create/create_test.go @@ -0,0 +1,23 @@ +package create + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCreateCommand(t *testing.T) { + createCommand := RemoteCreateCommand() + assert.Equal(t, createCommand.Use, "create") + assert.Equal(t, createCommand.Short, "Used for creating various flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, len(createCommand.Commands()), 1) + cmdNouns := createCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "project") + assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) + assert.Equal(t, cmdNouns[0].Short, "Create project resources") +} diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go new file mode 100644 index 0000000000..93a444ea8c --- /dev/null +++ b/flytectl/cmd/create/project.go @@ -0,0 +1,95 @@ +package create + +import ( + "context" + "fmt" + "io/ioutil" + + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "gopkg.in/yaml.v2" + + cmdCore "github.com/lyft/flytectl/cmd/core" +) + +const ( + projectShort = "Create project resources" + projectLong = ` +Create the projects.(project,projects can be used interchangeably in these commands) + +:: + + bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +Create Project by definition file +:: + + bin/flytectl create project --file project.yaml + +.. code-block:: yaml + + id: "project-unique-id" + name: "Friendly name" + labels: + app: flyte + description: "Some description for the project" + +` +) + +//go:generate pflags ProjectConfig --default-var projectConfig --bind-default-var + +// ProjectConfig Config hold configuration for project create flags. +type ProjectConfig struct { + ID string `json:"id" pflag:",id for the project specified as argument."` + Name string `json:"name" pflag:",name for the project specified as argument."` + File string `json:"file" pflag:",file for the project definition."` + Description string `json:"description" pflag:",description for the project specified as argument."` + Labels map[string]string `json:"labels" pflag:",labels for the project specified as argument."` +} + +var ( + projectConfig = &ProjectConfig{ + Description: "", + Labels: map[string]string{}, + } +) + +func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := projectDefinition{} + if projectConfig.File != "" { + yamlFile, err := ioutil.ReadFile(projectConfig.File) + if err != nil { + return err + } + err = yaml.Unmarshal(yamlFile, &project) + if err != nil { + return err + } + } else { + project.ID = projectConfig.ID + project.Name = projectConfig.Name + project.Description = projectConfig.Description + project.Labels = projectConfig.Labels + } + if project.ID == "" { + return fmt.Errorf("project ID is required flag") + } + if project.Name == "" { + return fmt.Errorf("project name is required flag") + } + _, err := cmdCtx.AdminClient().RegisterProject(ctx, &admin.ProjectRegisterRequest{ + Project: &admin.Project{ + Id: project.ID, + Name: project.Name, + Description: project.Description, + Labels: &admin.Labels{ + Values: project.Labels, + }, + }, + }) + if err != nil { + return err + } + fmt.Println("project Created successfully") + return nil +} diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go new file mode 100644 index 0000000000..e43e9124a5 --- /dev/null +++ b/flytectl/cmd/create/project_test.go @@ -0,0 +1,102 @@ +package create + +import ( + "bytes" + "context" + "io" + "log" + "os" + "testing" + + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/clients/go/admin/mocks" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" +) + +const projectValue = "dummyProject" + +var ( + reader *os.File + writer *os.File + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + mockOutStream io.Writer + args []string + cmdCtx cmdCore.CommandContext + projectRegisterRequest *admin.ProjectRegisterRequest + stdOut *os.File + stderr *os.File +) + +func setup() { + reader, writer, err = os.Pipe() + if err != nil { + panic(err) + } + stdOut = os.Stdout + stderr = os.Stderr + os.Stdout = writer + os.Stderr = writer + log.SetOutput(writer) + mockClient = new(mocks.AdminServiceClient) + mockOutStream = writer + cmdCtx = cmdCore.NewCommandContext(mockClient, mockOutStream) + projectRegisterRequest = &admin.ProjectRegisterRequest{ + Project: &admin.Project{ + Id: projectValue, + Name: projectValue, + Description: "", + Labels: &admin.Labels{ + Values: map[string]string{}, + }, + }, + } +} + +func teardownAndVerify(t *testing.T, expectedLog string) { + writer.Close() + os.Stdout = stdOut + os.Stderr = stderr + var buf bytes.Buffer + if _, err := io.Copy(&buf, reader); err != nil { + assert.Equal(t, expectedLog, buf.String()) + } +} + +func TestCreateProjectFunc(t *testing.T) { + setup() + defer teardownAndVerify(t, "project Created successfully") + projectConfig.ID = projectValue + projectConfig.Name = projectValue + projectConfig.Labels = map[string]string{} + projectConfig.Description = "" + mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) +} + +func TestEmptyProjectID(t *testing.T) { + setup() + defer teardownAndVerify(t, "project ID is required flag") + projectConfig.Name = projectValue + projectConfig.Labels = map[string]string{} + mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) +} + +func TestEmptyProjectName(t *testing.T) { + setup() + defer teardownAndVerify(t, "project ID is required flag") + projectConfig.ID = projectValue + projectConfig.Labels = map[string]string{} + projectConfig.Description = "" + mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) +} diff --git a/flytectl/cmd/create/projectconfig_flags.go b/flytectl/cmd/create/projectconfig_flags.go new file mode 100755 index 0000000000..db17e4882b --- /dev/null +++ b/flytectl/cmd/create/projectconfig_flags.go @@ -0,0 +1,59 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package create + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ProjectConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ProjectConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ProjectConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(projectConfig.ID), fmt.Sprintf("%v%v", prefix, "id"), *new(string), "id for the project specified as argument.") + cmdFlags.StringVar(&(projectConfig.Name), fmt.Sprintf("%v%v", prefix, "name"), *new(string), "name for the project specified as argument.") + cmdFlags.StringVar(&(projectConfig.File), fmt.Sprintf("%v%v", prefix, "file"), *new(string), "file for the project definition.") + cmdFlags.StringVar(&(projectConfig.Description), fmt.Sprintf("%v%v", prefix, "description"), *new(string), "description for the project specified as argument.") + cmdFlags.StringToStringVar(&(projectConfig.Labels), fmt.Sprintf("%v%v", prefix, "labels"), map[string]string{}, "labels for the project specified as argument.") + return cmdFlags +} diff --git a/flytectl/cmd/create/projectconfig_flags_test.go b/flytectl/cmd/create/projectconfig_flags_test.go new file mode 100755 index 0000000000..8d90bc5cd7 --- /dev/null +++ b/flytectl/cmd/create/projectconfig_flags_test.go @@ -0,0 +1,172 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package create + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsProjectConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementProjectConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsProjectConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookProjectConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementProjectConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_ProjectConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookProjectConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_ProjectConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_ProjectConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ProjectConfig(val, result)) +} + +func testDecodeRaw_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ProjectConfig(vStringSlice, result)) +} + +func TestProjectConfig_GetPFlagSet(t *testing.T) { + val := ProjectConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestProjectConfig_SetFlags(t *testing.T) { + actual := ProjectConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_id", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("id", testValue) + if vString, err := cmdFlags.GetString("id"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.ID) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_name", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("name", testValue) + if vString, err := cmdFlags.GetString("name"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.Name) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_file", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("file", testValue) + if vString, err := cmdFlags.GetString("file"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.File) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_description", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("description", testValue) + if vString, err := cmdFlags.GetString("description"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.Description) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_labels", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "a=1,b=2" + + cmdFlags.Set("labels", testValue) + if vStringToString, err := cmdFlags.GetStringToString("labels"); err == nil { + testDecodeRaw_ProjectConfig(t, vStringToString, &actual.Labels) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/create/type.go b/flytectl/cmd/create/type.go new file mode 100644 index 0000000000..61709eb6ef --- /dev/null +++ b/flytectl/cmd/create/type.go @@ -0,0 +1,8 @@ +package create + +type projectDefinition struct { + ID string `yaml:"id"` + Name string `yaml:"name"` + Description string `yaml:"description"` + Labels map[string]string `yaml:"labels"` +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 4ce6159973..572dc7d058 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/lyft/flytectl/cmd/config" + "github.com/lyft/flytectl/cmd/create" "github.com/lyft/flytectl/cmd/delete" "github.com/lyft/flytectl/cmd/get" "github.com/lyft/flytectl/cmd/register" @@ -45,6 +46,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) + rootCmd.AddCommand(create.RemoteCreateCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index ee262c6ec4..70c8b01eba 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -60,6 +60,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst new file mode 100644 index 0000000000..dbd0218ae4 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -0,0 +1,75 @@ +.. _flytectl_create: + +flytectl create +--------------- + +Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. + +Synopsis +~~~~~~~~ + + + +Example create. +:: + + bin/flytectl create project --file project.yaml + + +Options +~~~~~~~ + +:: + + -h, --help help for create + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_create_project` - Create project resources + diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst new file mode 100644 index 0000000000..26b8b4e557 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -0,0 +1,98 @@ +.. _flytectl_create_project: + +flytectl create project +----------------------- + +Create project resources + +Synopsis +~~~~~~~~ + + + +Create the projects.(project,projects can be used interchangeably in these commands) + +:: + + bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +Create Project by definition file +:: + + bin/flytectl create project --file project.yaml + +.. code-block:: yaml + + id: "project-unique-id" + name: "Friendly name" + labels: + app: flyte + description: "Some description for the project" + + + +:: + + flytectl create project [flags] + +Options +~~~~~~~ + +:: + + --description string description for the project specified as argument. + --file string file for the project definition. + -h, --help help for project + --id string id for the project specified as argument. + --labels stringToString labels for the project specified as argument. (default []) + --name string name for the project specified as argument. + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 581884254d..00a24536a7 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -47,7 +47,8 @@ Basic Configuration .. toctree:: :maxdepth: 1 :caption: Flytectl verbs - + + gen/flytectl_create gen/flytectl_get gen/flytectl_update gen/flytectl_delete @@ -58,6 +59,7 @@ Basic Configuration :maxdepth: 1 :caption: Flytectl nouns + gen/flytectl_create_project gen/flytectl_get_execution gen/flytectl_get_project gen/flytectl_get_workflow diff --git a/flytectl/go.mod b/flytectl/go.mod index 5f46438ddc..3c1d85d0d9 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -5,7 +5,6 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/ghodss/yaml v1.0.0 - github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 @@ -19,8 +18,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 - go.uber.org/zap v1.10.0 golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 // indirect google.golang.org/grpc v1.26.0 + gopkg.in/yaml.v2 v2.2.8 k8s.io/apimachinery v0.18.3 // indirect ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 41fc86466b..bc1a758eb3 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1,4 +1,3 @@ -<<<<<<< Updated upstream cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -28,15 +27,19 @@ github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSW github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -60,6 +63,7 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -84,6 +88,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= @@ -120,6 +125,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -129,7 +135,6 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18h github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -141,6 +146,7 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -157,6 +163,7 @@ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= @@ -178,6 +185,7 @@ 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/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.7.9/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= @@ -188,6 +196,7 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= @@ -196,18 +205,17 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= 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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1 h1:SH30nioTpP0VaCYafgUw+iS1EfJTDbtAeBcByEFqFrY= -github.com/landoop/tableprinter v0.0.0-20200104100433-ae9249991eb1/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lyft/flyteidl v0.18.1 h1:COKkZi5k6bQvUYOk5gE70+FJX9/NUn0WOQ1uMrw3Qio= -github.com/lyft/flyteidl v0.18.1/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= github.com/lyft/flyteidl v0.18.11 h1:24NaFYWxANhRbwKfvkgu8axGTWUcl1tgZBqNJutKNJ8= github.com/lyft/flyteidl v0.18.11/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= @@ -296,9 +304,12 @@ github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAE github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= @@ -343,7 +354,6 @@ go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -467,6 +477,7 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -478,6 +489,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -501,6 +513,7 @@ google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= diff --git a/flytectl/main.go b/flytectl/main.go index d6dbf7f4ad..5bc6a6fddc 100644 --- a/flytectl/main.go +++ b/flytectl/main.go @@ -1,9 +1,13 @@ package main -import "github.com/lyft/flytectl/cmd" +import ( + "fmt" + + "github.com/lyft/flytectl/cmd" +) func main() { if err := cmd.ExecuteCmd(); err != nil { - panic(err) + fmt.Printf("error: %v", err) } } From a2c4dd3149379dd77212764d90d04e07a8b6581d Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 17 Feb 2021 13:53:12 -0800 Subject: [PATCH 026/356] Pygments style should default to material (#35) --- flytectl/docs/source/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 29fba17e72..c346003f67 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -75,10 +75,6 @@ # This pattern also affects html_static_path and html_extra_path . exclude_patterns = [] -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - - # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for From 3eb2ea3a35d196cc4b9fa59d675b57fd33c836ba Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Thu, 25 Feb 2021 08:18:12 +0530 Subject: [PATCH 027/356] Flytectl Doc fixes (#38) * Flytectl Doc fixes * removed tab characters Co-authored-by: pmahindrakar --- flytectl/cmd/create/project.go | 12 ++++++------ flytectl/cmd/get/execution.go | 2 +- flytectl/cmd/get/launch_plan.go | 2 +- flytectl/cmd/get/task.go | 2 +- flytectl/cmd/get/workflow.go | 2 +- flytectl/cmd/update/project.go | 2 +- flytectl/docs/source/gen/flytectl_create_project.rst | 12 ++++++------ flytectl/docs/source/gen/flytectl_get_execution.rst | 2 +- flytectl/docs/source/gen/flytectl_get_launchplan.rst | 2 +- flytectl/docs/source/gen/flytectl_get_task.rst | 2 +- flytectl/docs/source/gen/flytectl_get_workflow.rst | 2 +- flytectl/docs/source/gen/flytectl_update_project.rst | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 93a444ea8c..776be99056 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -20,18 +20,18 @@ Create the projects.(project,projects can be used interchangeably in these comma bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte -Create Project by definition file +Create Project by definition file. Note: The name shouldn't contain any whitespace characters' :: bin/flytectl create project --file project.yaml .. code-block:: yaml - id: "project-unique-id" - name: "Friendly name" - labels: - app: flyte - description: "Some description for the project" + id: "project-unique-id" + name: "Name" + labels: + app: flyte + description: "Some description for the project" ` ) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 0c22e5674e..67ef82b9ac 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -26,7 +26,7 @@ Retrieves execution by name within project and domain. :: - bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r Retrieves execution by filters :: diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 8706a36271..eb4d292e20 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -24,7 +24,7 @@ Retrieves launch plan by name within project and domain. :: - bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + bin/flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet Retrieves launchplan by filters. :: diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 96631d1741..054225e413 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -27,7 +27,7 @@ Retrieves task by name within project and domain. :: - bin/flytectl task -p flytesnacks -d development square + bin/flytectl task -p flytesnacks -d development core.basic.lp.greet Retrieves project by filters. :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 857df5bf5b..322a3af0c0 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -26,7 +26,7 @@ Retrieves workflow by name within project and domain. :: - bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + bin/flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet Retrieves workflow by filters. :: diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index c421dddd2b..15c1c9dc73 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -30,7 +30,7 @@ Archives project named flytesnacks. :: - bin/flytectl get project flytesnacks --archiveProject + bin/flytectl update project -p flytesnacks --archiveProject Activates project named flytesnacks using short option -t. :: diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 26b8b4e557..3b1aa15100 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -16,18 +16,18 @@ Create the projects.(project,projects can be used interchangeably in these comma bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte -Create Project by definition file +Create Project by definition file. Note: The name shouldn't contain any whitespace characters' :: bin/flytectl create project --file project.yaml .. code-block:: yaml - id: "project-unique-id" - name: "Friendly name" - labels: - app: flyte - description: "Some description for the project" + id: "project-unique-id" + name: "Name" + labels: + app: flyte + description: "Some description for the project" diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index c623b62409..48a01189cc 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -19,7 +19,7 @@ Retrieves execution by name within project and domain. :: - bin/flytectl execution -p flytesnacks -d development oeh94k9r2r + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r Retrieves execution by filters :: diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 8ad77613a5..ab832ed6b5 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -19,7 +19,7 @@ Retrieves launch plan by name within project and domain. :: - bin/flytectl launchplan -p flytesnacks -d development recipes.core.basic.lp.my_wf + bin/flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet Retrieves launchplan by filters. :: diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 01587b65ab..3037d96055 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -19,7 +19,7 @@ Retrieves task by name within project and domain. :: - bin/flytectl task -p flytesnacks -d development square + bin/flytectl task -p flytesnacks -d development core.basic.lp.greet Retrieves project by filters. :: diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index e27166be70..4b4a996b2c 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -19,7 +19,7 @@ Retrieves workflow by name within project and domain. :: - bin/flytectl workflow -p flytesnacks -d development recipes.plugins.k8s_spark.pyspark_pi.my_spark + bin/flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet Retrieves workflow by filters. :: diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 5df7744a40..d3b2d44096 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -20,7 +20,7 @@ Archives project named flytesnacks. :: - bin/flytectl get project flytesnacks --archiveProject + bin/flytectl update project -p flytesnacks --archiveProject Activates project named flytesnacks using short option -t. :: From caf9bbc995a6022fa19a0caf5f8699ecbbc8eeaf Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Thu, 4 Mar 2021 01:26:36 +0530 Subject: [PATCH 028/356] Fix goreleaser (#40) Signed-off-by: Yuvraj --- flytectl/.github/workflows/release.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml index 7d30bdb666..e4c2de9fd3 100644 --- a/flytectl/.github/workflows/release.yml +++ b/flytectl/.github/workflows/release.yml @@ -10,25 +10,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Unit Tests - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make test_unit_codecov - - name: Push CodeCov - uses: codecov/codecov-action@v1 - with: - file: coverage.txt - flags: unittests - fail_ci_if_error: true - - name: Lint - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make lint - - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: From ce7ddc1ff5edbb825f2964fde05adb4998be828a Mon Sep 17 00:00:00 2001 From: brucearctor <5032356+brucearctor@users.noreply.github.com> Date: Wed, 17 Mar 2021 21:54:24 -0700 Subject: [PATCH 029/356] to flyteorg (#43) --- flytectl/Makefile | 2 +- flytectl/README.md | 6 +- flytectl/cmd/config/config.go | 4 +- flytectl/cmd/core/cmd.go | 4 +- flytectl/cmd/core/cmd_ctx.go | 2 +- flytectl/cmd/create/create.go | 2 +- flytectl/cmd/create/project.go | 4 +- flytectl/cmd/create/project_test.go | 6 +- flytectl/cmd/delete/delete.go | 2 +- flytectl/cmd/delete/execution.go | 10 +- flytectl/cmd/delete/execution_test.go | 8 +- flytectl/cmd/get/execution.go | 13 +- flytectl/cmd/get/execution_test.go | 10 +- flytectl/cmd/get/get.go | 2 +- flytectl/cmd/get/launch_plan.go | 12 +- flytectl/cmd/get/named_entity.go | 2 +- flytectl/cmd/get/project.go | 10 +- flytectl/cmd/get/task.go | 12 +- flytectl/cmd/get/workflow.go | 12 +- flytectl/cmd/register/files.go | 6 +- flytectl/cmd/register/filesconfig_flags.go | 2 +- flytectl/cmd/register/register.go | 2 +- flytectl/cmd/register/register_util.go | 14 +- flytectl/cmd/root.go | 18 +- flytectl/cmd/update/project.go | 6 +- flytectl/cmd/update/project_test.go | 8 +- flytectl/cmd/update/update.go | 2 +- flytectl/cmd/version.go | 2 +- flytectl/docs/CONTRIBUTING.md | 2 +- flytectl/docs/source/generate_docs.go | 2 +- flytectl/go.mod | 23 +- flytectl/go.sum | 750 +++++++++++++++++---- flytectl/main.go | 2 +- flytectl/pkg/adminutils/config.go | 2 +- flytectl/pkg/adminutils/iterator.go | 2 +- flytectl/pkg/printer/printer.go | 2 +- flytectl/proposal/README.md | 6 +- 37 files changed, 715 insertions(+), 259 deletions(-) diff --git a/flytectl/Makefile b/flytectl/Makefile index edf00f07ea..2e5bcf7a82 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -6,7 +6,7 @@ pip-compile $(1) --upgrade --verbose endef generate: - go test github.com/lyft/flytectl/cmd --update + go test github.com/flyteorg/flytectl/cmd --update compile: go build -o bin/flytectl main.go diff --git a/flytectl/README.md b/flytectl/README.md index a1a2af7292..6f46476b67 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -3,10 +3,10 @@ [![Docs](https://readthedocs.org/projects/flytectl/badge/?version=latest&style=plastic)](https://flytectl.rtfd.io) [![Current Release](https://img.shields.io/github/release/flyteorg/flytectl.svg)](https://github.com/flyteorg/flytectl/releases/latest) ![Master](https://github.com/flyteorg/flytectl/workflows/Master/badge.svg) -[![GoDoc](https://godoc.org/github.com/lyft/flytectl?status.svg)](https://pkg.go.dev/mod/github.com/lyft/flytectl) +[![GoDoc](https://godoc.org/github.com/flyteorg/flytectl?status.svg)](https://pkg.go.dev/mod/github.com/flyteorg/flytectl) [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [![CodeCoverage](https://img.shields.io/codecov/c/github/flyteorg/flytectl.svg)](https://codecov.io/gh/flyteorg/flytectl) -[![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytectl)](https://goreportcard.com/report/github.com/lyft/flytectl) +[![Go Report Card](https://goreportcard.com/badge/github.com/flyteorg/flytectl)](https://goreportcard.com/report/github.com/flyteorg/flytectl) ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytectl.svg?style=plastic) ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) @@ -27,5 +27,3 @@ curl -s https://raw.githubusercontent.com/flyteorg/flytectl/master/install.sh | ## Contributing [Contribution guidelines for this project](docs/CONTRIBUTING.md) - - diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index bb691b52c0..6c212d1cf9 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/lyft/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config" - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/pkg/printer" ) //go:generate pflags Config diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index aa76d00112..0e62c7369d 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -6,10 +6,10 @@ import ( "github.com/spf13/pflag" - "github.com/lyft/flyteidl/clients/go/admin" + "github.com/flyteorg/flyteidl/clients/go/admin" "github.com/spf13/cobra" - "github.com/lyft/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config" ) type PFlagProvider interface { diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 347e75c3fe..e0de7d1a18 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,7 +3,7 @@ package cmdcore import ( "io" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" ) type CommandContext struct { diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 51d487fc7b..5fbf0b9914 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -1,7 +1,7 @@ package create import ( - cmdcore "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 776be99056..e7550c6b5f 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -5,10 +5,10 @@ import ( "fmt" "io/ioutil" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "gopkg.in/yaml.v2" - cmdCore "github.com/lyft/flytectl/cmd/core" + cmdCore "github.com/flyteorg/flytectl/cmd/core" ) const ( diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index e43e9124a5..77c3cb7578 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/clients/go/admin/mocks" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 47eaf657e5..29ec1efa05 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -1,7 +1,7 @@ package delete import ( - cmdcore "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index 90220e9a50..d92871d45b 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -3,11 +3,11 @@ package delete import ( "context" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" - "github.com/lyft/flytestdlib/logger" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" ) // Long descriptions are whitespace sensitive when generating docs using sphinx. diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index 41e5f04085..f2f3ec11bb 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -6,10 +6,10 @@ import ( "io" "testing" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/clients/go/admin/mocks" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 67ef82b9ac..8cde1b7b57 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -3,15 +3,14 @@ package get import ( "context" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" - + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/printer" ) const ( diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 33cccd465f..d414f32145 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -6,11 +6,11 @@ import ( "io" "testing" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/clients/go/admin/mocks" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 2fd6806c5a..8f8cc9c25d 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -1,7 +1,7 @@ package get import ( - cmdcore "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index eb4d292e20..6d40cec4d4 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -3,13 +3,13 @@ package get import ( "context" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/adminutils" - "github.com/lyft/flytectl/pkg/printer" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flytestdlib/logger" ) const ( diff --git a/flytectl/cmd/get/named_entity.go b/flytectl/cmd/get/named_entity.go index b636145790..617542f5ec 100644 --- a/flytectl/cmd/get/named_entity.go +++ b/flytectl/cmd/get/named_entity.go @@ -1,7 +1,7 @@ package get import ( - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/pkg/printer" ) var entityColumns = []printer.Column{ diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 8307a6e627..f89b952d4b 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -3,13 +3,13 @@ package get import ( "context" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/printer" ) const ( diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 054225e413..ccbd46dd4d 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,16 +3,16 @@ package get import ( "context" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/pkg/adminutils" - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/printer" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 322a3af0c0..2736fe9b11 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,15 +3,15 @@ package get import ( "context" + "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/adminutils" - "github.com/lyft/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/printer" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b413619008..cf4f957e3a 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -5,9 +5,9 @@ import ( "encoding/json" "os" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" - "github.com/lyft/flytestdlib/logger" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flytestdlib/logger" ) //go:generate pflags FilesConfig diff --git a/flytectl/cmd/register/filesconfig_flags.go b/flytectl/cmd/register/filesconfig_flags.go index b35de5beb8..2600e6024e 100755 --- a/flytectl/cmd/register/filesconfig_flags.go +++ b/flytectl/cmd/register/filesconfig_flags.go @@ -41,7 +41,7 @@ func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.StringVarP(&(filesConfig.Version),fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") + cmdFlags.StringVarP(&(filesConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") cmdFlags.BoolVarP(&(filesConfig.ContinueOnError), fmt.Sprintf("%v%v", prefix, "continueOnError"), "c", *new(bool), "continue on error when registering files.") cmdFlags.BoolVarP(&(filesConfig.Archive), fmt.Sprintf("%v%v", prefix, "archive"), "a", *new(bool), "pass in archive file either an http link or local path.") return cmdFlags diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 3a46653b12..476080dd2c 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -1,7 +1,7 @@ package register import ( - cmdcore "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 1b419912f4..1f3ac0e816 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -16,13 +16,13 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flytectl/pkg/printer" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" - "github.com/lyft/flytestdlib/logger" - "github.com/lyft/flytestdlib/storage" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytestdlib/storage" ) const registrationProjectPattern = "{{ registration.project }}" diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 572dc7d058..26bfc2b453 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -4,15 +4,15 @@ import ( "context" "fmt" - "github.com/lyft/flytectl/cmd/config" - "github.com/lyft/flytectl/cmd/create" - "github.com/lyft/flytectl/cmd/delete" - "github.com/lyft/flytectl/cmd/get" - "github.com/lyft/flytectl/cmd/register" - "github.com/lyft/flytectl/cmd/update" - "github.com/lyft/flytectl/pkg/printer" - stdConfig "github.com/lyft/flytestdlib/config" - "github.com/lyft/flytestdlib/config/viper" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/create" + "github.com/flyteorg/flytectl/cmd/delete" + "github.com/flyteorg/flytectl/cmd/get" + "github.com/flyteorg/flytectl/cmd/register" + "github.com/flyteorg/flytectl/cmd/update" + "github.com/flyteorg/flytectl/pkg/printer" + stdConfig "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flytestdlib/config/viper" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 15c1c9dc73..0c13b7ed74 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) //go:generate pflags ProjectConfig diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index c11986b6fa..36e703b15e 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -9,10 +9,10 @@ import ( "os" "testing" - "github.com/lyft/flytectl/cmd/config" - cmdCore "github.com/lyft/flytectl/cmd/core" - "github.com/lyft/flyteidl/clients/go/admin/mocks" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index f88d0ff3aa..33526e6dcd 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -1,7 +1,7 @@ package update import ( - cmdcore "github.com/lyft/flytectl/cmd/core" + cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/version.go b/flytectl/cmd/version.go index b24cc3a63f..647a5a1eac 100644 --- a/flytectl/cmd/version.go +++ b/flytectl/cmd/version.go @@ -1,7 +1,7 @@ package cmd import ( - "github.com/lyft/flytestdlib/version" + "github.com/flyteorg/flytestdlib/version" "github.com/spf13/cobra" ) diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md index 391bee6d82..5758d747b2 100644 --- a/flytectl/docs/CONTRIBUTING.md +++ b/flytectl/docs/CONTRIBUTING.md @@ -11,6 +11,6 @@ FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec. #2) Setup Port forwarding: kubectl port-forward -n flyte service/flyteadmin 8081:$FLYTECTL_GRPC_PORT -#3) Update config line in https://github.com/lyft/flytectl/blob/master/config.yaml to dns:///localhost:8081 +#3) Update config line in https://github.com/flyteorg/flytectl/blob/master/config.yaml to dns:///localhost:8081 #4) All new flags introduced for flytectl commands and subcommands should be camelcased. eg: bin/flytectl update project -p flytesnacks --activateProject diff --git a/flytectl/docs/source/generate_docs.go b/flytectl/docs/source/generate_docs.go index 4bfb6667ef..e64f2a5996 100644 --- a/flytectl/docs/source/generate_docs.go +++ b/flytectl/docs/source/generate_docs.go @@ -1,6 +1,6 @@ package main -import "github.com/lyft/flytectl/cmd" +import "github.com/flyteorg/flytectl/cmd" func main() { if err := cmd.GenerateDocs(); err != nil { diff --git a/flytectl/go.mod b/flytectl/go.mod index 3c1d85d0d9..c07b1b38a1 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -1,25 +1,22 @@ -module github.com/lyft/flytectl +module github.com/flyteorg/flytectl go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect + github.com/flyteorg/flyteidl v0.18.15 + github.com/flyteorg/flytestdlib v0.3.13 github.com/ghodss/yaml v1.0.0 - github.com/golang/protobuf v1.3.2 + github.com/golang/protobuf v1.4.3 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/lyft/flyteidl v0.18.11 - github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/mitchellh/mapstructure v1.1.2 - github.com/sirupsen/logrus v1.4.2 - github.com/spf13/afero v1.2.2 // indirect - github.com/spf13/cobra v0.0.5 + github.com/mitchellh/mapstructure v1.4.1 + github.com/sirupsen/logrus v1.7.0 + github.com/spf13/cobra v1.1.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.4.0 + github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 - golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 // indirect - google.golang.org/grpc v1.26.0 - gopkg.in/yaml.v2 v2.2.8 - k8s.io/apimachinery v0.18.3 // indirect + google.golang.org/grpc v1.35.0 + gopkg.in/yaml.v2 v2.4.0 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index bc1a758eb3..410cad1d09 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -5,59 +5,109 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.52.0 h1:GGslhk/BU052LPlnI1vpp3fcbUs+hQ3E+Doti/3/vF8= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v38.2.0+incompatible h1:ZeCdp1E/V5lI8oLR/BjWQh0OW9aFBYlgXGKRVIWNPXY= -github.com/Azure/azure-sdk-for-go v38.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= -github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= +github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.28.9 h1:grIuBQc+p3dTRXerh5+2OxSuWFi0iXuxbFdTSg0jaW0= -github.com/aws/aws-sdk-go v1.28.9/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= +github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -68,64 +118,103 @@ github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgk github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= -github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= +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/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= +github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flyteorg/flyteidl v0.18.15 h1:sXrlwTRaRjQsXYMNrY/S930SKdKtu4XnpNFEu8I4tn4= +github.com/flyteorg/flyteidl v0.18.15/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= +github.com/flyteorg/flytestdlib v0.3.13 h1:5ioA/q3ixlyqkFh5kDaHgmPyTP/AHtqq1K/TIbVLUzM= +github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -136,241 +225,402 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/graymeta/stow v0.2.4 h1:qDGstknYXqcnmBQ5TRJtxD9Qv1MuRbYRhLoSMeUDs7U= -github.com/graymeta/stow v0.2.4/go.mod h1:+0vRL9oMECKjPMP7OeVWl8EIqRCpFwDlth3mrAeV2Kw= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= +github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 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-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.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o= github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= 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.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.7.9/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lyft/flyteidl v0.18.11 h1:24NaFYWxANhRbwKfvkgu8axGTWUcl1tgZBqNJutKNJ8= -github.com/lyft/flyteidl v0.18.11/go.mod h1:/zQXxuHO11u/saxTTZc8oYExIGEShXB+xCB1/F1Cu20= -github.com/lyft/flytestdlib v0.3.0/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= -github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa h1:anYLG/feMdMv321AfhHGBRd0S3cPLFFTZvJYssjhxFo= -github.com/lyft/flytestdlib v0.3.10-0.20200619054107-45f341b716fa/go.mod h1:LJPPJlkFj+wwVWMrQT3K5JZgNhZi2mULsCG4ZYhinhU= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.49 h1:eQaKIjSt/PXLKfYgzg01nevmO+CMXfXGRhB1gOhDs7E= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= +github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= +github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +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.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= 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= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +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/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= @@ -379,83 +629,160 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/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-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20180828015842-6cd1fcedba52/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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= @@ -467,92 +794,227 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200124170513-3f4d10fc73b4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +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-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.38.0 h1:vDyWk6eup8eQAidaZ31sNWIn8tZEL8qpbtGkBD4ytQo= +google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150 h1:VPpdpQkGvFicX9yo4G5oxZPi9ALBnEOZblPSa/Wa2m4= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +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-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= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.18.3 h1:pOGcbVAhxADgUYnjS08EFXs9QMl8qaH5U4fr5LGUrSk= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= -k8s.io/client-go v11.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytectl/main.go b/flytectl/main.go index 5bc6a6fddc..5951864944 100644 --- a/flytectl/main.go +++ b/flytectl/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/lyft/flytectl/cmd" + "github.com/flyteorg/flytectl/cmd" ) func main() { diff --git a/flytectl/pkg/adminutils/config.go b/flytectl/pkg/adminutils/config.go index 3b362b310b..f47ae8276b 100644 --- a/flytectl/pkg/adminutils/config.go +++ b/flytectl/pkg/adminutils/config.go @@ -1,6 +1,6 @@ package adminutils -import "github.com/lyft/flytestdlib/config" +import "github.com/flyteorg/flytestdlib/config" //go:generate pflags Config diff --git a/flytectl/pkg/adminutils/iterator.go b/flytectl/pkg/adminutils/iterator.go index 927b126de6..3e90690b43 100644 --- a/flytectl/pkg/adminutils/iterator.go +++ b/flytectl/pkg/adminutils/iterator.go @@ -3,8 +3,8 @@ package adminutils import ( "context" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/golang/protobuf/proto" - "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" "google.golang.org/grpc" ) diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 40fc4c39d9..fa86127b9e 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -6,12 +6,12 @@ import ( "fmt" "os" + "github.com/flyteorg/flytestdlib/errors" "github.com/ghodss/yaml" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" "github.com/landoop/tableprinter" - "github.com/lyft/flytestdlib/errors" "github.com/yalp/jsonpath" ) diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index c9c2acedd4..abbf8c6bfb 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -81,12 +81,12 @@ User-facing SDKs can serialize workflow code to protobuf representations but the * `{{ .project }}` * `{{ .domain }}` * `{{ .version }}` -* [auth](https://github.com/lyft/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L241): including the assumable_iam_role and/or kubernetes_service_account -* the [output_location_prefix](https://github.com/lyft/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L250) +* [auth](https://github.com/flyteorg/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L241): including the assumable_iam_role and/or kubernetes_service_account +* the [output_location_prefix](https://github.com/flyteorg/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L250) will be included in the serialized protobuf that must be substituted at **create** time. Eventually the hope is that substitution will be done server-side. -Furthermore, to reproduce the equivalent **fast-register** code path for the flyte-cli defined in flytekit an equivalent _fast-create_ command must fill in additional template variables in the [task container args](https://github.com/lyft/flyteidl/blob/master/protos/flyteidl/core/tasks.proto#L142). These serialized, templatized args will appear like so: +Furthermore, to reproduce the equivalent **fast-register** code path for the flyte-cli defined in flytekit an equivalent _fast-create_ command must fill in additional template variables in the [task container args](https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/core/tasks.proto#L142). These serialized, templatized args will appear like so: ``` "pyflyte-fast-execute", From e5d11a886fbc29d29f00d36b71df926ab71b362f Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Mon, 22 Mar 2021 10:13:51 +0530 Subject: [PATCH 030/356] Create executions in flytectl (#39) --- .../lyft/golang_support_tools/tools.go | 2 +- .../golang_test_targets/download_tooling.sh | 2 +- flytectl/cmd/create/create.go | 2 + flytectl/cmd/create/create_test.go | 28 +- flytectl/cmd/create/execution.go | 129 ++++ flytectl/cmd/create/execution_test.go | 166 +++++ flytectl/cmd/create/execution_util.go | 148 +++++ flytectl/cmd/create/executionconfig_flags.go | 50 ++ .../cmd/create/executionconfig_flags_test.go | 212 ++++++ flytectl/cmd/create/project_test.go | 70 +- flytectl/cmd/create/serialization_utils.go | 29 + flytectl/cmd/get/execution.go | 4 +- flytectl/cmd/get/execution_test.go | 9 - flytectl/cmd/get/execution_util.go | 128 ++++ flytectl/cmd/get/get.go | 4 +- flytectl/cmd/get/get_test.go | 24 + flytectl/cmd/get/launch_plan.go | 66 +- flytectl/cmd/get/launch_plan_test.go | 628 ++++++++++++++++++ flytectl/cmd/get/launch_plan_util.go | 90 +++ flytectl/cmd/get/launchplanconfig_flags.go | 48 ++ .../cmd/get/launchplanconfig_flags_test.go | 168 +++++ flytectl/cmd/get/task.go | 77 ++- flytectl/cmd/get/task_test.go | 368 ++++++++++ flytectl/cmd/get/task_util.go | 93 +++ flytectl/cmd/get/taskconfig_flags.go | 48 ++ flytectl/cmd/get/taskconfig_flags_test.go | 168 +++++ flytectl/cmd/register/register_util.go | 6 +- .../testdata/launchplan_execution_spec.yaml | 11 + .../cmd/testdata/task_execution_spec.yaml | 15 + flytectl/cmd/testutils/test_utils.go | 62 ++ flytectl/cmd/update/project_test.go | 1 + flytectl/docs/source/gen/flytectl_create.rst | 1 + .../source/gen/flytectl_create_execution.rst | 140 ++++ .../source/gen/flytectl_get_launchplan.rst | 37 +- .../docs/source/gen/flytectl_get_task.rst | 29 +- flytectl/docs/source/index.rst | 1 + flytectl/go.mod | 12 +- flytectl/go.sum | 26 +- flytectl/main.go | 2 +- flytectl/pkg/commandutils/command_utils.go | 26 + 40 files changed, 3000 insertions(+), 130 deletions(-) create mode 100644 flytectl/cmd/create/execution.go create mode 100644 flytectl/cmd/create/execution_test.go create mode 100644 flytectl/cmd/create/execution_util.go create mode 100755 flytectl/cmd/create/executionconfig_flags.go create mode 100755 flytectl/cmd/create/executionconfig_flags_test.go create mode 100644 flytectl/cmd/create/serialization_utils.go create mode 100644 flytectl/cmd/get/execution_util.go create mode 100644 flytectl/cmd/get/launch_plan_test.go create mode 100644 flytectl/cmd/get/launch_plan_util.go create mode 100755 flytectl/cmd/get/launchplanconfig_flags.go create mode 100755 flytectl/cmd/get/launchplanconfig_flags_test.go create mode 100644 flytectl/cmd/get/task_test.go create mode 100644 flytectl/cmd/get/task_util.go create mode 100755 flytectl/cmd/get/taskconfig_flags.go create mode 100755 flytectl/cmd/get/taskconfig_flags_test.go create mode 100644 flytectl/cmd/testdata/launchplan_execution_spec.yaml create mode 100644 flytectl/cmd/testdata/task_execution_spec.yaml create mode 100644 flytectl/cmd/testutils/test_utils.go create mode 100644 flytectl/docs/source/gen/flytectl_create_execution.rst create mode 100644 flytectl/pkg/commandutils/command_utils.go diff --git a/flytectl/boilerplate/lyft/golang_support_tools/tools.go b/flytectl/boilerplate/lyft/golang_support_tools/tools.go index 88ff645233..a256d868f1 100644 --- a/flytectl/boilerplate/lyft/golang_support_tools/tools.go +++ b/flytectl/boilerplate/lyft/golang_support_tools/tools.go @@ -5,6 +5,6 @@ package tools import ( _ "github.com/alvaroloes/enumer" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/lyft/flytestdlib/cli/pflags" + _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/vektra/mockery/cmd/mockery" ) diff --git a/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh index ab56c7e481..bc51af5646 100755 --- a/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh @@ -17,7 +17,7 @@ set -e # In the format of ":" or ":" if no cli tools=( "github.com/vektra/mockery/cmd/mockery" - "github.com/lyft/flytestdlib/cli/pflags" + "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" ) diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 5fbf0b9914..ad1f6ac33c 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -26,6 +26,8 @@ func RemoteCreateCommand() *cobra.Command { createResourcesFuncs := map[string]cmdcore.CommandEntry{ "project": {CmdFunc: createProjectsCommand, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, Short: projectShort, Long: projectLong}, + "execution": {CmdFunc: createExecutionCommand, Aliases: []string{"executions"}, ProjectDomainNotRequired: false, PFlagProvider: executionConfig, Short: executionShort, + Long: executionLong}, } cmdcore.AddCommands(createCmd, createResourcesFuncs) return createCmd diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index fb0d58a535..d2e4711a31 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -1,23 +1,43 @@ package create import ( + "context" "sort" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" ) +const testDataFolder = "../testdata/" + +var ( + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + args []string + cmdCtx cmdCore.CommandContext +) +var setup = testutils.Setup +var tearDownAndVerify = testutils.TearDownAndVerify + func TestCreateCommand(t *testing.T) { createCommand := RemoteCreateCommand() assert.Equal(t, createCommand.Use, "create") assert.Equal(t, createCommand.Short, "Used for creating various flyte resources including tasks/workflows/launchplans/executions/project.") - assert.Equal(t, len(createCommand.Commands()), 1) + assert.Equal(t, len(createCommand.Commands()), 2) cmdNouns := createCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "project") - assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[0].Short, "Create project resources") + assert.Equal(t, cmdNouns[0].Use, "execution") + assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) + assert.Equal(t, cmdNouns[0].Short, executionShort) + assert.Equal(t, cmdNouns[1].Use, "project") + assert.Equal(t, cmdNouns[1].Aliases, []string{"projects"}) + assert.Equal(t, cmdNouns[1].Short, "Create project resources") } diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go new file mode 100644 index 0000000000..b687790e12 --- /dev/null +++ b/flytectl/cmd/create/execution.go @@ -0,0 +1,129 @@ +package create + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + executionShort = "Create execution resources" + executionLong = ` +Create the executions for given workflow/task in a project and domain. + +There are three steps in generating an execution. + +- Generate the execution spec file using the get command. +- Update the inputs for the execution if needed. +- Run the execution by passing in the generated yaml file. + +The spec file should be generated first and then run the execution using the spec file. +You can reference the flytectl get task for more details + +:: + + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + + +The generated file can be modified to change the input values. + +.. code-block:: yaml + + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +And then can be passed through the command line. +Notice the source and target domain/projects can be different. +The root project and domain flags of -p and -d should point to task/launch plans project/domain. + +:: + + flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + +Usage +` +) + +//go:generate pflags ExecutionConfig --default-var executionConfig + +// ExecutionConfig hold configuration for create execution flags and configuration of the actual task or workflow to be launched. +type ExecutionConfig struct { + // pflag section + ExecFile string `json:"execFile,omitempty" pflag:",file for the execution params.If not specified defaults to <_name>.execution_spec.yaml"` + TargetDomain string `json:"targetDomain" pflag:",project where execution needs to be created.If not specified configured domain would be used."` + TargetProject string `json:"targetProject" pflag:",project where execution needs to be created.If not specified configured project would be used."` + KubeServiceAcct string `json:"kubeServiceAcct" pflag:",kubernetes service account AuthRole for launching execution."` + IamRoleARN string `json:"iamRoleARN" pflag:",iam role ARN AuthRole for launching execution."` + // Non plfag section is read from the execution config generated by get task/launchplan + Workflow string `json:"workflow,omitempty"` + Task string `json:"task,omitempty"` + Version string `json:"version"` + Inputs map[string]interface{} `json:"inputs"` +} + +type ExecutionParams struct { + name string + isTask bool +} + +var ( + executionConfig = &ExecutionConfig{} +) + +func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var execParams ExecutionParams + var err error + sourceProject := config.GetConfig().Project + sourceDomain := config.GetConfig().Domain + if execParams, err = readConfigAndValidate(config.GetConfig().Project, config.GetConfig().Domain); err != nil { + return err + } + var executionRequest *admin.ExecutionCreateRequest + if execParams.isTask { + if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { + return err + } + } else { + if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { + return err + } + } + exec, _err := cmdCtx.AdminClient().CreateExecution(ctx, executionRequest) + if _err != nil { + return _err + } + fmt.Printf("execution identifier %v\n", exec.Id) + return nil +} diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go new file mode 100644 index 0000000000..cb9fa4cc15 --- /dev/null +++ b/flytectl/cmd/create/execution_test.go @@ -0,0 +1,166 @@ +package create + +import ( + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// This function needs to be called after testutils.Steup() +func createExecutionSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + task1 := &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v2", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + } + mockClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + }, + }, + "numbers_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + "run_local_at_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + }, + }, + }, + }, + } + launchPlan1 := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "core.advanced.run_merge_sort.merge_sort", + Version: "v3", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + } + objectGetRequest := &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: "core.advanced.run_merge_sort.merge_sort", + Version: "v3", + }, + } + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan1, nil) +} +func TestCreateLaunchPlanExecutionFunc(t *testing.T) { + setup() + createExecutionSetup() + executionCreateResponseLP := &admin.ExecutionCreateResponse{ + Id: &core.WorkflowExecutionIdentifier{ + Project: "flytesnacks", + Domain: "development", + Name: "f652ea3596e7f4d80a0e", + }, + } + mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseLP, nil) + executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) +} + +func TestCreateTaskExecutionFunc(t *testing.T) { + setup() + createExecutionSetup() + executionCreateResponseTask := &admin.ExecutionCreateResponse{ + Id: &core.WorkflowExecutionIdentifier{ + Project: "flytesnacks", + Domain: "development", + Name: "ff513c0e44b5b4a35aa5", + }, + } + mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) + executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) +} diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go new file mode 100644 index 0000000000..acb3f595d8 --- /dev/null +++ b/flytectl/cmd/create/execution_util.go @@ -0,0 +1,148 @@ +package create + +import ( + "context" + "errors" + "fmt" + "io/ioutil" + "strings" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdGet "github.com/flyteorg/flytectl/cmd/get" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/google/uuid" + "sigs.k8s.io/yaml" +) + +func createExecutionRequestForWorkflow(ctx context.Context, workflowName string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { + var lp *admin.LaunchPlan + var err error + // Fetch the launch plan + if lp, err = cmdGet.FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain, cmdCtx); err != nil { + return nil, err + } + // Create workflow params literal map + var paramLiterals map[string]*core.Literal + workflowParams := cmdGet.WorkflowParams(lp) + if paramLiterals, err = MakeLiteralForParams(executionConfig.Inputs, workflowParams); err != nil { + return nil, err + } + var inputs = &core.LiteralMap{ + Literals: paramLiterals, + } + ID := lp.Id + return createExecutionRequest(ID, inputs, nil), nil +} + +func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { + var task *admin.Task + var err error + // Fetch the task + if task, err = cmdGet.FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain, cmdCtx); err != nil { + return nil, err + } + // Create task variables literal map + var variableLiterals map[string]*core.Literal + taskInputs := cmdGet.TaskInputs(task) + if variableLiterals, err = MakeLiteralForVariables(executionConfig.Inputs, taskInputs); err != nil { + return nil, err + } + var inputs = &core.LiteralMap{ + Literals: variableLiterals, + } + var authRole *admin.AuthRole + if executionConfig.KubeServiceAcct != "" { + authRole = &admin.AuthRole{Method: &admin.AuthRole_KubernetesServiceAccount{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct}} + } else { + authRole = &admin.AuthRole{Method: &admin.AuthRole_AssumableIamRole{ + AssumableIamRole: executionConfig.IamRoleARN}} + } + ID := &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: project, + Domain: domain, + Name: task.Id.Name, + Version: task.Id.Version, + } + return createExecutionRequest(ID, inputs, authRole), nil +} + +func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, authRole *admin.AuthRole) *admin.ExecutionCreateRequest { + return &admin.ExecutionCreateRequest{ + Project: executionConfig.TargetProject, + Domain: executionConfig.TargetDomain, + Name: "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19], + Spec: &admin.ExecutionSpec{ + LaunchPlan: ID, + Metadata: &admin.ExecutionMetadata{ + Mode: admin.ExecutionMetadata_MANUAL, + Principal: "sdk", + Nesting: 0, + }, + AuthRole: authRole, + }, + Inputs: inputs, + } +} + +func readExecConfigFromFile(fileName string) (*ExecutionConfig, error) { + data, _err := ioutil.ReadFile(fileName) + if _err != nil { + return nil, fmt.Errorf("unable to read from %v yaml file", fileName) + } + executionConfigRead := ExecutionConfig{} + if _err = yaml.Unmarshal(data, &executionConfigRead); _err != nil { + return nil, _err + } + return &executionConfigRead, nil +} + +func resolveOverrides(readExecutionConfig *ExecutionConfig, project string, domain string) { + if executionConfig.KubeServiceAcct != "" { + readExecutionConfig.KubeServiceAcct = executionConfig.KubeServiceAcct + } + if executionConfig.IamRoleARN != "" { + readExecutionConfig.IamRoleARN = executionConfig.IamRoleARN + } + if executionConfig.TargetProject != "" { + readExecutionConfig.TargetProject = executionConfig.TargetProject + } + if executionConfig.TargetDomain != "" { + readExecutionConfig.TargetDomain = executionConfig.TargetDomain + } + // Use the root project and domain to launch the task/workflow if target is unspecified + if executionConfig.TargetProject == "" { + readExecutionConfig.TargetProject = project + } + if executionConfig.TargetDomain == "" { + readExecutionConfig.TargetDomain = domain + } +} + +func readConfigAndValidate(project string, domain string) (ExecutionParams, error) { + executionParams := ExecutionParams{} + if executionConfig.ExecFile == "" { + return executionParams, errors.New("executionConfig can't be empty. Run the flytectl get task/launchplan to generate the config") + } + var readExecutionConfig *ExecutionConfig + var err error + if readExecutionConfig, err = readExecConfigFromFile(executionConfig.ExecFile); err != nil { + return executionParams, err + } + resolveOverrides(readExecutionConfig, project, domain) + // Update executionConfig pointer to readExecutionConfig as it contains all the updates. + executionConfig = readExecutionConfig + isTask := readExecutionConfig.Task != "" + isWorkflow := readExecutionConfig.Workflow != "" + if isTask == isWorkflow { + return executionParams, errors.New("either one of task or workflow name should be specified to launch an execution") + } + name := readExecutionConfig.Task + if !isTask { + name = readExecutionConfig.Workflow + } + return ExecutionParams{name: name, isTask: isTask}, nil +} diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go new file mode 100755 index 0000000000..4a9774dff0 --- /dev/null +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -0,0 +1,50 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package create + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ExecutionConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ExecutionConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ExecutionConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ExecutionConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(executionConfig.ExecFile),fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") + cmdFlags.StringVar(&(executionConfig.TargetDomain),fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") + cmdFlags.StringVar(&(executionConfig.TargetProject),fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") + cmdFlags.StringVar(&(executionConfig.KubeServiceAcct),fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") + cmdFlags.StringVar(&(executionConfig.IamRoleARN),fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") + return cmdFlags +} diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go new file mode 100755 index 0000000000..bf7ab9c47b --- /dev/null +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -0,0 +1,212 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package create + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsExecutionConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementExecutionConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsExecutionConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookExecutionConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementExecutionConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_ExecutionConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookExecutionConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_ExecutionConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_ExecutionConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ExecutionConfig(val, result)) +} + +func testDecodeSlice_ExecutionConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ExecutionConfig(vStringSlice, result)) +} + +func TestExecutionConfig_GetPFlagSet(t *testing.T) { + val := ExecutionConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestExecutionConfig_SetFlags(t *testing.T) { + actual := ExecutionConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_execFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("execFile"); err == nil { + assert.Equal(t, string(executionConfig.ExecFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("execFile", testValue) + if vString, err := cmdFlags.GetString("execFile"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_targetDomain", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("targetDomain"); err == nil { + assert.Equal(t, string(executionConfig.TargetDomain), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("targetDomain", testValue) + if vString, err := cmdFlags.GetString("targetDomain"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.TargetDomain) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_targetProject", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("targetProject"); err == nil { + assert.Equal(t, string(executionConfig.TargetProject), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("targetProject", testValue) + if vString, err := cmdFlags.GetString("targetProject"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.TargetProject) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_kubeServiceAcct", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("kubeServiceAcct"); err == nil { + assert.Equal(t, string(executionConfig.KubeServiceAcct), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("kubeServiceAcct", testValue) + if vString, err := cmdFlags.GetString("kubeServiceAcct"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.KubeServiceAcct) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_iamRoleARN", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("iamRoleARN"); err == nil { + assert.Equal(t, string(executionConfig.IamRoleARN), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("iamRoleARN", testValue) + if vString, err := cmdFlags.GetString("iamRoleARN"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.IamRoleARN) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 77c3cb7578..8f4bb309b0 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -1,48 +1,26 @@ package create import ( - "bytes" - "context" - "io" - "log" - "os" + "fmt" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) const projectValue = "dummyProject" var ( - reader *os.File - writer *os.File - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - mockOutStream io.Writer - args []string - cmdCtx cmdCore.CommandContext projectRegisterRequest *admin.ProjectRegisterRequest - stdOut *os.File - stderr *os.File ) -func setup() { - reader, writer, err = os.Pipe() - if err != nil { - panic(err) - } - stdOut = os.Stdout - stderr = os.Stderr - os.Stdout = writer - os.Stderr = writer - log.SetOutput(writer) - mockClient = new(mocks.AdminServiceClient) - mockOutStream = writer - cmdCtx = cmdCore.NewCommandContext(mockClient, mockOutStream) +func createProjectSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient projectRegisterRequest = &admin.ProjectRegisterRequest{ Project: &admin.Project{ Id: projectValue, @@ -53,21 +31,15 @@ func setup() { }, }, } + projectConfig.ID = "" + projectConfig.Name = "" + projectConfig.Labels = map[string]string{} + projectConfig.Description = "" } - -func teardownAndVerify(t *testing.T, expectedLog string) { - writer.Close() - os.Stdout = stdOut - os.Stderr = stderr - var buf bytes.Buffer - if _, err := io.Copy(&buf, reader); err != nil { - assert.Equal(t, expectedLog, buf.String()) - } -} - func TestCreateProjectFunc(t *testing.T) { setup() - defer teardownAndVerify(t, "project Created successfully") + createProjectSetup() + defer tearDownAndVerify(t, "project Created successfully") projectConfig.ID = projectValue projectConfig.Name = projectValue projectConfig.Labels = map[string]string{} @@ -80,23 +52,25 @@ func TestCreateProjectFunc(t *testing.T) { func TestEmptyProjectID(t *testing.T) { setup() - defer teardownAndVerify(t, "project ID is required flag") + createProjectSetup() + defer tearDownAndVerify(t, "") projectConfig.Name = projectValue projectConfig.Labels = map[string]string{} mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Nil(t, err) - mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) + assert.Equal(t, fmt.Errorf("project ID is required flag"), err) + mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } func TestEmptyProjectName(t *testing.T) { setup() - defer teardownAndVerify(t, "project ID is required flag") + createProjectSetup() + defer tearDownAndVerify(t, "") projectConfig.ID = projectValue projectConfig.Labels = map[string]string{} projectConfig.Description = "" mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Nil(t, err) - mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) + assert.Equal(t, fmt.Errorf("project name is required flag"), err) + mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } diff --git a/flytectl/cmd/create/serialization_utils.go b/flytectl/cmd/create/serialization_utils.go new file mode 100644 index 0000000000..b9759ca7c1 --- /dev/null +++ b/flytectl/cmd/create/serialization_utils.go @@ -0,0 +1,29 @@ +package create + +import ( + "github.com/flyteorg/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +// TODO: Move all functions to flyteidl +func MakeLiteralForVariables(serialize map[string]interface{}, variables map[string]*core.Variable) (map[string]*core.Literal, error) { + result := make(map[string]*core.Literal) + var err error + for k, v := range variables { + if result[k], err = coreutils.MakeLiteralForType(v.Type, serialize[k]); err != nil { + return nil, err + } + } + return result, nil +} + +func MakeLiteralForParams(serialize map[string]interface{}, parameters map[string]*core.Parameter) (map[string]*core.Literal, error) { + result := make(map[string]*core.Literal) + var err error + for k, v := range parameters { + if result[k], err = coreutils.MakeLiteralForType(v.GetVar().Type, serialize[k]); err != nil { + return nil, err + } + } + return result, nil +} diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 8cde1b7b57..f7d91812c1 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -50,8 +50,8 @@ Usage var executionColumns = []printer.Column{ {Header: "Name", JSONPath: "$.id.name"}, - {Header: "Workflow Name", JSONPath: "$.closure.workflowId.name"}, - {Header: "Type", JSONPath: "$.closure.workflowId.resourceType"}, + {Header: "Launch Plan Name", JSONPath: "$.spec.launchPlan.name"}, + {Header: "Type", JSONPath: "$.spec.launchPlan.resourceType"}, {Header: "Phase", JSONPath: "$.closure.phase"}, {Header: "Started", JSONPath: "$.closure.startedAt"}, {Header: "Elapsed Time", JSONPath: "$.closure.duration"}, diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index d414f32145..5940c3d17a 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -14,15 +14,6 @@ import ( "github.com/stretchr/testify/assert" ) -const projectValue = "dummyProject" -const domainValue = "dummyDomain" -const executionNameValue = "e124" -const launchPlanNameValue = "lp_name" -const launchPlanVersionValue = "lp_version" -const workflowNameValue = "wf_name" -const workflowVersionValue = "wf_version" -const output = "json" - func TestListExecutionFunc(t *testing.T) { ctx := context.Background() config.GetConfig().Project = projectValue diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go new file mode 100644 index 0000000000..da330af39e --- /dev/null +++ b/flytectl/cmd/get/execution_util.go @@ -0,0 +1,128 @@ +package get + +import ( + "errors" + "fmt" + "io/ioutil" + "os" + + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/flyteorg/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "sigs.k8s.io/yaml" +) + +// ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. +// TODO : replace this with a cleaner design +type ExecutionConfig struct { + TargetDomain string `json:"targetDomain"` + TargetProject string `json:"targetProject"` + KubeServiceAcct string `json:"kubeServiceAcct"` + IamRoleARN string `json:"iamRoleARN"` + Workflow string `json:"workflow,omitempty"` + Task string `json:"task,omitempty"` + Version string `json:"version"` + Inputs map[string]interface{} `json:"inputs"` +} + +func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) error { + d, err := yaml.Marshal(executionConfig) + if err != nil { + fmt.Printf("error: %v", err) + } + if _, err = os.Stat(fileName); err == nil { + if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { + return errors.New("backup the file before continuing") + } + } + return ioutil.WriteFile(fileName, d, 0600) +} + +func CreateAndWriteExecConfigForTask(task *admin.Task, fileName string) error { + var err error + executionConfig := ExecutionConfig{Task: task.Id.Name, Version: task.Id.Version} + if executionConfig.Inputs, err = ParamMapForTask(task); err != nil { + return err + } + return WriteExecConfigToFile(executionConfig, fileName) +} + +func CreateAndWriteExecConfigForWorkflow(wlp *admin.LaunchPlan, fileName string) error { + var err error + executionConfig := ExecutionConfig{Workflow: wlp.Id.Name, Version: wlp.Id.Version} + if executionConfig.Inputs, err = ParamMapForWorkflow(wlp); err != nil { + return err + } + return WriteExecConfigToFile(executionConfig, fileName) +} + +func TaskInputs(task *admin.Task) map[string]*core.Variable { + taskInputs := map[string]*core.Variable{} + if task == nil || task.Closure == nil { + return taskInputs + } + if task.Closure.CompiledTask == nil { + return taskInputs + } + if task.Closure.CompiledTask.Template == nil { + return taskInputs + } + if task.Closure.CompiledTask.Template.Interface == nil { + return taskInputs + } + if task.Closure.CompiledTask.Template.Interface.Inputs == nil { + return taskInputs + } + return task.Closure.CompiledTask.Template.Interface.Inputs.Variables +} + +func ParamMapForTask(task *admin.Task) (map[string]interface{}, error) { + taskInputs := TaskInputs(task) + paramMap := make(map[string]interface{}, len(taskInputs)) + for k, v := range taskInputs { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Type) + if err != nil { + fmt.Println("error creating default value for literal type ", v.Type) + return nil, err + } + if paramMap[k], err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { + return nil, err + } + } + return paramMap, nil +} + +func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter { + workflowParams := map[string]*core.Parameter{} + if lp == nil || lp.Spec == nil { + return workflowParams + } + if lp.Spec.DefaultInputs == nil { + return workflowParams + } + return lp.Spec.DefaultInputs.Parameters +} + +func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]interface{}, error) { + workflowParams := WorkflowParams(lp) + paramMap := make(map[string]interface{}, len(workflowParams)) + for k, v := range workflowParams { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Var.Type) + if err != nil { + fmt.Println("error creating default value for literal type ", v.Var.Type) + return nil, err + } + if paramMap[k], err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { + return nil, err + } + // Override if there is a default value + if paramsDefault, ok := v.Behavior.(*core.Parameter_Default); ok { + if paramMap[k], err = coreutils.ExtractFromLiteral(paramsDefault.Default); err != nil { + return nil, err + } + } + } + return paramMap, nil +} diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 8f8cc9c25d..e875a0ca01 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -30,11 +30,11 @@ func CreateGetCommand() *cobra.Command { Short: projectShort, Long: projectLong}, "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, - Long: taskLong}, + Long: taskLong, PFlagProvider: taskConfig}, "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, Long: workflowLong}, "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, - Long: launchPlanLong}, + Long: launchPlanLong, PFlagProvider: launchPlanConfig}, "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, Long: executionLong}, } diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 243a6a97da..852994db00 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -1,13 +1,37 @@ package get import ( + "context" "fmt" "sort" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" ) +const projectValue = "dummyProject" +const domainValue = "dummyDomain" +const output = "json" +const executionNameValue = "e124" +const launchPlanNameValue = "lp_name" +const launchPlanVersionValue = "lp_version" +const workflowNameValue = "wf_name" +const workflowVersionValue = "wf_version" +const testDataFolder = "../testdata/" + +var ( + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + cmdCtx cmdCore.CommandContext +) +var setup = testutils.Setup +var tearDownAndVerify = testutils.TearDownAndVerify + func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() assert.Equal(t, getCommand.Use, "get") diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 6d40cec4d4..2b6e8a7fe2 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -9,6 +9,7 @@ import ( "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" + "github.com/golang/protobuf/proto" ) @@ -18,13 +19,13 @@ const ( Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) :: - bin/flytectl get launchplan -p flytesnacks -d development + flytectl get launchplan -p flytesnacks -d development Retrieves launch plan by name within project and domain. :: - bin/flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet Retrieves launchplan by filters. :: @@ -35,18 +36,54 @@ Retrieves all the launchplan within project and domain in yaml format. :: - bin/flytectl get launchplan -p flytesnacks -d development -o yaml + flytectl get launchplan -p flytesnacks -d development -o yaml Retrieves all the launchplan within project and domain in json format :: - bin/flytectl get launchplan -p flytesnacks -d development -o json + flytectl get launchplan -p flytesnacks -d development -o json + +Retrieves a launch plans within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. + +:: + + flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yam + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + numbers: + - 0 + numbers_count: 0 + run_local_at_count: 10 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + version: v3 + workflow: core.advanced.run_merge_sort.merge_sort + +Check the create execution section on how to launch one using the generated file. Usage ` ) +//go:generate pflags LaunchPlanConfig --default-var launchPlanConfig +var ( + launchPlanConfig = &LaunchPlanConfig{} +) + +// LaunchPlanConfig +type LaunchPlanConfig struct { + ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single launchplan."` + Version string `json:"version" pflag:",version of the launchplan to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` +} + var launchplanColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -65,29 +102,24 @@ func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { launchPlanPrinter := printer.Printer{} - + project := config.GetConfig().Project + domain := config.GetConfig().Domain if len(args) == 1 { name := args[0] - launchPlan, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ - Limit: 10, - Id: &admin.NamedEntityIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: name, - }, - }) - if err != nil { + var launchPlans []*admin.LaunchPlan + var err error + if launchPlans, err = FetchLPForName(ctx, name, project, domain, cmdCtx); err != nil { return err } - logger.Debugf(ctx, "Retrieved %v excutions", len(launchPlan.LaunchPlans)) - err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, LaunchplanToProtoMessages(launchPlan.LaunchPlans)...) + logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) + err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, LaunchplanToProtoMessages(launchPlans)...) if err != nil { return err } return nil } - launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) + launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, adminutils.ListRequest{Project: project, Domain: domain}) if err != nil { return err } diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go new file mode 100644 index 0000000000..54f7f14202 --- /dev/null +++ b/flytectl/cmd/get/launch_plan_test.go @@ -0,0 +1,628 @@ +package get + +import ( + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + resourceListRequest *admin.ResourceListRequest + objectGetRequest *admin.ObjectGetRequest + namedIDRequest *admin.NamedEntityIdentifierListRequest + launchPlanListResponse *admin.LaunchPlanList + argsLp []string +) + +func getLaunchPlanSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient + argsLp = []string{"launchplan1"} + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + }, + }, + "numbers_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + "run_local_at_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + }, + }, + }, + }, + } + launchPlan1 := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "launchplan1", + Version: "v1", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + } + launchPlan2 := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "launchplan1", + Version: "v2", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + } + + launchPlans := []*admin.LaunchPlan{launchPlan2, launchPlan1} + + resourceListRequest = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: argsLp[0], + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + } + + launchPlanListResponse = &admin.LaunchPlanList{ + LaunchPlans: launchPlans, + } + + objectGetRequest = &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: projectValue, + Domain: domainValue, + Name: argsLp[0], + Version: "v2", + }, + } + + namedIDRequest = &admin.NamedEntityIdentifierListRequest{ + Project: projectValue, + Domain: domainValue, + SortBy: &admin.Sort{ + Key: "name", + Direction: admin.Sort_ASCENDING, + }, + Limit: 100, + } + + var entities []*admin.NamedEntityIdentifier + id1 := &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: "launchplan1", + } + id2 := &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: "launchplan2", + } + entities = append(entities, id1, id2) + namedIdentifierList := &admin.NamedEntityIdentifierList{ + Entities: entities, + } + + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) + + launchPlanConfig.Latest = false + launchPlanConfig.Version = "" + launchPlanConfig.ExecFile = "" +} + +func TestGetLaunchPlanFunc(t *testing.T) { + setup() + getLaunchPlanSetup() + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) + tearDownAndVerify(t, `[ + { + "id": { + "name": "launchplan1", + "version": "v2" + }, + "spec": { + "defaultInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + } + }, + "closure": { + "expectedInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } + }, + { + "id": { + "name": "launchplan1", + "version": "v1" + }, + "spec": { + "defaultInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + } + }, + "closure": { + "expectedInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:00Z" + } + } +]`) +} + +func TestGetLaunchPlanFuncLatest(t *testing.T) { + setup() + getLaunchPlanSetup() + launchPlanConfig.Latest = true + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) + tearDownAndVerify(t, `{ + "id": { + "name": "launchplan1", + "version": "v2" + }, + "spec": { + "defaultInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + } + }, + "closure": { + "expectedInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} + +func TestGetLaunchPlanWithVersion(t *testing.T) { + setup() + getLaunchPlanSetup() + launchPlanConfig.Version = "v2" + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) + tearDownAndVerify(t, `{ + "id": { + "name": "launchplan1", + "version": "v2" + }, + "spec": { + "defaultInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + } + }, + "closure": { + "expectedInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} + +func TestGetLaunchPlans(t *testing.T) { + setup() + getLaunchPlanSetup() + argsLp = []string{} + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListLaunchPlanIds", ctx, namedIDRequest) + tearDownAndVerify(t, `[ + { + "project": "dummyProject", + "domain": "dummyDomain", + "name": "launchplan1" + }, + { + "project": "dummyProject", + "domain": "dummyDomain", + "name": "launchplan2" + } +]`) +} + +func TestGetLaunchPlansWithExecFile(t *testing.T) { + setup() + getLaunchPlanSetup() + launchPlanConfig.Version = "v2" + launchPlanConfig.ExecFile = testDataFolder + "exec_file" + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + os.Remove(launchPlanConfig.ExecFile) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) + tearDownAndVerify(t, `{ + "id": { + "name": "launchplan1", + "version": "v2" + }, + "spec": { + "defaultInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + } + }, + "closure": { + "expectedInputs": { + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + }, + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + } + } + }, + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" + } + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} diff --git a/flytectl/cmd/get/launch_plan_util.go b/flytectl/cmd/get/launch_plan_util.go new file mode 100644 index 0000000000..e72c6e9094 --- /dev/null +++ b/flytectl/cmd/get/launch_plan_util.go @@ -0,0 +1,90 @@ +package get + +import ( + "context" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +// Reads the launchplan config to drive fetching the correct launch plans. +func FetchLPForName(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.LaunchPlan, error) { + var launchPlans []*admin.LaunchPlan + var lp *admin.LaunchPlan + var err error + if launchPlanConfig.Latest { + if lp, err = FetchLPLatestVersion(ctx, name, project, domain, cmdCtx); err != nil { + return nil, err + } + launchPlans = append(launchPlans, lp) + } else if launchPlanConfig.Version != "" { + if lp, err = FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain, cmdCtx); err != nil { + return nil, err + } + launchPlans = append(launchPlans, lp) + } else { + launchPlans, err = FetchAllVerOfLP(ctx, name, project, domain, cmdCtx) + if err != nil { + return nil, err + } + } + if launchPlanConfig.ExecFile != "" { + // There would be atleast one launchplan object when code reaches here and hence the length assertion is not required. + lp = launchPlans[0] + // Only write the first task from the tasks object. + if err = CreateAndWriteExecConfigForWorkflow(lp, launchPlanConfig.ExecFile); err != nil { + return nil, err + } + } + return launchPlans, nil +} + +func FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.LaunchPlan, error) { + tList, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: lpName, + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + if len(tList.LaunchPlans) == 0 { + return nil, fmt.Errorf("no launchplans retrieved for %v", lpName) + } + return tList.LaunchPlans, nil +} + +func FetchLPLatestVersion(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { + // Fetch the latest version of the task. + lpVersions, err := FetchAllVerOfLP(ctx, name, project, domain, cmdCtx) + if err != nil { + return nil, err + } + lp := lpVersions[0] + return lp, nil +} + +func FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { + lp, err := cmdCtx.AdminClient().GetLaunchPlan(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + }) + if err != nil { + return nil, err + } + return lp, nil +} diff --git a/flytectl/cmd/get/launchplanconfig_flags.go b/flytectl/cmd/get/launchplanconfig_flags.go new file mode 100755 index 0000000000..00becdd073 --- /dev/null +++ b/flytectl/cmd/get/launchplanconfig_flags.go @@ -0,0 +1,48 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package get + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (LaunchPlanConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (LaunchPlanConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in LaunchPlanConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg LaunchPlanConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("LaunchPlanConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(launchPlanConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), launchPlanConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") + cmdFlags.StringVar(&(launchPlanConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), launchPlanConfig.Version, "version of the launchplan to be fetched.") + cmdFlags.BoolVar(&(launchPlanConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), launchPlanConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + return cmdFlags +} diff --git a/flytectl/cmd/get/launchplanconfig_flags_test.go b/flytectl/cmd/get/launchplanconfig_flags_test.go new file mode 100755 index 0000000000..2b9271b278 --- /dev/null +++ b/flytectl/cmd/get/launchplanconfig_flags_test.go @@ -0,0 +1,168 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package get + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsLaunchPlanConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementLaunchPlanConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsLaunchPlanConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookLaunchPlanConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementLaunchPlanConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_LaunchPlanConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookLaunchPlanConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_LaunchPlanConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_LaunchPlanConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_LaunchPlanConfig(val, result)) +} + +func testDecodeSlice_LaunchPlanConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_LaunchPlanConfig(vStringSlice, result)) +} + +func TestLaunchPlanConfig_GetPFlagSet(t *testing.T) { + val := LaunchPlanConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestLaunchPlanConfig_SetFlags(t *testing.T) { + actual := LaunchPlanConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_execFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("execFile"); err == nil { + assert.Equal(t, string(launchPlanConfig.ExecFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("execFile", testValue) + if vString, err := cmdFlags.GetString("execFile"); err == nil { + testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_version", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("version"); err == nil { + assert.Equal(t, string(launchPlanConfig.Version), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_latest", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + assert.Equal(t, bool(launchPlanConfig.Latest), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index ccbd46dd4d..9b98de40d6 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,16 +3,14 @@ package get import ( "context" - "github.com/flyteorg/flytestdlib/logger" - "github.com/golang/protobuf/proto" - - "github.com/flyteorg/flytectl/pkg/adminutils" - "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - + "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" + + "github.com/golang/protobuf/proto" ) const ( @@ -46,10 +44,46 @@ Retrieves all the tasks within project and domain in json format. bin/flytectl get task -p flytesnacks -d development -o json +Retrieves a tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. + +:: + + bin/flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: v2 + +Check the create execution section on how to launch one using the generated file. + Usage ` ) +//go:generate pflags TaskConfig --default-var taskConfig +var ( + taskConfig = &TaskConfig{} +) + +// FilesConfig +type TaskConfig struct { + ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single task."` + Version string `json:"version" pflag:",version of the task to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` +} + var taskColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -68,31 +102,20 @@ func TaskToProtoMessages(l []*admin.Task) []proto.Message { } func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - taskPrinter := printer.Printer{} - + project := config.GetConfig().Project + domain := config.GetConfig().Domain if len(args) == 1 { - task, err := cmdCtx.AdminClient().ListTasks(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: args[0], - }, - // TODO Sorting and limits should be parameters - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) - if err != nil { + name := args[0] + var tasks []*admin.Task + var err error + if tasks, err = FetchTaskForName(ctx, name, project, domain, cmdCtx); err != nil { return err } - logger.Debugf(ctx, "Retrieved Task", task.Tasks) - - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(task.Tasks)...) + logger.Debugf(ctx, "Retrieved Task", tasks) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } - tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) + tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: project, Domain: domain}) if err != nil { return err } diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go new file mode 100644 index 0000000000..9f525b39ba --- /dev/null +++ b/flytectl/cmd/get/task_test.go @@ -0,0 +1,368 @@ +package get + +import ( + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + resourceListRequestTask *admin.ResourceListRequest + objectGetRequestTask *admin.ObjectGetRequest + namedIDRequestTask *admin.NamedEntityIdentifierListRequest + taskListResponse *admin.TaskList + argsTask []string +) + +func getTaskSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient + argsTask = []string{"task1"} + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + task1 := &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + } + + task2 := &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v2", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + } + + tasks := []*admin.Task{task2, task1} + resourceListRequestTask = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: argsTask[0], + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + } + + taskListResponse = &admin.TaskList{ + Tasks: tasks, + } + + objectGetRequestTask = &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: projectValue, + Domain: domainValue, + Name: argsTask[0], + Version: "v2", + }, + } + namedIDRequestTask = &admin.NamedEntityIdentifierListRequest{ + Project: projectValue, + Domain: domainValue, + SortBy: &admin.Sort{ + Key: "name", + Direction: admin.Sort_ASCENDING, + }, + Limit: 100, + } + + var taskEntities []*admin.NamedEntityIdentifier + idTask1 := &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: "task1", + } + idTask2 := &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: "task2", + } + taskEntities = append(taskEntities, idTask1, idTask2) + namedIdentifierListTask := &admin.NamedEntityIdentifierList{ + Entities: taskEntities, + } + + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + + taskConfig.Latest = false + taskConfig.ExecFile = "" + taskConfig.Version = "" +} + +func TestGetTaskFunc(t *testing.T) { + setup() + getTaskSetup() + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) + tearDownAndVerify(t, `[ + { + "id": { + "name": "task1", + "version": "v2" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + }, + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } + }, + { + "id": { + "name": "task1", + "version": "v1" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + }, + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:00Z" + } + } +]`) +} + +func TestGetTaskFuncLatest(t *testing.T) { + setup() + getTaskSetup() + taskConfig.Latest = true + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) + tearDownAndVerify(t, `{ + "id": { + "name": "task1", + "version": "v2" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + }, + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} + +func TestGetTaskWithVersion(t *testing.T) { + setup() + getTaskSetup() + taskConfig.Version = "v2" + objectGetRequestTask.Id.ResourceType = core.ResourceType_TASK + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetTask", ctx, objectGetRequestTask) + tearDownAndVerify(t, `{ + "id": { + "name": "task1", + "version": "v2" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + }, + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} + +func TestGetTasks(t *testing.T) { + setup() + getTaskSetup() + argsTask = []string{} + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListTaskIds", ctx, namedIDRequest) + tearDownAndVerify(t, `[ + { + "project": "dummyProject", + "domain": "dummyDomain", + "name": "task1" + }, + { + "project": "dummyProject", + "domain": "dummyDomain", + "name": "task2" + } +]`) +} + +func TestGetTaskWithExecFile(t *testing.T) { + setup() + getTaskSetup() + taskConfig.Version = "v2" + taskConfig.ExecFile = testDataFolder + "task_exec_file" + err = getTaskFunc(ctx, argsTask, cmdCtx) + os.Remove(taskConfig.ExecFile) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetTask", ctx, objectGetRequestTask) + tearDownAndVerify(t, `{ + "id": { + "name": "task1", + "version": "v2" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + }, + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + } + } + } + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } +}`) +} diff --git a/flytectl/cmd/get/task_util.go b/flytectl/cmd/get/task_util.go new file mode 100644 index 0000000000..0be9490dc0 --- /dev/null +++ b/flytectl/cmd/get/task_util.go @@ -0,0 +1,93 @@ +package get + +import ( + "context" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +// Reads the task config to drive fetching the correct tasks. +func FetchTaskForName(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.Task, error) { + var tasks []*admin.Task + var err error + var task *admin.Task + if taskConfig.Latest { + if task, err = FetchTaskLatestVersion(ctx, name, project, domain, cmdCtx); err != nil { + return nil, err + } + tasks = append(tasks, task) + } else if taskConfig.Version != "" { + if task, err = FetchTaskVersion(ctx, name, taskConfig.Version, project, domain, cmdCtx); err != nil { + return nil, err + } + tasks = append(tasks, task) + } else { + tasks, err = FetchAllVerOfTask(ctx, name, project, domain, cmdCtx) + if err != nil { + return nil, err + } + } + if taskConfig.ExecFile != "" { + // There would be atleast one task object when code reaches here and hence the length assertion is not required. + task = tasks[0] + // Only write the first task from the tasks object. + if err = CreateAndWriteExecConfigForTask(task, taskConfig.ExecFile); err != nil { + return nil, err + } + } + return tasks, nil +} + +func FetchAllVerOfTask(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.Task, error) { + tList, err := cmdCtx.AdminClient().ListTasks(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + if len(tList.Tasks) == 0 { + return nil, fmt.Errorf("no tasks retrieved for %v", name) + } + return tList.Tasks, nil +} + +func FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Task, error) { + var t *admin.Task + var err error + // Fetch the latest version of the task. + var taskVersions []*admin.Task + taskVersions, err = FetchAllVerOfTask(ctx, name, project, domain, cmdCtx) + if err != nil { + return nil, err + } + t = taskVersions[0] + return t, nil +} + +func FetchTaskVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Task, error) { + t, err := cmdCtx.AdminClient().GetTask(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + }) + if err != nil { + return nil, err + } + return t, nil +} diff --git a/flytectl/cmd/get/taskconfig_flags.go b/flytectl/cmd/get/taskconfig_flags.go new file mode 100755 index 0000000000..5379d61df7 --- /dev/null +++ b/flytectl/cmd/get/taskconfig_flags.go @@ -0,0 +1,48 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package get + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TaskConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (TaskConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in TaskConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg TaskConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TaskConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(taskConfig.ExecFile),fmt.Sprintf("%v%v", prefix, "execFile"), taskConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") + cmdFlags.StringVar(&(taskConfig.Version),fmt.Sprintf("%v%v", prefix, "version"), taskConfig.Version, "version of the task to be fetched.") + cmdFlags.BoolVar(&(taskConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), taskConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + return cmdFlags +} diff --git a/flytectl/cmd/get/taskconfig_flags_test.go b/flytectl/cmd/get/taskconfig_flags_test.go new file mode 100755 index 0000000000..b945e78619 --- /dev/null +++ b/flytectl/cmd/get/taskconfig_flags_test.go @@ -0,0 +1,168 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package get + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTaskConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTaskConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsTaskConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTaskConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTaskConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TaskConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTaskConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TaskConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TaskConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TaskConfig(val, result)) +} + +func testDecodeSlice_TaskConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TaskConfig(vStringSlice, result)) +} + +func TestTaskConfig_GetPFlagSet(t *testing.T) { + val := TaskConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTaskConfig_SetFlags(t *testing.T) { + actual := TaskConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_execFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("execFile"); err == nil { + assert.Equal(t, string(taskConfig.ExecFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("execFile", testValue) + if vString, err := cmdFlags.GetString("execFile"); err == nil { + testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_version", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("version"); err == nil { + assert.Equal(t, string(taskConfig.Version), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_latest", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + assert.Equal(t, bool(taskConfig.Latest), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 1f3ac0e816..031b0e836d 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -13,9 +13,6 @@ import ( "sort" "strings" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" - "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" @@ -23,6 +20,9 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/storage" + + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" ) const registrationProjectPattern = "{{ registration.project }}" diff --git a/flytectl/cmd/testdata/launchplan_execution_spec.yaml b/flytectl/cmd/testdata/launchplan_execution_spec.yaml new file mode 100644 index 0000000000..aa23903ed8 --- /dev/null +++ b/flytectl/cmd/testdata/launchplan_execution_spec.yaml @@ -0,0 +1,11 @@ +iamRoleARN: "" +inputs: + numbers: + - 0 + numbers_count: 0 + run_local_at_count: 10 +kubeServiceAcct: "" +targetDomain: "" +targetProject: "" +version: v3 +workflow: core.advanced.run_merge_sort.merge_sort diff --git a/flytectl/cmd/testdata/task_execution_spec.yaml b/flytectl/cmd/testdata/task_execution_spec.yaml new file mode 100644 index 0000000000..aba4e46d6d --- /dev/null +++ b/flytectl/cmd/testdata/task_execution_spec.yaml @@ -0,0 +1,15 @@ +iamRoleARN: "" +inputs: + sorted_list1: + - 0 + - 2 + - 4 + sorted_list2: + - 1 + - 3 + - 5 +kubeServiceAcct: "" +targetDomain: "development" +targetProject: "flytesnacks" +task: core.advanced.run_merge_sort.merge +version: v2 diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go new file mode 100644 index 0000000000..28d999ba73 --- /dev/null +++ b/flytectl/cmd/testutils/test_utils.go @@ -0,0 +1,62 @@ +package testutils + +import ( + "bytes" + "context" + "io" + "log" + "os" + "strings" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + + "github.com/stretchr/testify/assert" +) + +const projectValue = "dummyProject" +const domainValue = "dummyDomain" +const output = "json" + +var ( + reader *os.File + writer *os.File + Err error + Ctx context.Context + MockClient *mocks.AdminServiceClient + mockOutStream io.Writer + CmdCtx cmdCore.CommandContext + stdOut *os.File + stderr *os.File +) + +func Setup() { + Ctx = context.Background() + reader, writer, Err = os.Pipe() + if Err != nil { + panic(Err) + } + stdOut = os.Stdout + stderr = os.Stderr + os.Stdout = writer + os.Stderr = writer + log.SetOutput(writer) + MockClient = new(mocks.AdminServiceClient) + mockOutStream = writer + CmdCtx = cmdCore.NewCommandContext(MockClient, mockOutStream) + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = output +} + +func TearDownAndVerify(t *testing.T, expectedLog string) { + writer.Close() + os.Stdout = stdOut + os.Stderr = stderr + var buf bytes.Buffer + if _, err := io.Copy(&buf, reader); err == nil { + assert.Equal(t, strings.Trim(expectedLog, "\n "), strings.Trim(buf.String(), "\n ")) + } +} diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 36e703b15e..6b0491a375 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -13,6 +13,7 @@ import ( cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" ) diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index dbd0218ae4..a7528e911e 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -71,5 +71,6 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_create_execution` - Create execution resources * :doc:`flytectl_create_project` - Create project resources diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst new file mode 100644 index 0000000000..01b7f0e2b1 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -0,0 +1,140 @@ +.. _flytectl_create_execution: + +flytectl create execution +------------------------- + +Create execution resources + +Synopsis +~~~~~~~~ + + + +Create the executions for given workflow/task in a project and domain. + +There are three steps in generating an execution. + +- Generate the execution spec file using the get command. +- Update the inputs for the execution if needed. +- Run the execution by passing in the generated yaml file. + +The spec file should be generated first and then run the execution using the spec file. +You can reference the flytectl get task for more details + +:: + + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + + +The generated file can be modified to change the input values. + +.. code-block:: yaml + + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +And then can be passed through the command line. +Notice the source and target domain/projects can be different. +The root project and domain flags of -p and -d should point to task/launch plans project/domain. + +:: + + flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + +Usage + + +:: + + flytectl create execution [flags] + +Options +~~~~~~~ + +:: + + --execFile string file for the execution params.If not specified defaults to <_name>.execution_spec.yaml + -h, --help help for execution + --iamRoleARN string iam role ARN AuthRole for launching execution. + --kubeServiceAcct string kubernetes service account AuthRole for launching execution. + --targetDomain string project where execution needs to be created.If not specified configured domain would be used. + --targetProject string project where execution needs to be created.If not specified configured project would be used. + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index ab832ed6b5..2746270b21 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -13,13 +13,13 @@ Synopsis Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) :: - bin/flytectl get launchplan -p flytesnacks -d development + flytectl get launchplan -p flytesnacks -d development Retrieves launch plan by name within project and domain. :: - bin/flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet Retrieves launchplan by filters. :: @@ -30,13 +30,37 @@ Retrieves all the launchplan within project and domain in yaml format. :: - bin/flytectl get launchplan -p flytesnacks -d development -o yaml + flytectl get launchplan -p flytesnacks -d development -o yaml Retrieves all the launchplan within project and domain in json format :: - bin/flytectl get launchplan -p flytesnacks -d development -o json + flytectl get launchplan -p flytesnacks -d development -o json + +Retrieves a launch plans within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. + +:: + + flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yam + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + numbers: + - 0 + numbers_count: 0 + run_local_at_count: 10 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + workflow: core.advanced.run_merge_sort.merge + version: "v3" + +Check the create execution section on how to launch one using the generated file. Usage @@ -50,7 +74,10 @@ Options :: - -h, --help help for launchplan + --execFile string execution file name to be used for generating execution spec of a single launchplan. + -h, --help help for launchplan + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the launchplan to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 3037d96055..245de2b4f3 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -38,6 +38,30 @@ Retrieves all the tasks within project and domain in json format. bin/flytectl get task -p flytesnacks -d development -o json +Retrieves a tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. + +:: + + bin/flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + +The generated file would look similar to this + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +Check the create execution section on how to launch one using the generated file. + Usage @@ -50,7 +74,10 @@ Options :: - -h, --help help for task + --execFile string execution file name to be used for generating execution spec of a single task. + -h, --help help for task + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the task to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 00a24536a7..9833bf0c50 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -60,6 +60,7 @@ Basic Configuration :caption: Flytectl nouns gen/flytectl_create_project + gen/flytectl_create_execution gen/flytectl_get_execution gen/flytectl_get_project gen/flytectl_get_workflow diff --git a/flytectl/go.mod b/flytectl/go.mod index c07b1b38a1..5723376489 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,15 +8,23 @@ require ( github.com/flyteorg/flytestdlib v0.3.13 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 + github.com/google/uuid v1.1.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 + github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.4.1 - github.com/sirupsen/logrus v1.7.0 - github.com/spf13/cobra v1.1.1 + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/sirupsen/logrus v1.8.0 + github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 google.golang.org/grpc v1.35.0 + google.golang.org/protobuf v1.25.0 + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 + sigs.k8s.io/yaml v1.2.0 ) + +replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f diff --git a/flytectl/go.sum b/flytectl/go.sum index 410cad1d09..a189bc399e 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -141,6 +141,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -172,8 +173,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.15 h1:sXrlwTRaRjQsXYMNrY/S930SKdKtu4XnpNFEu8I4tn4= -github.com/flyteorg/flyteidl v0.18.15/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= +github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f h1:7qRMZRPQXUVpebBt92msIzQBRtJ4fraWhd75qA6oqaE= +github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= github.com/flyteorg/flytestdlib v0.3.13 h1:5ioA/q3ixlyqkFh5kDaHgmPyTP/AHtqq1K/TIbVLUzM= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -208,6 +209,7 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +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/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -228,6 +230,7 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -280,6 +283,7 @@ github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= @@ -367,17 +371,19 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -426,6 +432,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -518,8 +526,9 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -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.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -536,8 +545,9 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -959,8 +969,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1016,5 +1027,6 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytectl/main.go b/flytectl/main.go index 5951864944..89ecd8e65a 100644 --- a/flytectl/main.go +++ b/flytectl/main.go @@ -8,6 +8,6 @@ import ( func main() { if err := cmd.ExecuteCmd(); err != nil { - fmt.Printf("error: %v", err) + fmt.Printf("error: %v\n", err) } } diff --git a/flytectl/pkg/commandutils/command_utils.go b/flytectl/pkg/commandutils/command_utils.go new file mode 100644 index 0000000000..acee518a5f --- /dev/null +++ b/flytectl/pkg/commandutils/command_utils.go @@ -0,0 +1,26 @@ +package commandutils + +import ( + "bufio" + "fmt" + "log" + "os" + "strings" +) + +func AskForConfirmation(s string) bool { + reader := bufio.NewReader(os.Stdin) + for { + fmt.Printf("%s [y/n]: ", s) + response, err := reader.ReadString('\n') + if err != nil { + log.Fatal(err) + } + response = strings.ToLower(strings.TrimSpace(response)) + if response == "y" || response == "yes" { + return true + } else if response == "n" || response == "no" { + return false + } + } +} From 1468b6b495bd4d7fe198aa4d44d209a8970a3d7c Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Tue, 30 Mar 2021 15:22:53 -0400 Subject: [PATCH 031/356] update docs theme (#44) Signed-off-by: cosmicBboy --- flytectl/doc-requirements.in | 2 + flytectl/doc-requirements.txt | 18 ++++--- flytectl/docs/source/_static/custom.css | 33 +++++++++++++ .../docs/source/_templates/sidebar/brand.html | 18 +++++++ flytectl/docs/source/conf.py | 49 ++++++++++--------- flytectl/docs/source/index.rst | 49 ++++++++++--------- flytectl/docs/source/reference/index.rst | 24 +++++++++ 7 files changed, 141 insertions(+), 52 deletions(-) create mode 100644 flytectl/docs/source/_static/custom.css create mode 100644 flytectl/docs/source/_templates/sidebar/brand.html create mode 100644 flytectl/docs/source/reference/index.rst diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index cdb6725a1b..8a0e088122 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -1,3 +1,5 @@ +furo +readthedocs-sphinx-search sphinx sphinx-prompt sphinx-material diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index d5a288dbd0..d01f9385bf 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -10,6 +10,7 @@ babel==2.9.0 # via sphinx beautifulsoup4==4.9.3 # via + # furo # sphinx-code-include # sphinx-material certifi==2020.12.5 @@ -20,19 +21,21 @@ css-html-js-minify==2.5.5 # via sphinx-material docutils==0.16 # via sphinx +furo==2021.3.20b30 + # via -r doc-requirements.in idna==2.10 # via requests imagesize==1.2.0 # via sphinx jinja2==2.11.3 # via sphinx -lxml==4.6.2 +lxml==4.6.3 # via sphinx-material markupsafe==1.1.1 # via jinja2 packaging==20.9 # via sphinx -pygments==2.7.4 +pygments==2.8.1 # via # sphinx # sphinx-prompt @@ -42,13 +45,15 @@ python-slugify[unidecode]==4.0.1 # via sphinx-material pytz==2021.1 # via babel +readthedocs-sphinx-search==0.1.0 + # via -r doc-requirements.in requests==2.25.1 # via sphinx six==1.15.0 # via sphinx-code-include snowballstemmer==2.1.0 # via sphinx -soupsieve==2.1 +soupsieve==2.2.1 # via beautifulsoup4 sphinx-code-include==1.1.1 # via -r doc-requirements.in @@ -56,11 +61,12 @@ sphinx-copybutton==0.3.1 # via -r doc-requirements.in sphinx-material==0.0.32 # via -r doc-requirements.in -sphinx-prompt==1.3.0 +sphinx-prompt==1.4.0 # via -r doc-requirements.in -sphinx==3.4.3 +sphinx==3.5.3 # via # -r doc-requirements.in + # furo # sphinx-code-include # sphinx-copybutton # sphinx-material @@ -81,7 +87,7 @@ text-unidecode==1.3 # via python-slugify unidecode==1.2.0 # via python-slugify -urllib3==1.26.3 +urllib3==1.26.4 # via requests # The following packages are considered to be unsafe in a requirements file: diff --git a/flytectl/docs/source/_static/custom.css b/flytectl/docs/source/_static/custom.css new file mode 100644 index 0000000000..786fcd2611 --- /dev/null +++ b/flytectl/docs/source/_static/custom.css @@ -0,0 +1,33 @@ +h1, h2, h3, h4, h5, h6 { + font-weight: bold; +} + +.sidebar-logo { + max-width: 30%; +} + + +.sidebar-tree .reference.external:after { + content: none; +} + +div.sphx-glr-download a { + color: #4300c9; + background-color: rgb(241, 241, 241); + background-image: none; + border: 1px solid rgb(202, 202, 202); +} + +div.sphx-glr-download a:hover { + background-color: rgb(230, 230, 230); + box-shadow: none; +} + +div.sphx-glr-thumbcontainer a.headerlink { + display: none; +} + +div.sphx-glr-thumbcontainer:hover { + border-color: white; + box-shadow: none; +} diff --git a/flytectl/docs/source/_templates/sidebar/brand.html b/flytectl/docs/source/_templates/sidebar/brand.html new file mode 100644 index 0000000000..a170d6c6d1 --- /dev/null +++ b/flytectl/docs/source/_templates/sidebar/brand.html @@ -0,0 +1,18 @@ +

diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index c346003f67..a5b237ba3f 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -41,6 +41,7 @@ "sphinx.ext.coverage", "sphinx-prompt", "sphinx_copybutton", + "sphinx_search.extension", ] # build the templated autosummary files @@ -73,48 +74,50 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [] +exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "tango" +pygments_dark_style = "paraiso-dark" # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "sphinx_material" +html_theme = "furo" +html_title = "Flyte Docs" html_logo = "flyte_circle_gradient_1_4x4.png" + html_theme_options = { - # Set the name of the project to appear in the navigation. - "nav_title": "Flyte", - # Set you GA account ID to enable tracking - "google_analytics_account": "G-YQL24L5CKY", - # Specify a base_url used to generate sitemap.xml. If not - # specified, then no sitemap will be built. - "base_url": "https://github.com/flyteorg/flytectl", - # Set the color and the accent color - "color_primary": "deep-purple", - "color_accent": "blue", - # Set the repo location to get a badge with stats - "repo_url": "https://github.com/flyteorg/flyte/", - "repo_name": "flyte", - # Visible levels of the global TOC; -1 means unlimited - "globaltoc_depth": 1, - # If False, expand all TOC entries - "globaltoc_collapse": False, - # If True, show hidden TOC entries - "globaltoc_includehidden": False, + "light_css_variables": { + "color-brand-primary": "#4300c9", + "color-brand-content": "#4300c9", + }, + "dark_css_variables": { + "color-brand-primary": "#9D68E4", + "color-brand-content": "#9D68E4", + }, +} + +html_context = { + "home_page": "https://docs.flyte.org", } # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. -html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]} +# html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [] +html_static_path = ["_static"] +html_css_files = [ + "custom.css", +] # Custom sidebar templates, must be a dictionary that maps document names # to template names. diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 9833bf0c50..a950c89fc9 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -1,22 +1,22 @@ .. flytectl doc ########################################## -Welcome to ``Flytectl``'s documentation! +``Flytectl`` Reference ########################################## -Installation -============= +Install +======= Flytectl is a Golang binary and can be installed on any platform supported by -golang. To install simply copy paste the following into the command-line +golang. To install simply copy paste the following into the command-line: .. prompt:: bash curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash -Configuration -============== +Configure +========= Flytectl allows configuring using a YAML file or pass every configuration value on command-line. The follow configuration is useful to setup. @@ -30,23 +30,32 @@ Basic Configuration endpoint: dns:///flyte.lyft.net # Change insecure flag to ensure that you use the right setting for your environment insecure: true - # Logger settings to control logger output. Useful to debug - #logger: - #show-source: true - #level: 1 + # Logger settings to control logger output. Useful to debug logger: + show-source: true + level: 1 .. toctree:: :maxdepth: 1 - :caption: Flyte Core docs + :hidden: - Flyte Documentation + Getting Started + Tutorials + reference/index + Community - gen/flytectl .. toctree:: :maxdepth: 1 - :caption: Flytectl verbs + :caption: Flytectl + :hidden: + + Install and Configure + +.. toctree:: + :maxdepth: 1 + :caption: Verbs + :hidden: gen/flytectl_create gen/flytectl_get @@ -57,7 +66,8 @@ Basic Configuration .. toctree:: :maxdepth: 1 - :caption: Flytectl nouns + :caption: Nouns + :hidden: gen/flytectl_create_project gen/flytectl_create_execution @@ -74,13 +84,6 @@ Basic Configuration .. toctree:: :maxdepth: 2 :caption: Contribute + :hidden: contribute - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/flytectl/docs/source/reference/index.rst b/flytectl/docs/source/reference/index.rst new file mode 100644 index 0000000000..6b6ff34c49 --- /dev/null +++ b/flytectl/docs/source/reference/index.rst @@ -0,0 +1,24 @@ +############# +API Reference +############# + +.. toctree:: + :maxdepth: 1 + :caption: API Reference + :name: apitoc + + Flytekit Python + Flytekit Java + FlyteIDL + Flytectl + +.. toctree:: + :maxdepth: 1 + :caption: Component Reference (Code docs) + :name: componentreftoc + + FlytePropeller + FlyteAdmin + FlytePlugins + DataCatalog + \ No newline at end of file From cad9e39bf50cebdb9e417b80af15fafd3dc4081c Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 31 Mar 2021 12:00:09 -0400 Subject: [PATCH 032/356] dark theme updates (#45) Signed-off-by: cosmicBboy --- flytectl/docs/source/_static/custom.css | 66 +++++++++++++++++++++++-- flytectl/docs/source/conf.py | 2 +- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/flytectl/docs/source/_static/custom.css b/flytectl/docs/source/_static/custom.css index 786fcd2611..d9851b7d8f 100644 --- a/flytectl/docs/source/_static/custom.css +++ b/flytectl/docs/source/_static/custom.css @@ -11,15 +11,24 @@ h1, h2, h3, h4, h5, h6 { content: none; } +.sphx-glr-thumbcontainer { + background-color: transparent; + border: transparent; +} + +.sphx-glr-thumbcontainer:hover { + border: transparent; +} + div.sphx-glr-download a { - color: #4300c9; - background-color: rgb(241, 241, 241); + color:white; + background-color: #9d68e4cf; background-image: none; - border: 1px solid rgb(202, 202, 202); + border: 1px solid #9d68e4cf; } div.sphx-glr-download a:hover { - background-color: rgb(230, 230, 230); + background-color: #8b48e2cf; box-shadow: none; } @@ -31,3 +40,52 @@ div.sphx-glr-thumbcontainer:hover { border-color: white; box-shadow: none; } + +.sphx-glr-script-out .highlight pre { + background-color: #f8f8f8; +} + +p.sphx-glr-script-out { + padding-top: 0em; +} + +.search__outer::-webkit-scrollbar-track { + border-radius: 0px; +} + +@media (prefers-color-scheme: dark) { + .search__outer { + background-color: #131416 !important; + border: 1px solid #131416 !important; + } + .search__outer__input { + background-color: #1a1c1e !important; + } + .search__result__single { + border-bottom: #303335 !important; + } + .outer_div_page_results:hover { + background-color: black; + } + .search__result__title, .rtd_ui_search_subtitle { + color: #9D68E4 !important; + border-bottom: 1px solid #9D68E4 !important; + } + .search__outer .search__result__title span, .search__outer .search__result__content span { + background-color: #9d68e454; + } + .search__result__subheading, .search__result__content { + color: #ffffffd9 !important; + } + .search__outer::-webkit-scrollbar-track { + background-color: #131416 !important; + } + .rtd__search__credits { + background-color: #1a1c1e !important; + border: 1px solid #1a1c1e !important; + color: #81868d !important; + } + .rtd__search__credits a, .search__error__box { + color: #9ca0a5 !important; + } + } diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index a5b237ba3f..51ec8df120 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -78,7 +78,7 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = "tango" -pygments_dark_style = "paraiso-dark" +pygments_dark_style = "native" # -- Options for HTML output ------------------------------------------------- From 676f0cf847e952b01ce18e04d9487bafc153c717 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Fri, 2 Apr 2021 19:47:34 +0530 Subject: [PATCH 033/356] Added different repo for brew release (#46) * Added different repo for brew release Signed-off-by: yuvraj * small fix Signed-off-by: yuvraj --- flytectl/.goreleaser.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 18ace3b56b..43862c26fb 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -72,13 +72,12 @@ brews: # Default is 6 for all artifacts or each id if there a multiple versions. goarm: 6 - # NOTE: make sure the url_template, the token and given repo (github or gitlab) owner and name are from the - # same kind. We will probably unify this in the next major version like it is done with scoop. - + folder: Formula + # Github repository to push the tap to. tap: owner: flyteorg - name: flytectl + name: homebrew-tap # Template for the url which is determined by the given Token (github or gitlab) # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" @@ -98,16 +97,12 @@ brews: # Git author used to commit to the repository. # Defaults are shown. commit_author: - name: flytebot - email: flytebot@flyte.org - - # Caveats for the user of your binary. - # Default is empty. - caveats: "How to use this binary" + name: Flyte-Bot + email: admin@flyte.org # Your app's homepage. # Default is empty. - homepage: "https://flytectl.readthedocs.io/en/latest" + homepage: "https://docs.flyte.org/projects/flytectl" # Your app's description. # Default is empty. From 696065ce52ac4beffb94dc04348250132f010196 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Fri, 2 Apr 2021 22:35:29 +0530 Subject: [PATCH 034/356] Added goreleaser dry run in build (#47) * Added goreleaser dry run in build Signed-off-by: yuvraj * bug fix in goreleaser Signed-off-by: yuvraj --- flytectl/.github/workflows/build.yaml | 7 ++- flytectl/.github/workflows/release.yml | 2 +- flytectl/.goreleaser.yml | 69 ++------------------------ 3 files changed, 12 insertions(+), 66 deletions(-) diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 4b78569361..a7d933fed4 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -11,6 +11,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: --snapshot --skip-publish --rm-dist - name: Unit Tests uses: cedrickring/golang-action@1.5.2 env: @@ -28,4 +33,4 @@ jobs: env: GO111MODULE: "on" with: - args: make install && make lint \ No newline at end of file + args: make install && make lint diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml index e4c2de9fd3..6f27d86990 100644 --- a/flytectl/.github/workflows/release.yml +++ b/flytectl/.github/workflows/release.yml @@ -16,4 +16,4 @@ jobs: version: latest args: release --rm-dist --debug env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 43862c26fb..4f9557b3cd 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -13,8 +13,9 @@ builds: ldflags: - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - - replacements: - darwin: macOS + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + replacements: + darwin: Darwin linux: Linux windows: Windows 386: i386 @@ -32,46 +33,11 @@ changelog: exclude: - '^docs:' - '^test:' -scoop: - # Default is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" - - # Repository to push the app manifest to. - bucket: - owner: flyteorg - name: flytectl - - # Git author used to commit to the repository. - # Defaults are shown. - commit_author: - name: goreleaserbot - email: goreleaser@carlosbecker.com - - # Your app's homepage. - # Default is empty. - homepage: "https://godoc.org/github.com/flyteorg/flytectl" - - # Your app's description. - # Default is empty. - description: "FlyteCtl is a command line tool to interact with a Flyte cluster." - - # Your app's license - # Default is empty. - license: Apache-2.0 - - # Persist data between application updates - persist: - - "config.toml" brews: - # Name template of the recipe # Default to project name name: flytectl - # GOARM to specify which 32-bit arm version to use if there are multiple versions - # from the build section. Brew formulas support atm only one 32-bit version. - # Default is 6 for all artifacts or each id if there a multiple versions. - goarm: 6 - folder: Formula # Github repository to push the tap to. @@ -79,21 +45,6 @@ brews: owner: flyteorg name: homebrew-tap - # Template for the url which is determined by the given Token (github or gitlab) - # Default for github is "https://github.com///releases/download/{{ .Tag }}/{{ .ArtifactName }}" - # Default for gitlab is "https://gitlab.com///uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}" - url_template: "http://github.com/flyteorg/flytectl/releases/{{ .Tag }}/{{ .ArtifactName }}" - - # Allows you to set a custom download strategy. Note that you'll need - # to implement the strategy and add it to your tap repository. - # Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly - # Default is empty. - download_strategy: CurlDownloadStrategy. - - # Allows you to add a custom require_relative at the top of the formula template - # Default is empty - custom_require: custom_download_strategy - # Git author used to commit to the repository. # Defaults are shown. commit_author: @@ -108,18 +59,8 @@ brews: # Default is empty. description: "FlyteCtl is a command line tool to interact with a Flyte cluster." - # Setting this will prevent goreleaser to actually try to commit the updated - # formula - instead, the formula file will be stored on the dist folder only, - # leaving the responsibility of publishing it to the user. - # If set to auto, the release will not be uploaded to the homebrew tap - # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 # Default is false. skip_upload: auto - # So you can `brew test` your formula. - # Default is empty. - test: system "#{bin}/program --version" - - # Custom install script for brew. - # Default is 'bin.install "program"'. - install: bin.install "program" + dependencies: + - name: go \ No newline at end of file From 3904146af2ea42496e794f230b21fc65e3fbe5e9 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Sat, 3 Apr 2021 00:03:13 +0530 Subject: [PATCH 035/356] Added version command (#41) * wip: Added version command Signed-off-by: Yuvraj * wip: small fix Signed-off-by: yuvraj * wip: version api call added Signed-off-by: yuvraj * added docs for version Signed-off-by: Yuvraj * wip: lint fix Signed-off-by: yuvraj * fix testcase Signed-off-by: yuvraj * Removed version pkg Signed-off-by: yuvraj * added json output in version command Signed-off-by: yuvraj * unit test added Signed-off-by: yuvraj * Added brew install in readme Signed-off-by: yuvraj --- flytectl/Makefile | 11 ++- flytectl/README.md | 3 +- flytectl/cmd/root.go | 7 +- flytectl/cmd/version.go | 17 ---- flytectl/cmd/version/version.go | 82 +++++++++++++++++++ flytectl/cmd/version/version_test.go | 34 ++++++++ flytectl/docs/source/gen/flytectl.rst | 2 +- .../source/gen/flytectl_get_launchplan.rst | 12 +-- .../docs/source/gen/flytectl_get_task.rst | 2 +- flytectl/docs/source/gen/flytectl_version.rst | 9 +- flytectl/go.mod | 7 +- flytectl/go.sum | 8 +- 12 files changed, 156 insertions(+), 38 deletions(-) delete mode 100644 flytectl/cmd/version.go create mode 100644 flytectl/cmd/version/version.go create mode 100644 flytectl/cmd/version/version_test.go diff --git a/flytectl/Makefile b/flytectl/Makefile index 2e5bcf7a82..8104b44ca9 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -1,6 +1,15 @@ export REPOSITORY=flytectl include boilerplate/lyft/golang_test_targets/Makefile +GIT_VERSION := $(shell git describe --always --tags) +GIT_HASH := $(shell git rev-parse --short HEAD) +TIMESTAMP := $(shell date '+%Y-%m-%d') +PACKAGE ?=github.com/flyteorg/flytestdlib + +LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)" + + + define PIP_COMPILE pip-compile $(1) --upgrade --verbose endef @@ -9,7 +18,7 @@ generate: go test github.com/flyteorg/flytectl/cmd --update compile: - go build -o bin/flytectl main.go + go build -o bin/flytectl -ldflags=$(LD_FLAGS) main.go .PHONY: update_boilerplate update_boilerplate: diff --git a/flytectl/README.md b/flytectl/README.md index 6f46476b67..18d1afe748 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -21,7 +21,8 @@ Generating docs locally can be accomplished by running make gendocs from within ## Installation ```bash -curl -s https://raw.githubusercontent.com/flyteorg/flytectl/master/install.sh | bash +$ brew tap flyteorg/homebrew-tap +$ brew install flytectl ``` ## Contributing diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 26bfc2b453..8ad0fef299 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,11 +5,13 @@ import ( "fmt" "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/create" "github.com/flyteorg/flytectl/cmd/delete" "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flytectl/cmd/register" "github.com/flyteorg/flytectl/cmd/update" + "github.com/flyteorg/flytectl/cmd/version" "github.com/flyteorg/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/config/viper" @@ -44,12 +46,15 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s", printer.OutputFormats())) rootCmd.AddCommand(viper.GetConfigCommand()) - rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(create.RemoteCreateCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) + // Added version command + versioncmd := version.GetVersionCommand(rootCmd) + cmdCore.AddCommands(rootCmd, versioncmd) + config.GetConfig() return rootCmd diff --git a/flytectl/cmd/version.go b/flytectl/cmd/version.go deleted file mode 100644 index 647a5a1eac..0000000000 --- a/flytectl/cmd/version.go +++ /dev/null @@ -1,17 +0,0 @@ -package cmd - -import ( - "github.com/flyteorg/flytestdlib/version" - "github.com/spf13/cobra" -) - -var ( - versionCmd = &cobra.Command{ - Use: "version", - Short: "Displays version information for the client and server.", - Run: func(cmd *cobra.Command, args []string) { - version.LogBuildInformation("flytectl") - // TODO: Log Admin version - }, - } -) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go new file mode 100644 index 0000000000..57c7ddac08 --- /dev/null +++ b/flytectl/cmd/version/version.go @@ -0,0 +1,82 @@ +package version + +import ( + "context" + "encoding/json" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + stdlibversion "github.com/flyteorg/flytestdlib/version" + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + versionCmdShort = `Used for fetching flyte version` + versionCmdLong = ` +Example version. +:: + + bin/flytectl version +` +) + +type versionOutput struct { + // Specifies the Name of app + App string `json:"App,omitempty"` + // Specifies the GIT sha of the build + Build string `json:"Build,omitempty"` + // Version for the build, should follow a semver + Version string `json:"Version,omitempty"` + // Build timestamp + BuildTime string `json:"BuildTime,omitempty"` +} + +// GetVersionCommand will return version command +func GetVersionCommand(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { + getResourcesFuncs := map[string]cmdCore.CommandEntry{ + "version": {CmdFunc: getVersion, Aliases: []string{"versions"}, ProjectDomainNotRequired: true, + Short: versionCmdShort, + Long: versionCmdLong}, + } + return getResourcesFuncs +} + +func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + + v, err := cmdCtx.AdminClient().GetVersion(ctx, &admin.GetVersionRequest{}) + if err != nil { + return fmt.Errorf("err %v: ", err) + } + + // Print Flytectl + if err := printVersion(versionOutput{ + Build: stdlibversion.Build, + BuildTime: stdlibversion.BuildTime, + Version: stdlibversion.Version, + App: "flytectl", + }); err != nil { + return err + } + + // Print Flyteadmin + if err := printVersion(versionOutput{ + Build: v.ControlPlaneVersion.Build, + BuildTime: v.ControlPlaneVersion.BuildTime, + Version: v.ControlPlaneVersion.Version, + App: "controlPlane", + }); err != nil { + return err + } + return nil +} + +func printVersion(response versionOutput) error { + b, err := json.MarshalIndent(response, "", " ") + if err != nil { + return fmt.Errorf("err %v: ", err) + } + fmt.Print(string(b)) + return nil +} diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go new file mode 100644 index 0000000000..acaf34a829 --- /dev/null +++ b/flytectl/cmd/version/version_test.go @@ -0,0 +1,34 @@ +package version + +import ( + "context" + "fmt" + "io" + "testing" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" +) + +func TestListExecutionFunc(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + versionRequest := &admin.GetVersionRequest{} + versionResponse := &admin.GetVersionResponse{ + ControlPlaneVersion: &admin.Version{ + Build: "", + BuildTime: "", + Version: "", + }, + } + mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) + err := getVersion(ctx, args, cmdCtx) + fmt.Println(err) + assert.Nil(t, nil) + mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) +} diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 70c8b01eba..89e4a4db9c 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -65,5 +65,5 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. -* :doc:`flytectl_version` - Displays version information for the client and server. +* :doc:`flytectl_version` - Used for fetching flyte version diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 2746270b21..0cd64b8651 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -50,15 +50,15 @@ The generated file would look similar to this iamRoleARN: "" inputs: - numbers: - - 0 - numbers_count: 0 - run_local_at_count: 10 + numbers: + - 0 + numbers_count: 0 + run_local_at_count: 10 kubeServiceAcct: "" targetDomain: "" targetProject: "" - workflow: core.advanced.run_merge_sort.merge - version: "v3" + version: v3 + workflow: core.advanced.run_merge_sort.merge_sort Check the create execution section on how to launch one using the generated file. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 245de2b4f3..5ccddc30c9 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -58,7 +58,7 @@ The generated file would look similar to this targetDomain: "" targetProject: "" task: core.advanced.run_merge_sort.merge - version: "v2" + version: v2 Check the create execution section on how to launch one using the generated file. diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index cbcf99db64..a56c061f65 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -3,13 +3,18 @@ flytectl version ---------------- -Displays version information for the client and server. +Used for fetching flyte version Synopsis ~~~~~~~~ -Displays version information for the client and server. + +Example version. +:: + + bin/flytectl version + :: diff --git a/flytectl/go.mod b/flytectl/go.mod index 5723376489..4e89215bdf 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,14 +4,15 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.18.15 - github.com/flyteorg/flytestdlib v0.3.13 + github.com/flyteorg/flyteidl v0.18.25 + github.com/flyteorg/flytestdlib v0.3.15 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 + github.com/magiconair/properties v1.8.4 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.4.1 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect @@ -26,5 +27,3 @@ require ( gopkg.in/yaml.v2 v2.4.0 sigs.k8s.io/yaml v1.2.0 ) - -replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f diff --git a/flytectl/go.sum b/flytectl/go.sum index a189bc399e..cdd768fdab 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -173,10 +173,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f h1:7qRMZRPQXUVpebBt92msIzQBRtJ4fraWhd75qA6oqaE= -github.com/flyteorg/flyteidl v0.18.21-0.20210317055906-f2ce9eb7bd1f/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= -github.com/flyteorg/flytestdlib v0.3.13 h1:5ioA/q3ixlyqkFh5kDaHgmPyTP/AHtqq1K/TIbVLUzM= +github.com/flyteorg/flyteidl v0.18.25 h1:XbHwM4G1u5nGAcdKod+ENgbL84cHdNzQIWY+NajuHs8= +github.com/flyteorg/flyteidl v0.18.25/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= +github.com/flyteorg/flytestdlib v0.3.15 h1:vzsfqriENyavv6EBwsIm55di2wC+j0jkmjw30JGHAkM= +github.com/flyteorg/flytestdlib v0.3.15/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -230,7 +231,6 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From e3aaedb08f617e5fd9a8d60dcfbf05d7c05639df Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Sat, 3 Apr 2021 20:03:58 +0530 Subject: [PATCH 036/356] Update template formate in install script (#48) Signed-off-by: yuvraj --- flytectl/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 flytectl/install.sh diff --git a/flytectl/install.sh b/flytectl/install.sh old mode 100644 new mode 100755 index 8cd6b6ebd1..150ae277af --- a/flytectl/install.sh +++ b/flytectl/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2021-02-08T20:29:16Z. DO NOT EDIT. +# Code generated by godownloader on 2021-04-03T07:49:04Z. DO NOT EDIT. # usage() { @@ -101,7 +101,7 @@ adjust_os() { case ${OS} in 386) OS=i386 ;; amd64) OS=x86_64 ;; - darwin) OS=macOS ;; + darwin) OS=Darwin ;; linux) OS=Linux ;; windows) OS=Windows ;; esac @@ -112,7 +112,7 @@ adjust_arch() { case ${ARCH} in 386) ARCH=i386 ;; amd64) ARCH=x86_64 ;; - darwin) ARCH=macOS ;; + darwin) ARCH=Darwin ;; linux) ARCH=Linux ;; windows) ARCH=Windows ;; esac @@ -382,7 +382,7 @@ adjust_arch log_info "found version: ${VERSION} for ${TAG}/${OS}/${ARCH}" -NAME=${PROJECT_NAME}_${VERSION}_${OS}_${ARCH} +NAME=${PROJECT_NAME}_${OS}_${ARCH} TARBALL=${NAME}.${FORMAT} TARBALL_URL=${GITHUB_DOWNLOAD}/${TAG}/${TARBALL} CHECKSUM=checksums.txt From 6a00fb3f3cc18782cc557b82512de24fb6957de1 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Sat, 10 Apr 2021 05:21:29 +0530 Subject: [PATCH 037/356] fix config in docs (#50) Signed-off-by: yuvraj --- flytectl/docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index a950c89fc9..0f381d5e59 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -30,12 +30,12 @@ Basic Configuration endpoint: dns:///flyte.lyft.net # Change insecure flag to ensure that you use the right setting for your environment insecure: true + logger: # Logger settings to control logger output. Useful to debug logger: show-source: true level: 1 - .. toctree:: :maxdepth: 1 :hidden: From c673d3b7dac5d78f4a077459e88e921004755c04 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Sun, 18 Apr 2021 10:53:18 +0530 Subject: [PATCH 038/356] Bumped up the flyteidl version to fix create execution issue (#53) * Bumped up the flyteidl version to fix create execution issue Signed-off-by: Prafulla Mahindrakar * Dummy commit Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/update/project.go | 2 +- flytectl/go.mod | 3 +-- flytectl/go.sum | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 0c13b7ed74..5865c7e6af 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -20,7 +20,7 @@ type ProjectConfig struct { const ( projectShort = "Updates project resources" projectLong = ` -Updates the project according the flags passed.Allows you to archive or activate a project. +Updates the project according the flags passed. Allows you to archive or activate a project. Activates project named flytesnacks. :: diff --git a/flytectl/go.mod b/flytectl/go.mod index 4e89215bdf..ca000d677b 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.18.25 + github.com/flyteorg/flyteidl v0.18.32 github.com/flyteorg/flytestdlib v0.3.15 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 @@ -12,7 +12,6 @@ require ( github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/magiconair/properties v1.8.4 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.4.1 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index cdd768fdab..699d774fb8 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -175,6 +175,8 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v0.18.25 h1:XbHwM4G1u5nGAcdKod+ENgbL84cHdNzQIWY+NajuHs8= github.com/flyteorg/flyteidl v0.18.25/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= +github.com/flyteorg/flyteidl v0.18.32 h1:Z+DeBh4i+mZK75lfJwmsHPf23nbsp2Qiv+kCnGMY9Ds= +github.com/flyteorg/flyteidl v0.18.32/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.15 h1:vzsfqriENyavv6EBwsIm55di2wC+j0jkmjw30JGHAkM= github.com/flyteorg/flytestdlib v0.3.15/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= From 89f6e6f3dc732ac98fddf858f2828eb26860eaa7 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Tue, 20 Apr 2021 22:08:11 +0530 Subject: [PATCH 039/356] Added capability to relaunch an execution (#52) * Added capability to relaunch an execution Signed-off-by: Prafulla Mahindrakar * Added more coverage Signed-off-by: Prafulla Mahindrakar * Moved around test function Signed-off-by: Prafulla Mahindrakar * Added few more tests Signed-off-by: Prafulla Mahindrakar * Using RelaunchExecution directly Signed-off-by: Prafulla Mahindrakar * added comments for interface and renamed the file Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/create/execution.go | 28 +++++- flytectl/cmd/create/execution_test.go | 71 +++++++++++-- flytectl/cmd/create/execution_util.go | 47 ++++++--- flytectl/cmd/create/execution_util_test.go | 56 +++++++++++ flytectl/cmd/create/executionconfig_flags.go | 12 ++- flytectl/cmd/get/execution.go | 9 +- flytectl/cmd/get/execution_util.go | 16 +++ flytectl/cmd/get/get.go | 12 +++ .../cmd/get/interfaces/fetcher_interface.go | 16 +++ flytectl/cmd/get/interfaces/mocks/fetcher.go | 99 +++++++++++++++++++ .../cmd/get/interfaces/mocks/get_execution.go | 58 +++++++++++ flytectl/cmd/get/launch_plan_util.go | 4 +- flytectl/cmd/get/launchplanconfig_flags.go | 2 +- flytectl/cmd/get/taskconfig_flags.go | 6 +- .../cmd/testdata/invalid_execution_spec.yaml | 12 +++ .../cmd/testdata/task_execution_spec.yaml | 4 +- .../source/gen/flytectl_create_execution.rst | 7 ++ 17 files changed, 413 insertions(+), 46 deletions(-) create mode 100644 flytectl/cmd/create/execution_util_test.go create mode 100644 flytectl/cmd/get/interfaces/fetcher_interface.go create mode 100644 flytectl/cmd/get/interfaces/mocks/fetcher.go create mode 100644 flytectl/cmd/get/interfaces/mocks/get_execution.go create mode 100644 flytectl/cmd/testdata/invalid_execution_spec.yaml diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index b687790e12..d80f310b90 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -72,6 +72,12 @@ The root project and domain flags of -p and -d should point to task/launch plans flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks +Also an execution can be relaunched by passing in current execution id. + +:: + + flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development + Usage ` ) @@ -86,6 +92,7 @@ type ExecutionConfig struct { TargetProject string `json:"targetProject" pflag:",project where execution needs to be created.If not specified configured project would be used."` KubeServiceAcct string `json:"kubeServiceAcct" pflag:",kubernetes service account AuthRole for launching execution."` IamRoleARN string `json:"iamRoleARN" pflag:",iam role ARN AuthRole for launching execution."` + Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."` // Non plfag section is read from the execution config generated by get task/launchplan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` @@ -93,9 +100,17 @@ type ExecutionConfig struct { Inputs map[string]interface{} `json:"inputs"` } +type ExecutionType int + +const ( + Task ExecutionType = iota + Workflow + Relaunch +) + type ExecutionParams struct { - name string - isTask bool + name string + execType ExecutionType } var ( @@ -111,14 +126,19 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C return err } var executionRequest *admin.ExecutionCreateRequest - if execParams.isTask { + switch execParams.execType { + case Relaunch: + return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx) + case Task: if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { return err } - } else { + case Workflow: if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { return err } + default: + return fmt.Errorf("invalid execution type %v", execParams.execType) } exec, _err := cmdCtx.AdminClient().CreateExecution(ctx, executionRequest) if _err != nil { diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index cb9fa4cc15..9a593760c9 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -1,6 +1,7 @@ package create import ( + "fmt" "testing" "github.com/flyteorg/flytectl/cmd/config" @@ -129,6 +130,36 @@ func createExecutionSetup() { } mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan1, nil) } + +func TestCreateTaskExecutionFunc(t *testing.T) { + setup() + createExecutionSetup() + executionCreateResponseTask := &admin.ExecutionCreateResponse{ + Id: &core.WorkflowExecutionIdentifier{ + Project: "flytesnacks", + Domain: "development", + Name: "ff513c0e44b5b4a35aa5", + }, + } + mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) + executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) +} + +func TestCreateTaskExecutionFuncError(t *testing.T) { + setup() + createExecutionSetup() + mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(nil, fmt.Errorf("error launching task")) + executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error launching task"), err) + mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) +} + func TestCreateLaunchPlanExecutionFunc(t *testing.T) { setup() createExecutionSetup() @@ -147,20 +178,46 @@ func TestCreateLaunchPlanExecutionFunc(t *testing.T) { tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) } -func TestCreateTaskExecutionFunc(t *testing.T) { +func TestCreateRelaunchExecutionFunc(t *testing.T) { setup() createExecutionSetup() - executionCreateResponseTask := &admin.ExecutionCreateResponse{ + relaunchExecResponse := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", Domain: "development", - Name: "ff513c0e44b5b4a35aa5", + Name: "f652ea3596e7f4d80a0e", }, } - mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) - executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + + executionConfig.Relaunch = relaunchExecResponse.Id.Name + relaunchRequest := &admin.ExecutionRelaunchRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: executionConfig.Relaunch, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + } + mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) err = createExecutionCommand(ctx, args, cmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) + mockClient.AssertCalled(t, "RelaunchExecution", ctx, relaunchRequest) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) +} + +func TestCreateExecutionFuncInvalid(t *testing.T) { + setup() + createExecutionSetup() + executionConfig.Relaunch = "" + executionConfig.ExecFile = "" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("executionConfig or relaunch can't be empty. Run the flytectl get task/launchplan to generate the config"), err) + executionConfig.ExecFile = "Invalid-file" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from %v yaml file", executionConfig.ExecFile), err) + executionConfig.ExecFile = testDataFolder + "invalid_execution_spec.yaml" + err = createExecutionCommand(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("either one of task or workflow name should be specified to launch an execution"), err) } diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index acb3f595d8..dd21867ba8 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -2,7 +2,6 @@ package create import ( "context" - "errors" "fmt" "io/ioutil" "strings" @@ -11,7 +10,6 @@ import ( cmdGet "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/google/uuid" "sigs.k8s.io/yaml" ) @@ -20,7 +18,7 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName string, var lp *admin.LaunchPlan var err error // Fetch the launch plan - if lp, err = cmdGet.FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain, cmdCtx); err != nil { + if lp, err = cmdGet.DefaultFetcher.FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain, cmdCtx); err != nil { return nil, err } // Create workflow params literal map @@ -70,6 +68,21 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project return createExecutionRequest(ID, inputs, authRole), nil } +func relaunchExecution(ctx context.Context, executionName string, project string, domain string, cmdCtx cmdCore.CommandContext) error { + relaunchedExec, err := cmdCtx.AdminClient().RelaunchExecution(ctx, &admin.ExecutionRelaunchRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: executionName, + Project: project, + Domain: domain, + }, + }) + if err != nil { + return err + } + fmt.Printf("execution identifier %v\n", relaunchedExec.Id) + return nil +} + func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, authRole *admin.AuthRole) *admin.ExecutionCreateRequest { return &admin.ExecutionCreateRequest{ Project: executionConfig.TargetProject, @@ -100,32 +113,36 @@ func readExecConfigFromFile(fileName string) (*ExecutionConfig, error) { return &executionConfigRead, nil } -func resolveOverrides(readExecutionConfig *ExecutionConfig, project string, domain string) { +func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain string) { if executionConfig.KubeServiceAcct != "" { - readExecutionConfig.KubeServiceAcct = executionConfig.KubeServiceAcct + toBeOverridden.KubeServiceAcct = executionConfig.KubeServiceAcct } if executionConfig.IamRoleARN != "" { - readExecutionConfig.IamRoleARN = executionConfig.IamRoleARN + toBeOverridden.IamRoleARN = executionConfig.IamRoleARN } if executionConfig.TargetProject != "" { - readExecutionConfig.TargetProject = executionConfig.TargetProject + toBeOverridden.TargetProject = executionConfig.TargetProject } if executionConfig.TargetDomain != "" { - readExecutionConfig.TargetDomain = executionConfig.TargetDomain + toBeOverridden.TargetDomain = executionConfig.TargetDomain } // Use the root project and domain to launch the task/workflow if target is unspecified if executionConfig.TargetProject == "" { - readExecutionConfig.TargetProject = project + toBeOverridden.TargetProject = project } if executionConfig.TargetDomain == "" { - readExecutionConfig.TargetDomain = domain + toBeOverridden.TargetDomain = domain } } func readConfigAndValidate(project string, domain string) (ExecutionParams, error) { executionParams := ExecutionParams{} - if executionConfig.ExecFile == "" { - return executionParams, errors.New("executionConfig can't be empty. Run the flytectl get task/launchplan to generate the config") + if executionConfig.ExecFile == "" && executionConfig.Relaunch == "" { + return executionParams, fmt.Errorf("executionConfig or relaunch can't be empty. Run the flytectl get task/launchplan to generate the config") + } + if executionConfig.Relaunch != "" { + resolveOverrides(executionConfig, project, domain) + return ExecutionParams{name: executionConfig.Relaunch, execType: Relaunch}, nil } var readExecutionConfig *ExecutionConfig var err error @@ -138,11 +155,13 @@ func readConfigAndValidate(project string, domain string) (ExecutionParams, erro isTask := readExecutionConfig.Task != "" isWorkflow := readExecutionConfig.Workflow != "" if isTask == isWorkflow { - return executionParams, errors.New("either one of task or workflow name should be specified to launch an execution") + return executionParams, fmt.Errorf("either one of task or workflow name should be specified to launch an execution") } name := readExecutionConfig.Task + execType := Task if !isTask { name = readExecutionConfig.Workflow + execType = Workflow } - return ExecutionParams{name: name, isTask: isTask}, nil + return ExecutionParams{name: name, execType: execType}, nil } diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go new file mode 100644 index 0000000000..db3a084225 --- /dev/null +++ b/flytectl/cmd/create/execution_util_test.go @@ -0,0 +1,56 @@ +package create + +import ( + "errors" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" +) + +var ( + relaunchExecResponse *admin.ExecutionCreateResponse + relaunchRequest *admin.ExecutionRelaunchRequest +) + +// This function needs to be called after testutils.Steup() +func createExecutionUtilSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient + relaunchExecResponse = &admin.ExecutionCreateResponse{ + Id: &core.WorkflowExecutionIdentifier{ + Project: "flytesnacks", + Domain: "development", + Name: "f652ea3596e7f4d80a0e", + }, + } + relaunchRequest = &admin.ExecutionRelaunchRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: "execName", + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + } +} + +func TestCreateExecutionForRelaunch(t *testing.T) { + setup() + createExecutionUtilSetup() + mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) + err = relaunchExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + assert.Nil(t, err) +} + +func TestCreateExecutionForRelaunchNotFound(t *testing.T) { + setup() + createExecutionUtilSetup() + mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(nil, errors.New("unknown execution")) + err = relaunchExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, err, errors.New("unknown execution")) +} diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 4a9774dff0..59dc9adf41 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -41,10 +41,12 @@ func (ExecutionConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ExecutionConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(executionConfig.ExecFile),fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") - cmdFlags.StringVar(&(executionConfig.TargetDomain),fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") - cmdFlags.StringVar(&(executionConfig.TargetProject),fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") - cmdFlags.StringVar(&(executionConfig.KubeServiceAcct),fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") - cmdFlags.StringVar(&(executionConfig.IamRoleARN),fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") + cmdFlags.StringVar(&(executionConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") + cmdFlags.StringVar(&(executionConfig.TargetDomain), fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") + cmdFlags.StringVar(&(executionConfig.TargetProject), fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") + cmdFlags.StringVar(&(executionConfig.KubeServiceAcct), fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") + cmdFlags.StringVar(&(executionConfig.IamRoleARN), fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") + cmdFlags.StringVar(&(executionConfig.Relaunch), fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") + return cmdFlags } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index f7d91812c1..e6ab431df5 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -4,7 +4,6 @@ import ( "context" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" @@ -70,13 +69,7 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command var executions []*admin.Execution if len(args) > 0 { name := args[0] - execution, err := cmdCtx.AdminClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: name, - }, - }) + execution, err := DefaultFetcher.FetchExecution(ctx, name, config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) if err != nil { return err } diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index da330af39e..2a563f4165 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -1,11 +1,13 @@ package get import ( + "context" "errors" "fmt" "io/ioutil" "os" + cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -27,6 +29,20 @@ type ExecutionConfig struct { Inputs map[string]interface{} `json:"inputs"` } +func (f FetcherImpl) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Execution, error) { + e, err := cmdCtx.AdminClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + }) + if err != nil { + return nil, err + } + return e, nil +} + func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) error { d, err := yaml.Marshal(executionConfig) if err != nil { diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index e875a0ca01..46f392c4d0 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -2,6 +2,7 @@ package get import ( cmdcore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/get/interfaces" "github.com/spf13/cobra" ) @@ -17,6 +18,17 @@ Example get projects. ` ) +var ( + DefaultFetcher = NewFetcherImpl() +) + +func NewFetcherImpl() interfaces.Fetcher { + return FetcherImpl{} +} + +type FetcherImpl struct { +} + // CreateGetCommand will return get command func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ diff --git a/flytectl/cmd/get/interfaces/fetcher_interface.go b/flytectl/cmd/get/interfaces/fetcher_interface.go new file mode 100644 index 0000000000..62a007e848 --- /dev/null +++ b/flytectl/cmd/get/interfaces/fetcher_interface.go @@ -0,0 +1,16 @@ +package interfaces + +import ( + "context" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +//go:generate mockery -all -case=underscore + +// Interface for exposing the fetch capabilities to other modules. eg : create execution which requires to fetch launchplan details. +type Fetcher interface { + FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Execution, error) + FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) +} diff --git a/flytectl/cmd/get/interfaces/mocks/fetcher.go b/flytectl/cmd/get/interfaces/mocks/fetcher.go new file mode 100644 index 0000000000..61742c70c6 --- /dev/null +++ b/flytectl/cmd/get/interfaces/mocks/fetcher.go @@ -0,0 +1,99 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + cmdcore "github.com/flyteorg/flytectl/cmd/core" + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// Fetcher is an autogenerated mock type for the Fetcher type +type Fetcher struct { + mock.Mock +} + +type Fetcher_FetchExecution struct { + *mock.Call +} + +func (_m Fetcher_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *Fetcher_FetchExecution { + return &Fetcher_FetchExecution{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Fetcher) OnFetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) *Fetcher_FetchExecution { + c := _m.On("FetchExecution", ctx, name, project, domain, cmdCtx) + return &Fetcher_FetchExecution{Call: c} +} + +func (_m *Fetcher) OnFetchExecutionMatch(matchers ...interface{}) *Fetcher_FetchExecution { + c := _m.On("FetchExecution", matchers...) + return &Fetcher_FetchExecution{Call: c} +} + +// FetchExecution provides a mock function with given fields: ctx, name, project, domain, cmdCtx +func (_m *Fetcher) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.Execution, error) { + ret := _m.Called(ctx, name, project, domain, cmdCtx) + + var r0 *admin.Execution + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, cmdcore.CommandContext) *admin.Execution); ok { + r0 = rf(ctx, name, project, domain, cmdCtx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Execution) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, cmdcore.CommandContext) error); ok { + r1 = rf(ctx, name, project, domain, cmdCtx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Fetcher_FetchLPVersion struct { + *mock.Call +} + +func (_m Fetcher_FetchLPVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *Fetcher_FetchLPVersion { + return &Fetcher_FetchLPVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Fetcher) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdcore.CommandContext) *Fetcher_FetchLPVersion { + c := _m.On("FetchLPVersion", ctx, name, version, project, domain, cmdCtx) + return &Fetcher_FetchLPVersion{Call: c} +} + +func (_m *Fetcher) OnFetchLPVersionMatch(matchers ...interface{}) *Fetcher_FetchLPVersion { + c := _m.On("FetchLPVersion", matchers...) + return &Fetcher_FetchLPVersion{Call: c} +} + +// FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain, cmdCtx +func (_m *Fetcher) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, version, project, domain, cmdCtx) + + var r0 *admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, cmdcore.CommandContext) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, version, project, domain, cmdCtx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, cmdcore.CommandContext) error); ok { + r1 = rf(ctx, name, version, project, domain, cmdCtx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/cmd/get/interfaces/mocks/get_execution.go b/flytectl/cmd/get/interfaces/mocks/get_execution.go new file mode 100644 index 0000000000..0df4fcf5ac --- /dev/null +++ b/flytectl/cmd/get/interfaces/mocks/get_execution.go @@ -0,0 +1,58 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + cmdcore "github.com/flyteorg/flytectl/cmd/core" + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// GetExecution is an autogenerated mock type for the GetExecution type +type GetExecution struct { + mock.Mock +} + +type GetExecution_FetchExecution struct { + *mock.Call +} + +func (_m GetExecution_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *GetExecution_FetchExecution { + return &GetExecution_FetchExecution{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *GetExecution) OnFetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) *GetExecution_FetchExecution { + c := _m.On("FetchExecution", ctx, name, project, domain, cmdCtx) + return &GetExecution_FetchExecution{Call: c} +} + +func (_m *GetExecution) OnFetchExecutionMatch(matchers ...interface{}) *GetExecution_FetchExecution { + c := _m.On("FetchExecution", matchers...) + return &GetExecution_FetchExecution{Call: c} +} + +// FetchExecution provides a mock function with given fields: ctx, name, project, domain, cmdCtx +func (_m *GetExecution) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.Execution, error) { + ret := _m.Called(ctx, name, project, domain, cmdCtx) + + var r0 *admin.Execution + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, cmdcore.CommandContext) *admin.Execution); ok { + r0 = rf(ctx, name, project, domain, cmdCtx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Execution) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, cmdcore.CommandContext) error); ok { + r1 = rf(ctx, name, project, domain, cmdCtx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/cmd/get/launch_plan_util.go b/flytectl/cmd/get/launch_plan_util.go index e72c6e9094..d3a803e32b 100644 --- a/flytectl/cmd/get/launch_plan_util.go +++ b/flytectl/cmd/get/launch_plan_util.go @@ -20,7 +20,7 @@ func FetchLPForName(ctx context.Context, name string, project string, domain str } launchPlans = append(launchPlans, lp) } else if launchPlanConfig.Version != "" { - if lp, err = FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain, cmdCtx); err != nil { + if lp, err = DefaultFetcher.FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain, cmdCtx); err != nil { return nil, err } launchPlans = append(launchPlans, lp) @@ -73,7 +73,7 @@ func FetchLPLatestVersion(ctx context.Context, name string, project string, doma return lp, nil } -func FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { +func (f FetcherImpl) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { lp, err := cmdCtx.AdminClient().GetLaunchPlan(ctx, &admin.ObjectGetRequest{ Id: &core.Identifier{ ResourceType: core.ResourceType_LAUNCH_PLAN, diff --git a/flytectl/cmd/get/launchplanconfig_flags.go b/flytectl/cmd/get/launchplanconfig_flags.go index 00becdd073..f4e37ea0c4 100755 --- a/flytectl/cmd/get/launchplanconfig_flags.go +++ b/flytectl/cmd/get/launchplanconfig_flags.go @@ -43,6 +43,6 @@ func (cfg LaunchPlanConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("LaunchPlanConfig", pflag.ExitOnError) cmdFlags.StringVar(&(launchPlanConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), launchPlanConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") cmdFlags.StringVar(&(launchPlanConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), launchPlanConfig.Version, "version of the launchplan to be fetched.") - cmdFlags.BoolVar(&(launchPlanConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), launchPlanConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.BoolVar(&(launchPlanConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), launchPlanConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") return cmdFlags } diff --git a/flytectl/cmd/get/taskconfig_flags.go b/flytectl/cmd/get/taskconfig_flags.go index 5379d61df7..71a3fadabc 100755 --- a/flytectl/cmd/get/taskconfig_flags.go +++ b/flytectl/cmd/get/taskconfig_flags.go @@ -41,8 +41,8 @@ func (TaskConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg TaskConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("TaskConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(taskConfig.ExecFile),fmt.Sprintf("%v%v", prefix, "execFile"), taskConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") - cmdFlags.StringVar(&(taskConfig.Version),fmt.Sprintf("%v%v", prefix, "version"), taskConfig.Version, "version of the task to be fetched.") - cmdFlags.BoolVar(&(taskConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), taskConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&(taskConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), taskConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") + cmdFlags.StringVar(&(taskConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), taskConfig.Version, "version of the task to be fetched.") + cmdFlags.BoolVar(&(taskConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), taskConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") return cmdFlags } diff --git a/flytectl/cmd/testdata/invalid_execution_spec.yaml b/flytectl/cmd/testdata/invalid_execution_spec.yaml new file mode 100644 index 0000000000..556bb512c7 --- /dev/null +++ b/flytectl/cmd/testdata/invalid_execution_spec.yaml @@ -0,0 +1,12 @@ +iamRoleARN: "" +inputs: + numbers: + - 0 + numbers_count: 0 + run_local_at_count: 10 +kubeServiceAcct: "" +targetDomain: "" +targetProject: "" +version: v3 +workflow: core.advanced.run_merge_sort.merge_sort +task: core.advanced.run_merge_sort.merge diff --git a/flytectl/cmd/testdata/task_execution_spec.yaml b/flytectl/cmd/testdata/task_execution_spec.yaml index aba4e46d6d..aa33cdb355 100644 --- a/flytectl/cmd/testdata/task_execution_spec.yaml +++ b/flytectl/cmd/testdata/task_execution_spec.yaml @@ -1,4 +1,4 @@ -iamRoleARN: "" +iamRoleARN: "iamRoleARN" inputs: sorted_list1: - 0 @@ -8,7 +8,7 @@ inputs: - 1 - 3 - 5 -kubeServiceAcct: "" +kubeServiceAcct: "kubeServiceAcct" targetDomain: "development" targetProject: "flytesnacks" task: core.advanced.run_merge_sort.merge diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 01b7f0e2b1..5487019357 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -70,6 +70,12 @@ The root project and domain flags of -p and -d should point to task/launch plans flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks +Also an execution can be relaunched by passing in current execution id. + +:: + + flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development + Usage @@ -86,6 +92,7 @@ Options -h, --help help for execution --iamRoleARN string iam role ARN AuthRole for launching execution. --kubeServiceAcct string kubernetes service account AuthRole for launching execution. + --relaunch string execution id to be relaunched. --targetDomain string project where execution needs to be created.If not specified configured domain would be used. --targetProject string project where execution needs to be created.If not specified configured project would be used. From cf3ffa193209ab798f671a2c19ac2be5de9211b7 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Tue, 27 Apr 2021 16:20:56 +0530 Subject: [PATCH 040/356] Added update for named entity (#54) * Added update for named entity Signed-off-by: Prafulla Mahindrakar * Added docs Signed-off-by: Prafulla Mahindrakar * Incorporated the feedback Signed-off-by: Prafulla Mahindrakar * Fixed unit test Signed-off-by: Prafulla Mahindrakar * Removed unarchive comment on activate Signed-off-by: Prafulla Mahindrakar --- flytectl/Makefile | 3 + flytectl/clierrors/errors.go | 17 ++ flytectl/cmd/create/executionconfig_flags.go | 1 - .../cmd/update/interfaces/mocks/updater.go | 50 ++++++ flytectl/cmd/update/interfaces/updater.go | 14 ++ flytectl/cmd/update/launch_plan.go | 49 +++++ flytectl/cmd/update/launch_plan_test.go | 44 +++++ flytectl/cmd/update/named_entity.go | 50 ++++++ flytectl/cmd/update/named_entity_test.go | 48 +++++ .../cmd/update/namedentityconfig_flags.go | 48 +++++ .../update/namedentityconfig_flags_test.go | 168 ++++++++++++++++++ flytectl/cmd/update/project.go | 17 +- flytectl/cmd/update/project_test.go | 6 +- flytectl/cmd/update/task.go | 49 +++++ flytectl/cmd/update/task_test.go | 44 +++++ flytectl/cmd/update/update.go | 20 ++- flytectl/cmd/update/update_test.go | 16 +- flytectl/cmd/update/workflow.go | 49 +++++ flytectl/cmd/update/workflow_test.go | 44 +++++ flytectl/docs/source/gen/flytectl_update.rst | 3 + .../source/gen/flytectl_update_launchplan.rst | 94 ++++++++++ .../docs/source/gen/flytectl_update_task.rst | 94 ++++++++++ .../source/gen/flytectl_update_workflow.rst | 94 ++++++++++ 23 files changed, 994 insertions(+), 28 deletions(-) create mode 100644 flytectl/clierrors/errors.go create mode 100644 flytectl/cmd/update/interfaces/mocks/updater.go create mode 100644 flytectl/cmd/update/interfaces/updater.go create mode 100644 flytectl/cmd/update/launch_plan.go create mode 100644 flytectl/cmd/update/launch_plan_test.go create mode 100644 flytectl/cmd/update/named_entity.go create mode 100644 flytectl/cmd/update/named_entity_test.go create mode 100755 flytectl/cmd/update/namedentityconfig_flags.go create mode 100755 flytectl/cmd/update/namedentityconfig_flags_test.go create mode 100644 flytectl/cmd/update/task.go create mode 100644 flytectl/cmd/update/task_test.go create mode 100644 flytectl/cmd/update/workflow.go create mode 100644 flytectl/cmd/update/workflow_test.go create mode 100644 flytectl/docs/source/gen/flytectl_update_launchplan.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_task.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_workflow.rst diff --git a/flytectl/Makefile b/flytectl/Makefile index 8104b44ca9..118f40cf06 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -20,6 +20,9 @@ generate: compile: go build -o bin/flytectl -ldflags=$(LD_FLAGS) main.go +compile_debug: + go build -gcflags='all=-N -l' -o bin/flytectl main.go + .PHONY: update_boilerplate update_boilerplate: @boilerplate/update.sh diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go new file mode 100644 index 0000000000..a93f3c7a19 --- /dev/null +++ b/flytectl/clierrors/errors.go @@ -0,0 +1,17 @@ +package clierrors + +var ( + ErrInvalidStateUpdate = "Invalid state passed. Specify either activate or archive\n" + + ErrProjectNotPassed = "Project not passed\n" + ErrFailedProjectUpdate = "Project %v failed to get updated to %v state due to %v\n" + + ErrLPNotPassed = "Launch plan name not passed\n" + ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" + + ErrWorkflowNotPassed = "Workflow name not passed\n" + ErrFailedWorkflowUpdate = "Workflow %v failed to get updated to due to %v\n" + + ErrTaskNotPassed = "Task name not passed\n" // #nosec + ErrFailedTaskUpdate = "Task %v failed to get updated to due to %v\n" +) diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 59dc9adf41..974c284b0b 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -47,6 +47,5 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&(executionConfig.KubeServiceAcct), fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") cmdFlags.StringVar(&(executionConfig.IamRoleARN), fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") cmdFlags.StringVar(&(executionConfig.Relaunch), fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") - return cmdFlags } diff --git a/flytectl/cmd/update/interfaces/mocks/updater.go b/flytectl/cmd/update/interfaces/mocks/updater.go new file mode 100644 index 0000000000..30935bb156 --- /dev/null +++ b/flytectl/cmd/update/interfaces/mocks/updater.go @@ -0,0 +1,50 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + cmdcore "github.com/flyteorg/flytectl/cmd/core" + + core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + mock "github.com/stretchr/testify/mock" +) + +// Updater is an autogenerated mock type for the Updater type +type Updater struct { + mock.Mock +} + +type Updater_UpdateNamedEntity struct { + *mock.Call +} + +func (_m Updater_UpdateNamedEntity) Return(_a0 error) *Updater_UpdateNamedEntity { + return &Updater_UpdateNamedEntity{Call: _m.Call.Return(_a0)} +} + +func (_m *Updater) OnUpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdcore.CommandContext) *Updater_UpdateNamedEntity { + c := _m.On("UpdateNamedEntity", ctx, name, project, domain, rsType, cmdCtx) + return &Updater_UpdateNamedEntity{Call: c} +} + +func (_m *Updater) OnUpdateNamedEntityMatch(matchers ...interface{}) *Updater_UpdateNamedEntity { + c := _m.On("UpdateNamedEntity", matchers...) + return &Updater_UpdateNamedEntity{Call: c} +} + +// UpdateNamedEntity provides a mock function with given fields: ctx, name, project, domain, rsType, cmdCtx +func (_m *Updater) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdcore.CommandContext) error { + ret := _m.Called(ctx, name, project, domain, rsType, cmdCtx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, core.ResourceType, cmdcore.CommandContext) error); ok { + r0 = rf(ctx, name, project, domain, rsType, cmdCtx) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytectl/cmd/update/interfaces/updater.go b/flytectl/cmd/update/interfaces/updater.go new file mode 100644 index 0000000000..3ea18f678a --- /dev/null +++ b/flytectl/cmd/update/interfaces/updater.go @@ -0,0 +1,14 @@ +package interfaces + +import ( + "context" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +//go:generate mockery -name=Updater -case=underscore + +type Updater interface { + UpdateNamedEntity(ctx context.Context, name, project, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error +} diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go new file mode 100644 index 0000000000..1f32a2cb04 --- /dev/null +++ b/flytectl/cmd/update/launch_plan.go @@ -0,0 +1,49 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +const ( + updateLPShort = "Updates launch plan metadata" + updateLPLong = ` +Following command updates the description on the launchplan. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + +Archiving launchplan named entity is not supported and would throw an error. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating launchplan named entity would be a noop. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage +` +) + +func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrLPNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil +} diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go new file mode 100644 index 0000000000..aa8f8601de --- /dev/null +++ b/flytectl/cmd/update/launch_plan_test.go @@ -0,0 +1,44 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func UpdateLPSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestLPUpdate(t *testing.T) { + testutils.Setup() + UpdateLPSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"task1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, updateLPFunc(ctx, args, cmdCtx)) +} + +func TestLPUpdateFail(t *testing.T) { + testutils.Setup() + UpdateLPSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"task1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} + +func TestLPUpdateInvalidArgs(t *testing.T) { + testutils.Setup() + UpdateLPSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{} + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go new file mode 100644 index 0000000000..5c3391d708 --- /dev/null +++ b/flytectl/cmd/update/named_entity.go @@ -0,0 +1,50 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +//go:generate pflags NamedEntityConfig --default-var namedEntityConfig + +var ( + namedEntityConfig = &NamedEntityConfig{} +) + +type NamedEntityConfig struct { + Archive bool `json:"archive" pflag:",archive named entity."` + Activate bool `json:"activate" pflag:",activate the named entity."` + Description string `json:"description" pflag:",description of the named entity."` +} + +func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error { + archiveProject := n.Archive + activateProject := n.Activate + if activateProject == archiveProject && activateProject { + return fmt.Errorf(clierrors.ErrInvalidStateUpdate) + } + var nameEntityState admin.NamedEntityState + if activateProject { + nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + } else if archiveProject { + nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + } + _, err := cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ + ResourceType: rsType, + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + Metadata: &admin.NamedEntityMetadata{ + Description: n.Description, + State: nameEntityState, + }, + }) + return err +} diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go new file mode 100644 index 0000000000..9c322f1840 --- /dev/null +++ b/flytectl/cmd/update/named_entity_test.go @@ -0,0 +1,48 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/mock" + + "github.com/stretchr/testify/assert" +) + +func NamedEntitySetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestNamedEntity(t *testing.T) { + testutils.Setup() + NamedEntitySetup() + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + namedEntityConfig = &NamedEntityConfig{Archive: false, Activate: true, Description: "named entity description"} + assert.Nil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, cmdCtx)) + namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: false, Description: "named entity description"} + assert.Nil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, cmdCtx)) +} + +func TestNamedEntityValidationFailure(t *testing.T) { + testutils.Setup() + NamedEntitySetup() + namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} + assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, cmdCtx)) +} + +func TestNamedEntityFailure(t *testing.T) { + testutils.Setup() + NamedEntitySetup() + namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, cmdCtx)) +} diff --git a/flytectl/cmd/update/namedentityconfig_flags.go b/flytectl/cmd/update/namedentityconfig_flags.go new file mode 100755 index 0000000000..3d61711bec --- /dev/null +++ b/flytectl/cmd/update/namedentityconfig_flags.go @@ -0,0 +1,48 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package update + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (NamedEntityConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (NamedEntityConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in NamedEntityConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (n NamedEntityConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("NamedEntityConfig", pflag.ExitOnError) + cmdFlags.BoolVar(&(namedEntityConfig.Activate), fmt.Sprintf("%v%v", prefix, "activate"), *new(bool), "Activates the named entity specified as argument.") + cmdFlags.BoolVar(&(namedEntityConfig.Archive), fmt.Sprintf("%v%v", prefix, "archive"), *new(bool), "Archives the named entity specified as argument.") + cmdFlags.StringVar(&(namedEntityConfig.Description), fmt.Sprintf("%v%v", prefix, "description"), namedEntityConfig.Description, "description of the namedentity.") + return cmdFlags +} diff --git a/flytectl/cmd/update/namedentityconfig_flags_test.go b/flytectl/cmd/update/namedentityconfig_flags_test.go new file mode 100755 index 0000000000..1f9506481b --- /dev/null +++ b/flytectl/cmd/update/namedentityconfig_flags_test.go @@ -0,0 +1,168 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package update + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsNamedEntityConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementNamedEntityConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsNamedEntityConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookNamedEntityConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementNamedEntityConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_NamedEntityConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookNamedEntityConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_NamedEntityConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_NamedEntityConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_NamedEntityConfig(val, result)) +} + +func testDecodeSlice_NamedEntityConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_NamedEntityConfig(vStringSlice, result)) +} + +func TestNamedEntityConfig_GetPFlagSet(t *testing.T) { + val := NamedEntityConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestNamedEntityConfig_SetFlags(t *testing.T) { + actual := NamedEntityConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_archive", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + assert.Equal(t, bool(namedEntityConfig.Archive), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_NamedEntityConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_activate", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + assert.Equal(t, bool(namedEntityConfig.Activate), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_NamedEntityConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_description", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("description"); err == nil { + assert.Equal(t, string(namedEntityConfig.Description), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("description", testValue) + if vString, err := cmdFlags.GetString("description"); err == nil { + testDecodeJson_NamedEntityConfig(t, fmt.Sprintf("%v", vString), &actual.Description) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 5865c7e6af..0a1f5415d7 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -65,23 +67,18 @@ Usage ` ) -var ( - projectConfig = &ProjectConfig{} - errProjectNotFound = "Project %v not found\n" - errInvalidUpdate = "Invalid state passed. Specify either activate or archive\n" - errFailedUpdate = "Project %v failed to get updated to %v state due to %v\n" -) +var projectConfig = &ProjectConfig{} func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { id := config.GetConfig().Project if id == "" { - fmt.Printf(errProjectNotFound, id) + fmt.Printf(clierrors.ErrProjectNotPassed) return nil } archiveProject := projectConfig.ArchiveProject activateProject := projectConfig.ActivateProject if activateProject == archiveProject { - return fmt.Errorf(errInvalidUpdate) + return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } projectState := admin.Project_ACTIVE if archiveProject { @@ -92,8 +89,8 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma State: projectState, }) if err != nil { - fmt.Printf(errFailedUpdate, id, projectState, err) - return nil + fmt.Printf(clierrors.ErrFailedProjectUpdate, id, projectState, err) + return err } fmt.Printf("Project %v updated to %v state\n", id, projectState) return nil diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 6b0491a375..a3e7d9e2e5 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -84,7 +84,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err := updateProjectsFunc(ctx, args, cmdCtx) - assert.Nil(t, err) + assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -112,13 +112,13 @@ func TestArchiveProjectFuncWithError(t *testing.T) { } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err := updateProjectsFunc(ctx, args, cmdCtx) - assert.Nil(t, err) + assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } func TestEmptyProjectInput(t *testing.T) { setup() - defer teardownAndVerify(t, "Project not found\n") + defer teardownAndVerify(t, "Project not passed\n") config.GetConfig().Project = "" modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) diff --git a/flytectl/cmd/update/task.go b/flytectl/cmd/update/task.go new file mode 100644 index 0000000000..e38cdff16b --- /dev/null +++ b/flytectl/cmd/update/task.go @@ -0,0 +1,49 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +const ( + updateTaskShort = "Updates task metadata" + updateTaskLong = ` +Following command updates the description on the task. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" + +Archiving task named entity is not supported and would throw an error. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive + +Activating task named entity would be a noop as archiving is not possible. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate + +Usage +` +) + +func updateTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrTaskNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_TASK, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedTaskUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil +} diff --git a/flytectl/cmd/update/task_test.go b/flytectl/cmd/update/task_test.go new file mode 100644 index 0000000000..250f7f9fde --- /dev/null +++ b/flytectl/cmd/update/task_test.go @@ -0,0 +1,44 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func UpdateTaskSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestTaskUpdate(t *testing.T) { + testutils.Setup() + UpdateTaskSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"task1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, updateTaskFunc(ctx, args, cmdCtx)) +} + +func TestTaskUpdateFail(t *testing.T) { + testutils.Setup() + UpdateWorkflowSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"workflow1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} + +func TestTaskUpdateInvalidArgs(t *testing.T) { + testutils.Setup() + UpdateWorkflowSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{} + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 33526e6dcd..3f801ce08f 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -1,8 +1,7 @@ package update import ( - cmdcore "github.com/flyteorg/flytectl/cmd/core" - + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -27,13 +26,16 @@ func CreateUpdateCommand() *cobra.Command { Short: updateShort, Long: updatecmdLong, } - - updateResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: updateProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, - Short: projectShort, - Long: projectLong}, + updateResourcesFuncs := map[string]cmdCore.CommandEntry{ + "launchplan": {CmdFunc: updateLPFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + Short: updateLPShort, Long: updateLPLong}, + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, + Short: projectShort, Long: projectLong}, + "task": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + Short: updateTaskShort, Long: updateTaskLong}, + "workflow": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + Short: updateWorkflowShort, Long: updateWorkflowLong}, } - - cmdcore.AddCommands(updateCmd, updateResourcesFuncs) + cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd } diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index c54701f40a..9a610f9f5d 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -12,14 +12,20 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 1) + assert.Equal(t, len(updateCommand.Commands()), 4) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "project") - assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[0].Short, projectShort) - assert.Equal(t, cmdNouns[0].Long, projectLong) + useArray := []string{"launchplan", "project", "task", "workflow"} + aliases := [][]string{{}, {}, {}, {}} + shortArray := []string{updateLPShort, projectShort, updateTaskShort, updateWorkflowShort} + longArray := []string{updateLPLong, projectLong, updateTaskLong, updateWorkflowLong} + for i := range cmdNouns { + assert.Equal(t, cmdNouns[i].Use, useArray[i]) + assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) + assert.Equal(t, cmdNouns[i].Short, shortArray[i]) + assert.Equal(t, cmdNouns[i].Long, longArray[i]) + } } diff --git a/flytectl/cmd/update/workflow.go b/flytectl/cmd/update/workflow.go new file mode 100644 index 0000000000..9e67796208 --- /dev/null +++ b/flytectl/cmd/update/workflow.go @@ -0,0 +1,49 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +const ( + updateWorkflowShort = "Updates workflow metadata" + updateWorkflowLong = ` +Following command updates the description on the workflow. +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" + +Archiving workflow named entity would cause this to disapper from flyteconsole UI. +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating workflow named entity +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage +` +) + +func updateWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrWorkflowNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_WORKFLOW, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedWorkflowUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil +} diff --git a/flytectl/cmd/update/workflow_test.go b/flytectl/cmd/update/workflow_test.go new file mode 100644 index 0000000000..d6b5ba06ad --- /dev/null +++ b/flytectl/cmd/update/workflow_test.go @@ -0,0 +1,44 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func UpdateWorkflowSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestWorkflowUpdate(t *testing.T) { + testutils.Setup() + UpdateWorkflowSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"workflow1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, updateWorkflowFunc(ctx, args, cmdCtx)) +} + +func TestWorkflowUpdateFail(t *testing.T) { + testutils.Setup() + UpdateWorkflowSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"workflow1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateWorkflowFunc(ctx, args, cmdCtx)) +} + +func TestWorkflowUpdateInvalidArgs(t *testing.T) { + testutils.Setup() + UpdateWorkflowSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{} + assert.NotNil(t, updateWorkflowFunc(ctx, args, cmdCtx)) +} diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 0424744484..e3e03e6496 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -73,5 +73,8 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources +* :doc:`flytectl_update_task` - Updates task metadata +* :doc:`flytectl_update_workflow` - Updates launch plan metadata diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst new file mode 100644 index 0000000000..a110317ff2 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -0,0 +1,94 @@ +.. _flytectl_update_launchplan: + +flytectl update launchplan +-------------------------- + +Updates launch plan metadata + +Synopsis +~~~~~~~~ + + + +Updates launchplan metadata. +Following command updates the description on the launchplan. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + +Archiving launchplan named entity is not supported and would throw an error. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating launchplan named entity would be a noop. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage + + +:: + + flytectl update launchplan [flags] + +Options +~~~~~~~ + +:: + + --activate Activates the named entity specified as argument. + --archive Archives the named entity specified as argument. + --description string description of the namedentity. + -h, --help help for launchplan + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst new file mode 100644 index 0000000000..358537b9c3 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -0,0 +1,94 @@ +.. _flytectl_update_task: + +flytectl update task +-------------------- + +Updates task metadata + +Synopsis +~~~~~~~~ + + + +Updates task metadata. +Following command updates the description on the task. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" + +Archiving task named entity would is not supported and would throw an error. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive + +Activating workflow named entity would be a noop as archiving is not possible. +:: + + flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate + +Usage + + +:: + + flytectl update task [flags] + +Options +~~~~~~~ + +:: + + --activate Activates the named entity specified as argument. + --archive Archives the named entity specified as argument. + --description string description of the namedentity. + -h, --help help for task + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst new file mode 100644 index 0000000000..2cdd0c21ea --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -0,0 +1,94 @@ +.. _flytectl_update_workflow: + +flytectl update workflow +------------------------ + +Updates launch plan metadata + +Synopsis +~~~~~~~~ + + + +Updates workflow metadata. +Following command updates the description on the workflow. +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" + +Archiving workflow named entity would cause this to disapper from flyteconsole UI. +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating workflow named entity would unarchive it. +:: + + flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage + + +:: + + flytectl update workflow [flags] + +Options +~~~~~~~ + +:: + + --activate Activates the named entity specified as argument. + --archive Archives the named entity specified as argument. + --description string description of the namedentity. + -h, --help help for workflow + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + From 65580deaf0b23c7fe37a65835d8d7fb09950b53d Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 29 Apr 2021 02:05:23 +0530 Subject: [PATCH 041/356] Updated Boilerplate Code (#57) Signed-off-by: Samhita Alla --- flytectl/.github/config.yml | 15 +++++++++++ flytectl/boilerplate/flyte/Readme.rst | 8 ++++++ flytectl/boilerplate/flyte/config.yml | 15 +++++++++++ flytectl/boilerplate/flyte/update.sh | 14 ++++++++++ flytectl/boilerplate/update.cfg | 2 ++ flytectl/boilerplate/update.sh | 37 +++++++++++++++++++++------ 6 files changed, 83 insertions(+), 8 deletions(-) create mode 100644 flytectl/.github/config.yml create mode 100644 flytectl/boilerplate/flyte/Readme.rst create mode 100644 flytectl/boilerplate/flyte/config.yml create mode 100755 flytectl/boilerplate/flyte/update.sh diff --git a/flytectl/.github/config.yml b/flytectl/.github/config.yml new file mode 100644 index 0000000000..f99bcd78f1 --- /dev/null +++ b/flytectl/.github/config.yml @@ -0,0 +1,15 @@ +# Comment to be posted on PRs from first-time contributors in your repository +newPRWelcomeComment: > + Thank you for opening this pull request! 🙌 + + These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. + - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉 + +# Comment to be posted on first-time issues +newIssueWelcomeComment: > + Thank you for opening your first issue here! 🛠 diff --git a/flytectl/boilerplate/flyte/Readme.rst b/flytectl/boilerplate/flyte/Readme.rst new file mode 100644 index 0000000000..ea18781185 --- /dev/null +++ b/flytectl/boilerplate/flyte/Readme.rst @@ -0,0 +1,8 @@ +Config File -- Welcome Bot +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Provides a ``config.yml`` file. + +**To Enable:** + +Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. \ No newline at end of file diff --git a/flytectl/boilerplate/flyte/config.yml b/flytectl/boilerplate/flyte/config.yml new file mode 100644 index 0000000000..f99bcd78f1 --- /dev/null +++ b/flytectl/boilerplate/flyte/config.yml @@ -0,0 +1,15 @@ +# Comment to be posted on PRs from first-time contributors in your repository +newPRWelcomeComment: > + Thank you for opening this pull request! 🙌 + + These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. + - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! 🎉 + +# Comment to be posted on first-time issues +newIssueWelcomeComment: > + Thank you for opening your first issue here! 🛠 diff --git a/flytectl/boilerplate/flyte/update.sh b/flytectl/boilerplate/flyte/update.sh new file mode 100755 index 0000000000..506c3221b7 --- /dev/null +++ b/flytectl/boilerplate/flyte/update.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +# Clone the config.yml file +echo " - copying ${DIR}/config.yml to the root directory." +cp ${DIR}/config.yml ${DIR}/../../.github/config.yml diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg index a1b1bff989..468bf2cb80 100644 --- a/flytectl/boilerplate/update.cfg +++ b/flytectl/boilerplate/update.cfg @@ -2,3 +2,5 @@ lyft/golang_test_targets lyft/golangci_file lyft/golang_support_tools lyft/pull_request_template +flyte/ + diff --git a/flytectl/boilerplate/update.sh b/flytectl/boilerplate/update.sh index a8c05705e3..374e4b930e 100755 --- a/flytectl/boilerplate/update.sh +++ b/flytectl/boilerplate/update.sh @@ -10,7 +10,9 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -git clone git@github.com:lyft/boilerplate.git "${OUT}" +trap "rm -fr $OUT" EXIT + +git clone git@github.com:flyteorg/boilerplate.git "${OUT}" echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" @@ -18,7 +20,7 @@ echo "" CONFIG_FILE="${DIR}/update.cfg" -README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" +README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" if [ ! -f "$CONFIG_FILE" ]; then echo "$CONFIG_FILE not found." @@ -33,13 +35,34 @@ if [ -z "$REPOSITORY" ]; then exit 1 fi -while read directory; do - # TODO: Skip empty lines, whitespace only lines, and comment lines +while read directory junk; do + # Skip comment lines (which can have leading whitespace) + if [[ "$directory" == '#'* ]]; then + continue + fi + # Skip blank or whitespace-only lines + if [[ "$directory" == "" ]]; then + continue + fi + # Lines like + # valid/path other_junk + # are not acceptable, unless `other_junk` is a comment + if [[ "$junk" != "" ]] && [[ "$junk" != '#'* ]]; then + echo "Invalid config! Only one directory is allowed per line. Found '$junk'" + exit 1 + fi + + dir_path="${OUT}/boilerplate/${directory}" + # Make sure the directory exists + if ! [[ -d "$dir_path" ]]; then + echo "Invalid boilerplate directory: '$directory'" + exit 1 + fi + echo "***********************************************************************************" echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." - dir_path="${OUT}/boilerplate/${directory}" rm -rf "${DIR}/${directory}" mkdir -p $(dirname "${DIR}/${directory}") cp -r "$dir_path" "${DIR}/${directory}" @@ -49,6 +72,4 @@ while read directory; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" - -rm -rf "${OUT}" +done < "$CONFIG_FILE" \ No newline at end of file From 6114a7cd66c9107182987f207844e974b4fea4c0 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Fri, 30 Apr 2021 17:00:55 -0400 Subject: [PATCH 042/356] update docs based on revamp RFC (#60) * update docs based on revamp RFC - udpate main nav items - update toc - use furo fork Signed-off-by: cosmicBboy * remove custom.css Signed-off-by: cosmicBboy --- flytectl/doc-requirements.in | 2 +- flytectl/doc-requirements.txt | 6 +- flytectl/docs/source/_static/custom.css | 91 ------------------- flytectl/docs/source/conf.py | 3 - flytectl/docs/source/gen/flytectl_update.rst | 2 +- .../source/gen/flytectl_update_launchplan.rst | 1 - .../source/gen/flytectl_update_project.rst | 2 +- .../docs/source/gen/flytectl_update_task.rst | 5 +- .../source/gen/flytectl_update_workflow.rst | 5 +- flytectl/docs/source/index.rst | 47 ++-------- flytectl/docs/source/nouns.rst | 19 ++++ flytectl/docs/source/reference/index.rst | 24 ----- flytectl/docs/source/verbs.rst | 14 +++ 13 files changed, 51 insertions(+), 170 deletions(-) delete mode 100644 flytectl/docs/source/_static/custom.css create mode 100644 flytectl/docs/source/nouns.rst delete mode 100644 flytectl/docs/source/reference/index.rst create mode 100644 flytectl/docs/source/verbs.rst diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 8a0e088122..3cf9da6f2f 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -1,4 +1,4 @@ -furo +git+git://github.com/flyteorg/furo@main readthedocs-sphinx-search sphinx sphinx-prompt diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index d01f9385bf..8df6e8b686 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -6,7 +6,7 @@ # alabaster==0.7.12 # via sphinx -babel==2.9.0 +babel==2.9.1 # via sphinx beautifulsoup4==4.9.3 # via @@ -21,7 +21,7 @@ css-html-js-minify==2.5.5 # via sphinx-material docutils==0.16 # via sphinx -furo==2021.3.20b30 +git+git://github.com/flyteorg/furo@main # via -r doc-requirements.in idna==2.10 # via requests @@ -63,7 +63,7 @@ sphinx-material==0.0.32 # via -r doc-requirements.in sphinx-prompt==1.4.0 # via -r doc-requirements.in -sphinx==3.5.3 +sphinx==3.5.4 # via # -r doc-requirements.in # furo diff --git a/flytectl/docs/source/_static/custom.css b/flytectl/docs/source/_static/custom.css deleted file mode 100644 index d9851b7d8f..0000000000 --- a/flytectl/docs/source/_static/custom.css +++ /dev/null @@ -1,91 +0,0 @@ -h1, h2, h3, h4, h5, h6 { - font-weight: bold; -} - -.sidebar-logo { - max-width: 30%; -} - - -.sidebar-tree .reference.external:after { - content: none; -} - -.sphx-glr-thumbcontainer { - background-color: transparent; - border: transparent; -} - -.sphx-glr-thumbcontainer:hover { - border: transparent; -} - -div.sphx-glr-download a { - color:white; - background-color: #9d68e4cf; - background-image: none; - border: 1px solid #9d68e4cf; -} - -div.sphx-glr-download a:hover { - background-color: #8b48e2cf; - box-shadow: none; -} - -div.sphx-glr-thumbcontainer a.headerlink { - display: none; -} - -div.sphx-glr-thumbcontainer:hover { - border-color: white; - box-shadow: none; -} - -.sphx-glr-script-out .highlight pre { - background-color: #f8f8f8; -} - -p.sphx-glr-script-out { - padding-top: 0em; -} - -.search__outer::-webkit-scrollbar-track { - border-radius: 0px; -} - -@media (prefers-color-scheme: dark) { - .search__outer { - background-color: #131416 !important; - border: 1px solid #131416 !important; - } - .search__outer__input { - background-color: #1a1c1e !important; - } - .search__result__single { - border-bottom: #303335 !important; - } - .outer_div_page_results:hover { - background-color: black; - } - .search__result__title, .rtd_ui_search_subtitle { - color: #9D68E4 !important; - border-bottom: 1px solid #9D68E4 !important; - } - .search__outer .search__result__title span, .search__outer .search__result__content span { - background-color: #9d68e454; - } - .search__result__subheading, .search__result__content { - color: #ffffffd9 !important; - } - .search__outer::-webkit-scrollbar-track { - background-color: #131416 !important; - } - .rtd__search__credits { - background-color: #1a1c1e !important; - border: 1px solid #1a1c1e !important; - color: #81868d !important; - } - .rtd__search__credits a, .search__error__box { - color: #9ca0a5 !important; - } - } diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 51ec8df120..9874c85aa7 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -115,9 +115,6 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_css_files = [ - "custom.css", -] # Custom sidebar templates, must be a dictionary that maps document names # to template names. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index e3e03e6496..7db54b49a6 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -76,5 +76,5 @@ SEE ALSO * :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata -* :doc:`flytectl_update_workflow` - Updates launch plan metadata +* :doc:`flytectl_update_workflow` - Updates workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index a110317ff2..49bf4bffa9 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -10,7 +10,6 @@ Synopsis -Updates launchplan metadata. Following command updates the description on the launchplan. :: diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index d3b2d44096..4a6e7bee48 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -10,7 +10,7 @@ Synopsis -Updates the project according the flags passed.Allows you to archive or activate a project. +Updates the project according the flags passed. Allows you to archive or activate a project. Activates project named flytesnacks. :: diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index 358537b9c3..5a81366eb8 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -10,18 +10,17 @@ Synopsis -Updates task metadata. Following command updates the description on the task. :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" -Archiving task named entity would is not supported and would throw an error. +Archiving task named entity is not supported and would throw an error. :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive -Activating workflow named entity would be a noop as archiving is not possible. +Activating task named entity would be a noop as archiving is not possible. :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 2cdd0c21ea..553446ca27 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -3,14 +3,13 @@ flytectl update workflow ------------------------ -Updates launch plan metadata +Updates workflow metadata Synopsis ~~~~~~~~ -Updates workflow metadata. Following command updates the description on the workflow. :: @@ -21,7 +20,7 @@ Archiving workflow named entity would cause this to disapper from flyteconsole U flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive -Activating workflow named entity would unarchive it. +Activating workflow named entity :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 0f381d5e59..44d061489d 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -41,49 +41,18 @@ Basic Configuration :hidden: Getting Started - Tutorials - reference/index + User Guide + Tutorials + Concepts + API Reference Community .. toctree:: - :maxdepth: 1 + :maxdepth: -1 :caption: Flytectl :hidden: Install and Configure - -.. toctree:: - :maxdepth: 1 - :caption: Verbs - :hidden: - - gen/flytectl_create - gen/flytectl_get - gen/flytectl_update - gen/flytectl_delete - gen/flytectl_register - gen/flytectl_config - -.. toctree:: - :maxdepth: 1 - :caption: Nouns - :hidden: - - gen/flytectl_create_project - gen/flytectl_create_execution - gen/flytectl_get_execution - gen/flytectl_get_project - gen/flytectl_get_workflow - gen/flytectl_get_task - gen/flytectl_get_launchplan - gen/flytectl_update_project - gen/flytectl_register_files - gen/flytectl_version - gen/flytectl_config_validate - -.. toctree:: - :maxdepth: 2 - :caption: Contribute - :hidden: - - contribute + verbs + nouns + Contribute diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst new file mode 100644 index 0000000000..78996e38ce --- /dev/null +++ b/flytectl/docs/source/nouns.rst @@ -0,0 +1,19 @@ +Nouns +------ + +.. toctree:: + :maxdepth: 1 + :caption: Nouns + :hidden: + + gen/flytectl_create_project + gen/flytectl_create_execution + gen/flytectl_get_execution + gen/flytectl_get_project + gen/flytectl_get_workflow + gen/flytectl_get_task + gen/flytectl_get_launchplan + gen/flytectl_update_project + gen/flytectl_register_files + gen/flytectl_version + gen/flytectl_config_validate diff --git a/flytectl/docs/source/reference/index.rst b/flytectl/docs/source/reference/index.rst deleted file mode 100644 index 6b6ff34c49..0000000000 --- a/flytectl/docs/source/reference/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -############# -API Reference -############# - -.. toctree:: - :maxdepth: 1 - :caption: API Reference - :name: apitoc - - Flytekit Python - Flytekit Java - FlyteIDL - Flytectl - -.. toctree:: - :maxdepth: 1 - :caption: Component Reference (Code docs) - :name: componentreftoc - - FlytePropeller - FlyteAdmin - FlytePlugins - DataCatalog - \ No newline at end of file diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst new file mode 100644 index 0000000000..49f90367b0 --- /dev/null +++ b/flytectl/docs/source/verbs.rst @@ -0,0 +1,14 @@ +Verbs +------ + +.. toctree:: + :maxdepth: 1 + :caption: Verbs + :hidden: + + gen/flytectl_create + gen/flytectl_get + gen/flytectl_update + gen/flytectl_delete + gen/flytectl_register + gen/flytectl_config \ No newline at end of file From 73e4aa37555c6cfca4119b032cebebbd17e691ce Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Sat, 1 May 2021 03:08:40 +0530 Subject: [PATCH 043/356] Added HOMEDIR/.flyte to search path for config.yaml (#59) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/root.go | 10 ++++- flytectl/docs/source/index.rst | 6 +++ .../pkg/filesystemutils/file_system_utils.go | 22 ++++++++++ .../flile_system_utils_test.go | 42 +++++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 flytectl/pkg/filesystemutils/file_system_utils.go create mode 100644 flytectl/pkg/filesystemutils/flile_system_utils_test.go diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 8ad0fef299..56a371a75a 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -12,6 +12,7 @@ import ( "github.com/flyteorg/flytectl/cmd/register" "github.com/flyteorg/flytectl/cmd/update" "github.com/flyteorg/flytectl/cmd/version" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/config/viper" @@ -26,6 +27,11 @@ var ( configAccessor = viper.NewAccessor(stdConfig.Options{StrictMode: true}) ) +const ( + configFileDir = ".flyte" + configFileName = "config.yaml" +) + func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, @@ -36,7 +42,7 @@ func newRootCmd() *cobra.Command { } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", - "config file (default is $HOME/config.yaml)") + "config file (default is $HOME/.flyte/config.yaml)") configAccessor.InitializePflags(rootCmd.PersistentFlags()) @@ -63,7 +69,7 @@ func newRootCmd() *cobra.Command { func initConfig(_ *cobra.Command, _ []string) error { configAccessor = viper.NewAccessor(stdConfig.Options{ StrictMode: true, - SearchPaths: []string{cfgFile}, + SearchPaths: []string{cfgFile, f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName)}, }) err := configAccessor.UpdateConfig(context.TODO()) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 44d061489d..a3a3d61cc1 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -19,6 +19,12 @@ Configure ========= Flytectl allows configuring using a YAML file or pass every configuration value on command-line. The follow configuration is useful to setup. +Place this in $HOME/.flyte directory with name config.yaml. +This file is searched in +1] $HOME/.flyte +2] currDir from where you run flytectl +3] /etc/flyte/config +4] You can pass it commandline using --config Basic Configuration -------------------- diff --git a/flytectl/pkg/filesystemutils/file_system_utils.go b/flytectl/pkg/filesystemutils/file_system_utils.go new file mode 100644 index 0000000000..2f0b756c90 --- /dev/null +++ b/flytectl/pkg/filesystemutils/file_system_utils.go @@ -0,0 +1,22 @@ +package filesystemutils + +import ( + "os" + "path/filepath" +) + +var osUserHomDirFunc = os.UserHomeDir +var filePathJoinFunc = filepath.Join + +// UserHomeDir Returns the users home directory or on error returns the current dir +func UserHomeDir() string { + if homeDir, err := osUserHomDirFunc(); err == nil { + return homeDir + } + return "." +} + +// FilePathJoin Returns the file path obtained by joining various path elements. +func FilePathJoin(elems ...string) string { + return filePathJoinFunc(elems...) +} diff --git a/flytectl/pkg/filesystemutils/flile_system_utils_test.go b/flytectl/pkg/filesystemutils/flile_system_utils_test.go new file mode 100644 index 0000000000..9698d1709d --- /dev/null +++ b/flytectl/pkg/filesystemutils/flile_system_utils_test.go @@ -0,0 +1,42 @@ +package filesystemutils + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +var ( + homeDirVal = "/home/user" + homeDirErr error +) + +func FakeUserHomeDir() (string, error) { + return homeDirVal, homeDirErr +} + +func TestUserHomeDir(t *testing.T) { + t.Run("User home dir", func(t *testing.T) { + osUserHomDirFunc = FakeUserHomeDir + homeDir := UserHomeDir() + assert.Equal(t, homeDirVal, homeDir) + }) + t.Run("User home dir fail", func(t *testing.T) { + homeDirErr = fmt.Errorf("failed to get users home directory") + homeDirVal = "." + osUserHomDirFunc = FakeUserHomeDir + homeDir := UserHomeDir() + assert.Equal(t, ".", homeDir) + // Reset + homeDirErr = nil + homeDirVal = "/home/user" + }) +} + +func TestFilePathJoin(t *testing.T) { + t.Run("File path join", func(t *testing.T) { + homeDir := FilePathJoin("/", "home", "user") + assert.Equal(t, "/home/user", homeDir) + }) +} From f103e41112bd174efb5f14e4425c82bd0c141261 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Mon, 3 May 2021 10:29:49 +0530 Subject: [PATCH 044/356] Oauth support in flytectl (#49) * Using changed flyteidl which contains oauth changes Signed-off-by: Prafulla Mahindrakar * Added zlando keyring as an implementation of tokencache Signed-off-by: Prafulla Mahindrakar * Fixed unit tests Signed-off-by: Prafulla Mahindrakar * Fixed linter issues Signed-off-by: Prafulla Mahindrakar * go mod tidy Signed-off-by: Prafulla Mahindrakar * Update to latest flyteidl Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar * Update to released flyteidl Signed-off-by: Haytham Abuelfutuh Signed-off-by: Prafulla Mahindrakar Co-authored-by: Haytham Abuelfutuh --- flytectl/cmd/core/cmd.go | 17 +++-- flytectl/cmd/get/project.go | 5 +- flytectl/cmd/root.go | 2 +- flytectl/config.yaml | 5 +- flytectl/go.mod | 4 +- flytectl/go.sum | 20 +++--- .../pkg/pkce/testdata/empty_access_token.json | 6 ++ flytectl/pkg/pkce/testdata/token.json | 6 ++ flytectl/pkg/pkce/token_cache_keyring.go | 58 +++++++++++++++++ flytectl/pkg/pkce/token_cache_keyring_test.go | 64 +++++++++++++++++++ 10 files changed, 163 insertions(+), 24 deletions(-) create mode 100644 flytectl/pkg/pkce/testdata/empty_access_token.json create mode 100644 flytectl/pkg/pkce/testdata/token.json create mode 100644 flytectl/pkg/pkce/token_cache_keyring.go create mode 100644 flytectl/pkg/pkce/token_cache_keyring_test.go diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 0e62c7369d..27d8d56063 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/spf13/pflag" - + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/pkg/pkce" "github.com/flyteorg/flyteidl/clients/go/admin" - "github.com/spf13/cobra" - "github.com/flyteorg/flytectl/cmd/config" + "github.com/spf13/cobra" + "github.com/spf13/pflag" ) type PFlagProvider interface { @@ -57,10 +57,15 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] return err } - adminClient, err := admin.InitializeAdminClientFromConfig(ctx) + clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). + WithTokenCache(pkce.TokenCacheKeyringProvider{ + ServiceUser: pkce.KeyRingServiceUser, + ServiceName: pkce.KeyRingServiceName, + }).Build(ctx) if err != nil { return err } - return cmdEntry.CmdFunc(ctx, args, NewCommandContext(adminClient, cmd.OutOrStdout())) + + return cmdEntry.CmdFunc(ctx, args, NewCommandContext(clientSet.AdminClient(), cmd.OutOrStdout())) } } diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index f89b952d4b..0fa2f70450 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -67,11 +67,9 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC if err != nil { return err } + if len(args) == 1 { name := args[0] - if err != nil { - return err - } logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) for _, v := range projects.Projects { if v.Name == name { @@ -84,6 +82,7 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } return nil } + logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), projectColumns, ProjectToProtoMessages(projects.Projects)...) } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 56a371a75a..200d6d4115 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -46,7 +46,7 @@ func newRootCmd() *cobra.Command { configAccessor.InitializePflags(rootCmd.PersistentFlags()) - // Due to https://github.com/lyft/flyte/issues/341, project flag will have to be specified as + // Due to https://github.com/flyteorg/flyte/issues/341, project flag will have to be specified as // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") diff --git a/flytectl/config.yaml b/flytectl/config.yaml index a6b72e5741..a4505fccf6 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,8 +1,7 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///flyte.lyft.net - # endpoint: dns:///flyte.lyft.net - insecure: true + endpoint: dns:///flyte.myexample.com + authType: Pkce logger: show-source: true level: 1 diff --git a/flytectl/go.mod b/flytectl/go.mod index ca000d677b..cd987f766a 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.18.32 + github.com/flyteorg/flyteidl v0.18.40 github.com/flyteorg/flytestdlib v0.3.15 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 @@ -20,6 +20,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 + github.com/zalando/go-keyring v0.1.1 + golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 google.golang.org/grpc v1.35.0 google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 699d774fb8..a1ceb251bd 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -129,8 +129,6 @@ github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEka github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -142,6 +140,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= +github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -173,10 +173,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.25 h1:XbHwM4G1u5nGAcdKod+ENgbL84cHdNzQIWY+NajuHs8= -github.com/flyteorg/flyteidl v0.18.25/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= -github.com/flyteorg/flyteidl v0.18.32 h1:Z+DeBh4i+mZK75lfJwmsHPf23nbsp2Qiv+kCnGMY9Ds= -github.com/flyteorg/flyteidl v0.18.32/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= +github.com/flyteorg/flyteidl v0.18.40 h1:YuLBNpIotOFwyLSXSs0aj3B9N9vwPhzLRAQTWxYSI/w= +github.com/flyteorg/flyteidl v0.18.40/go.mod h1:IJD02cc/95QMkGDBJNibsr5aWd6V7TlQiJ8Iz5mVZ28= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.15 h1:vzsfqriENyavv6EBwsIm55di2wC+j0jkmjw30JGHAkM= github.com/flyteorg/flytestdlib v0.3.15/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= @@ -214,6 +212,8 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -466,6 +466,8 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -476,8 +478,6 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -589,6 +589,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= +github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -984,8 +986,6 @@ gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= -gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= diff --git a/flytectl/pkg/pkce/testdata/empty_access_token.json b/flytectl/pkg/pkce/testdata/empty_access_token.json new file mode 100644 index 0000000000..474f4762e0 --- /dev/null +++ b/flytectl/pkg/pkce/testdata/empty_access_token.json @@ -0,0 +1,6 @@ +{ + "access_token":"", + "token_type":"bearer", + "refresh_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1MzM1MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiZi5hbGwiLCJhY2Nlc3NfdG9rZW4iXSwic3ViIjoiMTE0NTI3ODE1MzA1MTI4OTc0NDcwIiwidXNlcl9pbmZvIjp7ImZhbWlseV9uYW1lIjoiTWFoaW5kcmFrYXIiLCJnaXZlbl9uYW1lIjoiUHJhZnVsbGEiLCJuYW1lIjoiUHJhZnVsbGEgTWFoaW5kcmFrYXIiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2p1VDFrOC04YTV2QkdPSUYxYURnaFltRng4aEQ5S05pUjVqblp1PXM5Ni1jIiwic3ViamVjdCI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCJ9fQ.YKom5-gE4e84rJJIfxcpbMzgjZT33UZ27UTa1y8pK2BAWaPjIZtwudwDHQ5Rd3m0mJJWhBp0j0e8h9DvzBUdpsnGMXSCYKP-ag9y9k5OW59FMm9RqIakWHtj6NPnxGO1jAsaNCYePj8knR7pBLCLCse2taDHUJ8RU1F0DeHNr2y-JupgG5y1vjBcb-9eD8OwOSTp686_hm7XoJlxiKx8dj2O7HPH7M2pAHA_0bVrKKj7Y_s3fRhkm_Aq6LRdA-IiTl9xJQxgVUreejls9-RR9mSTKj6A81-Isz3qAUttVVaA4OT5OdW879_yT7OSLw_QwpXzNZ7qOR7OIpmL_xZXig", + "expiry":"2021-04-27T19:55:26.658635+05:30" +} \ No newline at end of file diff --git a/flytectl/pkg/pkce/testdata/token.json b/flytectl/pkg/pkce/testdata/token.json new file mode 100644 index 0000000000..721cecc5f6 --- /dev/null +++ b/flytectl/pkg/pkce/testdata/token.json @@ -0,0 +1,6 @@ +{ + "access_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1Mjk5MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiYWxsIiwiYWNjZXNzX3Rva2VuIl0sInN1YiI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCIsInVzZXJfaW5mbyI6eyJmYW1pbHlfbmFtZSI6Ik1haGluZHJha2FyIiwiZ2l2ZW5fbmFtZSI6IlByYWZ1bGxhIiwibmFtZSI6IlByYWZ1bGxhIE1haGluZHJha2FyIiwicGljdHVyZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hLS9BT2gxNEdqdVQxazgtOGE1dkJHT0lGMWFEZ2hZbUZ4OGhEOUtOaVI1am5adT1zOTYtYyIsInN1YmplY3QiOiIxMTQ1Mjc4MTUzMDUxMjg5NzQ0NzAifX0.ojbUOy2tF6HL8fIp1FJAQchU2MimlVMr3EGVPxMvYyahpW5YsWh6mz7qn4vpEnBuYZDf6cTaN50pJ8krlDX9RqtxF3iEfV2ZYHwyKMThI9sWh_kEBgGwUpyHyk98ZeqQX1uFOH3iwwhR-lPPUlpgdFGzKsxfxeFLOtu1y0V7BgA08KFqgYzl0lJqDYWBkJh_wUAv5g_r0NzSQCsMqb-B3Lno5ScMnlA3SZ_Hg-XdW8hnFIlrwJj4Cv47j3fcZxpqLbTNDXWWogmRbJb3YPlgn_LEnRAyZnFERHKMCE9vaBSTu-1Qstp-gRTORjyV7l3y680dEygQS-99KV3OSBlz6g", + "token_type":"bearer", + "refresh_token":"eyJhbGciOiJSUzI1NiIsImtleV9pZCI6IjlLZlNILXphZjRjY1dmTlNPbm91YmZUbnItVW5kMHVuY3ctWF9KNUJVdWciLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiaHR0cHM6Ly9kZW1vLm51Y2x5ZGUuaW8iXSwiY2xpZW50X2lkIjoiZmx5dGVjdGwiLCJleHAiOjE2MTk1MzM1MjcsImZvcm0iOnsiY29kZV9jaGFsbGVuZ2UiOiJ2bWNxazArZnJRS3Vvb2FMUHZwUDJCeUtod2VKR2VaeG1mdGtkMml0T042Tk13SVBQNWwySmNpWDd3NTdlaS9iVW1LTWhPSjJVUERnK0F5RXRaTG94SFJiMDl1cWRKSSIsImNvZGVfY2hhbGxlbmdlX21ldGhvZCI6IlN2WEgyeDh2UDUrSkJxQ0NjT2dCL0hNWjdLSmE3bkdLMDBaUVA0ekd4WGcifSwiaWF0IjoxNjE5NTAyNTM1LCJpc3MiOiJodHRwczovL2RlbW8ubnVjbHlkZS5pbyIsImp0aSI6IjQzMTM1ZWY2LTA5NjEtNGFlZC1hOTYxLWQyZGI1YWJmM2U1YyIsInNjcCI6WyJvZmZsaW5lIiwiZi5hbGwiLCJhY2Nlc3NfdG9rZW4iXSwic3ViIjoiMTE0NTI3ODE1MzA1MTI4OTc0NDcwIiwidXNlcl9pbmZvIjp7ImZhbWlseV9uYW1lIjoiTWFoaW5kcmFrYXIiLCJnaXZlbl9uYW1lIjoiUHJhZnVsbGEiLCJuYW1lIjoiUHJhZnVsbGEgTWFoaW5kcmFrYXIiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2p1VDFrOC04YTV2QkdPSUYxYURnaFltRng4aEQ5S05pUjVqblp1PXM5Ni1jIiwic3ViamVjdCI6IjExNDUyNzgxNTMwNTEyODk3NDQ3MCJ9fQ.YKom5-gE4e84rJJIfxcpbMzgjZT33UZ27UTa1y8pK2BAWaPjIZtwudwDHQ5Rd3m0mJJWhBp0j0e8h9DvzBUdpsnGMXSCYKP-ag9y9k5OW59FMm9RqIakWHtj6NPnxGO1jAsaNCYePj8knR7pBLCLCse2taDHUJ8RU1F0DeHNr2y-JupgG5y1vjBcb-9eD8OwOSTp686_hm7XoJlxiKx8dj2O7HPH7M2pAHA_0bVrKKj7Y_s3fRhkm_Aq6LRdA-IiTl9xJQxgVUreejls9-RR9mSTKj6A81-Isz3qAUttVVaA4OT5OdW879_yT7OSLw_QwpXzNZ7qOR7OIpmL_xZXig", + "expiry":"2021-04-27T19:55:26.658635+05:30" +} \ No newline at end of file diff --git a/flytectl/pkg/pkce/token_cache_keyring.go b/flytectl/pkg/pkce/token_cache_keyring.go new file mode 100644 index 0000000000..119fea5033 --- /dev/null +++ b/flytectl/pkg/pkce/token_cache_keyring.go @@ -0,0 +1,58 @@ +package pkce + +import ( + "encoding/json" + "fmt" + + "github.com/zalando/go-keyring" + "golang.org/x/oauth2" +) + +// TokenCacheKeyringProvider wraps the logic to save and retrieve tokens from the OS's keyring implementation. +type TokenCacheKeyringProvider struct { + ServiceName string + ServiceUser string +} + +const ( + KeyRingServiceUser = "flytectl-user" + KeyRingServiceName = "flytectl" +) + +func (t TokenCacheKeyringProvider) SaveToken(token *oauth2.Token) error { + var tokenBytes []byte + if token.AccessToken == "" { + return fmt.Errorf("cannot save empty token with expiration %v", token.Expiry) + } + + var err error + if tokenBytes, err = json.Marshal(token); err != nil { + return fmt.Errorf("unable to marshal token to save in cache due to %w", err) + } + + // set token in keyring + if err = keyring.Set(t.ServiceName, t.ServiceUser, string(tokenBytes)); err != nil { + return fmt.Errorf("unable to save token. Error: %w", err) + } + + return nil +} + +func (t TokenCacheKeyringProvider) GetToken() (*oauth2.Token, error) { + // get saved token + tokenJSON, err := keyring.Get(t.ServiceName, t.ServiceUser) + if len(tokenJSON) == 0 { + return nil, fmt.Errorf("no token found in the cache") + } + + if err != nil { + return nil, err + } + + token := oauth2.Token{} + if err = json.Unmarshal([]byte(tokenJSON), &token); err != nil { + return nil, fmt.Errorf("unmarshalling error for saved token. Error: %w", err) + } + + return &token, nil +} diff --git a/flytectl/pkg/pkce/token_cache_keyring_test.go b/flytectl/pkg/pkce/token_cache_keyring_test.go new file mode 100644 index 0000000000..11946b677d --- /dev/null +++ b/flytectl/pkg/pkce/token_cache_keyring_test.go @@ -0,0 +1,64 @@ +package pkce + +import ( + "encoding/json" + "io/ioutil" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/zalando/go-keyring" + "golang.org/x/oauth2" +) + +func TestSaveAndGetToken(t *testing.T) { + keyring.MockInit() + tokenCacheProvider := TokenCacheKeyringProvider{ + ServiceUser: "testServiceUser", + ServiceName: "testServiceName", + } + + t.Run("Valid Save/Get Token", func(t *testing.T) { + plan, _ := ioutil.ReadFile("testdata/token.json") + var tokenData oauth2.Token + err := json.Unmarshal(plan, &tokenData) + assert.NoError(t, err) + err = tokenCacheProvider.SaveToken(&tokenData) + assert.NoError(t, err) + var savedToken *oauth2.Token + savedToken, err = tokenCacheProvider.GetToken() + assert.NoError(t, err) + assert.NotNil(t, savedToken) + assert.Equal(t, tokenData.AccessToken, savedToken.AccessToken) + assert.Equal(t, tokenData.TokenType, savedToken.TokenType) + assert.Equal(t, tokenData.Expiry, savedToken.Expiry) + }) + + t.Run("Empty access token Save", func(t *testing.T) { + plan, _ := ioutil.ReadFile("testdata/empty_access_token.json") + var tokenData oauth2.Token + var err error + err = json.Unmarshal(plan, &tokenData) + assert.NoError(t, err) + + err = tokenCacheProvider.SaveToken(&tokenData) + assert.Error(t, err) + }) + + t.Run("Different service name", func(t *testing.T) { + plan, _ := ioutil.ReadFile("testdata/token.json") + var tokenData oauth2.Token + err := json.Unmarshal(plan, &tokenData) + assert.NoError(t, err) + err = tokenCacheProvider.SaveToken(&tokenData) + assert.NoError(t, err) + tokenCacheProvider2 := TokenCacheKeyringProvider{ + ServiceUser: "testServiceUser2", + ServiceName: "testServiceName2", + } + + var savedToken *oauth2.Token + savedToken, err = tokenCacheProvider2.GetToken() + assert.Error(t, err) + assert.Nil(t, savedToken) + }) +} From a0632f082b505e94c7785602891ffe7e528ec50a Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Fri, 7 May 2021 11:10:56 +0530 Subject: [PATCH 045/356] Refactored the fetcher interface to exclude cmdCtx (#61) * Refactored the fetcher interface to exclude cmdCtx and added builder Signed-off-by: Prafulla Mahindrakar * Further refactoring and fixed tests Signed-off-by: Prafulla Mahindrakar * Added more coverage and fixed linter issues Signed-off-by: Prafulla Mahindrakar * Still more coverage Signed-off-by: Prafulla Mahindrakar * Still more coverage Signed-off-by: Prafulla Mahindrakar * lint issue Signed-off-by: Prafulla Mahindrakar * lint issue Signed-off-by: Prafulla Mahindrakar * morelint issue Signed-off-by: Prafulla Mahindrakar * Renamed Fetcher to be AdminFetcherExt and initialized it cmdCtx Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/core/cmd.go | 1 - flytectl/cmd/core/cmd_ctx.go | 15 +- flytectl/cmd/create/create.go | 3 +- flytectl/cmd/create/execution_test.go | 2 +- flytectl/cmd/create/execution_util.go | 26 +- flytectl/cmd/delete/delete.go | 3 +- flytectl/cmd/get/execution.go | 12 +- flytectl/cmd/get/execution_util.go | 16 - flytectl/cmd/get/execution_util_test.go | 90 +++++ flytectl/cmd/get/get.go | 12 - .../cmd/get/interfaces/fetcher_interface.go | 16 - flytectl/cmd/get/interfaces/mocks/fetcher.go | 99 ----- .../cmd/get/interfaces/mocks/get_execution.go | 58 --- flytectl/cmd/get/launch_plan.go | 46 ++- flytectl/cmd/get/launch_plan_test.go | 72 +++- flytectl/cmd/get/launch_plan_util.go | 90 ----- flytectl/cmd/get/task.go | 35 +- flytectl/cmd/get/task_test.go | 72 +++- flytectl/cmd/get/task_util.go | 93 ----- flytectl/cmd/testutils/test_utils.go | 8 +- flytectl/docs/source/index.rst | 8 +- flytectl/pkg/ext/execution_fetcher_ext.go | 22 ++ flytectl/pkg/ext/fetcher_ext_client.go | 49 +++ flytectl/pkg/ext/launch_plan_fetcher.go | 60 ++++ .../ext/mocks/admin_fetcher_ext_interface.go | 339 ++++++++++++++++++ .../admin_service_fetcher_ext_interface.go | 339 ++++++++++++++++++ flytectl/pkg/ext/task_fetcher.go | 60 ++++ 27 files changed, 1218 insertions(+), 428 deletions(-) create mode 100644 flytectl/cmd/get/execution_util_test.go delete mode 100644 flytectl/cmd/get/interfaces/fetcher_interface.go delete mode 100644 flytectl/cmd/get/interfaces/mocks/fetcher.go delete mode 100644 flytectl/cmd/get/interfaces/mocks/get_execution.go delete mode 100644 flytectl/cmd/get/launch_plan_util.go delete mode 100644 flytectl/cmd/get/task_util.go create mode 100644 flytectl/pkg/ext/execution_fetcher_ext.go create mode 100644 flytectl/pkg/ext/fetcher_ext_client.go create mode 100644 flytectl/pkg/ext/launch_plan_fetcher.go create mode 100644 flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go create mode 100644 flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go create mode 100644 flytectl/pkg/ext/task_fetcher.go diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 27d8d56063..2a13e36c05 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -65,7 +65,6 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] if err != nil { return err } - return cmdEntry.CmdFunc(ctx, args, NewCommandContext(clientSet.AdminClient(), cmd.OutOrStdout())) } } diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index e0de7d1a18..58f3ff457b 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,17 +3,20 @@ package cmdcore import ( "io" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" ) type CommandContext struct { - adminClient service.AdminServiceClient - in io.Reader - out io.Writer + adminClient service.AdminServiceClient + adminClientFetcherExt ext.AdminFetcherExtInterface + in io.Reader + out io.Writer } func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext { - return CommandContext{adminClient: adminClient, out: out} + return CommandContext{adminClient: adminClient, out: out, + adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: adminClient}} } func (c CommandContext) AdminClient() service.AdminServiceClient { @@ -27,3 +30,7 @@ func (c CommandContext) OutputPipe() io.Writer { func (c CommandContext) InputPipe() io.Reader { return c.in } + +func (c CommandContext) AdminFetcherExt() ext.AdminFetcherExtInterface { + return c.adminClientFetcherExt +} diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index ad1f6ac33c..5868b91c97 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -2,6 +2,7 @@ package create import ( cmdcore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" ) @@ -16,7 +17,7 @@ Example create. ` ) -// CreateCommand will return create command +// RemoteCreateCommand will return create flyte resource commands func RemoteCreateCommand() *cobra.Command { createCmd := &cobra.Command{ Use: "create", diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 9a593760c9..c833da4889 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -175,7 +175,7 @@ func TestCreateLaunchPlanExecutionFunc(t *testing.T) { err = createExecutionCommand(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) } func TestCreateRelaunchExecutionFunc(t *testing.T) { diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index dd21867ba8..25721d14e4 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -14,31 +14,37 @@ import ( "sigs.k8s.io/yaml" ) -func createExecutionRequestForWorkflow(ctx context.Context, workflowName string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { +func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, + cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { var lp *admin.LaunchPlan var err error + // Fetch the launch plan - if lp, err = cmdGet.DefaultFetcher.FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain, cmdCtx); err != nil { + if lp, err = cmdCtx.AdminFetcherExt().FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain); err != nil { return nil, err } + // Create workflow params literal map var paramLiterals map[string]*core.Literal workflowParams := cmdGet.WorkflowParams(lp) + if paramLiterals, err = MakeLiteralForParams(executionConfig.Inputs, workflowParams); err != nil { return nil, err } var inputs = &core.LiteralMap{ Literals: paramLiterals, } + ID := lp.Id return createExecutionRequest(ID, inputs, nil), nil } -func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { +func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, + cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { var task *admin.Task var err error // Fetch the task - if task, err = cmdGet.FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain, cmdCtx); err != nil { + if task, err = cmdCtx.AdminFetcherExt().FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain); err != nil { return nil, err } // Create task variables literal map @@ -68,7 +74,8 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project return createExecutionRequest(ID, inputs, authRole), nil } -func relaunchExecution(ctx context.Context, executionName string, project string, domain string, cmdCtx cmdCore.CommandContext) error { +func relaunchExecution(ctx context.Context, executionName string, project string, domain string, + cmdCtx cmdCore.CommandContext) error { relaunchedExec, err := cmdCtx.AdminClient().RelaunchExecution(ctx, &admin.ExecutionRelaunchRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: executionName, @@ -83,7 +90,8 @@ func relaunchExecution(ctx context.Context, executionName string, project string return nil } -func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, authRole *admin.AuthRole) *admin.ExecutionCreateRequest { +func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, + authRole *admin.AuthRole) *admin.ExecutionCreateRequest { return &admin.ExecutionCreateRequest{ Project: executionConfig.TargetProject, Domain: executionConfig.TargetDomain, @@ -138,7 +146,8 @@ func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain st func readConfigAndValidate(project string, domain string) (ExecutionParams, error) { executionParams := ExecutionParams{} if executionConfig.ExecFile == "" && executionConfig.Relaunch == "" { - return executionParams, fmt.Errorf("executionConfig or relaunch can't be empty. Run the flytectl get task/launchplan to generate the config") + return executionParams, fmt.Errorf("executionConfig or relaunch can't be empty." + + " Run the flytectl get task/launchplan to generate the config") } if executionConfig.Relaunch != "" { resolveOverrides(executionConfig, project, domain) @@ -155,7 +164,8 @@ func readConfigAndValidate(project string, domain string) (ExecutionParams, erro isTask := readExecutionConfig.Task != "" isWorkflow := readExecutionConfig.Workflow != "" if isTask == isWorkflow { - return executionParams, fmt.Errorf("either one of task or workflow name should be specified to launch an execution") + return executionParams, fmt.Errorf("either one of task or workflow name should be specified" + + " to launch an execution") } name := readExecutionConfig.Task execType := Task diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 29ec1efa05..2b6cf36310 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -25,7 +25,8 @@ func RemoteDeleteCommand() *cobra.Command { Long: deleteCmdLong, } terminateResourcesFuncs := map[string]cmdcore.CommandEntry{ - "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, Long: execCmdLong}, + "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, + Long: execCmdLong}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index e6ab431df5..3f378b6c1d 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -3,13 +3,12 @@ package get import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" - "github.com/golang/protobuf/proto" - "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" + "github.com/golang/protobuf/proto" ) const ( @@ -69,7 +68,7 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command var executions []*admin.Execution if len(args) > 0 { name := args[0] - execution, err := DefaultFetcher.FetchExecution(ctx, name, config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + execution, err := cmdCtx.AdminFetcherExt().FetchExecution(ctx, name, config.GetConfig().Project, config.GetConfig().Domain) if err != nil { return err } @@ -88,7 +87,8 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command executions = executionList.Executions } logger.Infof(ctx, "Retrieved %v executions", len(executions)) - err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) + err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, + ExecutionToProtoMessages(executions)...) if err != nil { return err } diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 2a563f4165..da330af39e 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -1,13 +1,11 @@ package get import ( - "context" "errors" "fmt" "io/ioutil" "os" - cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -29,20 +27,6 @@ type ExecutionConfig struct { Inputs map[string]interface{} `json:"inputs"` } -func (f FetcherImpl) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Execution, error) { - e, err := cmdCtx.AdminClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: project, - Domain: domain, - Name: name, - }, - }) - if err != nil { - return nil, err - } - return e, nil -} - func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) error { d, err := yaml.Marshal(executionConfig) if err != nil { diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go new file mode 100644 index 0000000000..2d98c8b834 --- /dev/null +++ b/flytectl/cmd/get/execution_util_test.go @@ -0,0 +1,90 @@ +package get + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" + + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestTaskInputs(t *testing.T) { + taskInputs := map[string]*core.Variable{} + t.Run("nil task", func(t *testing.T) { + retValue := TaskInputs(nil) + assert.Equal(t, taskInputs, retValue) + }) + t.Run("valid inputs", func(t *testing.T) { + task := createTask() + retValue := TaskInputs(task) + assert.Equal(t, task.Closure.CompiledTask.Template.Interface.Inputs.Variables, retValue) + }) + t.Run("closure compiled task nil", func(t *testing.T) { + task := createTask() + task.Closure.CompiledTask = nil + retValue := TaskInputs(task) + assert.Equal(t, taskInputs, retValue) + }) + t.Run("closure compiled task template nil", func(t *testing.T) { + task := createTask() + task.Closure.CompiledTask.Template = nil + retValue := TaskInputs(task) + assert.Equal(t, taskInputs, retValue) + }) + t.Run("closure compiled task template interface nil", func(t *testing.T) { + task := createTask() + task.Closure.CompiledTask.Template.Interface = nil + retValue := TaskInputs(task) + assert.Equal(t, taskInputs, retValue) + }) + t.Run("closure compiled task template interface input nil", func(t *testing.T) { + task := createTask() + task.Closure.CompiledTask.Template.Interface.Inputs = nil + retValue := TaskInputs(task) + assert.Equal(t, taskInputs, retValue) + }) +} + +func createTask() *admin.Task { + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + inputs := &core.VariableMap{ + Variables: variableMap, + } + typedInterface := &core.TypedInterface{ + Inputs: inputs, + } + taskTemplate := &core.TaskTemplate{ + Interface: typedInterface, + } + compiledTask := &core.CompiledTask{ + Template: taskTemplate, + } + return &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v2", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledTask: compiledTask, + }, + } +} diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 46f392c4d0..e875a0ca01 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -2,7 +2,6 @@ package get import ( cmdcore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/cmd/get/interfaces" "github.com/spf13/cobra" ) @@ -18,17 +17,6 @@ Example get projects. ` ) -var ( - DefaultFetcher = NewFetcherImpl() -) - -func NewFetcherImpl() interfaces.Fetcher { - return FetcherImpl{} -} - -type FetcherImpl struct { -} - // CreateGetCommand will return get command func CreateGetCommand() *cobra.Command { getCmd := &cobra.Command{ diff --git a/flytectl/cmd/get/interfaces/fetcher_interface.go b/flytectl/cmd/get/interfaces/fetcher_interface.go deleted file mode 100644 index 62a007e848..0000000000 --- a/flytectl/cmd/get/interfaces/fetcher_interface.go +++ /dev/null @@ -1,16 +0,0 @@ -package interfaces - -import ( - "context" - - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" -) - -//go:generate mockery -all -case=underscore - -// Interface for exposing the fetch capabilities to other modules. eg : create execution which requires to fetch launchplan details. -type Fetcher interface { - FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Execution, error) - FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) -} diff --git a/flytectl/cmd/get/interfaces/mocks/fetcher.go b/flytectl/cmd/get/interfaces/mocks/fetcher.go deleted file mode 100644 index 61742c70c6..0000000000 --- a/flytectl/cmd/get/interfaces/mocks/fetcher.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. - -package mocks - -import ( - cmdcore "github.com/flyteorg/flytectl/cmd/core" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// Fetcher is an autogenerated mock type for the Fetcher type -type Fetcher struct { - mock.Mock -} - -type Fetcher_FetchExecution struct { - *mock.Call -} - -func (_m Fetcher_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *Fetcher_FetchExecution { - return &Fetcher_FetchExecution{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *Fetcher) OnFetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) *Fetcher_FetchExecution { - c := _m.On("FetchExecution", ctx, name, project, domain, cmdCtx) - return &Fetcher_FetchExecution{Call: c} -} - -func (_m *Fetcher) OnFetchExecutionMatch(matchers ...interface{}) *Fetcher_FetchExecution { - c := _m.On("FetchExecution", matchers...) - return &Fetcher_FetchExecution{Call: c} -} - -// FetchExecution provides a mock function with given fields: ctx, name, project, domain, cmdCtx -func (_m *Fetcher) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.Execution, error) { - ret := _m.Called(ctx, name, project, domain, cmdCtx) - - var r0 *admin.Execution - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, cmdcore.CommandContext) *admin.Execution); ok { - r0 = rf(ctx, name, project, domain, cmdCtx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.Execution) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, cmdcore.CommandContext) error); ok { - r1 = rf(ctx, name, project, domain, cmdCtx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type Fetcher_FetchLPVersion struct { - *mock.Call -} - -func (_m Fetcher_FetchLPVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *Fetcher_FetchLPVersion { - return &Fetcher_FetchLPVersion{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *Fetcher) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdcore.CommandContext) *Fetcher_FetchLPVersion { - c := _m.On("FetchLPVersion", ctx, name, version, project, domain, cmdCtx) - return &Fetcher_FetchLPVersion{Call: c} -} - -func (_m *Fetcher) OnFetchLPVersionMatch(matchers ...interface{}) *Fetcher_FetchLPVersion { - c := _m.On("FetchLPVersion", matchers...) - return &Fetcher_FetchLPVersion{Call: c} -} - -// FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain, cmdCtx -func (_m *Fetcher) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.LaunchPlan, error) { - ret := _m.Called(ctx, name, version, project, domain, cmdCtx) - - var r0 *admin.LaunchPlan - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, cmdcore.CommandContext) *admin.LaunchPlan); ok { - r0 = rf(ctx, name, version, project, domain, cmdCtx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.LaunchPlan) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, cmdcore.CommandContext) error); ok { - r1 = rf(ctx, name, version, project, domain, cmdCtx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/flytectl/cmd/get/interfaces/mocks/get_execution.go b/flytectl/cmd/get/interfaces/mocks/get_execution.go deleted file mode 100644 index 0df4fcf5ac..0000000000 --- a/flytectl/cmd/get/interfaces/mocks/get_execution.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. - -package mocks - -import ( - cmdcore "github.com/flyteorg/flytectl/cmd/core" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// GetExecution is an autogenerated mock type for the GetExecution type -type GetExecution struct { - mock.Mock -} - -type GetExecution_FetchExecution struct { - *mock.Call -} - -func (_m GetExecution_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *GetExecution_FetchExecution { - return &GetExecution_FetchExecution{Call: _m.Call.Return(_a0, _a1)} -} - -func (_m *GetExecution) OnFetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) *GetExecution_FetchExecution { - c := _m.On("FetchExecution", ctx, name, project, domain, cmdCtx) - return &GetExecution_FetchExecution{Call: c} -} - -func (_m *GetExecution) OnFetchExecutionMatch(matchers ...interface{}) *GetExecution_FetchExecution { - c := _m.On("FetchExecution", matchers...) - return &GetExecution_FetchExecution{Call: c} -} - -// FetchExecution provides a mock function with given fields: ctx, name, project, domain, cmdCtx -func (_m *GetExecution) FetchExecution(ctx context.Context, name string, project string, domain string, cmdCtx cmdcore.CommandContext) (*admin.Execution, error) { - ret := _m.Called(ctx, name, project, domain, cmdCtx) - - var r0 *admin.Execution - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, cmdcore.CommandContext) *admin.Execution); ok { - r0 = rf(ctx, name, project, domain, cmdCtx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*admin.Execution) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, cmdcore.CommandContext) error); ok { - r1 = rf(ctx, name, project, domain, cmdCtx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 2b6e8a7fe2..e98029483c 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -6,6 +6,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" @@ -108,21 +109,58 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman name := args[0] var launchPlans []*admin.LaunchPlan var err error - if launchPlans, err = FetchLPForName(ctx, name, project, domain, cmdCtx); err != nil { + if launchPlans, err = FetchLPForName(ctx, cmdCtx.AdminFetcherExt(), name, project, domain); err != nil { return err } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) - err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, LaunchplanToProtoMessages(launchPlans)...) + err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, + LaunchplanToProtoMessages(launchPlans)...) if err != nil { return err } return nil } - launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, adminutils.ListRequest{Project: project, Domain: domain}) + launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, + adminutils.ListRequest{Project: project, Domain: domain}) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) - return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(launchPlans)...) + return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, + adminutils.NamedEntityToProtoMessage(launchPlans)...) +} + +// FetchLPForName fetches the launchplan give it name. +func FetchLPForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project, + domain string) ([]*admin.LaunchPlan, error) { + var launchPlans []*admin.LaunchPlan + var lp *admin.LaunchPlan + var err error + if launchPlanConfig.Latest { + if lp, err = fetcher.FetchLPLatestVersion(ctx, name, project, domain); err != nil { + return nil, err + } + launchPlans = append(launchPlans, lp) + } else if launchPlanConfig.Version != "" { + if lp, err = fetcher.FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain); err != nil { + return nil, err + } + launchPlans = append(launchPlans, lp) + } else { + launchPlans, err = fetcher.FetchAllVerOfLP(ctx, name, project, domain) + if err != nil { + return nil, err + } + } + if launchPlanConfig.ExecFile != "" { + // There would be atleast one launchplan object when code reaches here and hence the length + // assertion is not required. + lp = launchPlans[0] + // Only write the first task from the tasks object. + if err = CreateAndWriteExecConfigForWorkflow(lp, launchPlanConfig.ExecFile); err != nil { + return nil, err + } + } + return launchPlans, nil } diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 54f7f14202..058e745cd0 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -1,12 +1,15 @@ package get import ( + "fmt" "os" "testing" "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" @@ -18,6 +21,8 @@ var ( namedIDRequest *admin.NamedEntityIdentifierListRequest launchPlanListResponse *admin.LaunchPlanList argsLp []string + namedIdentifierList *admin.NamedEntityIdentifierList + launchPlan2 *admin.LaunchPlan ) func getLaunchPlanSetup() { @@ -90,7 +95,7 @@ func getLaunchPlanSetup() { }, }, } - launchPlan2 := &admin.LaunchPlan{ + launchPlan2 = &admin.LaunchPlan{ Id: &core.Identifier{ Name: "launchplan1", Version: "v2", @@ -159,22 +164,65 @@ func getLaunchPlanSetup() { Name: "launchplan2", } entities = append(entities, id1, id2) - namedIdentifierList := &admin.NamedEntityIdentifierList{ + namedIdentifierList = &admin.NamedEntityIdentifierList{ Entities: entities, } - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) - launchPlanConfig.Latest = false launchPlanConfig.Version = "" launchPlanConfig.ExecFile = "" } +func TestGetLaunchPlanFuncWithError(t *testing.T) { + t.Run("failure fetch latest", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + launchPlanConfig.Latest = true + mockFetcher.OnFetchLPLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching version ", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + launchPlanConfig.Version = "v1" + mockFetcher.OnFetchLPVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching version")) + _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching all version ", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + mockFetcher.OnFetchAllVerOfLPMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching ", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(nil, fmt.Errorf("error fetching all version")) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(nil, fmt.Errorf("error fetching lanuch plan")) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(nil, fmt.Errorf("error listing lanuch plan ids")) + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.NotNil(t, err) + }) +} + func TestGetLaunchPlanFunc(t *testing.T) { setup() getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) @@ -344,6 +392,9 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { setup() getLaunchPlanSetup() launchPlanConfig.Latest = true + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) @@ -432,6 +483,9 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { setup() getLaunchPlanSetup() launchPlanConfig.Version = "v2" + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) @@ -519,6 +573,9 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { func TestGetLaunchPlans(t *testing.T) { setup() getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) argsLp = []string{} err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) @@ -540,6 +597,9 @@ func TestGetLaunchPlans(t *testing.T) { func TestGetLaunchPlansWithExecFile(t *testing.T) { setup() getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) launchPlanConfig.Version = "v2" launchPlanConfig.ExecFile = testDataFolder + "exec_file" err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) diff --git a/flytectl/cmd/get/launch_plan_util.go b/flytectl/cmd/get/launch_plan_util.go deleted file mode 100644 index d3a803e32b..0000000000 --- a/flytectl/cmd/get/launch_plan_util.go +++ /dev/null @@ -1,90 +0,0 @@ -package get - -import ( - "context" - "fmt" - - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" -) - -// Reads the launchplan config to drive fetching the correct launch plans. -func FetchLPForName(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.LaunchPlan, error) { - var launchPlans []*admin.LaunchPlan - var lp *admin.LaunchPlan - var err error - if launchPlanConfig.Latest { - if lp, err = FetchLPLatestVersion(ctx, name, project, domain, cmdCtx); err != nil { - return nil, err - } - launchPlans = append(launchPlans, lp) - } else if launchPlanConfig.Version != "" { - if lp, err = DefaultFetcher.FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain, cmdCtx); err != nil { - return nil, err - } - launchPlans = append(launchPlans, lp) - } else { - launchPlans, err = FetchAllVerOfLP(ctx, name, project, domain, cmdCtx) - if err != nil { - return nil, err - } - } - if launchPlanConfig.ExecFile != "" { - // There would be atleast one launchplan object when code reaches here and hence the length assertion is not required. - lp = launchPlans[0] - // Only write the first task from the tasks object. - if err = CreateAndWriteExecConfigForWorkflow(lp, launchPlanConfig.ExecFile); err != nil { - return nil, err - } - } - return launchPlans, nil -} - -func FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.LaunchPlan, error) { - tList, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: lpName, - }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) - if err != nil { - return nil, err - } - if len(tList.LaunchPlans) == 0 { - return nil, fmt.Errorf("no launchplans retrieved for %v", lpName) - } - return tList.LaunchPlans, nil -} - -func FetchLPLatestVersion(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { - // Fetch the latest version of the task. - lpVersions, err := FetchAllVerOfLP(ctx, name, project, domain, cmdCtx) - if err != nil { - return nil, err - } - lp := lpVersions[0] - return lp, nil -} - -func (f FetcherImpl) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.LaunchPlan, error) { - lp, err := cmdCtx.AdminClient().GetLaunchPlan(ctx, &admin.ObjectGetRequest{ - Id: &core.Identifier{ - ResourceType: core.ResourceType_LAUNCH_PLAN, - Project: project, - Domain: domain, - Name: name, - Version: version, - }, - }) - if err != nil { - return nil, err - } - return lp, nil -} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 9b98de40d6..7be143d232 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -6,6 +6,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/adminutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" @@ -109,7 +110,7 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte name := args[0] var tasks []*admin.Task var err error - if tasks, err = FetchTaskForName(ctx, name, project, domain, cmdCtx); err != nil { + if tasks, err = FetchTaskForName(ctx, cmdCtx.AdminFetcherExt(), name, project, domain); err != nil { return err } logger.Debugf(ctx, "Retrieved Task", tasks) @@ -122,3 +123,35 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) return taskPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(tasks)...) } + +// FetchTaskForName Reads the task config to drive fetching the correct tasks. +func FetchTaskForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project, domain string) ([]*admin.Task, error) { + var tasks []*admin.Task + var err error + var task *admin.Task + if taskConfig.Latest { + if task, err = fetcher.FetchTaskLatestVersion(ctx, name, project, domain); err != nil { + return nil, err + } + tasks = append(tasks, task) + } else if taskConfig.Version != "" { + if task, err = fetcher.FetchTaskVersion(ctx, name, taskConfig.Version, project, domain); err != nil { + return nil, err + } + tasks = append(tasks, task) + } else { + tasks, err = fetcher.FetchAllVerOfTask(ctx, name, project, domain) + if err != nil { + return nil, err + } + } + if taskConfig.ExecFile != "" { + // There would be atleast one task object when code reaches here and hence the length assertion is not required. + task = tasks[0] + // Only write the first task from the tasks object. + if err = CreateAndWriteExecConfigForTask(task, taskConfig.ExecFile); err != nil { + return nil, err + } + } + return tasks, nil +} diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 9f525b39ba..e5f2c62246 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -1,12 +1,15 @@ package get import ( + "fmt" "os" "testing" "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" @@ -18,6 +21,8 @@ var ( namedIDRequestTask *admin.NamedEntityIdentifierListRequest taskListResponse *admin.TaskList argsTask []string + namedIdentifierListTask *admin.NamedEntityIdentifierList + task2 *admin.Task ) func getTaskSetup() { @@ -60,7 +65,7 @@ func getTaskSetup() { }, } - task2 := &admin.Task{ + task2 = &admin.Task{ Id: &core.Identifier{ Name: "task1", Version: "v2", @@ -128,22 +133,65 @@ func getTaskSetup() { Name: "task2", } taskEntities = append(taskEntities, idTask1, idTask2) - namedIdentifierListTask := &admin.NamedEntityIdentifierList{ + namedIdentifierListTask = &admin.NamedEntityIdentifierList{ Entities: taskEntities, } - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) - taskConfig.Latest = false taskConfig.ExecFile = "" taskConfig.Version = "" } +func TestGetTaskFuncWithError(t *testing.T) { + t.Run("failure fetch latest", func(t *testing.T) { + setup() + getTaskSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + taskConfig.Latest = true + mockFetcher.OnFetchTaskLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching version ", func(t *testing.T) { + setup() + getTaskSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + taskConfig.Version = "v1" + mockFetcher.OnFetchTaskVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching version")) + _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching all version ", func(t *testing.T) { + setup() + getTaskSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + mockFetcher.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching ", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(nil, fmt.Errorf("error fetching all version")) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.NotNil(t, err) + }) +} + func TestGetTaskFunc(t *testing.T) { setup() getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) @@ -220,6 +268,9 @@ func TestGetTaskFunc(t *testing.T) { func TestGetTaskFuncLatest(t *testing.T) { setup() getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) taskConfig.Latest = true err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) @@ -262,6 +313,9 @@ func TestGetTaskFuncLatest(t *testing.T) { func TestGetTaskWithVersion(t *testing.T) { setup() getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) taskConfig.Version = "v2" objectGetRequestTask.Id.ResourceType = core.ResourceType_TASK err = getTaskFunc(ctx, argsTask, cmdCtx) @@ -305,6 +359,9 @@ func TestGetTaskWithVersion(t *testing.T) { func TestGetTasks(t *testing.T) { setup() getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) argsTask = []string{} err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) @@ -326,6 +383,9 @@ func TestGetTasks(t *testing.T) { func TestGetTaskWithExecFile(t *testing.T) { setup() getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) taskConfig.Version = "v2" taskConfig.ExecFile = testDataFolder + "task_exec_file" err = getTaskFunc(ctx, argsTask, cmdCtx) diff --git a/flytectl/cmd/get/task_util.go b/flytectl/cmd/get/task_util.go deleted file mode 100644 index 0be9490dc0..0000000000 --- a/flytectl/cmd/get/task_util.go +++ /dev/null @@ -1,93 +0,0 @@ -package get - -import ( - "context" - "fmt" - - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" -) - -// Reads the task config to drive fetching the correct tasks. -func FetchTaskForName(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.Task, error) { - var tasks []*admin.Task - var err error - var task *admin.Task - if taskConfig.Latest { - if task, err = FetchTaskLatestVersion(ctx, name, project, domain, cmdCtx); err != nil { - return nil, err - } - tasks = append(tasks, task) - } else if taskConfig.Version != "" { - if task, err = FetchTaskVersion(ctx, name, taskConfig.Version, project, domain, cmdCtx); err != nil { - return nil, err - } - tasks = append(tasks, task) - } else { - tasks, err = FetchAllVerOfTask(ctx, name, project, domain, cmdCtx) - if err != nil { - return nil, err - } - } - if taskConfig.ExecFile != "" { - // There would be atleast one task object when code reaches here and hence the length assertion is not required. - task = tasks[0] - // Only write the first task from the tasks object. - if err = CreateAndWriteExecConfigForTask(task, taskConfig.ExecFile); err != nil { - return nil, err - } - } - return tasks, nil -} - -func FetchAllVerOfTask(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) ([]*admin.Task, error) { - tList, err := cmdCtx.AdminClient().ListTasks(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: name, - }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) - if err != nil { - return nil, err - } - if len(tList.Tasks) == 0 { - return nil, fmt.Errorf("no tasks retrieved for %v", name) - } - return tList.Tasks, nil -} - -func FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Task, error) { - var t *admin.Task - var err error - // Fetch the latest version of the task. - var taskVersions []*admin.Task - taskVersions, err = FetchAllVerOfTask(ctx, name, project, domain, cmdCtx) - if err != nil { - return nil, err - } - t = taskVersions[0] - return t, nil -} - -func FetchTaskVersion(ctx context.Context, name string, version string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.Task, error) { - t, err := cmdCtx.AdminClient().GetTask(ctx, &admin.ObjectGetRequest{ - Id: &core.Identifier{ - ResourceType: core.ResourceType_TASK, - Project: project, - Domain: domain, - Name: name, - Version: version, - }, - }) - if err != nil { - return nil, err - } - return t, nil -} diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 28d999ba73..3285ed1523 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -11,6 +11,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/stretchr/testify/assert" @@ -26,6 +27,7 @@ var ( Err error Ctx context.Context MockClient *mocks.AdminServiceClient + FetcherExt ext.AdminFetcherExtInterface mockOutStream io.Writer CmdCtx cmdCore.CommandContext stdOut *os.File @@ -57,6 +59,10 @@ func TearDownAndVerify(t *testing.T, expectedLog string) { os.Stderr = stderr var buf bytes.Buffer if _, err := io.Copy(&buf, reader); err == nil { - assert.Equal(t, strings.Trim(expectedLog, "\n "), strings.Trim(buf.String(), "\n ")) + assert.Equal(t, santizeString(expectedLog), santizeString(buf.String())) } } + +func santizeString(str string) string { + return strings.Trim(strings.ReplaceAll(strings.ReplaceAll(str, "\n", ""), "\t", ""), " \t") +} diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index a3a3d61cc1..d615f2fe7e 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -21,10 +21,10 @@ Flytectl allows configuring using a YAML file or pass every configuration value on command-line. The follow configuration is useful to setup. Place this in $HOME/.flyte directory with name config.yaml. This file is searched in -1] $HOME/.flyte -2] currDir from where you run flytectl -3] /etc/flyte/config -4] You can pass it commandline using --config +* $HOME/.flyte +* currDir from where you run flytectl +* /etc/flyte/config +* You can pass it commandline using --config Basic Configuration -------------------- diff --git a/flytectl/pkg/ext/execution_fetcher_ext.go b/flytectl/pkg/ext/execution_fetcher_ext.go new file mode 100644 index 0000000000..e96351c8b8 --- /dev/null +++ b/flytectl/pkg/ext/execution_fetcher_ext.go @@ -0,0 +1,22 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +func (a *AdminFetcherExtClient) FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) { + e, err := a.AdminServiceClient().GetExecution(ctx, &admin.WorkflowExecutionGetRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + }) + if err != nil { + return nil, err + } + return e, nil +} diff --git a/flytectl/pkg/ext/fetcher_ext_client.go b/flytectl/pkg/ext/fetcher_ext_client.go new file mode 100644 index 0000000000..ebe34ca9d3 --- /dev/null +++ b/flytectl/pkg/ext/fetcher_ext_client.go @@ -0,0 +1,49 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +//go:generate mockery -all -case=underscore + +// AdminFetcherExtInterface Interface for exposing the fetch capabilities from the admin and also allow this to be injectable into other +// modules. eg : create execution which requires to fetch launchplan details to construct the execution spec. +type AdminFetcherExtInterface interface { + AdminServiceClient() service.AdminServiceClient + + // FetchExecution fetches the execution based on name, project, domain + FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) + + // FetchAllVerOfLP fetches all versions of launch plan in a project, domain + FetchAllVerOfLP(ctx context.Context, lpName, project, domain string) ([]*admin.LaunchPlan, error) + + // FetchLPLatestVersion fetches latest version of launch plan in a project, domain + FetchLPLatestVersion(ctx context.Context, name, project, domain string) (*admin.LaunchPlan, error) + + // FetchLPVersion fetches particular version of launch plan in a project, domain + FetchLPVersion(ctx context.Context, name, version, project, domain string) (*admin.LaunchPlan, error) + + // FetchAllVerOfTask fetches all versions of task in a project, domain + FetchAllVerOfTask(ctx context.Context, name, project, domain string) ([]*admin.Task, error) + + // FetchTaskLatestVersion fetches latest version of task in a project, domain + FetchTaskLatestVersion(ctx context.Context, name, project, domain string) (*admin.Task, error) + + // FetchTaskVersion fetches particular version of task in a project, domain + FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) +} + +// AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service +type AdminFetcherExtClient struct { + AdminClient service.AdminServiceClient +} + +func (a *AdminFetcherExtClient) AdminServiceClient() service.AdminServiceClient { + if a == nil { + return nil + } + return a.AdminClient +} diff --git a/flytectl/pkg/ext/launch_plan_fetcher.go b/flytectl/pkg/ext/launch_plan_fetcher.go new file mode 100644 index 0000000000..e7aa21b124 --- /dev/null +++ b/flytectl/pkg/ext/launch_plan_fetcher.go @@ -0,0 +1,60 @@ +package ext + +import ( + "context" + "fmt" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +// FetchAllVerOfLP fetches all the versions for give launch plan name +func (a *AdminFetcherExtClient) FetchAllVerOfLP(ctx context.Context, lpName, project, domain string) ([]*admin.LaunchPlan, error) { + tList, err := a.AdminServiceClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: lpName, + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + if len(tList.LaunchPlans) == 0 { + return nil, fmt.Errorf("no launchplans retrieved for %v", lpName) + } + return tList.LaunchPlans, nil +} + +// FetchLPLatestVersion fetches latest version for give launch plan name +func (a *AdminFetcherExtClient) FetchLPLatestVersion(ctx context.Context, name, project, domain string) (*admin.LaunchPlan, error) { + // Fetch the latest version of the task. + lpVersions, err := a.FetchAllVerOfLP(ctx, name, project, domain) + if err != nil { + return nil, err + } + lp := lpVersions[0] + return lp, nil +} + +// FetchLPVersion fetches particular version of launch plan +func (a *AdminFetcherExtClient) FetchLPVersion(ctx context.Context, name, version, project, domain string) (*admin.LaunchPlan, error) { + lp, err := a.AdminServiceClient().GetLaunchPlan(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + }) + if err != nil { + return nil, err + } + return lp, nil +} diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go new file mode 100644 index 0000000000..9f8d7512ff --- /dev/null +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -0,0 +1,339 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +// AdminFetcherExtInterface is an autogenerated mock type for the AdminFetcherExtInterface type +type AdminFetcherExtInterface struct { + mock.Mock +} + +type AdminFetcherExtInterface_AdminServiceClient struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_AdminServiceClient) Return(_a0 service.AdminServiceClient) *AdminFetcherExtInterface_AdminServiceClient { + return &AdminFetcherExtInterface_AdminServiceClient{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminFetcherExtInterface) OnAdminServiceClient() *AdminFetcherExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient") + return &AdminFetcherExtInterface_AdminServiceClient{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminFetcherExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient", matchers...) + return &AdminFetcherExtInterface_AdminServiceClient{Call: c} +} + +// AdminServiceClient provides a mock function with given fields: +func (_m *AdminFetcherExtInterface) AdminServiceClient() service.AdminServiceClient { + ret := _m.Called() + + var r0 service.AdminServiceClient + if rf, ok := ret.Get(0).(func() service.AdminServiceClient); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.AdminServiceClient) + } + } + + return r0 +} + +type AdminFetcherExtInterface_FetchAllVerOfLP struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchAllVerOfLP) Return(_a0 []*admin.LaunchPlan, _a1 error) *AdminFetcherExtInterface_FetchAllVerOfLP { + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfLP { + c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLPMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfLP { + c := _m.On("FetchAllVerOfLP", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} +} + +// FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain +func (_m *AdminFetcherExtInterface) FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) ([]*admin.LaunchPlan, error) { + ret := _m.Called(ctx, lpName, project, domain) + + var r0 []*admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.LaunchPlan); ok { + r0 = rf(ctx, lpName, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, lpName, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchAllVerOfTask struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchAllVerOfTask) Return(_a0 []*admin.Task, _a1 error) *AdminFetcherExtInterface_FetchAllVerOfTask { + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfTask { + c := _m.On("FetchAllVerOfTask", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTaskMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfTask { + c := _m.On("FetchAllVerOfTask", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} +} + +// FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name string, project string, domain string) ([]*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 []*admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.Task); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchExecution struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *AdminFetcherExtInterface_FetchExecution { + return &AdminFetcherExtInterface_FetchExecution{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchExecution(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchExecution { + c := _m.On("FetchExecution", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchExecution{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchExecution { + c := _m.On("FetchExecution", matchers...) + return &AdminFetcherExtInterface_FetchExecution{Call: c} +} + +// FetchExecution provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchExecution(ctx context.Context, name string, project string, domain string) (*admin.Execution, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.Execution + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Execution); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Execution) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchLPLatestVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchLPLatestVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminFetcherExtInterface_FetchLPLatestVersion { + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchLPLatestVersion { + c := _m.On("FetchLPLatestVersion", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPLatestVersion { + c := _m.On("FetchLPLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} +} + +// FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchLPLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchLPVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchLPVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminFetcherExtInterface_FetchLPVersion { + return &AdminFetcherExtInterface_FetchLPVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchLPVersion { + c := _m.On("FetchLPVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchLPVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPVersion { + c := _m.On("FetchLPVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c} +} + +// FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain +func (_m *AdminFetcherExtInterface) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, version, project, domain) + + var r0 *admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, version, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, version, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchTaskLatestVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchTaskLatestVersion) Return(_a0 *admin.Task, _a1 error) *AdminFetcherExtInterface_FetchTaskLatestVersion { + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchTaskLatestVersion { + c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskLatestVersion { + c := _m.On("FetchTaskLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} +} + +// FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Task); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchTaskVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchTaskVersion) Return(_a0 *admin.Task, _a1 error) *AdminFetcherExtInterface_FetchTaskVersion { + return &AdminFetcherExtInterface_FetchTaskVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchTaskVersion { + c := _m.On("FetchTaskVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskVersion { + c := _m.On("FetchTaskVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} +} + +// FetchTaskVersion provides a mock function with given fields: ctx, name, version, project, domain +func (_m *AdminFetcherExtInterface) FetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) (*admin.Task, error) { + ret := _m.Called(ctx, name, version, project, domain) + + var r0 *admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.Task); ok { + r0 = rf(ctx, name, version, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, version, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go new file mode 100644 index 0000000000..df851c5d29 --- /dev/null +++ b/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go @@ -0,0 +1,339 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +// AdminServiceFetcherExtInterface is an autogenerated mock type for the AdminServiceFetcherExtInterface type +type AdminServiceFetcherExtInterface struct { + mock.Mock +} + +type AdminServiceFetcherExtInterface_AdminServiceClient struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_AdminServiceClient) Return(_a0 service.AdminServiceClient) *AdminServiceFetcherExtInterface_AdminServiceClient { + return &AdminServiceFetcherExtInterface_AdminServiceClient{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminServiceFetcherExtInterface) OnAdminServiceClient() *AdminServiceFetcherExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient") + return &AdminServiceFetcherExtInterface_AdminServiceClient{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient", matchers...) + return &AdminServiceFetcherExtInterface_AdminServiceClient{Call: c} +} + +// AdminServiceClient provides a mock function with given fields: +func (_m *AdminServiceFetcherExtInterface) AdminServiceClient() service.AdminServiceClient { + ret := _m.Called() + + var r0 service.AdminServiceClient + if rf, ok := ret.Get(0).(func() service.AdminServiceClient); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.AdminServiceClient) + } + } + + return r0 +} + +type AdminServiceFetcherExtInterface_FetchAllVerOfLP struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchAllVerOfLP) Return(_a0 []*admin.LaunchPlan, _a1 error) *AdminServiceFetcherExtInterface_FetchAllVerOfLP { + return &AdminServiceFetcherExtInterface_FetchAllVerOfLP{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) *AdminServiceFetcherExtInterface_FetchAllVerOfLP { + c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain) + return &AdminServiceFetcherExtInterface_FetchAllVerOfLP{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchAllVerOfLPMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchAllVerOfLP { + c := _m.On("FetchAllVerOfLP", matchers...) + return &AdminServiceFetcherExtInterface_FetchAllVerOfLP{Call: c} +} + +// FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) ([]*admin.LaunchPlan, error) { + ret := _m.Called(ctx, lpName, project, domain) + + var r0 []*admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.LaunchPlan); ok { + r0 = rf(ctx, lpName, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, lpName, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchAllVerOfTask struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchAllVerOfTask) Return(_a0 []*admin.Task, _a1 error) *AdminServiceFetcherExtInterface_FetchAllVerOfTask { + return &AdminServiceFetcherExtInterface_FetchAllVerOfTask{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string) *AdminServiceFetcherExtInterface_FetchAllVerOfTask { + c := _m.On("FetchAllVerOfTask", ctx, name, project, domain) + return &AdminServiceFetcherExtInterface_FetchAllVerOfTask{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchAllVerOfTaskMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchAllVerOfTask { + c := _m.On("FetchAllVerOfTask", matchers...) + return &AdminServiceFetcherExtInterface_FetchAllVerOfTask{Call: c} +} + +// FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name string, project string, domain string) ([]*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 []*admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.Task); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchExecution struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchExecution) Return(_a0 *admin.Execution, _a1 error) *AdminServiceFetcherExtInterface_FetchExecution { + return &AdminServiceFetcherExtInterface_FetchExecution{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchExecution(ctx context.Context, name string, project string, domain string) *AdminServiceFetcherExtInterface_FetchExecution { + c := _m.On("FetchExecution", ctx, name, project, domain) + return &AdminServiceFetcherExtInterface_FetchExecution{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchExecutionMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchExecution { + c := _m.On("FetchExecution", matchers...) + return &AdminServiceFetcherExtInterface_FetchExecution{Call: c} +} + +// FetchExecution provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchExecution(ctx context.Context, name string, project string, domain string) (*admin.Execution, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.Execution + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Execution); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Execution) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchLPLatestVersion struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchLPLatestVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceFetcherExtInterface_FetchLPLatestVersion { + return &AdminServiceFetcherExtInterface_FetchLPLatestVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string) *AdminServiceFetcherExtInterface_FetchLPLatestVersion { + c := _m.On("FetchLPLatestVersion", ctx, name, project, domain) + return &AdminServiceFetcherExtInterface_FetchLPLatestVersion{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchLPLatestVersionMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchLPLatestVersion { + c := _m.On("FetchLPLatestVersion", matchers...) + return &AdminServiceFetcherExtInterface_FetchLPLatestVersion{Call: c} +} + +// FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchLPLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchLPVersion struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchLPVersion) Return(_a0 *admin.LaunchPlan, _a1 error) *AdminServiceFetcherExtInterface_FetchLPVersion { + return &AdminServiceFetcherExtInterface_FetchLPVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string) *AdminServiceFetcherExtInterface_FetchLPVersion { + c := _m.On("FetchLPVersion", ctx, name, version, project, domain) + return &AdminServiceFetcherExtInterface_FetchLPVersion{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchLPVersionMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchLPVersion { + c := _m.On("FetchLPVersion", matchers...) + return &AdminServiceFetcherExtInterface_FetchLPVersion{Call: c} +} + +// FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchLPVersion(ctx context.Context, name string, version string, project string, domain string) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, version, project, domain) + + var r0 *admin.LaunchPlan + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, version, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.LaunchPlan) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, version, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchTaskLatestVersion struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchTaskLatestVersion) Return(_a0 *admin.Task, _a1 error) *AdminServiceFetcherExtInterface_FetchTaskLatestVersion { + return &AdminServiceFetcherExtInterface_FetchTaskLatestVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) *AdminServiceFetcherExtInterface_FetchTaskLatestVersion { + c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain) + return &AdminServiceFetcherExtInterface_FetchTaskLatestVersion{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchTaskLatestVersionMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchTaskLatestVersion { + c := _m.On("FetchTaskLatestVersion", matchers...) + return &AdminServiceFetcherExtInterface_FetchTaskLatestVersion{Call: c} +} + +// FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Task); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminServiceFetcherExtInterface_FetchTaskVersion struct { + *mock.Call +} + +func (_m AdminServiceFetcherExtInterface_FetchTaskVersion) Return(_a0 *admin.Task, _a1 error) *AdminServiceFetcherExtInterface_FetchTaskVersion { + return &AdminServiceFetcherExtInterface_FetchTaskVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) *AdminServiceFetcherExtInterface_FetchTaskVersion { + c := _m.On("FetchTaskVersion", ctx, name, version, project, domain) + return &AdminServiceFetcherExtInterface_FetchTaskVersion{Call: c} +} + +func (_m *AdminServiceFetcherExtInterface) OnFetchTaskVersionMatch(matchers ...interface{}) *AdminServiceFetcherExtInterface_FetchTaskVersion { + c := _m.On("FetchTaskVersion", matchers...) + return &AdminServiceFetcherExtInterface_FetchTaskVersion{Call: c} +} + +// FetchTaskVersion provides a mock function with given fields: ctx, name, version, project, domain +func (_m *AdminServiceFetcherExtInterface) FetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) (*admin.Task, error) { + ret := _m.Called(ctx, name, version, project, domain) + + var r0 *admin.Task + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.Task); ok { + r0 = rf(ctx, name, version, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Task) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, version, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/ext/task_fetcher.go b/flytectl/pkg/ext/task_fetcher.go new file mode 100644 index 0000000000..96984549a2 --- /dev/null +++ b/flytectl/pkg/ext/task_fetcher.go @@ -0,0 +1,60 @@ +package ext + +import ( + "context" + "fmt" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +func (a *AdminFetcherExtClient) FetchAllVerOfTask(ctx context.Context, name, project, domain string) ([]*admin.Task, error) { + tList, err := a.AdminServiceClient().ListTasks(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + if len(tList.Tasks) == 0 { + return nil, fmt.Errorf("no tasks retrieved for %v", name) + } + return tList.Tasks, nil +} + +func (a *AdminFetcherExtClient) FetchTaskLatestVersion(ctx context.Context, name, project, domain string) (*admin.Task, error) { + var t *admin.Task + var err error + // Fetch the latest version of the task. + var taskVersions []*admin.Task + taskVersions, err = a.FetchAllVerOfTask(ctx, name, project, domain) + if err != nil { + return nil, err + } + t = taskVersions[0] + return t, nil +} + +func (a *AdminFetcherExtClient) FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) { + t, err := a.AdminServiceClient().GetTask(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + }) + if err != nil { + return nil, err + } + return t, nil +} From 661de8de42b555c582dd770a8c75f0a64e07bb1b Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Tue, 11 May 2021 22:25:22 +0530 Subject: [PATCH 046/356] Matchable resource support in flytectl for task resource attributes (#63) * Adding commands for task resource attributes support Signed-off-by: Prafulla Mahindrakar --- flytectl/.gitignore | 1 + .../task_resource_attribute_delete_config.go | 10 ++ .../task_resource_attribute_fetch_config.go | 9 ++ .../task_resource_attribute_file_config.go | 86 ++++++++++ .../task_resource_attribute_update_config.go | 10 ++ .../taskresourceattrdeleteconfig_flags.go | 46 ++++++ ...taskresourceattrdeleteconfig_flags_test.go | 124 ++++++++++++++ .../taskresourceattrfetchconfig_flags.go | 46 ++++++ .../taskresourceattrfetchconfig_flags_test.go | 124 ++++++++++++++ .../taskresourceattrupdateconfig_flags.go | 46 ++++++ ...taskresourceattrupdateconfig_flags_test.go | 124 ++++++++++++++ flytectl/cmd/core/cmd.go | 11 +- flytectl/cmd/core/cmd_ctx.go | 27 +++- flytectl/cmd/create/execution_test.go | 4 +- flytectl/cmd/delete/delete.go | 4 + flytectl/cmd/delete/delete_test.go | 20 ++- flytectl/cmd/delete/execution_test.go | 66 ++++---- .../matchable_task_resource_attribute.go | 97 +++++++++++ .../matchable_task_resource_attribute_test.go | 133 +++++++++++++++ .../testdata/invalid_task_attribute.yaml | 5 + .../valid_project_domain_task_attribute.yaml | 9 ++ .../valid_workflow_task_attribute.yaml | 9 ++ flytectl/cmd/get/get.go | 4 + flytectl/cmd/get/get_test.go | 12 +- flytectl/cmd/get/launch_plan_test.go | 10 +- .../get/matchable_task_resource_attribute.go | 98 ++++++++++++ .../matchable_task_resource_attribute_test.go | 144 +++++++++++++++++ flytectl/cmd/get/task_test.go | 10 +- flytectl/cmd/get/taskconfig_flags.go | 2 +- flytectl/cmd/testutils/test_utils.go | 19 ++- .../matchable_task_resource_attribute.go | 95 +++++++++++ .../matchable_task_resource_attribute_test.go | 94 +++++++++++ flytectl/cmd/update/project_test.go | 81 ++++------ .../testdata/invalid_task_attribute.yaml | 5 + .../valid_project_domain_task_attribute.yaml | 9 ++ .../valid_workflow_task_attribute.yaml | 9 ++ flytectl/cmd/update/update.go | 3 + flytectl/cmd/update/update_test.go | 24 ++- flytectl/docs/coverage.out | 1 + flytectl/docs/source/gen/flytectl.rst | 12 +- flytectl/docs/source/gen/flytectl_config.rst | 12 +- .../source/gen/flytectl_config_discover.rst | 12 +- .../source/gen/flytectl_config_validate.rst | 12 +- flytectl/docs/source/gen/flytectl_create.rst | 12 +- .../source/gen/flytectl_create_execution.rst | 12 +- .../source/gen/flytectl_create_project.rst | 12 +- flytectl/docs/source/gen/flytectl_delete.rst | 13 +- .../source/gen/flytectl_delete_execution.rst | 12 +- ...lytectl_delete_task-resource-attribute.rst | 112 +++++++++++++ flytectl/docs/source/gen/flytectl_get.rst | 13 +- .../source/gen/flytectl_get_execution.rst | 12 +- .../source/gen/flytectl_get_launchplan.rst | 12 +- .../docs/source/gen/flytectl_get_project.rst | 12 +- .../flytectl_get_task-resource-attribute.rst | 110 +++++++++++++ .../docs/source/gen/flytectl_get_task.rst | 12 +- .../docs/source/gen/flytectl_get_workflow.rst | 12 +- .../docs/source/gen/flytectl_register.rst | 12 +- .../source/gen/flytectl_register_files.rst | 12 +- flytectl/docs/source/gen/flytectl_update.rst | 13 +- .../source/gen/flytectl_update_launchplan.rst | 12 +- .../source/gen/flytectl_update_project.rst | 12 +- ...lytectl_update_task-resource-attribute.rst | 117 ++++++++++++++ .../docs/source/gen/flytectl_update_task.rst | 12 +- .../source/gen/flytectl_update_workflow.rst | 12 +- flytectl/docs/source/gen/flytectl_version.rst | 12 +- .../pkg/ext/attribute_match_deleter_test.go | 49 ++++++ flytectl/pkg/ext/attribute_match_fetcher.go | 29 ++++ .../pkg/ext/attribute_match_fetcher_test.go | 49 ++++++ flytectl/pkg/ext/attribute_match_updater.go | 31 ++++ .../pkg/ext/attribute_match_updater_test.go | 55 +++++++ flytectl/pkg/ext/attribute_matcher_deleter.go | 26 +++ flytectl/pkg/ext/deleter.go | 33 ++++ flytectl/pkg/ext/doc.go | 2 + ...on_fetcher_ext.go => execution_fetcher.go} | 0 flytectl/pkg/ext/execution_fetcher_test.go | 68 ++++++++ .../ext/{fetcher_ext_client.go => fetcher.go} | 6 + flytectl/pkg/ext/launch_plan_fetcher_test.go | 151 ++++++++++++++++++ .../ext/mocks/admin_deleter_ext_interface.go | 116 ++++++++++++++ .../ext/mocks/admin_fetcher_ext_interface.go | 82 ++++++++++ .../ext/mocks/admin_updater_ext_interface.go | 116 ++++++++++++++ flytectl/pkg/ext/task_fetcher_test.go | 125 +++++++++++++++ flytectl/pkg/ext/updater.go | 33 ++++ 82 files changed, 2961 insertions(+), 259 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go create mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go create mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/delete/matchable_task_resource_attribute.go create mode 100644 flytectl/cmd/delete/matchable_task_resource_attribute_test.go create mode 100644 flytectl/cmd/delete/testdata/invalid_task_attribute.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml create mode 100644 flytectl/cmd/get/matchable_task_resource_attribute.go create mode 100644 flytectl/cmd/get/matchable_task_resource_attribute_test.go create mode 100644 flytectl/cmd/update/matchable_task_resource_attribute.go create mode 100644 flytectl/cmd/update/matchable_task_resource_attribute_test.go create mode 100644 flytectl/cmd/update/testdata/invalid_task_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml create mode 100644 flytectl/docs/coverage.out create mode 100644 flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst create mode 100644 flytectl/pkg/ext/attribute_match_deleter_test.go create mode 100644 flytectl/pkg/ext/attribute_match_fetcher.go create mode 100644 flytectl/pkg/ext/attribute_match_fetcher_test.go create mode 100644 flytectl/pkg/ext/attribute_match_updater.go create mode 100644 flytectl/pkg/ext/attribute_match_updater_test.go create mode 100644 flytectl/pkg/ext/attribute_matcher_deleter.go create mode 100644 flytectl/pkg/ext/deleter.go create mode 100644 flytectl/pkg/ext/doc.go rename flytectl/pkg/ext/{execution_fetcher_ext.go => execution_fetcher.go} (100%) create mode 100644 flytectl/pkg/ext/execution_fetcher_test.go rename flytectl/pkg/ext/{fetcher_ext_client.go => fetcher.go} (79%) create mode 100644 flytectl/pkg/ext/launch_plan_fetcher_test.go create mode 100644 flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go create mode 100644 flytectl/pkg/ext/mocks/admin_updater_ext_interface.go create mode 100644 flytectl/pkg/ext/task_fetcher_test.go create mode 100644 flytectl/pkg/ext/updater.go diff --git a/flytectl/.gitignore b/flytectl/.gitignore index 45283c9a91..5f7a3898d1 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -6,3 +6,4 @@ bin _test ./config.yaml docs/build/* +cmd/get/temp-output-file diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go new file mode 100644 index 0000000000..34a6a4e466 --- /dev/null +++ b/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go @@ -0,0 +1,10 @@ +package subcommand + +//go:generate pflags TaskResourceAttrDeleteConfig --default-var DefaultTaskResourceDelConfig + +// TaskResourceAttrDeleteConfig Matchable resource attributes configuration passed from command line +type TaskResourceAttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultTaskResourceDelConfig = &TaskResourceAttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go new file mode 100644 index 0000000000..34b1d435f4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go @@ -0,0 +1,9 @@ +package subcommand + +//go:generate pflags TaskResourceAttrFetchConfig --default-var DefaultTaskResourceFetchConfig + +type TaskResourceAttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultTaskResourceFetchConfig = &TaskResourceAttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go new file mode 100644 index 0000000000..d0c0a0656c --- /dev/null +++ b/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go @@ -0,0 +1,86 @@ +package subcommand + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "os" + + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" + + "sigs.k8s.io/yaml" +) + +// TaskResourceAttrFileConfig shadow config for TaskResourceAttribute. +// The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type TaskResourceAttrFileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.TaskResourceAttributes +} + +// WriteConfigToFile used for marshaling the config to a file which can then be used for update/delete +func (t TaskResourceAttrFileConfig) WriteConfigToFile(fileName string) error { + d, err := yaml.Marshal(t) + if err != nil { + return fmt.Errorf("error: %v", err) + } + if _, err = os.Stat(fileName); err == nil { + if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { + return fmt.Errorf("backup the file before continuing") + } + } + return ioutil.WriteFile(fileName, d, 0600) +} + +// Dumps the json representation of the TaskResourceAttrFileConfig +func (t TaskResourceAttrFileConfig) String() string { + tj, err := json.Marshal(t) + if err != nil { + fmt.Println(err) + return "marshaling error" + } + return fmt.Sprintf("%s\n", tj) +} + +// ReadConfigFromFile used for unmarshaling the config from a file which is used for update/delete +func (t *TaskResourceAttrFileConfig) ReadConfigFromFile(fileName string) error { + data, err := ioutil.ReadFile(fileName) + if err != nil { + return fmt.Errorf("unable to read from %v yaml file", fileName) + } + if err = yaml.UnmarshalStrict(data, t); err != nil { + return err + } + return nil +} + +// MatchableAttributeDecorator decorator over TaskResourceAttributes. Similar decorator would exist for other MatchingAttributes +func (t *TaskResourceAttrFileConfig) MatchableAttributeDecorator() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: t.TaskResourceAttributes, + }, + } +} + +func (t TaskResourceAttrFileConfig) DumpTaskResourceAttr(ctx context.Context, fileName string) { + // Dump empty task resource attr for editing + // Write config to file if filename provided in the command + if len(fileName) > 0 { + // Read the config from the file and update the TaskResourceAttrFileConfig with the TaskResourceAttrConfig + if err := t.WriteConfigToFile(fileName); err != nil { + fmt.Printf("error dumping in file due to %v", err) + logger.Warnf(ctx, "error dumping in file due to %v", err) + return + } + fmt.Printf("wrote the config to file %v", fileName) + } else { + fmt.Printf("%v", t) + } +} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go new file mode 100644 index 0000000000..d85944777d --- /dev/null +++ b/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go @@ -0,0 +1,10 @@ +package subcommand + +//go:generate pflags TaskResourceAttrUpdateConfig --default-var DefaultTaskResourceUpdateConfig + +// TaskResourceAttrUpdateConfig Matchable resource attributes configuration passed from command line +type TaskResourceAttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultTaskResourceUpdateConfig = &TaskResourceAttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go new file mode 100755 index 0000000000..fadea1f465 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TaskResourceAttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (TaskResourceAttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg TaskResourceAttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TaskResourceAttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultTaskResourceDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..222fae2c50 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTaskResourceAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTaskResourceAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsTaskResourceAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTaskResourceAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTaskResourceAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TaskResourceAttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTaskResourceAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TaskResourceAttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TaskResourceAttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrDeleteConfig(val, result)) +} + +func testDecodeSlice_TaskResourceAttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrDeleteConfig(vStringSlice, result)) +} + +func TestTaskResourceAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := TaskResourceAttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTaskResourceAttrDeleteConfig_SetFlags(t *testing.T) { + actual := TaskResourceAttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultTaskResourceDelConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_TaskResourceAttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go new file mode 100755 index 0000000000..ebf6ec6220 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TaskResourceAttrFetchConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (TaskResourceAttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrFetchConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg TaskResourceAttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TaskResourceAttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultTaskResourceFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go new file mode 100755 index 0000000000..c2c77e82c2 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTaskResourceAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTaskResourceAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsTaskResourceAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTaskResourceAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTaskResourceAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TaskResourceAttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTaskResourceAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TaskResourceAttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TaskResourceAttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrFetchConfig(val, result)) +} + +func testDecodeSlice_TaskResourceAttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrFetchConfig(vStringSlice, result)) +} + +func TestTaskResourceAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := TaskResourceAttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTaskResourceAttrFetchConfig_SetFlags(t *testing.T) { + actual := TaskResourceAttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultTaskResourceFetchConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_TaskResourceAttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go new file mode 100755 index 0000000000..d94413106f --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (TaskResourceAttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (TaskResourceAttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg TaskResourceAttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TaskResourceAttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultTaskResourceUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go new file mode 100755 index 0000000000..73f272b45e --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsTaskResourceAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementTaskResourceAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsTaskResourceAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookTaskResourceAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementTaskResourceAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_TaskResourceAttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookTaskResourceAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_TaskResourceAttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_TaskResourceAttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrUpdateConfig(val, result)) +} + +func testDecodeSlice_TaskResourceAttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_TaskResourceAttrUpdateConfig(vStringSlice, result)) +} + +func TestTaskResourceAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := TaskResourceAttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestTaskResourceAttrUpdateConfig_SetFlags(t *testing.T) { + actual := TaskResourceAttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultTaskResourceUpdateConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_TaskResourceAttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 2a13e36c05..54483c5c8f 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -28,11 +28,12 @@ type CommandEntry struct { func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { for resource, cmdEntry := range cmdFuncs { cmd := &cobra.Command{ - Use: resource, - Short: cmdEntry.Short, - Long: cmdEntry.Long, - Aliases: cmdEntry.Aliases, - RunE: generateCommandFunc(cmdEntry), + Use: resource, + Short: cmdEntry.Short, + Long: cmdEntry.Long, + Aliases: cmdEntry.Aliases, + RunE: generateCommandFunc(cmdEntry), + SilenceUsage: true, } if cmdEntry.PFlagProvider != nil { cmd.Flags().AddFlagSet(cmdEntry.PFlagProvider.GetPFlagSet("")) diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 58f3ff457b..ab1c6c6afd 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -10,13 +10,30 @@ import ( type CommandContext struct { adminClient service.AdminServiceClient adminClientFetcherExt ext.AdminFetcherExtInterface + adminClientUpdateExt ext.AdminUpdaterExtInterface + adminClientDeleteExt ext.AdminDeleterExtInterface in io.Reader out io.Writer } func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext { return CommandContext{adminClient: adminClient, out: out, - adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: adminClient}} + adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: adminClient}, + adminClientUpdateExt: &ext.AdminUpdaterExtClient{AdminClient: adminClient}, + adminClientDeleteExt: &ext.AdminDeleterExtClient{AdminClient: adminClient}} +} + +// NewCommandContextWithExt construct command context with injected extensions. Helps in injecting mocked ones for testing. +func NewCommandContextWithExt( + adminClient service.AdminServiceClient, + fetcher ext.AdminFetcherExtInterface, + updater ext.AdminUpdaterExtInterface, + deleter ext.AdminDeleterExtInterface, + out io.Writer) CommandContext { + return CommandContext{adminClient: adminClient, out: out, + adminClientFetcherExt: fetcher, + adminClientUpdateExt: updater, + adminClientDeleteExt: deleter} } func (c CommandContext) AdminClient() service.AdminServiceClient { @@ -34,3 +51,11 @@ func (c CommandContext) InputPipe() io.Reader { func (c CommandContext) AdminFetcherExt() ext.AdminFetcherExtInterface { return c.adminClientFetcherExt } + +func (c CommandContext) AdminUpdaterExt() ext.AdminUpdaterExtInterface { + return c.adminClientUpdateExt +} + +func (c CommandContext) AdminDeleterExt() ext.AdminDeleterExtInterface { + return c.adminClientDeleteExt +} diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index c833da4889..d83d99ae96 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -17,8 +18,9 @@ import ( // This function needs to be called after testutils.Steup() func createExecutionSetup() { ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx mockClient = testutils.MockClient + // TODO: migrate to new command context from testutils + cmdCtx = cmdCore.NewCommandContext(mockClient, testutils.MockOutStream) sortedListLiteralType := core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 2b6cf36310..2c694db819 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -1,6 +1,7 @@ package delete import ( + "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -27,6 +28,9 @@ func RemoteDeleteCommand() *cobra.Command { terminateResourcesFuncs := map[string]cmdcore.CommandEntry{ "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, Long: execCmdLong}, + "task-resource-attribute": {CmdFunc: deleteTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, + Short: taskResourceAttributesShort, + Long: taskResourceAttributesLong, PFlagProvider: subcommand.DefaultTaskResourceDelConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 5543c88d28..dd3075edac 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -1,18 +1,32 @@ package delete import ( + "context" "sort" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" ) +var ( + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + cmdCtx cmdCore.CommandContext +) +var setup = testutils.Setup +var tearDownAndVerify = testutils.TearDownAndVerify + func TestDeleteCommand(t *testing.T) { deleteCommand := RemoteDeleteCommand() assert.Equal(t, deleteCommand.Use, "delete") assert.Equal(t, deleteCommand.Short, deleteCmdShort) assert.Equal(t, deleteCommand.Long, deleteCmdLong) - assert.Equal(t, len(deleteCommand.Commands()), 1) + assert.Equal(t, len(deleteCommand.Commands()), 2) cmdNouns := deleteCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { @@ -22,4 +36,8 @@ func TestDeleteCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) assert.Equal(t, cmdNouns[0].Short, execCmdShort) assert.Equal(t, cmdNouns[0].Long, execCmdLong) + assert.Equal(t, cmdNouns[1].Use, "task-resource-attribute") + assert.Equal(t, cmdNouns[1].Aliases, []string{"task-resource-attributes"}) + assert.Equal(t, cmdNouns[1].Short, taskResourceAttributesShort) + assert.Equal(t, cmdNouns[1].Long, taskResourceAttributesLong) } diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index f2f3ec11bb..c9a5b11c62 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -1,13 +1,11 @@ package delete import ( - "context" "errors" - "io" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -15,68 +13,64 @@ import ( ) var ( - ctx context.Context - args []string + args []string + terminateExecRequests []*admin.ExecutionTerminateRequest ) -func setup() { - ctx = context.Background() - args = []string{} +func terminateExecutionSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient + args = append(args, "exec1", "exec2") + terminateExecRequests = []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{ + Name: "exec1", + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }}, + {Id: &core.WorkflowExecutionIdentifier{ + Name: "exec2", + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }}, + } } func TestTerminateExecutionFunc(t *testing.T) { setup() - args = append(args, "exec1", "exec2") - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - terminateExecRequests := []*admin.ExecutionTerminateRequest{ - {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, - {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, - } + terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) - err := terminateExecutionFunc(ctx, args, cmdCtx) + err = terminateExecutionFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) + tearDownAndVerify(t, "") } func TestTerminateExecutionFuncWithError(t *testing.T) { setup() - args = append(args, "exec1", "exec2") - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - terminateExecRequests := []*admin.ExecutionTerminateRequest{ - {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, - {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, - } + terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(nil, errors.New("failed to terminate")) mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) - err := terminateExecutionFunc(ctx, args, cmdCtx) + err = terminateExecutionFunc(ctx, args, cmdCtx) assert.Equal(t, errors.New("failed to terminate"), err) mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) mockClient.AssertNotCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) + tearDownAndVerify(t, "") } func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { setup() - args = append(args, "exec1", "exec2") - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - terminateExecRequests := []*admin.ExecutionTerminateRequest{ - {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, - {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, - } + terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(nil, errors.New("failed to terminate")) - err := terminateExecutionFunc(ctx, args, cmdCtx) + err = terminateExecutionFunc(ctx, args, cmdCtx) assert.Equal(t, errors.New("failed to terminate"), err) mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) + tearDownAndVerify(t, "") } diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go new file mode 100644 index 0000000000..57791d033d --- /dev/null +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -0,0 +1,97 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" +) + +const ( + taskResourceAttributesShort = "Deletes matchable resources of task attributes" + taskResourceAttributesLong = ` +Deletes task resource attributes for given project,domain combination or additionally with workflow name. + +Deletes task resource attribute for project and domain +Here the command delete task resource attributes for project flytectldemo and development domain. +:: + + flytectl delete task-resource-attribute -p flytectldemo -d development + + +Deleting task resource attribute using config file which was used for creating it. +Here the command deletes task resource attributes from the config file tra.yaml +eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +Deleting task resource attribute for a workflow +Here the command deletes task resource attributes for a workflow + +:: + + flytectl delete task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deleteTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + delConfig := subcommand.DefaultTaskResourceDelConfig + var project string + var domain string + var workflowName string + + if len(delConfig.AttrFile) > 0 { + // Read the config from the file + taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{} + if err := taskResourceAttrFileConfig.ReadConfigFromFile(delConfig.AttrFile); err != nil { + return err + } + // Get project domain workflow name from the read file. + project = taskResourceAttrFileConfig.Project + domain = taskResourceAttrFileConfig.Domain + workflowName = taskResourceAttrFileConfig.Workflow + } else { + // Get all the parameters for deletion from the command line + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + } + + if len(workflowName) > 0 { + // Delete the workflow attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here + err := cmdCtx.AdminDeleterExt().DeleteWorkflowAttributes(ctx, project, domain, workflowName, admin.MatchableResource_TASK_RESOURCE) + if err != nil { + return err + } + logger.Debugf(ctx, "Deleted task resource attributes from %v project and domain %v and workflow %v", project, domain, workflowName) + } else { + // Delete the project domain attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here + err := cmdCtx.AdminDeleterExt().DeleteProjectDomainAttributes(ctx, project, domain, admin.MatchableResource_TASK_RESOURCE) + if err != nil { + return err + } + logger.Debugf(ctx, "Deleted task resource attributes from %v project and domain %v", project, domain) + } + return nil +} diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go new file mode 100644 index 0000000000..211aeb694b --- /dev/null +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -0,0 +1,133 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deleteTaskResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + subcommand.DefaultTaskResourceDelConfig = &subcommand.TaskResourceAttrDeleteConfig{} +} + +func TestDeleteTaskResourceAttributes(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/non-existent" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_TASK_RESOURCE) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/invalid_task_attribute.yaml" + // No args implying project domain attribute deletion + err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + }) +} diff --git a/flytectl/cmd/delete/testdata/invalid_task_attribute.yaml b/flytectl/cmd/delete/testdata/invalid_task_attribute.yaml new file mode 100644 index 0000000000..3804d837a3 --- /dev/null +++ b/flytectl/cmd/delete/testdata/invalid_task_attribute.yaml @@ -0,0 +1,5 @@ +InvalidDomain: development +InvalidProject: flytectldemo +InvalidWorkflow: "" +cpu: "1" +memory: 150Mi \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml new file mode 100644 index 0000000000..0051a4c2cc --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml @@ -0,0 +1,9 @@ +Domain: development +Project: flytectldemo +Workflow: "" +defaults: + cpu: "1" + memory: 150Mi +limits: + cpu: "2" + memory: 450Mi \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml new file mode 100644 index 0000000000..2593cad309 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml @@ -0,0 +1,9 @@ +Domain: development +Project: flytectldemo +Workflow: core.control_flow.run_merge_sort.merge_sort +defaults: + cpu: "2" + memory: 250Mi +limits: + cpu: "3" + memory: 350Mi \ No newline at end of file diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index e875a0ca01..0b7bd5da93 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -1,6 +1,7 @@ package get import ( + "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -37,6 +38,9 @@ func CreateGetCommand() *cobra.Command { Long: launchPlanLong, PFlagProvider: launchPlanConfig}, "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, Long: executionLong}, + "task-resource-attribute": {CmdFunc: getTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, + Short: taskResourceAttributesShort, + Long: taskResourceAttributesLong, PFlagProvider: subcommand.DefaultTaskResourceFetchConfig}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 852994db00..e277ba1624 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -37,7 +37,7 @@ func TestCreateGetCommand(t *testing.T) { assert.Equal(t, getCommand.Use, "get") assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) - assert.Equal(t, len(getCommand.Commands()), 5) + assert.Equal(t, len(getCommand.Commands()), 6) cmdNouns := getCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { @@ -55,7 +55,11 @@ func TestCreateGetCommand(t *testing.T) { assert.Equal(t, cmdNouns[3].Use, "task") assert.Equal(t, cmdNouns[3].Aliases, []string{"tasks"}) assert.Equal(t, cmdNouns[3].Short, "Gets task resources") - assert.Equal(t, cmdNouns[4].Use, "workflow") - assert.Equal(t, cmdNouns[4].Aliases, []string{"workflows"}) - assert.Equal(t, cmdNouns[4].Short, "Gets workflow resources") + assert.Equal(t, cmdNouns[4].Use, "task-resource-attribute") + assert.Equal(t, cmdNouns[4].Aliases, []string{"task-resource-attributes"}) + assert.Equal(t, cmdNouns[4].Short, taskResourceAttributesShort) + assert.Equal(t, cmdNouns[4].Long, taskResourceAttributesLong) + assert.Equal(t, cmdNouns[5].Use, "workflow") + assert.Equal(t, cmdNouns[5].Aliases, []string{"workflows"}) + assert.Equal(t, cmdNouns[5].Short, "Gets workflow resources") } diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 058e745cd0..5933746acb 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,7 +5,8 @@ import ( "os" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -26,9 +27,10 @@ var ( ) func getLaunchPlanSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient + ctx = u.Ctx + mockClient = u.MockClient + // TODO: migrate to new command context from testutils + cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsLp = []string{"launchplan1"} parameterMap := map[string]*core.Parameter{ "numbers": { diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go new file mode 100644 index 0000000000..09e8b5df99 --- /dev/null +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -0,0 +1,98 @@ +package get + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + taskResourceAttributesShort = "Gets matchable resources of task attributes" + taskResourceAttributesLong = ` +Retrieves task resource attributes for given project,domain combination or additionally with workflow name. + +Retrieves task resource attribute for project and domain +Here the command get task resource attributes for project flytectldemo and development domain. +:: + + flytectl get task-resource-attribute -p flytectldemo -d development + +eg : O/P + +.. code-block:: json + + {"Project":"flytectldemo","Domain":"development","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + +Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. +Here the command gets task resource attributes and writes the config file to tra.yaml +eg: content of tra.yaml + +:: + + flytectl get task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +Usage +` +) + +func getTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for TaskResourceAttribute. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the attribute file name from the command line config + fileName := subcommand.DefaultTaskResourceFetchConfig.AttrFile + + if len(workflowName) > 0 { + // Fetch the workflow attribute from the admin + workflowAttr, err := cmdCtx.AdminFetcherExt().FetchWorkflowAttributes(ctx, + project, domain, workflowName, admin.MatchableResource_TASK_RESOURCE) + if err != nil { + return err + } + if workflowAttr.GetAttributes() == nil || workflowAttr.GetAttributes().GetMatchingAttributes() == nil { + return fmt.Errorf("attribute doesn't exist") + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + taskResourceAttrFileConfig.TaskResourceAttributes = workflowAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() + } else { + // Fetch the project domain attribute from the admin + projectDomainAttr, err := cmdCtx.AdminFetcherExt().FetchProjectDomainAttributes(ctx, + project, domain, admin.MatchableResource_TASK_RESOURCE) + if err != nil { + return err + } + if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { + return fmt.Errorf("attribute doesn't exist") + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + taskResourceAttrFileConfig.TaskResourceAttributes = projectDomainAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() + } + // Write the config to the file which can be used for update + taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) + return nil +} diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go new file mode 100644 index 0000000000..00f3efad26 --- /dev/null +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -0,0 +1,144 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getTaskResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + subcommand.DefaultTaskResourceFetchConfig = &subcommand.TaskResourceAttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove("temp-output-file") +} + +func TestGetTaskResourceAttributes(t *testing.T) { + taskResourceAttr := &admin.TaskResourceAttributes{ + Defaults: &admin.TaskResourceSpec{ + Cpu: "1", + Memory: "150Mi", + }, + Limits: &admin.TaskResourceSpec{ + Cpu: "2", + Memory: "350Mi", + }, + } + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: taskResourceAttr, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: taskResourceAttr, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceFetchConfig.AttrFile = "temp-output-file" + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceFetchConfig.AttrFile = "non-existent-dir/temp-output-file" + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, `error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory`) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getTaskResourceAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getTaskResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index e5f2c62246..7164840518 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,7 +5,8 @@ import ( "os" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -26,9 +27,10 @@ var ( ) func getTaskSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient + ctx = u.Ctx + mockClient = u.MockClient + // TODO: migrate to new command context from testutils + cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsTask = []string{"task1"} sortedListLiteralType := core.Variable{ Type: &core.LiteralType{ diff --git a/flytectl/cmd/get/taskconfig_flags.go b/flytectl/cmd/get/taskconfig_flags.go index 71a3fadabc..525884466b 100755 --- a/flytectl/cmd/get/taskconfig_flags.go +++ b/flytectl/cmd/get/taskconfig_flags.go @@ -40,7 +40,7 @@ func (TaskConfig) mustMarshalJSON(v json.Marshaler) string { // GetPFlagSet will return strongly types pflags for all fields in TaskConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg TaskConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("TaskConfig", pflag.ExitOnError) + cmdFlags := pflag.NewFlagSet("TaskResourceAttrConfig", pflag.ExitOnError) cmdFlags.StringVar(&(taskConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), taskConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") cmdFlags.StringVar(&(taskConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), taskConfig.Version, "version of the task to be fetched.") cmdFlags.BoolVar(&(taskConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), taskConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 3285ed1523..f386341f32 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -11,7 +11,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/ext" + extMocks "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/stretchr/testify/assert" @@ -27,8 +27,10 @@ var ( Err error Ctx context.Context MockClient *mocks.AdminServiceClient - FetcherExt ext.AdminFetcherExtInterface - mockOutStream io.Writer + FetcherExt *extMocks.AdminFetcherExtInterface + UpdaterExt *extMocks.AdminUpdaterExtInterface + DeleterExt *extMocks.AdminDeleterExtInterface + MockOutStream io.Writer CmdCtx cmdCore.CommandContext stdOut *os.File stderr *os.File @@ -46,13 +48,20 @@ func Setup() { os.Stderr = writer log.SetOutput(writer) MockClient = new(mocks.AdminServiceClient) - mockOutStream = writer - CmdCtx = cmdCore.NewCommandContext(MockClient, mockOutStream) + FetcherExt = new(extMocks.AdminFetcherExtInterface) + UpdaterExt = new(extMocks.AdminUpdaterExtInterface) + DeleterExt = new(extMocks.AdminDeleterExtInterface) + FetcherExt.OnAdminServiceClient().Return(MockClient) + UpdaterExt.OnAdminServiceClient().Return(MockClient) + DeleterExt.OnAdminServiceClient().Return(MockClient) + MockOutStream = writer + CmdCtx = cmdCore.NewCommandContextWithExt(MockClient, FetcherExt, UpdaterExt, DeleterExt, MockOutStream) config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue config.GetConfig().Output = output } +// TearDownAndVerify TODO: Change this to verify log lines from context func TearDownAndVerify(t *testing.T, expectedLog string) { writer.Close() os.Stdout = stdOut diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go new file mode 100644 index 0000000000..239a81d736 --- /dev/null +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -0,0 +1,95 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytestdlib/logger" +) + +const ( + taskResourceAttributesShort = "Updates matchable resources of task attributes" + taskResourceAttributesLong = ` +Updates task resource attributes for given project and domain combination or additionally with workflow name. + +Updating the task resource attribute is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for task resource attributes from the config file tra.yaml +eg: content of tra.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +:: + + flytectl update task-resource-attribute -attrFile tra.yaml + +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +resource attribute defined at project domain level. +Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +:: + + flytectl update task-resource-attribute -attrFile tra.yaml + +Usage + +` +) + +func updateTaskResourceAttributesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := subcommand.DefaultTaskResourceUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for task resource attribute") + } + + taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{} + if err := taskResourceAttrFileConfig.ReadConfigFromFile(updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := taskResourceAttrFileConfig.Project + domain := taskResourceAttrFileConfig.Domain + workflowName := taskResourceAttrFileConfig.Workflow + + // decorate the taskresource Attributes with MatchingAttributes + matchingAttr := taskResourceAttrFileConfig.MatchableAttributeDecorator() + + if len(workflowName) > 0 { + // Update the workflow attribute using the admin. + err := cmdCtx.AdminUpdaterExt().UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) + if err != nil { + return err + } + logger.Debugf(ctx, "Updated task resource attributes from %v project and domain %v and workflow %v", project, domain, workflowName) + } else { + // Update the project domain attribute using the admin. + err := cmdCtx.AdminUpdaterExt().UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) + if err != nil { + return err + } + logger.Debugf(ctx, "Updated task resource attributes from %v project and domain %v", project, domain) + } + return nil +} diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go new file mode 100644 index 0000000000..4ab7b84cab --- /dev/null +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -0,0 +1,94 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand" + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updateTaskResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + subcommand.DefaultTaskResourceUpdateConfig = &subcommand.TaskResourceAttrUpdateConfig{} +} + +func TestUpdateTaskResourceAttributes(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for task resource attribute"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/non-existent-filel" + err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-filel yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updateTaskResourceAttributeSetup() + subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/invalid_task_attribute.yaml" + err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index a3e7d9e2e5..e3eac5ff84 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -1,17 +1,13 @@ package update import ( - "bytes" - "context" "errors" - "io" - "log" - "os" + "fmt" "testing" + "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -20,49 +16,19 @@ import ( const projectValue = "dummyProject" var ( - reader *os.File - writer *os.File - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - mockOutStream io.Writer args []string - cmdCtx cmdCore.CommandContext projectUpdateRequest *admin.Project - stdOut *os.File - stderr *os.File ) -func setup() { - reader, writer, err = os.Pipe() - if err != nil { - panic(err) - } - stdOut = os.Stdout - stderr = os.Stderr - os.Stdout = writer - os.Stderr = writer - log.SetOutput(writer) - config.GetConfig().Project = projectValue - mockClient = new(mocks.AdminServiceClient) - mockOutStream = writer - cmdCtx = cmdCore.NewCommandContext(mockClient, mockOutStream) +func updateProjectSetup() { + mockClient = u.MockClient + cmdCtx = u.CmdCtx projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ACTIVE, } } -func teardownAndVerify(t *testing.T, expectedLog string) { - writer.Close() - os.Stdout = stdOut - os.Stderr = stderr - var buf bytes.Buffer - if _, err := io.Copy(&buf, reader); err != nil { - assert.Equal(t, expectedLog, buf.String()) - } -} - func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProject *bool, newActivateVal bool) { *archiveProject = newArchiveVal *activateProject = newActivateVal @@ -70,69 +36,76 @@ func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProjec func TestActivateProjectFunc(t *testing.T) { setup() - defer teardownAndVerify(t, "Project dummyProject updated to ACTIVE state\n") + updateProjectSetup() modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "Project dummyProject updated to ACTIVE state\n") } func TestActivateProjectFuncWithError(t *testing.T) { setup() - defer teardownAndVerify(t, "Project dummyProject failed to get updated to ACTIVE state due to Error Updating Project\n") + updateProjectSetup() modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "Project dummyProject failed to get updated to ACTIVE state due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { setup() - defer teardownAndVerify(t, "Project dummyProject updated to ARCHIVED state\n") + updateProjectSetup() modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) - projectUpdateRequest := &admin.Project{ + projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ARCHIVED, } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "Project dummyProject updated to ARCHIVED state\n") } func TestArchiveProjectFuncWithError(t *testing.T) { setup() - defer teardownAndVerify(t, "Project dummyProject failed to get updated to ARCHIVED state due to Error Updating Project\n") + updateProjectSetup() modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) - projectUpdateRequest := &admin.Project{ + projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ARCHIVED, } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "Project dummyProject failed to get updated to ARCHIVED state due to Error Updating Project\n") } func TestEmptyProjectInput(t *testing.T) { setup() - defer teardownAndVerify(t, "Project not passed\n") + updateProjectSetup() config.GetConfig().Project = "" modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "Project not passed") } func TestInvalidInput(t *testing.T) { setup() - defer teardownAndVerify(t, "Invalid state passed. Specify either activate or archive\n") + updateProjectSetup() modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), false) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(ctx, args, cmdCtx) + err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) + tearDownAndVerify(t, "") } diff --git a/flytectl/cmd/update/testdata/invalid_task_attribute.yaml b/flytectl/cmd/update/testdata/invalid_task_attribute.yaml new file mode 100644 index 0000000000..3804d837a3 --- /dev/null +++ b/flytectl/cmd/update/testdata/invalid_task_attribute.yaml @@ -0,0 +1,5 @@ +InvalidDomain: development +InvalidProject: flytectldemo +InvalidWorkflow: "" +cpu: "1" +memory: 150Mi \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml new file mode 100644 index 0000000000..0051a4c2cc --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml @@ -0,0 +1,9 @@ +Domain: development +Project: flytectldemo +Workflow: "" +defaults: + cpu: "1" + memory: 150Mi +limits: + cpu: "2" + memory: 450Mi \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml new file mode 100644 index 0000000000..2593cad309 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml @@ -0,0 +1,9 @@ +Domain: development +Project: flytectldemo +Workflow: core.control_flow.run_merge_sort.merge_sort +defaults: + cpu: "2" + memory: 250Mi +limits: + cpu: "3" + memory: 350Mi \ No newline at end of file diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 3f801ce08f..c842c0855b 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -1,6 +1,7 @@ package update import ( + "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -35,6 +36,8 @@ func CreateUpdateCommand() *cobra.Command { Short: updateTaskShort, Long: updateTaskLong}, "workflow": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateWorkflowShort, Long: updateWorkflowLong}, + "task-resource-attribute": {CmdFunc: updateTaskResourceAttributesFunc, Aliases: []string{}, PFlagProvider: subcommand.DefaultTaskResourceUpdateConfig, + Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, ProjectDomainNotRequired: true}, } cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 9a610f9f5d..33e9b9eb5e 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -1,27 +1,41 @@ package update import ( + "context" "sort" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" ) +var ( + err error + ctx context.Context + mockClient *mocks.AdminServiceClient + cmdCtx cmdCore.CommandContext +) +var setup = testutils.Setup +var tearDownAndVerify = testutils.TearDownAndVerify + func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 4) + assert.Equal(t, len(updateCommand.Commands()), 5) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"launchplan", "project", "task", "workflow"} - aliases := [][]string{{}, {}, {}, {}} - shortArray := []string{updateLPShort, projectShort, updateTaskShort, updateWorkflowShort} - longArray := []string{updateLPLong, projectLong, updateTaskLong, updateWorkflowLong} + useArray := []string{"launchplan", "project", "task", "task-resource-attribute", "workflow"} + aliases := [][]string{{}, {}, {}, {}, {}} + shortArray := []string{updateLPShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort} + longArray := []string{updateLPLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/docs/coverage.out b/flytectl/docs/coverage.out new file mode 100644 index 0000000000..5f02b11199 --- /dev/null +++ b/flytectl/docs/coverage.out @@ -0,0 +1 @@ +mode: set diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 89e4a4db9c..c878c96298 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -17,20 +17,20 @@ Options :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index d3bf35e5bf..a2f96c1e7a 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -26,20 +26,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 2ce677324c..c5e86530a1 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -28,20 +28,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index ac0f848d42..7223e1a240 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -30,20 +30,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index a7528e911e..7233aa611a 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -29,20 +29,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 5487019357..ade3a51e11 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -102,20 +102,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 3b1aa15100..b99b60268f 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -53,20 +53,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index f9c3e5b589..49006715a4 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -29,20 +29,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) @@ -72,4 +72,5 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. +* :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index d606658174..60dda389ad 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -72,20 +72,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst new file mode 100644 index 0000000000..4f19d5b32c --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -0,0 +1,112 @@ +.. _flytectl_delete_task-resource-attribute: + +flytectl delete task-resource-attribute +--------------------------------------- + +Deletes matchable resources of task attributes + +Synopsis +~~~~~~~~ + + + +Deletes task resource attributes for given project,domain combination or additionally with workflow name. + +Deletes task resource attribute for project and domain +Here the command delete task resource attributes for project flytectldemo and development domain. +:: + + flytectl delete task-resource-attribute -p flytectldemo -d development + + +Deleting task resource attribute using config file which was used for creating it. +Here the command deletes task resource attributes from the config file tra.yaml +eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +Deleting task resource attribute for a workflow +Here the command deletes task resource attributes for a workflow + +:: + + flytectl delete task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete task-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for task-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index ae7a6ae65d..add9e81c9b 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -29,20 +29,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) @@ -75,5 +75,6 @@ SEE ALSO * :doc:`flytectl_get_launchplan` - Gets launch plan resources * :doc:`flytectl_get_project` - Gets project resources * :doc:`flytectl_get_task` - Gets task resources +* :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes * :doc:`flytectl_get_workflow` - Gets workflow resources diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 48a01189cc..fad935ec01 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -58,20 +58,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 0cd64b8651..2f97de100f 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -85,20 +85,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 17c5d35b3a..e47f0061c2 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -58,20 +58,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst new file mode 100644 index 0000000000..05046e2469 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -0,0 +1,110 @@ +.. _flytectl_get_task-resource-attribute: + +flytectl get task-resource-attribute +------------------------------------ + +Gets matchable resources of task attributes + +Synopsis +~~~~~~~~ + + + +Retrieves task resource attributes for given project,domain combination or additionally with workflow name. + +Retrieves task resource attribute for project and domain +Here the command get task resource attributes for project flytectldemo and development domain. +:: + + flytectl get task-resource-attribute -p flytectldemo -d development + +eg : O/P + +.. code-block:: json + + {"Project":"flytectldemo","Domain":"development","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + +Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. +Here the command gets task resource attributes and writes the config file to tra.yaml +eg: content of tra.yaml + +:: + + flytectl get task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +Usage + + +:: + + flytectl get task-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for task-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 5ccddc30c9..8a770670f9 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -85,20 +85,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 4b4a996b2c..9a2288c75f 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -58,20 +58,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 19179afdfc..f02dbed437 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -29,20 +29,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 01074e4dc8..c3c90edb5e 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -75,20 +75,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 7db54b49a6..a30c1a9337 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -31,20 +31,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) @@ -76,5 +76,6 @@ SEE ALSO * :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata +* :doc:`flytectl_update_task-resource-attribute` - Updates matchable resources of task attributes * :doc:`flytectl_update_workflow` - Updates workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 49bf4bffa9..cc76a1ab93 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -48,20 +48,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 4a6e7bee48..8a2e2525ca 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -73,20 +73,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst new file mode 100644 index 0000000000..a0aef81d04 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -0,0 +1,117 @@ +.. _flytectl_update_task-resource-attribute: + +flytectl update task-resource-attribute +--------------------------------------- + +Updates matchable resources of task attributes + +Synopsis +~~~~~~~~ + + + +Updates task resource attributes for given project and domain combination or additionally with workflow name. + +Updating the task resource attribute is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for task resource attributes from the config file tra.yaml +eg: content of tra.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +:: + + flytectl update task-resource-attribute -attrFile tra.yaml + +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +resource attribute defined at project domain level. +Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + defaults: + cpu: "1" + memory: 150Mi + limits: + cpu: "2" + memory: 450Mi + +:: + + flytectl update task-resource-attribute -attrFile tra.yaml + +Usage + + + +:: + + flytectl update task-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for task-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index 5a81366eb8..ba02121a13 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -48,20 +48,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 553446ca27..7320bb5423 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -48,20 +48,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index a56c061f65..84df72ed64 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -33,20 +33,20 @@ Options inherited from parent commands :: --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' - --admin.clientId string Client ID - --admin.clientSecretLocation string File containing the client secret + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.scopes strings List of scopes to request - --admin.tokenUrl string Your IDPs token endpoint - --admin.useAuth Whether or not to try to authenticate with options below + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) - --config string config file (default is $HOME/config.yaml) + --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/pkg/ext/attribute_match_deleter_test.go b/flytectl/pkg/ext/attribute_match_deleter_test.go new file mode 100644 index 0000000000..9c8c665b08 --- /dev/null +++ b/flytectl/pkg/ext/attribute_match_deleter_test.go @@ -0,0 +1,49 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var adminDeleterExt AdminDeleterExtClient + +func deleteAttributeMatchFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminDeleterExt = AdminDeleterExtClient{AdminClient: adminClient} +} + +func TestDeleteWorkflowAttributes(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminDeleterExt.DeleteWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.Nil(t, err) +} + +func TestDeleteWorkflowAttributesError(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminDeleterExt.DeleteWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestDeleteProjectDomainAttributes(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminDeleterExt.DeleteProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.Nil(t, err) +} + +func TestDeleteProjectDomainAttributesError(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminDeleterExt.DeleteProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go new file mode 100644 index 0000000000..f3ea76b369 --- /dev/null +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -0,0 +1,29 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, project, domain, name string, + rsType admin.MatchableResource) (*admin.WorkflowAttributesGetResponse, error) { + workflowAttr, err := a.AdminServiceClient().GetWorkflowAttributes(ctx, &admin.WorkflowAttributesGetRequest{ + Project: project, + Domain: domain, + Workflow: name, + ResourceType: rsType, + }) + return workflowAttr, err +} + +func (a *AdminFetcherExtClient) FetchProjectDomainAttributes(ctx context.Context, project, domain string, + rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) { + projectDomainAttr, err := a.AdminServiceClient().GetProjectDomainAttributes(ctx, + &admin.ProjectDomainAttributesGetRequest{ + Project: project, + Domain: domain, + ResourceType: rsType, + }) + return projectDomainAttr, err +} diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go new file mode 100644 index 0000000000..b91d18fe3a --- /dev/null +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -0,0 +1,49 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getAttributeMatchFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} +} + +func TestFetchWorkflowAttributes(t *testing.T) { + getAttributeMatchFetcherSetup() + resp := &admin.WorkflowAttributesGetResponse{} + adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(resp, nil) + _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.Nil(t, err) +} + +func TestFetchWorkflowAttributesError(t *testing.T) { + getAttributeMatchFetcherSetup() + adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestFetchProjectDomainAttributes(t *testing.T) { + getAttributeMatchFetcherSetup() + resp := &admin.ProjectDomainAttributesGetResponse{} + adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(resp, nil) + _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.Nil(t, err) +} + +func TestFetchProjectDomainAttributesError(t *testing.T) { + getAttributeMatchFetcherSetup() + adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/attribute_match_updater.go b/flytectl/pkg/ext/attribute_match_updater.go new file mode 100644 index 0000000000..d06e22155e --- /dev/null +++ b/flytectl/pkg/ext/attribute_match_updater.go @@ -0,0 +1,31 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func (a *AdminUpdaterExtClient) UpdateWorkflowAttributes(ctx context.Context, project, domain, name string, matchingAttr *admin.MatchingAttributes) error { + _, err := a.AdminServiceClient().UpdateWorkflowAttributes(ctx, &admin.WorkflowAttributesUpdateRequest{ + Attributes: &admin.WorkflowAttributes{ + Project: project, + Domain: domain, + Workflow: name, + MatchingAttributes: matchingAttr, + }, + }) + return err +} + +func (a *AdminUpdaterExtClient) UpdateProjectDomainAttributes(ctx context.Context, project, domain string, matchingAttr *admin.MatchingAttributes) error { + _, err := a.AdminServiceClient().UpdateProjectDomainAttributes(ctx, + &admin.ProjectDomainAttributesUpdateRequest{ + Attributes: &admin.ProjectDomainAttributes{ + Project: project, + Domain: domain, + MatchingAttributes: matchingAttr, + }, + }) + return err +} diff --git a/flytectl/pkg/ext/attribute_match_updater_test.go b/flytectl/pkg/ext/attribute_match_updater_test.go new file mode 100644 index 0000000000..f57d86a369 --- /dev/null +++ b/flytectl/pkg/ext/attribute_match_updater_test.go @@ -0,0 +1,55 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var adminUpdaterExt AdminUpdaterExtClient + +func updateAttributeMatchFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminUpdaterExt = AdminUpdaterExtClient{AdminClient: adminClient} +} + +func TestUpdateWorkflowAttributes(t *testing.T) { + updateAttributeMatchFetcherSetup() + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{}, + } + adminClient.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminUpdaterExt.UpdateWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", matchingAttr) + assert.Nil(t, err) +} + +func TestUpdateWorkflowAttributesError(t *testing.T) { + updateAttributeMatchFetcherSetup() + adminClient.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminUpdaterExt.UpdateWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", nil) + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestUpdateProjectDomainAttributes(t *testing.T) { + updateAttributeMatchFetcherSetup() + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{}, + } + adminClient.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminUpdaterExt.UpdateProjectDomainAttributes(ctx, "dummyProject", "domainValue", matchingAttr) + assert.Nil(t, err) +} + +func TestUpdateProjectDomainAttributesError(t *testing.T) { + updateAttributeMatchFetcherSetup() + adminClient.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminUpdaterExt.UpdateProjectDomainAttributes(ctx, "dummyProject", "domainValue", nil) + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/attribute_matcher_deleter.go b/flytectl/pkg/ext/attribute_matcher_deleter.go new file mode 100644 index 0000000000..b7fdaec9b2 --- /dev/null +++ b/flytectl/pkg/ext/attribute_matcher_deleter.go @@ -0,0 +1,26 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func (a *AdminDeleterExtClient) DeleteWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) error { + _, err := a.AdminServiceClient().DeleteWorkflowAttributes(ctx, &admin.WorkflowAttributesDeleteRequest{ + Project: project, + Domain: domain, + Workflow: name, + ResourceType: rsType, + }) + return err +} + +func (a *AdminDeleterExtClient) DeleteProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) error { + _, err := a.AdminServiceClient().DeleteProjectDomainAttributes(ctx, &admin.ProjectDomainAttributesDeleteRequest{ + Project: project, + Domain: domain, + ResourceType: rsType, + }) + return err +} diff --git a/flytectl/pkg/ext/deleter.go b/flytectl/pkg/ext/deleter.go new file mode 100644 index 0000000000..03827d1079 --- /dev/null +++ b/flytectl/pkg/ext/deleter.go @@ -0,0 +1,33 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +//go:generate mockery -all -case=underscore + +// AdminDeleterExtInterface Interface for exposing the update capabilities from the admin +type AdminDeleterExtInterface interface { + AdminServiceClient() service.AdminServiceClient + + // DeleteWorkflowAttributes deletes workflow attributes within a project, domain for a particular matchable resource + DeleteWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) error + + // DeleteProjectDomainAttributes deletes project domain attributes for a particular matchable resource + DeleteProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) error +} + +// AdminDeleterExtClient is used for interacting with extended features used for deleting/archiving data in admin service +type AdminDeleterExtClient struct { + AdminClient service.AdminServiceClient +} + +func (a *AdminDeleterExtClient) AdminServiceClient() service.AdminServiceClient { + if a == nil { + return nil + } + return a.AdminClient +} diff --git a/flytectl/pkg/ext/doc.go b/flytectl/pkg/ext/doc.go new file mode 100644 index 0000000000..aa5073ed52 --- /dev/null +++ b/flytectl/pkg/ext/doc.go @@ -0,0 +1,2 @@ +// Package ext Provides Fetch,Update and Delete extensions to the admin API's whose interface directly relates to flytectl commands +package ext diff --git a/flytectl/pkg/ext/execution_fetcher_ext.go b/flytectl/pkg/ext/execution_fetcher.go similarity index 100% rename from flytectl/pkg/ext/execution_fetcher_ext.go rename to flytectl/pkg/ext/execution_fetcher.go diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go new file mode 100644 index 0000000000..add301a6da --- /dev/null +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -0,0 +1,68 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var ( + executionResponse *admin.Execution +) + +func getExecutionFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + projectValue := "dummyProject" + domainValue := "domainValue" + executionNameValue := "execName" + launchPlanNameValue := "launchPlanNameValue" + launchPlanVersionValue := "launchPlanVersionValue" + workflowNameValue := "workflowNameValue" + workflowVersionValue := "workflowVersionValue" + executionResponse = &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: executionNameValue, + }, + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: launchPlanNameValue, + Version: launchPlanVersionValue, + }, + }, + Closure: &admin.ExecutionClosure{ + WorkflowId: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: workflowNameValue, + Version: workflowVersionValue, + }, + Phase: core.WorkflowExecution_SUCCEEDED, + }, + } +} + +func TestFetchExecutionVersion(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnGetExecutionMatch(mock.Anything, mock.Anything).Return(executionResponse, nil) + _, err := adminFetcherExt.FetchExecution(ctx, "execName", "dummyProject", "domainValue") + assert.Nil(t, err) +} + +func TestFetchExecutionError(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnGetExecutionMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchExecution(ctx, "execName", "dummyProject", "domainValue") + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/fetcher_ext_client.go b/flytectl/pkg/ext/fetcher.go similarity index 79% rename from flytectl/pkg/ext/fetcher_ext_client.go rename to flytectl/pkg/ext/fetcher.go index ebe34ca9d3..d32421156b 100644 --- a/flytectl/pkg/ext/fetcher_ext_client.go +++ b/flytectl/pkg/ext/fetcher.go @@ -34,6 +34,12 @@ type AdminFetcherExtInterface interface { // FetchTaskVersion fetches particular version of task in a project, domain FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) + + // FetchWorkflowAttributes fetches workflow attributes particular resource type in a project, domain and workflow + FetchWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) (*admin.WorkflowAttributesGetResponse, error) + + // FetchProjectDomainAttributes fetches project domain attributes particular resource type in a project, domain + FetchProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) } // AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go new file mode 100644 index 0000000000..7b40fbde89 --- /dev/null +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -0,0 +1,151 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + launchPlanListResponse *admin.LaunchPlanList +) + +func getLaunchPlanFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + }, + }, + "numbers_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + "run_local_at_count": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + }, + }, + }, + }, + } + launchPlan1 := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "launchplan1", + Version: "v1", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + } + launchPlan2 := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "launchplan1", + Version: "v2", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{ + Parameters: parameterMap, + }, + }, + } + + launchPlans := []*admin.LaunchPlan{launchPlan2, launchPlan1} + + launchPlanListResponse = &admin.LaunchPlanList{ + LaunchPlans: launchPlans, + } +} + +func TestFetchAllVerOfLP(t *testing.T) { + getLaunchPlanFetcherSetup() + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchAllVerOfLPError(t *testing.T) { + getLaunchPlanFetcherSetup() + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestFetchAllVerOfLPEmptyResponse(t *testing.T) { + launchPlanListResponse := &admin.LaunchPlanList{} + getLaunchPlanFetcherSetup() + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + assert.Equal(t, fmt.Errorf("no launchplans retrieved for lpName"), err) +} + +func TestFetchLPLatestVersion(t *testing.T) { + getLaunchPlanFetcherSetup() + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) + _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchLPLatestVersionError(t *testing.T) { + launchPlanListResponse := &admin.LaunchPlanList{} + getLaunchPlanFetcherSetup() + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) + _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain") + assert.Equal(t, fmt.Errorf("no launchplans retrieved for lpName"), err) +} diff --git a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go new file mode 100644 index 0000000000..2f55293a80 --- /dev/null +++ b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go @@ -0,0 +1,116 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +// AdminDeleterExtInterface is an autogenerated mock type for the AdminDeleterExtInterface type +type AdminDeleterExtInterface struct { + mock.Mock +} + +type AdminDeleterExtInterface_AdminServiceClient struct { + *mock.Call +} + +func (_m AdminDeleterExtInterface_AdminServiceClient) Return(_a0 service.AdminServiceClient) *AdminDeleterExtInterface_AdminServiceClient { + return &AdminDeleterExtInterface_AdminServiceClient{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminDeleterExtInterface) OnAdminServiceClient() *AdminDeleterExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient") + return &AdminDeleterExtInterface_AdminServiceClient{Call: c} +} + +func (_m *AdminDeleterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminDeleterExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient", matchers...) + return &AdminDeleterExtInterface_AdminServiceClient{Call: c} +} + +// AdminServiceClient provides a mock function with given fields: +func (_m *AdminDeleterExtInterface) AdminServiceClient() service.AdminServiceClient { + ret := _m.Called() + + var r0 service.AdminServiceClient + if rf, ok := ret.Get(0).(func() service.AdminServiceClient); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.AdminServiceClient) + } + } + + return r0 +} + +type AdminDeleterExtInterface_DeleteProjectDomainAttributes struct { + *mock.Call +} + +func (_m AdminDeleterExtInterface_DeleteProjectDomainAttributes) Return(_a0 error) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { + c := _m.On("DeleteProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} +} + +func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { + c := _m.On("DeleteProjectDomainAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} +} + +// DeleteProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType +func (_m *AdminDeleterExtInterface) DeleteProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) error { + ret := _m.Called(ctx, project, domain, rsType) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, admin.MatchableResource) error); ok { + r0 = rf(ctx, project, domain, rsType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AdminDeleterExtInterface_DeleteWorkflowAttributes struct { + *mock.Call +} + +func (_m AdminDeleterExtInterface_DeleteWorkflowAttributes) Return(_a0 error) *AdminDeleterExtInterface_DeleteWorkflowAttributes { + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteWorkflowAttributes { + c := _m.On("DeleteWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} +} + +func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteWorkflowAttributes { + c := _m.On("DeleteWorkflowAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} +} + +// DeleteWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType +func (_m *AdminDeleterExtInterface) DeleteWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) error { + ret := _m.Called(ctx, project, domain, name, rsType) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, admin.MatchableResource) error); ok { + r0 = rf(ctx, project, domain, name, rsType) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 9f8d7512ff..95d3c99c92 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -256,6 +256,47 @@ func (_m *AdminFetcherExtInterface) FetchLPVersion(ctx context.Context, name str return r0, r1 } +type AdminFetcherExtInterface_FetchProjectDomainAttributes struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchProjectDomainAttributes) Return(_a0 *admin.ProjectDomainAttributesGetResponse, _a1 error) *AdminFetcherExtInterface_FetchProjectDomainAttributes { + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchProjectDomainAttributes { + c := _m.On("FetchProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchProjectDomainAttributes { + c := _m.On("FetchProjectDomainAttributes", matchers...) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} +} + +// FetchProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType +func (_m *AdminFetcherExtInterface) FetchProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) { + ret := _m.Called(ctx, project, domain, rsType) + + var r0 *admin.ProjectDomainAttributesGetResponse + if rf, ok := ret.Get(0).(func(context.Context, string, string, admin.MatchableResource) *admin.ProjectDomainAttributesGetResponse); ok { + r0 = rf(ctx, project, domain, rsType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ProjectDomainAttributesGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, admin.MatchableResource) error); ok { + r1 = rf(ctx, project, domain, rsType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchTaskLatestVersion struct { *mock.Call } @@ -337,3 +378,44 @@ func (_m *AdminFetcherExtInterface) FetchTaskVersion(ctx context.Context, name s return r0, r1 } + +type AdminFetcherExtInterface_FetchWorkflowAttributes struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchWorkflowAttributes) Return(_a0 *admin.WorkflowAttributesGetResponse, _a1 error) *AdminFetcherExtInterface_FetchWorkflowAttributes { + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchWorkflowAttributes { + c := _m.On("FetchWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowAttributes { + c := _m.On("FetchWorkflowAttributes", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} +} + +// FetchWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType +func (_m *AdminFetcherExtInterface) FetchWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) (*admin.WorkflowAttributesGetResponse, error) { + ret := _m.Called(ctx, project, domain, name, rsType) + + var r0 *admin.WorkflowAttributesGetResponse + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, admin.MatchableResource) *admin.WorkflowAttributesGetResponse); ok { + r0 = rf(ctx, project, domain, name, rsType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.WorkflowAttributesGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, admin.MatchableResource) error); ok { + r1 = rf(ctx, project, domain, name, rsType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go new file mode 100644 index 0000000000..d944ff5a82 --- /dev/null +++ b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go @@ -0,0 +1,116 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +// AdminUpdaterExtInterface is an autogenerated mock type for the AdminUpdaterExtInterface type +type AdminUpdaterExtInterface struct { + mock.Mock +} + +type AdminUpdaterExtInterface_AdminServiceClient struct { + *mock.Call +} + +func (_m AdminUpdaterExtInterface_AdminServiceClient) Return(_a0 service.AdminServiceClient) *AdminUpdaterExtInterface_AdminServiceClient { + return &AdminUpdaterExtInterface_AdminServiceClient{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminUpdaterExtInterface) OnAdminServiceClient() *AdminUpdaterExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient") + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} +} + +func (_m *AdminUpdaterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminUpdaterExtInterface_AdminServiceClient { + c := _m.On("AdminServiceClient", matchers...) + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} +} + +// AdminServiceClient provides a mock function with given fields: +func (_m *AdminUpdaterExtInterface) AdminServiceClient() service.AdminServiceClient { + ret := _m.Called() + + var r0 service.AdminServiceClient + if rf, ok := ret.Get(0).(func() service.AdminServiceClient); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(service.AdminServiceClient) + } + } + + return r0 +} + +type AdminUpdaterExtInterface_UpdateProjectDomainAttributes struct { + *mock.Call +} + +func (_m AdminUpdaterExtInterface_UpdateProjectDomainAttributes) Return(_a0 error) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributes(ctx context.Context, project string, domain string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { + c := _m.On("UpdateProjectDomainAttributes", ctx, project, domain, matchingAttr) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { + c := _m.On("UpdateProjectDomainAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} +} + +// UpdateProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, matchingAttr +func (_m *AdminUpdaterExtInterface) UpdateProjectDomainAttributes(ctx context.Context, project string, domain string, matchingAttr *admin.MatchingAttributes) error { + ret := _m.Called(ctx, project, domain, matchingAttr) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *admin.MatchingAttributes) error); ok { + r0 = rf(ctx, project, domain, matchingAttr) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type AdminUpdaterExtInterface_UpdateWorkflowAttributes struct { + *mock.Call +} + +func (_m AdminUpdaterExtInterface_UpdateWorkflowAttributes) Return(_a0 error) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributes(ctx context.Context, project string, domain string, name string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { + c := _m.On("UpdateWorkflowAttributes", ctx, project, domain, name, matchingAttr) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { + c := _m.On("UpdateWorkflowAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} +} + +// UpdateWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, matchingAttr +func (_m *AdminUpdaterExtInterface) UpdateWorkflowAttributes(ctx context.Context, project string, domain string, name string, matchingAttr *admin.MatchingAttributes) error { + ret := _m.Called(ctx, project, domain, name, matchingAttr) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *admin.MatchingAttributes) error); ok { + r0 = rf(ctx, project, domain, name, matchingAttr) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go new file mode 100644 index 0000000000..7f7476b2c0 --- /dev/null +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -0,0 +1,125 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + adminFetcherExt AdminFetcherExtClient + adminClient *mocks.AdminServiceClient + ctx context.Context + taskListResponse *admin.TaskList +) + +func getTaskFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + task1 := &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + } + + task2 := &admin.Task{ + Id: &core.Identifier{ + Name: "task1", + Version: "v2", + }, + Closure: &admin.TaskClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + } + + tasks := []*admin.Task{task2, task1} + + taskListResponse = &admin.TaskList{ + Tasks: tasks, + } +} + +func TestFetchAllVerOfTask(t *testing.T) { + getTaskFetcherSetup() + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchAllVerOfTaskError(t *testing.T) { + getTaskFetcherSetup() + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestFetchAllVerOfTaskEmptyResponse(t *testing.T) { + taskListResponse := &admin.TaskList{} + getTaskFetcherSetup() + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + assert.Equal(t, fmt.Errorf("no tasks retrieved for taskName"), err) +} + +func TestFetchTaskLatestVersion(t *testing.T) { + getTaskFetcherSetup() + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) + _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchTaskLatestVersionError(t *testing.T) { + taskListResponse := &admin.TaskList{} + getTaskFetcherSetup() + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) + _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain") + assert.Equal(t, fmt.Errorf("no tasks retrieved for taskName"), err) +} diff --git a/flytectl/pkg/ext/updater.go b/flytectl/pkg/ext/updater.go new file mode 100644 index 0000000000..ddf9f5841e --- /dev/null +++ b/flytectl/pkg/ext/updater.go @@ -0,0 +1,33 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" +) + +//go:generate mockery -all -case=underscore + +// AdminUpdaterExtInterface Interface for exposing the update capabilities from the admin +type AdminUpdaterExtInterface interface { + AdminServiceClient() service.AdminServiceClient + + // UpdateWorkflowAttributes updates workflow attributes within a project, domain for a particular matchable resource + UpdateWorkflowAttributes(ctx context.Context, project, domain, name string, matchingAttr *admin.MatchingAttributes) error + + // UpdateProjectDomainAttributes updates project domain attributes for a particular matchable resource + UpdateProjectDomainAttributes(ctx context.Context, project, domain string, matchingAttr *admin.MatchingAttributes) error +} + +// AdminUpdaterExtClient is used for interacting with extended features used for updating data in admin service +type AdminUpdaterExtClient struct { + AdminClient service.AdminServiceClient +} + +func (a *AdminUpdaterExtClient) AdminServiceClient() service.AdminServiceClient { + if a == nil { + return nil + } + return a.AdminClient +} From 36c1e4f86047bb3a23aacc0c8f817d0c3af42efb Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Wed, 12 May 2021 00:34:00 +0530 Subject: [PATCH 047/356] Added version support to workflow command (#64) Signed-off-by: Ketan Umare --- .../task_resource_attribute_file_config.go | 10 +- .../cmd/config/subcommand/workflow_config.go | 13 ++ .../config/subcommand/workflowconfig_flags.go | 47 ++++++ .../subcommand/workflowconfig_flags_test.go | 146 ++++++++++++++++++ .../matchable_task_resource_attribute.go | 7 +- flytectl/cmd/get/get.go | 2 +- flytectl/cmd/get/launch_plan.go | 13 ++ .../get/matchable_task_resource_attribute.go | 11 +- .../matchable_task_resource_attribute_test.go | 10 +- flytectl/cmd/get/task.go | 12 ++ flytectl/cmd/get/workflow.go | 72 ++++++--- flytectl/cmd/get/workflow_test.go | 65 ++++++++ .../matchable_task_resource_attribute.go | 15 +- ...lytectl_delete_task-resource-attribute.rst | 7 +- .../source/gen/flytectl_get_launchplan.rst | 13 ++ .../flytectl_get_task-resource-attribute.rst | 5 +- .../docs/source/gen/flytectl_get_task.rst | 12 ++ .../docs/source/gen/flytectl_get_workflow.rst | 24 ++- ...lytectl_update_task-resource-attribute.rst | 15 +- flytectl/pkg/ext/fetcher.go | 9 ++ .../ext/mocks/admin_fetcher_ext_interface.go | 123 +++++++++++++++ flytectl/pkg/ext/workflow_fetcher.go | 60 +++++++ flytectl/pkg/ext/workflow_fetcher_test.go | 120 ++++++++++++++ 23 files changed, 749 insertions(+), 62 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/workflow_config.go create mode 100755 flytectl/cmd/config/subcommand/workflowconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/workflowconfig_flags_test.go create mode 100644 flytectl/cmd/get/workflow_test.go create mode 100644 flytectl/pkg/ext/workflow_fetcher.go create mode 100644 flytectl/pkg/ext/workflow_fetcher_test.go diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go index d0c0a0656c..62fa2f7e3f 100644 --- a/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go +++ b/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go @@ -18,9 +18,9 @@ import ( // The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. // As the same structure is being used for both ProjectDomainAttribute/Workflowattribute type TaskResourceAttrFileConfig struct { - Project string `json:"project"` - Domain string `json:"domain"` - Workflow string `json:"workflow,omitempty"` + Project string + Domain string + Workflow string *admin.TaskResourceAttributes } @@ -28,7 +28,7 @@ type TaskResourceAttrFileConfig struct { func (t TaskResourceAttrFileConfig) WriteConfigToFile(fileName string) error { d, err := yaml.Marshal(t) if err != nil { - return fmt.Errorf("error: %v", err) + fmt.Printf("error: %v", err) } if _, err = os.Stat(fileName); err == nil { if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { @@ -79,7 +79,7 @@ func (t TaskResourceAttrFileConfig) DumpTaskResourceAttr(ctx context.Context, fi logger.Warnf(ctx, "error dumping in file due to %v", err) return } - fmt.Printf("wrote the config to file %v", fileName) + fmt.Printf("written the config to file %v", fileName) } else { fmt.Printf("%v", t) } diff --git a/flytectl/cmd/config/subcommand/workflow_config.go b/flytectl/cmd/config/subcommand/workflow_config.go new file mode 100644 index 0000000000..b3c6452a62 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflow_config.go @@ -0,0 +1,13 @@ +package subcommand + +//go:generate pflags WorkflowConfig --default-var DefaultWorklfowConfig + +var ( + DefaultWorklfowConfig = &WorkflowConfig{} +) + +// WorkflowConfig commandline configuration +type WorkflowConfig struct { + Version string `json:"version" pflag:",version of the workflow to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` +} diff --git a/flytectl/cmd/config/subcommand/workflowconfig_flags.go b/flytectl/cmd/config/subcommand/workflowconfig_flags.go new file mode 100755 index 0000000000..cc5a1743d4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowconfig_flags.go @@ -0,0 +1,47 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (WorkflowConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (WorkflowConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in WorkflowConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg WorkflowConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("WorkflowConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultWorklfowConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultWorklfowConfig.Version, "version of the workflow to be fetched.") + cmdFlags.BoolVar(&(DefaultWorklfowConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), DefaultWorklfowConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/workflowconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowconfig_flags_test.go new file mode 100755 index 0000000000..105f884def --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowconfig_flags_test.go @@ -0,0 +1,146 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package subcommand + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsWorkflowConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementWorkflowConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsWorkflowConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookWorkflowConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementWorkflowConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_WorkflowConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookWorkflowConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_WorkflowConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_WorkflowConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_WorkflowConfig(val, result)) +} + +func testDecodeSlice_WorkflowConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_WorkflowConfig(vStringSlice, result)) +} + +func TestWorkflowConfig_GetPFlagSet(t *testing.T) { + val := WorkflowConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestWorkflowConfig_SetFlags(t *testing.T) { + actual := WorkflowConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_version", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("version"); err == nil { + assert.Equal(t, string(DefaultWorklfowConfig.Version), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_WorkflowConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_latest", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + assert.Equal(t, bool(DefaultWorklfowConfig.Latest), vBool) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + testDecodeJson_WorkflowConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 57791d033d..00e8e51148 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -22,7 +22,7 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file which was used for creating it. +Deleting task resource attribute using config file Here the command deletes task resource attributes from the config file tra.yaml eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource @@ -33,8 +33,9 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 0b7bd5da93..f5b414013f 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -33,7 +33,7 @@ func CreateGetCommand() *cobra.Command { "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, Long: taskLong, PFlagProvider: taskConfig}, "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, - Long: workflowLong}, + Long: workflowLong, PFlagProvider: subcommand.DefaultWorklfowConfig}, "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, Long: launchPlanLong, PFlagProvider: launchPlanConfig}, "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index e98029483c..22ff6660fe 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -28,6 +28,19 @@ Retrieves launch plan by name within project and domain. flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet + +Retrieves latest version of task by name within project and domain. + +:: + + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest + +Retrieves particular version of launchplan by name within project and domain. + +:: + + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 + Retrieves launchplan by filters. :: diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 09e8b5df99..bfa68d6edc 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -38,8 +38,9 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi @@ -72,10 +73,11 @@ func getTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCor workflowAttr, err := cmdCtx.AdminFetcherExt().FetchWorkflowAttributes(ctx, project, domain, workflowName, admin.MatchableResource_TASK_RESOURCE) if err != nil { + taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) return err } if workflowAttr.GetAttributes() == nil || workflowAttr.GetAttributes().GetMatchingAttributes() == nil { - return fmt.Errorf("attribute doesn't exist") + return fmt.Errorf("invalid matching attribute returned with nil data") } // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. taskResourceAttrFileConfig.TaskResourceAttributes = workflowAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() @@ -84,10 +86,11 @@ func getTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCor projectDomainAttr, err := cmdCtx.AdminFetcherExt().FetchProjectDomainAttributes(ctx, project, domain, admin.MatchableResource_TASK_RESOURCE) if err != nil { + taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) return err } if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { - return fmt.Errorf("attribute doesn't exist") + return fmt.Errorf("invalid matching attribute returned with nil data") } // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. taskResourceAttrFileConfig.TaskResourceAttributes = projectDomainAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index 00f3efad26..22d82df983 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -68,7 +68,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { var args []string @@ -82,7 +82,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + tearDownAndVerify(t, `written the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { var args []string @@ -110,7 +110,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":""}`) }) t.Run("successful get workflow attribute", func(t *testing.T) { var args []string @@ -124,7 +124,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { var args []string @@ -139,6 +139,6 @@ func TestGetTaskResourceAttributes(t *testing.T) { u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"workflow"}`) }) } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 7be143d232..eb40e9cb23 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -28,6 +28,18 @@ Retrieves task by name within project and domain. bin/flytectl task -p flytesnacks -d development core.basic.lp.greet +Retrieves latest version of task by name within project and domain. + +:: + + flytectl get task -p flytesnacks -d development core.basic.lp.greet --latest + +Retrieves particular version of task by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.greet --version v2 + Retrieves project by filters. :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 2736fe9b11..3640a5f342 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,6 +3,8 @@ package get import ( "context" + "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" @@ -20,13 +22,25 @@ const ( Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) :: - bin/flytectl get workflow -p flytesnacks -d development + flytectl get workflow -p flytesnacks -d development Retrieves workflow by name within project and domain. :: - bin/flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet + +Retrieves latest version of workflow by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --latest + +Retrieves particular version of workflow by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 Retrieves workflow by filters. :: @@ -37,13 +51,13 @@ Retrieves all the workflow within project and domain in yaml format. :: - bin/flytectl get workflow -p flytesnacks -d development -o yaml + flytectl get workflow -p flytesnacks -d development -o yaml Retrieves all the workflow within project and domain in json format. :: - bin/flytectl get workflow -p flytesnacks -d development -o json + flytectl get workflow -p flytesnacks -d development -o json Usage ` @@ -66,25 +80,18 @@ func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} if len(args) > 0 { - workflows, err := cmdCtx.AdminClient().ListWorkflows(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: args[0], - }, - // TODO Sorting and limits should be parameters - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) + name := args[0] + var workflows []*admin.Workflow + var err error + if workflows, err = FetchWorkflowForName(ctx, cmdCtx.AdminFetcherExt(), name, config.GetConfig().Project, config.GetConfig().Domain); err != nil { + return err + } + logger.Debugf(ctx, "Retrieved %v workflow", len(workflows)) + err = adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) if err != nil { return err } - logger.Debugf(ctx, "Retrieved %v workflows", len(workflows.Workflows)) - - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows.Workflows)...) + return nil } workflows, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListWorkflowIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) @@ -94,3 +101,28 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(workflows)...) } + +// FetchWorkflowForName fetches the workflow give it name. +func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project, + domain string) ([]*admin.Workflow, error) { + var workflows []*admin.Workflow + var workflow *admin.Workflow + var err error + if subcommand.DefaultWorklfowConfig.Latest { + if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain); err != nil { + return nil, err + } + workflows = append(workflows, workflow) + } else if subcommand.DefaultWorklfowConfig.Version != "" { + if workflow, err = fetcher.FetchWorkflowVersion(ctx, name, subcommand.DefaultWorklfowConfig.Version, project, domain); err != nil { + return nil, err + } + workflows = append(workflows, workflow) + } else { + workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain) + if err != nil { + return nil, err + } + } + return workflows, nil +} diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go new file mode 100644 index 0000000000..93928eebc4 --- /dev/null +++ b/flytectl/cmd/get/workflow_test.go @@ -0,0 +1,65 @@ +package get + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext/mocks" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getWorkflowSetup() { + ctx = u.Ctx + mockClient = u.MockClient + cmdCtx = u.CmdCtx + subcommand.DefaultWorklfowConfig.Latest = false + subcommand.DefaultWorklfowConfig.Version = "" +} + +func TestGetWorkflowFuncWithError(t *testing.T) { + t.Run("failure fetch latest", func(t *testing.T) { + setup() + getWorkflowSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + subcommand.DefaultWorklfowConfig.Latest = true + mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching version ", func(t *testing.T) { + setup() + getWorkflowSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + subcommand.DefaultWorklfowConfig.Version = "v1" + mockFetcher.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching version")) + _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching all version ", func(t *testing.T) { + setup() + getWorkflowSetup() + mockFetcher := new(mocks.AdminFetcherExtInterface) + mockFetcher.OnFetchAllVerOfWorkflowMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + assert.NotNil(t, err) + }) + + t.Run("failure fetching ", func(t *testing.T) { + setup() + getWorkflowSetup() + subcommand.DefaultWorklfowConfig.Latest = true + args := []string{"workflowName"} + u.FetcherExt.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + err = getWorkflowFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + }) +} diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 239a81d736..598eb98531 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -12,7 +12,7 @@ import ( const ( taskResourceAttributesShort = "Updates matchable resources of task attributes" taskResourceAttributesLong = ` -Updates task resource attributes for given project and domain combination or additionally with workflow name. +Updates task resource attributes for given project,domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for task resource attributes from the config file tra.yaml @@ -20,8 +20,9 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi @@ -33,14 +34,14 @@ eg: content of tra.yaml flytectl update task-resource-attribute -attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + Domain: development + Project: flytectldemo + Workflow: core.control_flow.run_merge_sort.merge_sort defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 4f19d5b32c..da97151fef 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -19,7 +19,7 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file which was used for creating it. +Deleting task resource attribute using config file Here the command deletes task resource attributes from the config file tra.yaml eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource @@ -30,8 +30,9 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 2f97de100f..fa45e3f85f 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -21,6 +21,19 @@ Retrieves launch plan by name within project and domain. flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet + +Retrieves latest version of task by name within project and domain. + +:: + + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest + +Retrieves particular version of launchplan by name within project and domain. + +:: + + flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 + Retrieves launchplan by filters. :: diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 05046e2469..ea2356a8ca 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -35,8 +35,9 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 8a770670f9..494ee1b7a1 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -21,6 +21,18 @@ Retrieves task by name within project and domain. bin/flytectl task -p flytesnacks -d development core.basic.lp.greet +Retrieves latest version of task by name within project and domain. + +:: + + flytectl get task -p flytesnacks -d development core.basic.lp.greet --latest + +Retrieves particular version of task by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.greet --version v2 + Retrieves project by filters. :: diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 9a2288c75f..89e4c688db 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -13,13 +13,25 @@ Synopsis Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) :: - bin/flytectl get workflow -p flytesnacks -d development + flytectl get workflow -p flytesnacks -d development Retrieves workflow by name within project and domain. :: - bin/flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet + +Retrieves latest version of workflow by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --latest + +Retrieves particular version of workflow by name within project and domain. + +:: + + flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 Retrieves workflow by filters. :: @@ -30,13 +42,13 @@ Retrieves all the workflow within project and domain in yaml format. :: - bin/flytectl get workflow -p flytesnacks -d development -o yaml + flytectl get workflow -p flytesnacks -d development -o yaml Retrieves all the workflow within project and domain in json format. :: - bin/flytectl get workflow -p flytesnacks -d development -o json + flytectl get workflow -p flytesnacks -d development -o json Usage @@ -50,7 +62,9 @@ Options :: - -h, --help help for workflow + -h, --help help for workflow + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the workflow to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index a0aef81d04..6f60b7d50d 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -10,7 +10,7 @@ Synopsis -Updates task resource attributes for given project and domain combination or additionally with workflow name. +Updates task resource attributes for given project,domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for task resource attributes from the config file tra.yaml @@ -18,8 +18,9 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo + Domain: development + Project: flytectldemo + Workflow: "" defaults: cpu: "1" memory: 150Mi @@ -31,14 +32,14 @@ eg: content of tra.yaml flytectl update task-resource-attribute -attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + Domain: development + Project: flytectldemo + Workflow: core.control_flow.run_merge_sort.merge_sort defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index d32421156b..8601ec7e71 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -35,6 +35,15 @@ type AdminFetcherExtInterface interface { // FetchTaskVersion fetches particular version of task in a project, domain FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) + // FetchAllVerOfWorkflow fetches all versions of task in a project, domain + FetchAllVerOfWorkflow(ctx context.Context, name, project, domain string) ([]*admin.Workflow, error) + + // FetchWorkflowLatestVersion fetches latest version of workflow in a project, domain + FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string) (*admin.Workflow, error) + + // FetchWorkflowVersion fetches particular version of workflow in a project, domain + FetchWorkflowVersion(ctx context.Context, name, version, project, domain string) (*admin.Workflow, error) + // FetchWorkflowAttributes fetches workflow attributes particular resource type in a project, domain and workflow FetchWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) (*admin.WorkflowAttributesGetResponse, error) diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 95d3c99c92..902121ef88 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -133,6 +133,47 @@ func (_m *AdminFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name return r0, r1 } +type AdminFetcherExtInterface_FetchAllVerOfWorkflow struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchAllVerOfWorkflow) Return(_a0 []*admin.Workflow, _a1 error) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { + c := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflowMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { + c := _m.On("FetchAllVerOfWorkflow", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} +} + +// FetchAllVerOfWorkflow provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string) ([]*admin.Workflow, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 []*admin.Workflow + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.Workflow); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.Workflow) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchExecution struct { *mock.Call } @@ -419,3 +460,85 @@ func (_m *AdminFetcherExtInterface) FetchWorkflowAttributes(ctx context.Context, return r0, r1 } + +type AdminFetcherExtInterface_FetchWorkflowLatestVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchWorkflowLatestVersion) Return(_a0 *admin.Workflow, _a1 error) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { + c := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { + c := _m.On("FetchWorkflowLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} +} + +// FetchWorkflowLatestVersion provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.Workflow, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.Workflow + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Workflow); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Workflow) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_FetchWorkflowVersion struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchWorkflowVersion) Return(_a0 *admin.Workflow, _a1 error) *AdminFetcherExtInterface_FetchWorkflowVersion { + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchWorkflowVersion { + c := _m.On("FetchWorkflowVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowVersion { + c := _m.On("FetchWorkflowVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} +} + +// FetchWorkflowVersion provides a mock function with given fields: ctx, name, version, project, domain +func (_m *AdminFetcherExtInterface) FetchWorkflowVersion(ctx context.Context, name string, version string, project string, domain string) (*admin.Workflow, error) { + ret := _m.Called(ctx, name, version, project, domain) + + var r0 *admin.Workflow + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.Workflow); ok { + r0 = rf(ctx, name, version, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Workflow) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, version, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go new file mode 100644 index 0000000000..3abcb04fab --- /dev/null +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -0,0 +1,60 @@ +package ext + +import ( + "context" + "fmt" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +// FetchAllVerOfWorkflow fetches all the versions for give workflow name +func (a *AdminFetcherExtClient) FetchAllVerOfWorkflow(ctx context.Context, workflowName, project, domain string) ([]*admin.Workflow, error) { + wList, err := a.AdminServiceClient().ListWorkflows(ctx, &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: workflowName, + }, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + if len(wList.Workflows) == 0 { + return nil, fmt.Errorf("no workflow retrieved for %v", workflowName) + } + return wList.Workflows, nil +} + +// FetchWorkflowLatestVersion fetches latest version for given workflow name +func (a *AdminFetcherExtClient) FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string) (*admin.Workflow, error) { + // Fetch the latest version of the workflow. + wVersions, err := a.FetchAllVerOfWorkflow(ctx, name, project, domain) + if err != nil { + return nil, err + } + w := wVersions[0] + return w, nil +} + +// FetchWorkflowVersion fetches particular version of workflow +func (a *AdminFetcherExtClient) FetchWorkflowVersion(ctx context.Context, name, version, project, domain string) (*admin.Workflow, error) { + lp, err := a.AdminServiceClient().GetWorkflow(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_WORKFLOW, + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + }) + if err != nil { + return nil, err + } + return lp, nil +} diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go new file mode 100644 index 0000000000..91c6818c72 --- /dev/null +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -0,0 +1,120 @@ +package ext + +import ( + "context" + "fmt" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var ( + workflowListResponse *admin.WorkflowList +) + +func getWorkflowFetcherSetup() { + ctx = context.Background() + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + var compiledTasks []*core.CompiledTask + compiledTasks = append(compiledTasks, &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }) + + workflow1 := &admin.Workflow{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Tasks: compiledTasks, + }, + }, + } + workflow2 := &admin.Workflow{ + Id: &core.Identifier{ + Name: "workflow", + Version: "v2", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Tasks: compiledTasks, + }, + }, + } + + workflows := []*admin.Workflow{workflow2, workflow1} + + workflowListResponse = &admin.WorkflowList{ + Workflows: workflows, + } +} + +func TestFetchAllVerOfWorkflow(t *testing.T) { + getWorkflowFetcherSetup() + adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchAllVerOfWorkflowError(t *testing.T) { + getWorkflowFetcherSetup() + adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestFetchAllVerOfWorkflowEmptyResponse(t *testing.T) { + workflowListResponse := &admin.WorkflowList{} + getWorkflowFetcherSetup() + adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + assert.Equal(t, fmt.Errorf("no workflow retrieved for workflowName"), err) +} + +func TestFetchWorkflowLatestVersion(t *testing.T) { + getWorkflowFetcherSetup() + adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) + _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") + assert.Nil(t, err) +} + +func TestFetchWorkflowLatestVersionError(t *testing.T) { + workflowListResponse := &admin.WorkflowList{} + getWorkflowFetcherSetup() + adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) + _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") + assert.Equal(t, fmt.Errorf("no workflow retrieved for workflowName"), err) +} From 34d76146a459a194d229784ee6a33139d4de518d Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Thu, 13 May 2021 10:26:44 +0530 Subject: [PATCH 048/356] Added cluster resource attribute support (#65) * Adding commands for task resource attributes support Signed-off-by: Prafulla Mahindrakar * Added cluster resource attribute support Signed-off-by: Prafulla Mahindrakar * Fixed update command to use cluster default config Signed-off-by: Prafulla Mahindrakar --- .../attrdeleteconfig_flags.go} | 14 +- .../attrdeleteconfig_flags_test.go} | 38 ++--- .../attrfetchconfig_flags.go} | 14 +- .../attrfetchconfig_flags_test.go} | 38 ++--- .../attrupdateconfig_flags.go} | 14 +- .../attrupdateconfig_flags_test.go} | 38 ++--- .../clusterresourceattribute/delete_config.go | 10 ++ .../clusterresourceattribute/fetch_config.go | 9 ++ .../clusterresourceattribute/file_config.go | 47 ++++++ .../file_config_test.go | 46 ++++++ .../clusterresourceattribute/update_config.go | 10 ++ .../matchable_attr_file_config_utils.go | 60 ++++++++ .../matchable_attribute_decorator.go | 13 ++ .../project_domain_workflow_getter.go | 40 +++++ .../task_resource_attribute_delete_config.go | 10 -- .../task_resource_attribute_fetch_config.go | 9 -- .../task_resource_attribute_file_config.go | 86 ----------- .../task_resource_attribute_update_config.go | 10 -- .../attrdeleteconfig_flags.go | 46 ++++++ .../attrdeleteconfig_flags_test.go | 124 ++++++++++++++++ .../attrfetchconfig_flags.go} | 15 +- .../attrfetchconfig_flags_test.go | 124 ++++++++++++++++ .../attrupdateconfig_flags.go | 46 ++++++ .../attrupdateconfig_flags_test.go | 124 ++++++++++++++++ .../taskresourceattribute/delete_config.go | 10 ++ .../taskresourceattribute/fetch_config.go | 9 ++ .../taskresourceattribute/file_config.go | 47 ++++++ .../taskresourceattribute/file_config_test.go | 53 +++++++ .../taskresourceattribute/update_config.go | 10 ++ .../subcommand/workflow/config_flags.go | 47 ++++++ .../config_flags_test.go} | 42 +++--- .../{ => workflow}/workflow_config.go | 10 +- flytectl/cmd/delete/delete.go | 8 +- flytectl/cmd/delete/delete_test.go | 20 +-- .../cmd/delete/matchable_attribute_util.go | 29 ++++ .../matchable_cluster_resource_attribute.go | 79 ++++++++++ ...tchable_cluster_resource_attribute_test.go | 134 +++++++++++++++++ .../matchable_task_resource_attribute.go | 70 ++++----- .../matchable_task_resource_attribute_test.go | 19 +-- ..._attribute.yaml => invalid_attribute.yaml} | 0 ...alid_project_domain_cluster_attribute.yaml | 5 + .../valid_project_domain_task_attribute.yaml | 5 +- .../valid_workflow_cluster_attribute.yaml | 6 + .../valid_workflow_task_attribute.yaml | 6 +- flytectl/cmd/get/get.go | 11 +- flytectl/cmd/get/get_test.go | 35 ++--- flytectl/cmd/get/matchable_attribute_util.go | 32 ++++ .../matchable_cluster_resource_attribute.go | 78 ++++++++++ ...tchable_cluster_resource_attribute_test.go | 138 ++++++++++++++++++ .../get/matchable_task_resource_attribute.go | 58 +++----- .../matchable_task_resource_attribute_test.go | 23 +-- flytectl/cmd/get/workflow.go | 8 +- flytectl/cmd/get/workflow_test.go | 12 +- .../cmd/update/matchable_attribute_util.go | 30 ++++ .../matchable_cluster_resource_attribute.go | 76 ++++++++++ ...tchable_cluster_resource_attribute_test.go | 94 ++++++++++++ .../matchable_task_resource_attribute.go | 62 +++----- .../matchable_task_resource_attribute_test.go | 16 +- ..._attribute.yaml => invalid_attribute.yaml} | 0 ...alid_project_domain_cluster_attribute.yaml | 5 + .../valid_project_domain_task_attribute.yaml | 5 +- .../valid_workflow_cluster_attribute.yaml | 6 + .../valid_workflow_task_attribute.yaml | 6 +- flytectl/cmd/update/update.go | 8 +- flytectl/cmd/update/update_test.go | 13 +- flytectl/docs/source/gen/flytectl_delete.rst | 1 + ...ectl_delete_cluster-resource-attribute.rst | 109 ++++++++++++++ ...lytectl_delete_task-resource-attribute.rst | 15 +- flytectl/docs/source/gen/flytectl_get.rst | 1 + ...lytectl_get_cluster-resource-attribute.rst | 107 ++++++++++++++ .../flytectl_get_task-resource-attribute.rst | 13 +- flytectl/docs/source/gen/flytectl_update.rst | 1 + ...ectl_update_cluster-resource-attribute.rst | 111 ++++++++++++++ ...lytectl_update_task-resource-attribute.rst | 31 ++-- flytectl/docs/source/nouns.rst | 11 ++ flytectl/pkg/ext/attribute_match_fetcher.go | 17 ++- .../pkg/ext/attribute_match_fetcher_test.go | 56 +++++-- 77 files changed, 2300 insertions(+), 483 deletions(-) rename flytectl/cmd/config/subcommand/{taskresourceattrdeleteconfig_flags.go => clusterresourceattribute/attrdeleteconfig_flags.go} (55%) rename flytectl/cmd/config/subcommand/{taskresourceattrfetchconfig_flags_test.go => clusterresourceattribute/attrdeleteconfig_flags_test.go} (64%) rename flytectl/cmd/config/subcommand/{taskresourceattrfetchconfig_flags.go => clusterresourceattribute/attrfetchconfig_flags.go} (55%) rename flytectl/cmd/config/subcommand/{taskresourceattrdeleteconfig_flags_test.go => clusterresourceattribute/attrfetchconfig_flags_test.go} (63%) rename flytectl/cmd/config/subcommand/{taskresourceattrupdateconfig_flags.go => clusterresourceattribute/attrupdateconfig_flags.go} (54%) rename flytectl/cmd/config/subcommand/{taskresourceattrupdateconfig_flags_test.go => clusterresourceattribute/attrupdateconfig_flags_test.go} (63%) create mode 100644 flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go create mode 100644 flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go create mode 100644 flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go create mode 100644 flytectl/cmd/config/subcommand/matchable_attribute_decorator.go create mode 100644 flytectl/cmd/config/subcommand/project_domain_workflow_getter.go delete mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go delete mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go delete mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go delete mode 100644 flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go rename flytectl/cmd/config/subcommand/{workflowconfig_flags.go => taskresourceattribute/attrfetchconfig_flags.go} (52%) create mode 100755 flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go create mode 100644 flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go create mode 100755 flytectl/cmd/config/subcommand/workflow/config_flags.go rename flytectl/cmd/config/subcommand/{workflowconfig_flags_test.go => workflow/config_flags_test.go} (69%) rename flytectl/cmd/config/subcommand/{ => workflow}/workflow_config.go (51%) create mode 100644 flytectl/cmd/delete/matchable_attribute_util.go create mode 100644 flytectl/cmd/delete/matchable_cluster_resource_attribute.go create mode 100644 flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go rename flytectl/cmd/delete/testdata/{invalid_task_attribute.yaml => invalid_attribute.yaml} (100%) create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml create mode 100644 flytectl/cmd/get/matchable_attribute_util.go create mode 100644 flytectl/cmd/get/matchable_cluster_resource_attribute.go create mode 100644 flytectl/cmd/get/matchable_cluster_resource_attribute_test.go create mode 100644 flytectl/cmd/update/matchable_attribute_util.go create mode 100644 flytectl/cmd/update/matchable_cluster_resource_attribute.go create mode 100644 flytectl/cmd/update/matchable_cluster_resource_attribute_test.go rename flytectl/cmd/update/testdata/{invalid_task_attribute.yaml => invalid_attribute.yaml} (100%) create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml create mode 100644 flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst diff --git a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go similarity index 55% rename from flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go index fadea1f465..2ee35a7887 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,7 +14,7 @@ import ( // If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. -func (TaskResourceAttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() @@ -28,7 +28,7 @@ func (TaskResourceAttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } -func (TaskResourceAttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { panic(err) @@ -37,10 +37,10 @@ func (TaskResourceAttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { return string(raw) } -// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrDeleteConfig and its nested types. The format of the +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (cfg TaskResourceAttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("TaskResourceAttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultTaskResourceDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go similarity index 64% rename from flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go index c2c77e82c2..798e81d2cf 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsTaskResourceAttrFetchConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementTaskResourceAttrFetchConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsTaskResourceAttrFetchConfig[t] +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookTaskResourceAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementTaskResourceAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookTaskResourceAttrFetchConfig(_, to reflect.Type, data int return data, nil } -func decode_TaskResourceAttrFetchConfig(input, result interface{}) error { +func decode_AttrDeleteConfig(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_TaskResourceAttrFetchConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookTaskResourceAttrFetchConfig, + jsonUnmarshalerHookAttrDeleteConfig, ), } @@ -70,7 +70,7 @@ func decode_TaskResourceAttrFetchConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_TaskResourceAttrFetchConfig(arr interface{}, sep string) string { +func join_AttrDeleteConfig(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_TaskResourceAttrFetchConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_TaskResourceAttrFetchConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrFetchConfig(val, result)) +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_TaskResourceAttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrFetchConfig(vStringSlice, result)) +func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } -func TestTaskResourceAttrFetchConfig_GetPFlagSet(t *testing.T) { - val := TaskResourceAttrFetchConfig{} +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestTaskResourceAttrFetchConfig_SetFlags(t *testing.T) { - actual := TaskResourceAttrFetchConfig{} +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -103,7 +103,7 @@ func TestTaskResourceAttrFetchConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultTaskResourceFetchConfig.AttrFile), vString) + assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) } else { assert.FailNow(t, err.Error()) } @@ -114,7 +114,7 @@ func TestTaskResourceAttrFetchConfig_SetFlags(t *testing.T) { cmdFlags.Set("attrFile", testValue) if vString, err := cmdFlags.GetString("attrFile"); err == nil { - testDecodeJson_TaskResourceAttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go similarity index 55% rename from flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go index ebf6ec6220..477e57689f 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,7 +14,7 @@ import ( // If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. -func (TaskResourceAttrFetchConfig) elemValueOrNil(v interface{}) interface{} { +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() @@ -28,7 +28,7 @@ func (TaskResourceAttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } -func (TaskResourceAttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { panic(err) @@ -37,10 +37,10 @@ func (TaskResourceAttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { return string(raw) } -// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrFetchConfig and its nested types. The format of the +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (cfg TaskResourceAttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("TaskResourceAttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultTaskResourceFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go similarity index 63% rename from flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go index 222fae2c50..4d8ae3e0e6 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsTaskResourceAttrDeleteConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementTaskResourceAttrDeleteConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsTaskResourceAttrDeleteConfig[t] +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookTaskResourceAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementTaskResourceAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookTaskResourceAttrDeleteConfig(_, to reflect.Type, data in return data, nil } -func decode_TaskResourceAttrDeleteConfig(input, result interface{}) error { +func decode_AttrFetchConfig(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_TaskResourceAttrDeleteConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookTaskResourceAttrDeleteConfig, + jsonUnmarshalerHookAttrFetchConfig, ), } @@ -70,7 +70,7 @@ func decode_TaskResourceAttrDeleteConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_TaskResourceAttrDeleteConfig(arr interface{}, sep string) string { +func join_AttrFetchConfig(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_TaskResourceAttrDeleteConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_TaskResourceAttrDeleteConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrDeleteConfig(val, result)) +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_TaskResourceAttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrDeleteConfig(vStringSlice, result)) +func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } -func TestTaskResourceAttrDeleteConfig_GetPFlagSet(t *testing.T) { - val := TaskResourceAttrDeleteConfig{} +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestTaskResourceAttrDeleteConfig_SetFlags(t *testing.T) { - actual := TaskResourceAttrDeleteConfig{} +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -103,7 +103,7 @@ func TestTaskResourceAttrDeleteConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultTaskResourceDelConfig.AttrFile), vString) + assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) } else { assert.FailNow(t, err.Error()) } @@ -114,7 +114,7 @@ func TestTaskResourceAttrDeleteConfig_SetFlags(t *testing.T) { cmdFlags.Set("attrFile", testValue) if vString, err := cmdFlags.GetString("attrFile"); err == nil { - testDecodeJson_TaskResourceAttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go similarity index 54% rename from flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go index d94413106f..60a9af145a 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,7 +14,7 @@ import ( // If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. -func (TaskResourceAttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() @@ -28,7 +28,7 @@ func (TaskResourceAttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } -func (TaskResourceAttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { panic(err) @@ -37,10 +37,10 @@ func (TaskResourceAttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { return string(raw) } -// GetPFlagSet will return strongly types pflags for all fields in TaskResourceAttrUpdateConfig and its nested types. The format of the +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (cfg TaskResourceAttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("TaskResourceAttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultTaskResourceUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultTaskResourceUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go similarity index 63% rename from flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go rename to flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go index 73f272b45e..aa5d18dd07 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package clusterresourceattribute import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsTaskResourceAttrUpdateConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementTaskResourceAttrUpdateConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsTaskResourceAttrUpdateConfig[t] +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookTaskResourceAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementTaskResourceAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookTaskResourceAttrUpdateConfig(_, to reflect.Type, data in return data, nil } -func decode_TaskResourceAttrUpdateConfig(input, result interface{}) error { +func decode_AttrUpdateConfig(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_TaskResourceAttrUpdateConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookTaskResourceAttrUpdateConfig, + jsonUnmarshalerHookAttrUpdateConfig, ), } @@ -70,7 +70,7 @@ func decode_TaskResourceAttrUpdateConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_TaskResourceAttrUpdateConfig(arr interface{}, sep string) string { +func join_AttrUpdateConfig(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_TaskResourceAttrUpdateConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_TaskResourceAttrUpdateConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrUpdateConfig(val, result)) +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_TaskResourceAttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_TaskResourceAttrUpdateConfig(vStringSlice, result)) +func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } -func TestTaskResourceAttrUpdateConfig_GetPFlagSet(t *testing.T) { - val := TaskResourceAttrUpdateConfig{} +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestTaskResourceAttrUpdateConfig_SetFlags(t *testing.T) { - actual := TaskResourceAttrUpdateConfig{} +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -103,7 +103,7 @@ func TestTaskResourceAttrUpdateConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultTaskResourceUpdateConfig.AttrFile), vString) + assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) } else { assert.FailNow(t, err.Error()) } @@ -114,7 +114,7 @@ func TestTaskResourceAttrUpdateConfig_SetFlags(t *testing.T) { cmdFlags.Set("attrFile", testValue) if vString, err := cmdFlags.GetString("attrFile"); err == nil { - testDecodeJson_TaskResourceAttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go new file mode 100644 index 0000000000..3b81cd0991 --- /dev/null +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go @@ -0,0 +1,10 @@ +package clusterresourceattribute + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go new file mode 100644 index 0000000000..9da6d481f8 --- /dev/null +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go @@ -0,0 +1,9 @@ +package clusterresourceattribute + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go new file mode 100644 index 0000000000..5bfece378d --- /dev/null +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go @@ -0,0 +1,47 @@ +package clusterresourceattribute + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// AttrFileConfig shadow Config for ClusterResourceAttributes. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type AttrFileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.ClusterResourceAttributes +} + +// Decorate decorator over ClusterResourceAttributes. +func (c AttrFileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: c.ClusterResourceAttributes, + }, + } +} + +// UnDecorate to uncover ClusterResourceAttributes. +func (c *AttrFileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + c.ClusterResourceAttributes = matchingAttribute.GetClusterResourceAttributes() +} + +// GetProject from the AttrFileConfig +func (c AttrFileConfig) GetProject() string { + return c.Project +} + +// GetDomain from the AttrFileConfig +func (c AttrFileConfig) GetDomain() string { + return c.Domain +} + +// GetWorkflow from the AttrFileConfig +func (c AttrFileConfig) GetWorkflow() string { + return c.Workflow +} diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go new file mode 100644 index 0000000000..f9510c7d07 --- /dev/null +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go @@ -0,0 +1,46 @@ +package clusterresourceattribute + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + clusterAttrFileConfig := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + ClusterResourceAttributes: &admin.ClusterResourceAttributes{ + Attributes: map[string]string{"foo": "bar"}, + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: clusterAttrFileConfig.ClusterResourceAttributes, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, clusterAttrFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + clusterAttrFileConfigNew := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + clusterAttrFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, clusterAttrFileConfig, clusterAttrFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + clusterAttrFileConfigNew := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", clusterAttrFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", clusterAttrFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", clusterAttrFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go new file mode 100644 index 0000000000..2ff214af1f --- /dev/null +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go @@ -0,0 +1,10 @@ +package clusterresourceattribute + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go new file mode 100644 index 0000000000..c29b3f23a7 --- /dev/null +++ b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go @@ -0,0 +1,60 @@ +package subcommand + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "sigs.k8s.io/yaml" +) + +// WriteConfigToFile used for marshaling the Config to a file which can then be used for update/delete +func WriteConfigToFile(matchableAttrConfig interface{}, fileName string) error { + d, err := yaml.Marshal(matchableAttrConfig) + if err != nil { + return fmt.Errorf("error: %v", err) + } + if _, err = os.Stat(fileName); err == nil { + if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { + return fmt.Errorf("backup the file before continuing") + } + } + return ioutil.WriteFile(fileName, d, 0600) +} + +// String Dumps the json representation of the TaskResourceAttrFileConfig +func String(matchableAttrConfig interface{}) string { + tj, err := json.Marshal(matchableAttrConfig) + if err != nil { + fmt.Println(err) + return "marshaling error" + } + return fmt.Sprintf("%s\n", tj) +} + +// ReadConfigFromFile used for unmarshaling the Config from a file which is used for update/delete +func ReadConfigFromFile(matchableAttrConfig interface{}, fileName string) error { + data, err := ioutil.ReadFile(fileName) + if err != nil { + return fmt.Errorf("unable to read from %v yaml file", fileName) + } + if err = yaml.UnmarshalStrict(data, matchableAttrConfig); err != nil { + return err + } + return nil +} + +func DumpTaskResourceAttr(matchableAttrConfig interface{}, fileName string) error { + // Write Config to file if filename provided in the command + if len(fileName) > 0 { + if err := WriteConfigToFile(matchableAttrConfig, fileName); err != nil { + return fmt.Errorf("error dumping in file due to %v", err) + } + fmt.Printf("wrote the config to file %v", fileName) + } else { + fmt.Printf("%v", String(matchableAttrConfig)) + } + return nil +} diff --git a/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go b/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go new file mode 100644 index 0000000000..728be8582f --- /dev/null +++ b/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go @@ -0,0 +1,13 @@ +package subcommand + +import "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + +// MatchableAttributeDecorator defines a decorator for any matchable attribute target. +type MatchableAttributeDecorator interface { + Decorate() *admin.MatchingAttributes +} + +// MatchableAttributeUnDecorator defines a undecorator to get the target. +type MatchableAttributeUnDecorator interface { + UnDecorate(*admin.MatchingAttributes) +} diff --git a/flytectl/cmd/config/subcommand/project_domain_workflow_getter.go b/flytectl/cmd/config/subcommand/project_domain_workflow_getter.go new file mode 100644 index 0000000000..ee77f9ca3f --- /dev/null +++ b/flytectl/cmd/config/subcommand/project_domain_workflow_getter.go @@ -0,0 +1,40 @@ +package subcommand + +import rootConfig "github.com/flyteorg/flytectl/cmd/config" + +// ProjectDomainWorkflowGetter defines a interface for getting the project domain workflow. +type ProjectDomainWorkflowGetter interface { + GetProject() string + GetDomain() string + GetWorkflow() string +} + +// PDWGetterCommandLine implements the command line way of getting project domain and workflow +type PDWGetterCommandLine struct { + Config *rootConfig.Config + Args []string +} + +// GetProject returns the cobra parsed Project from the Config +func (g PDWGetterCommandLine) GetProject() string { + if g.Config == nil { + return "" + } + return g.Config.Project +} + +// GetDomain returns the cobra parsed Domain from the Config +func (g PDWGetterCommandLine) GetDomain() string { + if g.Config == nil { + return "" + } + return g.Config.Domain +} + +// GetWorkflow returns the first argument from the commandline +func (g PDWGetterCommandLine) GetWorkflow() string { + if g.Args == nil || len(g.Args) == 0 { + return "" + } + return g.Args[0] +} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go deleted file mode 100644 index 34a6a4e466..0000000000 --- a/flytectl/cmd/config/subcommand/task_resource_attribute_delete_config.go +++ /dev/null @@ -1,10 +0,0 @@ -package subcommand - -//go:generate pflags TaskResourceAttrDeleteConfig --default-var DefaultTaskResourceDelConfig - -// TaskResourceAttrDeleteConfig Matchable resource attributes configuration passed from command line -type TaskResourceAttrDeleteConfig struct { - AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` -} - -var DefaultTaskResourceDelConfig = &TaskResourceAttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go deleted file mode 100644 index 34b1d435f4..0000000000 --- a/flytectl/cmd/config/subcommand/task_resource_attribute_fetch_config.go +++ /dev/null @@ -1,9 +0,0 @@ -package subcommand - -//go:generate pflags TaskResourceAttrFetchConfig --default-var DefaultTaskResourceFetchConfig - -type TaskResourceAttrFetchConfig struct { - AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` -} - -var DefaultTaskResourceFetchConfig = &TaskResourceAttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go deleted file mode 100644 index 62fa2f7e3f..0000000000 --- a/flytectl/cmd/config/subcommand/task_resource_attribute_file_config.go +++ /dev/null @@ -1,86 +0,0 @@ -package subcommand - -import ( - "context" - "encoding/json" - "fmt" - "io/ioutil" - "os" - - cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" - - "sigs.k8s.io/yaml" -) - -// TaskResourceAttrFileConfig shadow config for TaskResourceAttribute. -// The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. -// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute -type TaskResourceAttrFileConfig struct { - Project string - Domain string - Workflow string - *admin.TaskResourceAttributes -} - -// WriteConfigToFile used for marshaling the config to a file which can then be used for update/delete -func (t TaskResourceAttrFileConfig) WriteConfigToFile(fileName string) error { - d, err := yaml.Marshal(t) - if err != nil { - fmt.Printf("error: %v", err) - } - if _, err = os.Stat(fileName); err == nil { - if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { - return fmt.Errorf("backup the file before continuing") - } - } - return ioutil.WriteFile(fileName, d, 0600) -} - -// Dumps the json representation of the TaskResourceAttrFileConfig -func (t TaskResourceAttrFileConfig) String() string { - tj, err := json.Marshal(t) - if err != nil { - fmt.Println(err) - return "marshaling error" - } - return fmt.Sprintf("%s\n", tj) -} - -// ReadConfigFromFile used for unmarshaling the config from a file which is used for update/delete -func (t *TaskResourceAttrFileConfig) ReadConfigFromFile(fileName string) error { - data, err := ioutil.ReadFile(fileName) - if err != nil { - return fmt.Errorf("unable to read from %v yaml file", fileName) - } - if err = yaml.UnmarshalStrict(data, t); err != nil { - return err - } - return nil -} - -// MatchableAttributeDecorator decorator over TaskResourceAttributes. Similar decorator would exist for other MatchingAttributes -func (t *TaskResourceAttrFileConfig) MatchableAttributeDecorator() *admin.MatchingAttributes { - return &admin.MatchingAttributes{ - Target: &admin.MatchingAttributes_TaskResourceAttributes{ - TaskResourceAttributes: t.TaskResourceAttributes, - }, - } -} - -func (t TaskResourceAttrFileConfig) DumpTaskResourceAttr(ctx context.Context, fileName string) { - // Dump empty task resource attr for editing - // Write config to file if filename provided in the command - if len(fileName) > 0 { - // Read the config from the file and update the TaskResourceAttrFileConfig with the TaskResourceAttrConfig - if err := t.WriteConfigToFile(fileName); err != nil { - fmt.Printf("error dumping in file due to %v", err) - logger.Warnf(ctx, "error dumping in file due to %v", err) - return - } - fmt.Printf("written the config to file %v", fileName) - } else { - fmt.Printf("%v", t) - } -} diff --git a/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go b/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go deleted file mode 100644 index d85944777d..0000000000 --- a/flytectl/cmd/config/subcommand/task_resource_attribute_update_config.go +++ /dev/null @@ -1,10 +0,0 @@ -package subcommand - -//go:generate pflags TaskResourceAttrUpdateConfig --default-var DefaultTaskResourceUpdateConfig - -// TaskResourceAttrUpdateConfig Matchable resource attributes configuration passed from command line -type TaskResourceAttrUpdateConfig struct { - AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` -} - -var DefaultTaskResourceUpdateConfig = &TaskResourceAttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go new file mode 100755 index 0000000000..b335257d99 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package taskresourceattribute + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..3c219496ae --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package taskresourceattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) +} + +func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) +} + +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/workflowconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go similarity index 52% rename from flytectl/cmd/config/subcommand/workflowconfig_flags.go rename to flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go index cc5a1743d4..761baa5c3a 100755 --- a/flytectl/cmd/config/subcommand/workflowconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package taskresourceattribute import ( "encoding/json" @@ -14,7 +14,7 @@ import ( // If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. -func (WorkflowConfig) elemValueOrNil(v interface{}) interface{} { +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { if reflect.ValueOf(v).IsNil() { return reflect.Zero(t.Elem()).Interface() @@ -28,7 +28,7 @@ func (WorkflowConfig) elemValueOrNil(v interface{}) interface{} { return v } -func (WorkflowConfig) mustMarshalJSON(v json.Marshaler) string { +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { panic(err) @@ -37,11 +37,10 @@ func (WorkflowConfig) mustMarshalJSON(v json.Marshaler) string { return string(raw) } -// GetPFlagSet will return strongly types pflags for all fields in WorkflowConfig and its nested types. The format of the +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (cfg WorkflowConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("WorkflowConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultWorklfowConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultWorklfowConfig.Version, "version of the workflow to be fetched.") - cmdFlags.BoolVar(&(DefaultWorklfowConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), DefaultWorklfowConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go new file mode 100755 index 0000000000..1b91152a97 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package taskresourceattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) +} + +func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) +} + +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go new file mode 100755 index 0000000000..b94b102bc6 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package taskresourceattribute + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go new file mode 100755 index 0000000000..2672552de4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package taskresourceattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) +} + +func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) +} + +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go new file mode 100644 index 0000000000..6c513cafe0 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go @@ -0,0 +1,10 @@ +package taskresourceattribute + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go new file mode 100644 index 0000000000..6909229c30 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go @@ -0,0 +1,9 @@ +package taskresourceattribute + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go new file mode 100644 index 0000000000..6c31553f87 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go @@ -0,0 +1,47 @@ +package taskresourceattribute + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// TaskResourceAttrFileConfig shadow Config for TaskResourceAttribute. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type TaskResourceAttrFileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.TaskResourceAttributes +} + +// Decorate decorator over TaskResourceAttributes. +func (t TaskResourceAttrFileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: t.TaskResourceAttributes, + }, + } +} + +// UnDecorate to uncover TaskResourceAttributes. +func (t *TaskResourceAttrFileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + t.TaskResourceAttributes = matchingAttribute.GetTaskResourceAttributes() +} + +// GetProject from the TaskResourceAttrFileConfig +func (t TaskResourceAttrFileConfig) GetProject() string { + return t.Project +} + +// GetDomain from the TaskResourceAttrFileConfig +func (t TaskResourceAttrFileConfig) GetDomain() string { + return t.Domain +} + +// GetWorkflow from the TaskResourceAttrFileConfig +func (t TaskResourceAttrFileConfig) GetWorkflow() string { + return t.Workflow +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go new file mode 100644 index 0000000000..73b2248985 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go @@ -0,0 +1,53 @@ +package taskresourceattribute + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + taskAttrFileConfig := TaskResourceAttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + TaskResourceAttributes: &admin.TaskResourceAttributes{ + Defaults: &admin.TaskResourceSpec{ + Cpu: "1", + Memory: "150Mi", + }, + Limits: &admin.TaskResourceSpec{ + Cpu: "2", + Memory: "350Mi", + }, + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: taskAttrFileConfig.TaskResourceAttributes, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, taskAttrFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + taskAttrFileConfigNew := TaskResourceAttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + taskAttrFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, taskAttrFileConfig, taskAttrFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + taskAttrFileConfigNew := TaskResourceAttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", taskAttrFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", taskAttrFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", taskAttrFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go new file mode 100644 index 0000000000..d9ea24ab77 --- /dev/null +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go @@ -0,0 +1,10 @@ +package taskresourceattribute + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags.go b/flytectl/cmd/config/subcommand/workflow/config_flags.go new file mode 100755 index 0000000000..3db237e852 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflow/config_flags.go @@ -0,0 +1,47 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflow + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the workflow to be fetched.") + cmdFlags.BoolVar(&(DefaultConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/workflowconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go similarity index 69% rename from flytectl/cmd/config/subcommand/workflowconfig_flags_test.go rename to flytectl/cmd/config/subcommand/workflow/config_flags_test.go index 105f884def..e3d3eae412 100755 --- a/flytectl/cmd/config/subcommand/workflowconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package subcommand +package workflow import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsWorkflowConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementWorkflowConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsWorkflowConfig[t] +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookWorkflowConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementWorkflowConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookWorkflowConfig(_, to reflect.Type, data interface{}) (in return data, nil } -func decode_WorkflowConfig(input, result interface{}) error { +func decode_Config(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_WorkflowConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookWorkflowConfig, + jsonUnmarshalerHookConfig, ), } @@ -70,7 +70,7 @@ func decode_WorkflowConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_WorkflowConfig(arr interface{}, sep string) string { +func join_Config(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_WorkflowConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_WorkflowConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_WorkflowConfig(val, result)) +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_WorkflowConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_WorkflowConfig(vStringSlice, result)) +func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) } -func TestWorkflowConfig_GetPFlagSet(t *testing.T) { - val := WorkflowConfig{} +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestWorkflowConfig_SetFlags(t *testing.T) { - actual := WorkflowConfig{} +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -103,7 +103,7 @@ func TestWorkflowConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string(DefaultWorklfowConfig.Version), vString) + assert.Equal(t, string(DefaultConfig.Version), vString) } else { assert.FailNow(t, err.Error()) } @@ -114,7 +114,7 @@ func TestWorkflowConfig_SetFlags(t *testing.T) { cmdFlags.Set("version", testValue) if vString, err := cmdFlags.GetString("version"); err == nil { - testDecodeJson_WorkflowConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Version) } else { assert.FailNow(t, err.Error()) @@ -125,7 +125,7 @@ func TestWorkflowConfig_SetFlags(t *testing.T) { t.Run("DefaultValue", func(t *testing.T) { // Test that default value is set properly if vBool, err := cmdFlags.GetBool("latest"); err == nil { - assert.Equal(t, bool(DefaultWorklfowConfig.Latest), vBool) + assert.Equal(t, bool(DefaultConfig.Latest), vBool) } else { assert.FailNow(t, err.Error()) } @@ -136,7 +136,7 @@ func TestWorkflowConfig_SetFlags(t *testing.T) { cmdFlags.Set("latest", testValue) if vBool, err := cmdFlags.GetBool("latest"); err == nil { - testDecodeJson_WorkflowConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Latest) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/workflow_config.go b/flytectl/cmd/config/subcommand/workflow/workflow_config.go similarity index 51% rename from flytectl/cmd/config/subcommand/workflow_config.go rename to flytectl/cmd/config/subcommand/workflow/workflow_config.go index b3c6452a62..d4890f84c2 100644 --- a/flytectl/cmd/config/subcommand/workflow_config.go +++ b/flytectl/cmd/config/subcommand/workflow/workflow_config.go @@ -1,13 +1,13 @@ -package subcommand +package workflow -//go:generate pflags WorkflowConfig --default-var DefaultWorklfowConfig +//go:generate pflags Config --default-var DefaultConfig var ( - DefaultWorklfowConfig = &WorkflowConfig{} + DefaultConfig = &Config{} ) -// WorkflowConfig commandline configuration -type WorkflowConfig struct { +// Config commandline configuration +type Config struct { Version string `json:"version" pflag:",version of the workflow to be fetched."` Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` } diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 2c694db819..fe518f9ca0 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -1,7 +1,8 @@ package delete import ( - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -30,7 +31,10 @@ func RemoteDeleteCommand() *cobra.Command { Long: execCmdLong}, "task-resource-attribute": {CmdFunc: deleteTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, Short: taskResourceAttributesShort, - Long: taskResourceAttributesLong, PFlagProvider: subcommand.DefaultTaskResourceDelConfig, ProjectDomainNotRequired: true}, + Long: taskResourceAttributesLong, PFlagProvider: taskresourceattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, + "cluster-resource-attribute": {CmdFunc: deleteClusterResourceAttributes, Aliases: []string{"cluster-resource-attributes"}, + Short: clusterResourceAttributesShort, + Long: clusterResourceAttributesLong, PFlagProvider: clusterresourceattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index dd3075edac..52ea0e9090 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -26,18 +26,20 @@ func TestDeleteCommand(t *testing.T) { assert.Equal(t, deleteCommand.Use, "delete") assert.Equal(t, deleteCommand.Short, deleteCmdShort) assert.Equal(t, deleteCommand.Long, deleteCmdLong) - assert.Equal(t, len(deleteCommand.Commands()), 2) + assert.Equal(t, len(deleteCommand.Commands()), 3) cmdNouns := deleteCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "execution") - assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) - assert.Equal(t, cmdNouns[0].Short, execCmdShort) - assert.Equal(t, cmdNouns[0].Long, execCmdLong) - assert.Equal(t, cmdNouns[1].Use, "task-resource-attribute") - assert.Equal(t, cmdNouns[1].Aliases, []string{"task-resource-attributes"}) - assert.Equal(t, cmdNouns[1].Short, taskResourceAttributesShort) - assert.Equal(t, cmdNouns[1].Long, taskResourceAttributesLong) + useArray := []string{"cluster-resource-attribute", "execution", "task-resource-attribute"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"task-resource-attributes"}} + shortArray := []string{clusterResourceAttributesShort, execCmdShort, taskResourceAttributesShort} + longArray := []string{clusterResourceAttributesLong, execCmdLong, taskResourceAttributesLong} + for i := range cmdNouns { + assert.Equal(t, cmdNouns[i].Use, useArray[i]) + assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) + assert.Equal(t, cmdNouns[i].Short, shortArray[i]) + assert.Equal(t, cmdNouns[i].Long, longArray[i]) + } } diff --git a/flytectl/cmd/delete/matchable_attribute_util.go b/flytectl/cmd/delete/matchable_attribute_util.go new file mode 100644 index 0000000000..6621ae85d8 --- /dev/null +++ b/flytectl/cmd/delete/matchable_attribute_util.go @@ -0,0 +1,29 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" +) + +func deleteMatchableAttr(ctx context.Context, project, domain, workflowName string, + deleter ext.AdminDeleterExtInterface, rsType admin.MatchableResource) error { + if len(workflowName) > 0 { + // Delete the workflow attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here + err := deleter.DeleteWorkflowAttributes(ctx, project, domain, workflowName, rsType) + if err != nil { + return err + } + logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v and workflow %v", project, domain, workflowName) + } else { + // Delete the project domain attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here + err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) + if err != nil { + return err + } + logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v", project, domain) + } + return nil +} diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go new file mode 100644 index 0000000000..18dfa582e8 --- /dev/null +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -0,0 +1,79 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + clusterResourceAttributesShort = "Deletes matchable resources of cluster attributes" + clusterResourceAttributesLong = ` +Deletes cluster resource attributes for given project and domain combination or additionally with workflow name. + +Deletes cluster resource attribute for project and domain +Here the command delete cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development + + +Deleting cluster resource attribute using config file which was used for creating it. +Here the command deletes cluster resource attributes from the config file cra.yaml +eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete cluster-resource-attribute --attrFile cra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Deleting cluster resource attribute for a workflow +Here the command deletes cluster resource attributes for a workflow + +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deleteClusterResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := clusterresourceattribute.DefaultDelConfig + + // Get the project domain workflowName from the config file or commandline params + if len(delConfig.AttrFile) > 0 { + // Initialize TaskResourceAttrFileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the attribute file + pwdGetter = &clusterresourceattribute.AttrFileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { + return err + } + } + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the taskResourceAttrFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_CLUSTER_RESOURCE); err != nil { + return err + } + + return nil +} diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go new file mode 100644 index 0000000000..ef84023c45 --- /dev/null +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -0,0 +1,134 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deleteClusterResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + clusterresourceattribute.DefaultDelConfig = &clusterresourceattribute.AttrDeleteConfig{} + args = []string{} +} + +func TestDeleteClusterResourceAttributes(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/non-existent" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_CLUSTER_RESOURCE) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deleteClusterResourceAttributeSetup() + // Empty attribute file + clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/invalid_attribute.yaml" + // No args implying project domain attribute deletion + err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + }) +} diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 00e8e51148..dbd8293cfe 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -4,10 +4,10 @@ import ( "context" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" ) const ( @@ -22,7 +22,7 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file +Deleting task resource attribute using config file which was used for creating it. Here the command deletes task resource attributes from the config file tra.yaml eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource @@ -33,15 +33,14 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" Deleting task resource attribute for a workflow Here the command deletes task resource attributes for a workflow @@ -55,44 +54,29 @@ Usage ) func deleteTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - delConfig := subcommand.DefaultTaskResourceDelConfig - var project string - var domain string - var workflowName string + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := taskresourceattribute.DefaultDelConfig + // Get the project domain workflowName from the config file or commandline params if len(delConfig.AttrFile) > 0 { - // Read the config from the file - taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{} - if err := taskResourceAttrFileConfig.ReadConfigFromFile(delConfig.AttrFile); err != nil { + // Initialize TaskResourceAttrFileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the attribute file + pwdGetter = &taskresourceattribute.TaskResourceAttrFileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { return err } - // Get project domain workflow name from the read file. - project = taskResourceAttrFileConfig.Project - domain = taskResourceAttrFileConfig.Domain - workflowName = taskResourceAttrFileConfig.Workflow - } else { - // Get all the parameters for deletion from the command line - project = config.GetConfig().Project - domain = config.GetConfig().Domain - if len(args) == 1 { - workflowName = args[0] - } } - - if len(workflowName) > 0 { - // Delete the workflow attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here - err := cmdCtx.AdminDeleterExt().DeleteWorkflowAttributes(ctx, project, domain, workflowName, admin.MatchableResource_TASK_RESOURCE) - if err != nil { - return err - } - logger.Debugf(ctx, "Deleted task resource attributes from %v project and domain %v and workflow %v", project, domain, workflowName) - } else { - // Delete the project domain attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here - err := cmdCtx.AdminDeleterExt().DeleteProjectDomainAttributes(ctx, project, domain, admin.MatchableResource_TASK_RESOURCE) - if err != nil { - return err - } - logger.Debugf(ctx, "Deleted task resource attributes from %v project and domain %v", project, domain) + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the taskResourceAttrFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_TASK_RESOURCE); err != nil { + return err } + return nil } diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 211aeb694b..16443ef270 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -17,7 +17,8 @@ func deleteTaskResourceAttributeSetup() { ctx = u.Ctx cmdCtx = u.CmdCtx mockClient = u.MockClient - subcommand.DefaultTaskResourceDelConfig = &subcommand.TaskResourceAttrDeleteConfig{} + taskresourceattribute.DefaultDelConfig = &taskresourceattribute.AttrDeleteConfig{} + args = []string{} } func TestDeleteTaskResourceAttributes(t *testing.T) { @@ -25,7 +26,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + taskresourceattribute.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -50,7 +51,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -63,7 +64,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + taskresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -77,7 +78,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "" + taskresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) @@ -92,7 +93,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -106,7 +107,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/non-existent" + taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/non-existent" // No args implying project domain attribute deletion u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -120,7 +121,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - subcommand.DefaultTaskResourceDelConfig.AttrFile = "testdata/invalid_task_attribute.yaml" + taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/invalid_attribute.yaml" // No args implying project domain attribute deletion err = deleteTaskResourceAttributes(ctx, args, cmdCtx) assert.NotNil(t, err) diff --git a/flytectl/cmd/delete/testdata/invalid_task_attribute.yaml b/flytectl/cmd/delete/testdata/invalid_attribute.yaml similarity index 100% rename from flytectl/cmd/delete/testdata/invalid_task_attribute.yaml rename to flytectl/cmd/delete/testdata/invalid_attribute.yaml diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml new file mode 100644 index 0000000000..c6c25fa904 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml @@ -0,0 +1,5 @@ +domain: development +project: flytectldemo +attributes: + "foo": "bar" + "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml index 0051a4c2cc..a16186c80b 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml @@ -1,6 +1,5 @@ -Domain: development -Project: flytectldemo -Workflow: "" +domain: development +project: flytectldemo defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml new file mode 100644 index 0000000000..f8e7b17f65 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml @@ -0,0 +1,6 @@ +Domain: development +Project: flytectldemo +Workflow: core.control_flow.run_merge_sort.merge_sort +attributes: + "foo": "bar" + "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml index 2593cad309..3b8d08cc79 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml @@ -1,6 +1,6 @@ -Domain: development -Project: flytectldemo -Workflow: core.control_flow.run_merge_sort.merge_sort +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort defaults: cpu: "2" memory: 250Mi diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index f5b414013f..a03e4931b3 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -1,7 +1,9 @@ package get import ( - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -33,14 +35,17 @@ func CreateGetCommand() *cobra.Command { "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, Long: taskLong, PFlagProvider: taskConfig}, "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, - Long: workflowLong, PFlagProvider: subcommand.DefaultWorklfowConfig}, + Long: workflowLong, PFlagProvider: workflow.DefaultConfig}, "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, Long: launchPlanLong, PFlagProvider: launchPlanConfig}, "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, Long: executionLong}, "task-resource-attribute": {CmdFunc: getTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, Short: taskResourceAttributesShort, - Long: taskResourceAttributesLong, PFlagProvider: subcommand.DefaultTaskResourceFetchConfig}, + Long: taskResourceAttributesLong, PFlagProvider: taskresourceattribute.DefaultFetchConfig}, + "cluster-resource-attribute": {CmdFunc: getClusterResourceAttributes, Aliases: []string{"cluster-resource-attributes"}, + Short: clusterResourceAttributesShort, + Long: clusterResourceAttributesLong, PFlagProvider: clusterresourceattribute.DefaultFetchConfig}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index e277ba1624..1d0bebe97b 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -37,29 +37,24 @@ func TestCreateGetCommand(t *testing.T) { assert.Equal(t, getCommand.Use, "get") assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) - assert.Equal(t, len(getCommand.Commands()), 6) + assert.Equal(t, len(getCommand.Commands()), 7) cmdNouns := getCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "execution") - assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) - assert.Equal(t, cmdNouns[0].Short, "Gets execution resources") - assert.Equal(t, cmdNouns[1].Use, "launchplan") - assert.Equal(t, cmdNouns[1].Aliases, []string{"launchplans"}) - assert.Equal(t, cmdNouns[1].Short, "Gets launch plan resources") - assert.Equal(t, cmdNouns[2].Use, "project") - assert.Equal(t, cmdNouns[2].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[2].Short, "Gets project resources") - assert.Equal(t, cmdNouns[3].Use, "task") - assert.Equal(t, cmdNouns[3].Aliases, []string{"tasks"}) - assert.Equal(t, cmdNouns[3].Short, "Gets task resources") - assert.Equal(t, cmdNouns[4].Use, "task-resource-attribute") - assert.Equal(t, cmdNouns[4].Aliases, []string{"task-resource-attributes"}) - assert.Equal(t, cmdNouns[4].Short, taskResourceAttributesShort) - assert.Equal(t, cmdNouns[4].Long, taskResourceAttributesLong) - assert.Equal(t, cmdNouns[5].Use, "workflow") - assert.Equal(t, cmdNouns[5].Aliases, []string{"workflows"}) - assert.Equal(t, cmdNouns[5].Short, "Gets workflow resources") + useArray := []string{"cluster-resource-attribute", "execution", "launchplan", "project", + "task", "task-resource-attribute", "workflow"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"launchplans"}, {"projects"}, {"tasks"}, + {"task-resource-attributes"}, {"workflows"}} + shortArray := []string{clusterResourceAttributesShort, executionShort, launchPlanShort, projectShort, + taskShort, taskResourceAttributesShort, workflowShort} + longArray := []string{clusterResourceAttributesLong, executionLong, launchPlanLong, projectLong, taskLong, + taskResourceAttributesLong, workflowLong} + for i := range cmdNouns { + assert.Equal(t, cmdNouns[i].Use, useArray[i]) + assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) + assert.Equal(t, cmdNouns[i].Short, shortArray[i]) + assert.Equal(t, cmdNouns[i].Long, longArray[i]) + } } diff --git a/flytectl/cmd/get/matchable_attribute_util.go b/flytectl/cmd/get/matchable_attribute_util.go new file mode 100644 index 0000000000..cddfdab348 --- /dev/null +++ b/flytectl/cmd/get/matchable_attribute_util.go @@ -0,0 +1,32 @@ +package get + +import ( + "context" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func FetchAndUnDecorateMatchableAttr(ctx context.Context, project, domain, workflowName string, + fetcher ext.AdminFetcherExtInterface, unDecorator sconfig.MatchableAttributeUnDecorator, rsType admin.MatchableResource) error { + if len(workflowName) > 0 { + // Fetch the workflow attribute from the admin + workflowAttr, err := fetcher.FetchWorkflowAttributes(ctx, + project, domain, workflowName, rsType) + if err != nil { + return err + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + unDecorator.UnDecorate(workflowAttr.GetAttributes().GetMatchingAttributes()) + } else { + // Fetch the project domain attribute from the admin + projectDomainAttr, err := fetcher.FetchProjectDomainAttributes(ctx, project, domain, rsType) + if err != nil { + return err + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + unDecorator.UnDecorate(projectDomainAttr.GetAttributes().GetMatchingAttributes()) + } + return nil +} diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go new file mode 100644 index 0000000000..4ca0934cd4 --- /dev/null +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -0,0 +1,78 @@ +package get + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes" + clusterResourceAttributesLong = ` +Retrieves cluster resource attributes for given project and domain combination or additionally with workflow name. + +Retrieves cluster resource attribute for project and domain +Here the command get cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl get cluster-resource-attribute -p flytectldemo -d development + +eg : O/P + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} + +Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. +Here the command gets task resource attributes and writes the config file to tra.yaml +eg: content of tra.yaml + +:: + + flytectl get task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Usage +` +) + +func getClusterResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for ClusterResourceAttribute. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + clusterResourceAttrFileConfig := clusterresourceattribute.AttrFileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the attribute file name from the command line config + fileName := clusterresourceattribute.DefaultFetchConfig.AttrFile + + // Updates the taskResourceAttrFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &clusterResourceAttrFileConfig, admin.MatchableResource_CLUSTER_RESOURCE); err != nil { + return err + } + + // Write the config to the file which can be used for update + if err := sconfig.DumpTaskResourceAttr(clusterResourceAttrFileConfig, fileName); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go new file mode 100644 index 0000000000..dd93934a91 --- /dev/null +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -0,0 +1,138 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getClusterResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + clusterresourceattribute.DefaultFetchConfig = &clusterresourceattribute.AttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove("temp-output-file") +} + +func TestGetClusterResourceAttributes(t *testing.T) { + clusterResourceAttr := &admin.ClusterResourceAttributes{ + Attributes: map[string]string{"foo": "bar"}, + } + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: clusterResourceAttr, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: clusterResourceAttr, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","attributes":{"foo":"bar"}}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + clusterresourceattribute.DefaultFetchConfig.AttrFile = "temp-output-file" + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + clusterresourceattribute.DefaultFetchConfig.AttrFile = "non-existent-dir/temp-output-file" + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, ``) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","attributes":{"foo":"bar"}}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getClusterResourceAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getClusterResourceAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index bfa68d6edc..e27367e8a2 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -2,10 +2,10 @@ package get import ( "context" - "fmt" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) @@ -38,15 +38,14 @@ eg: content of tra.yaml .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" Usage ` @@ -64,38 +63,19 @@ func getTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmdCor workflowName = args[0] } // Construct a shadow config for TaskResourceAttribute. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. - taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{Project: project, Domain: domain, Workflow: workflowName} + taskResourceAttrFileConfig := taskresourceattribute.TaskResourceAttrFileConfig{Project: project, Domain: domain, Workflow: workflowName} // Get the attribute file name from the command line config - fileName := subcommand.DefaultTaskResourceFetchConfig.AttrFile - - if len(workflowName) > 0 { - // Fetch the workflow attribute from the admin - workflowAttr, err := cmdCtx.AdminFetcherExt().FetchWorkflowAttributes(ctx, - project, domain, workflowName, admin.MatchableResource_TASK_RESOURCE) - if err != nil { - taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) - return err - } - if workflowAttr.GetAttributes() == nil || workflowAttr.GetAttributes().GetMatchingAttributes() == nil { - return fmt.Errorf("invalid matching attribute returned with nil data") - } - // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. - taskResourceAttrFileConfig.TaskResourceAttributes = workflowAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() - } else { - // Fetch the project domain attribute from the admin - projectDomainAttr, err := cmdCtx.AdminFetcherExt().FetchProjectDomainAttributes(ctx, - project, domain, admin.MatchableResource_TASK_RESOURCE) - if err != nil { - taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) - return err - } - if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { - return fmt.Errorf("invalid matching attribute returned with nil data") - } - // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. - taskResourceAttrFileConfig.TaskResourceAttributes = projectDomainAttr.GetAttributes().GetMatchingAttributes().GetTaskResourceAttributes() + fileName := taskresourceattribute.DefaultFetchConfig.AttrFile + + // Updates the taskResourceAttrFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &taskResourceAttrFileConfig, admin.MatchableResource_TASK_RESOURCE); err != nil { + return err } + // Write the config to the file which can be used for update - taskResourceAttrFileConfig.DumpTaskResourceAttr(ctx, fileName) + if err := sconfig.DumpTaskResourceAttr(taskResourceAttrFileConfig, fileName); err != nil { + return err + } return nil } diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index 22d82df983..2477661d70 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -18,7 +18,7 @@ func getTaskResourceAttributeSetup() { ctx = u.Ctx cmdCtx = u.CmdCtx mockClient = u.MockClient - subcommand.DefaultTaskResourceFetchConfig = &subcommand.TaskResourceAttrFetchConfig{} + taskresourceattribute.DefaultFetchConfig = &taskresourceattribute.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove("temp-output-file") } @@ -68,13 +68,13 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { var args []string setup() getTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceFetchConfig.AttrFile = "temp-output-file" + taskresourceattribute.DefaultFetchConfig.AttrFile = "temp-output-file" // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) @@ -82,21 +82,22 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `written the config to file temp-output-file`) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { var args []string setup() getTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceFetchConfig.AttrFile = "non-existent-dir/temp-output-file" + taskresourceattribute.DefaultFetchConfig.AttrFile = "non-existent-dir/temp-output-file" // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) err = getTaskResourceAttributes(ctx, args, cmdCtx) - assert.Nil(t, err) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory`) + tearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { var args []string @@ -110,7 +111,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":""}`) + tearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { var args []string @@ -124,7 +125,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { var args []string @@ -139,6 +140,6 @@ func TestGetTaskResourceAttributes(t *testing.T) { u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"Project":"dummyProject","Domain":"dummyDomain","Workflow":"workflow"}`) + tearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 3640a5f342..4de25ace61 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,7 +3,7 @@ package get import ( "context" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + workflowconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" @@ -108,13 +108,13 @@ func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterf var workflows []*admin.Workflow var workflow *admin.Workflow var err error - if subcommand.DefaultWorklfowConfig.Latest { + if workflowconfig.DefaultConfig.Latest { if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain); err != nil { return nil, err } workflows = append(workflows, workflow) - } else if subcommand.DefaultWorklfowConfig.Version != "" { - if workflow, err = fetcher.FetchWorkflowVersion(ctx, name, subcommand.DefaultWorklfowConfig.Version, project, domain); err != nil { + } else if workflowconfig.DefaultConfig.Version != "" { + if workflow, err = fetcher.FetchWorkflowVersion(ctx, name, workflowconfig.DefaultConfig.Version, project, domain); err != nil { return nil, err } workflows = append(workflows, workflow) diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 93928eebc4..bb9f88d356 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/stretchr/testify/assert" @@ -15,8 +15,8 @@ func getWorkflowSetup() { ctx = u.Ctx mockClient = u.MockClient cmdCtx = u.CmdCtx - subcommand.DefaultWorklfowConfig.Latest = false - subcommand.DefaultWorklfowConfig.Version = "" + workflow.DefaultConfig.Latest = false + workflow.DefaultConfig.Version = "" } func TestGetWorkflowFuncWithError(t *testing.T) { @@ -24,7 +24,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { setup() getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - subcommand.DefaultWorklfowConfig.Latest = true + workflow.DefaultConfig.Latest = true mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) @@ -35,7 +35,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { setup() getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - subcommand.DefaultWorklfowConfig.Version = "v1" + workflow.DefaultConfig.Version = "v1" mockFetcher.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) @@ -55,7 +55,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { t.Run("failure fetching ", func(t *testing.T) { setup() getWorkflowSetup() - subcommand.DefaultWorklfowConfig.Latest = true + workflow.DefaultConfig.Latest = true args := []string{"workflowName"} u.FetcherExt.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go new file mode 100644 index 0000000000..8717789574 --- /dev/null +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -0,0 +1,30 @@ +package update + +import ( + "context" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flytestdlib/logger" +) + +func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workflowName string, + updater ext.AdminUpdaterExtInterface, mcDecorator sconfig.MatchableAttributeDecorator) error { + matchingAttr := mcDecorator.Decorate() + if len(workflowName) > 0 { + // Update the workflow attribute using the admin. + err := updater.UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) + if err != nil { + return err + } + logger.Debugf(ctx, "Updated attributes from %v project and domain %v and workflow %v", project, domain, workflowName) + } else { + // Update the project domain attribute using the admin. + err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) + if err != nil { + return err + } + logger.Debugf(ctx, "Updated attributes from %v project and domain %v", project, domain) + } + return nil +} diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go new file mode 100644 index 0000000000..ff0b42c9ef --- /dev/null +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -0,0 +1,76 @@ +package update + +import ( + "context" + "fmt" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + clusterResourceAttributesShort = "Updates matchable resources of cluster attributes" + clusterResourceAttributesLong = ` +Updates cluster resource attributes for given project and domain combination or additionally with workflow name. + +Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for cluster resource attributes from the config file cra.yaml +eg: content of tra.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +resource attribute defined at project domain level. +Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Usage + +` +) + +func updateClusterResourceAttributesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := clusterresourceattribute.DefaultUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute") + } + + clustrResourceAttrFileConfig := clusterresourceattribute.AttrFileConfig{} + if err := sconfig.ReadConfigFromFile(&clustrResourceAttrFileConfig, updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := clustrResourceAttrFileConfig.Project + domain := clustrResourceAttrFileConfig.Domain + workflowName := clustrResourceAttrFileConfig.Workflow + + // Updates the admin matchable attribute from taskResourceAttrFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + clustrResourceAttrFileConfig); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go new file mode 100644 index 0000000000..1819c6cec4 --- /dev/null +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -0,0 +1,94 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updateClusterResourceAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} +} + +func TestUpdateClusterResourceAttributes(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/non-existent-filel" + err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-filel yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updateClusterResourceAttributeSetup() + clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/invalid_attribute.yaml" + err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 598eb98531..84e3128145 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -4,15 +4,15 @@ import ( "context" "fmt" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytestdlib/logger" ) const ( taskResourceAttributesShort = "Updates matchable resources of task attributes" taskResourceAttributesLong = ` -Updates task resource attributes for given project,domain combination or additionally with workflow name. +Updates task resource attributes for given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for task resource attributes from the config file tra.yaml @@ -20,34 +20,33 @@ eg: content of tra.yaml .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" :: flytectl update task-resource-attribute -attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: core.control_flow.run_merge_sort.merge_sort + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" :: @@ -59,13 +58,13 @@ Usage ) func updateTaskResourceAttributesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - updateConfig := subcommand.DefaultTaskResourceUpdateConfig + updateConfig := taskresourceattribute.DefaultUpdateConfig if len(updateConfig.AttrFile) == 0 { return fmt.Errorf("attrFile is mandatory while calling update for task resource attribute") } - taskResourceAttrFileConfig := subcommand.TaskResourceAttrFileConfig{} - if err := taskResourceAttrFileConfig.ReadConfigFromFile(updateConfig.AttrFile); err != nil { + taskResourceAttrFileConfig := taskresourceattribute.TaskResourceAttrFileConfig{} + if err := sconfig.ReadConfigFromFile(&taskResourceAttrFileConfig, updateConfig.AttrFile); err != nil { return err } @@ -74,23 +73,10 @@ func updateTaskResourceAttributesFunc(ctx context.Context, args []string, cmdCtx domain := taskResourceAttrFileConfig.Domain workflowName := taskResourceAttrFileConfig.Workflow - // decorate the taskresource Attributes with MatchingAttributes - matchingAttr := taskResourceAttrFileConfig.MatchableAttributeDecorator() - - if len(workflowName) > 0 { - // Update the workflow attribute using the admin. - err := cmdCtx.AdminUpdaterExt().UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) - if err != nil { - return err - } - logger.Debugf(ctx, "Updated task resource attributes from %v project and domain %v and workflow %v", project, domain, workflowName) - } else { - // Update the project domain attribute using the admin. - err := cmdCtx.AdminUpdaterExt().UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) - if err != nil { - return err - } - logger.Debugf(ctx, "Updated task resource attributes from %v project and domain %v", project, domain) + // Updates the admin matchable attribute from taskResourceAttrFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + taskResourceAttrFileConfig); err != nil { + return err } return nil } diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index 4ab7b84cab..75aca56c29 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/stretchr/testify/assert" @@ -15,7 +15,7 @@ func updateTaskResourceAttributeSetup() { ctx = u.Ctx cmdCtx = u.CmdCtx mockClient = u.MockClient - subcommand.DefaultTaskResourceUpdateConfig = &subcommand.TaskResourceAttrUpdateConfig{} + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} } func TestUpdateTaskResourceAttributes(t *testing.T) { @@ -30,7 +30,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("successful update project domain attribute", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -41,7 +41,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("failed update project domain attribute", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) @@ -53,7 +53,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("successful update workflow attribute", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -64,7 +64,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("failed update workflow attribute", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) @@ -76,7 +76,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("non existent file", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/non-existent-filel" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/non-existent-filel" err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-filel yaml file"), err) @@ -85,7 +85,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("invalid update file", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - subcommand.DefaultTaskResourceUpdateConfig.AttrFile = "testdata/invalid_task_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/invalid_attribute.yaml" err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) diff --git a/flytectl/cmd/update/testdata/invalid_task_attribute.yaml b/flytectl/cmd/update/testdata/invalid_attribute.yaml similarity index 100% rename from flytectl/cmd/update/testdata/invalid_task_attribute.yaml rename to flytectl/cmd/update/testdata/invalid_attribute.yaml diff --git a/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml new file mode 100644 index 0000000000..c6c25fa904 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml @@ -0,0 +1,5 @@ +domain: development +project: flytectldemo +attributes: + "foo": "bar" + "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml index 0051a4c2cc..a16186c80b 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml @@ -1,6 +1,5 @@ -Domain: development -Project: flytectldemo -Workflow: "" +domain: development +project: flytectldemo defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml new file mode 100644 index 0000000000..f8e7b17f65 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml @@ -0,0 +1,6 @@ +Domain: development +Project: flytectldemo +Workflow: core.control_flow.run_merge_sort.merge_sort +attributes: + "foo": "bar" + "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml index 2593cad309..3b8d08cc79 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml @@ -1,6 +1,6 @@ -Domain: development -Project: flytectldemo -Workflow: core.control_flow.run_merge_sort.merge_sort +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort defaults: cpu: "2" memory: 250Mi diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index c842c0855b..203407d306 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -1,8 +1,10 @@ package update import ( - "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" ) @@ -36,8 +38,10 @@ func CreateUpdateCommand() *cobra.Command { Short: updateTaskShort, Long: updateTaskLong}, "workflow": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateWorkflowShort, Long: updateWorkflowLong}, - "task-resource-attribute": {CmdFunc: updateTaskResourceAttributesFunc, Aliases: []string{}, PFlagProvider: subcommand.DefaultTaskResourceUpdateConfig, + "task-resource-attribute": {CmdFunc: updateTaskResourceAttributesFunc, Aliases: []string{}, PFlagProvider: taskresourceattribute.DefaultUpdateConfig, Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, ProjectDomainNotRequired: true}, + "cluster-resource-attribute": {CmdFunc: updateClusterResourceAttributesFunc, Aliases: []string{}, PFlagProvider: clusterresourceattribute.DefaultUpdateConfig, + Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, ProjectDomainNotRequired: true}, } cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 33e9b9eb5e..abebad5236 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -26,16 +26,19 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 5) + assert.Equal(t, len(updateCommand.Commands()), 6) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"launchplan", "project", "task", "task-resource-attribute", "workflow"} - aliases := [][]string{{}, {}, {}, {}, {}} - shortArray := []string{updateLPShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort} - longArray := []string{updateLPLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong} + useArray := []string{"cluster-resource-attribute", "launchplan", "project", "task", + "task-resource-attribute", "workflow"} + aliases := [][]string{{}, {}, {}, {}, {}, {}} + shortArray := []string{clusterResourceAttributesShort, updateLPShort, projectShort, updateTaskShort, + taskResourceAttributesShort, updateWorkflowShort} + longArray := []string{clusterResourceAttributesLong, updateLPLong, projectLong, updateTaskLong, + taskResourceAttributesLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 49006715a4..be95495573 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -71,6 +71,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes * :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. * :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst new file mode 100644 index 0000000000..bb342e1ed9 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -0,0 +1,109 @@ +.. _flytectl_delete_cluster-resource-attribute: + +flytectl delete cluster-resource-attribute +------------------------------------------ + +Deletes matchable resources of cluster attributes + +Synopsis +~~~~~~~~ + + + +Deletes cluster resource attributes for given project and domain combination or additionally with workflow name. + +Deletes cluster resource attribute for project and domain +Here the command delete cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development + + +Deleting cluster resource attribute using config file which was used for creating it. +Here the command deletes cluster resource attributes from the config file cra.yaml +eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete cluster-resource-attribute --attrFile cra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Deleting cluster resource attribute for a workflow +Here the command deletes cluster resource attributes for a workflow + +:: + + flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index da97151fef..d31faa8b9f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -19,7 +19,7 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file +Deleting task resource attribute using config file which was used for creating it. Here the command deletes task resource attributes from the config file tra.yaml eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource @@ -30,15 +30,14 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" Deleting task resource attribute for a workflow Here the command deletes task resource attributes for a workflow diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index add9e81c9b..7a37881b50 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -71,6 +71,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes * :doc:`flytectl_get_execution` - Gets execution resources * :doc:`flytectl_get_launchplan` - Gets launch plan resources * :doc:`flytectl_get_project` - Gets project resources diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst new file mode 100644 index 0000000000..db51d52098 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -0,0 +1,107 @@ +.. _flytectl_get_cluster-resource-attribute: + +flytectl get cluster-resource-attribute +--------------------------------------- + +Gets matchable resources of cluster resource attributes + +Synopsis +~~~~~~~~ + + + +Retrieves cluster resource attributes for given project and domain combination or additionally with workflow name. + +Retrieves cluster resource attribute for project and domain +Here the command get cluster resource attributes for project flytectldemo and development domain. +:: + + flytectl get cluster-resource-attribute -p flytectldemo -d development + +eg : O/P + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} + +Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. +Here the command gets task resource attributes and writes the config file to tra.yaml +eg: content of tra.yaml + +:: + + flytectl get task-resource-attribute --attrFile tra.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +Usage + + +:: + + flytectl get cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index ea2356a8ca..5c1d307eae 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -35,15 +35,14 @@ eg: content of tra.yaml .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" Usage diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index a30c1a9337..4692575169 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -73,6 +73,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes * :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst new file mode 100644 index 0000000000..96be5e1fa7 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -0,0 +1,111 @@ +.. _flytectl_update_cluster-resource-attribute: + +flytectl update cluster-resource-attribute +------------------------------------------ + +Updates matchable resources of cluster attributes + +Synopsis +~~~~~~~~ + + + +Updates cluster resource attributes for given project and domain combination or additionally with workflow name. + +Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for cluster resource attributes from the config file cra.yaml +eg: content of tra.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +resource attribute defined at project domain level. +Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + attributes: + foo: "bar" + buzz: "lightyear" + +:: + + flytectl update cluster-resource-attribute -attrFile cra.yaml + +Usage + + + +:: + + flytectl update cluster-resource-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for cluster-resource-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 6f60b7d50d..fd4b141361 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -10,7 +10,7 @@ Synopsis -Updates task resource attributes for given project,domain combination or additionally with workflow name. +Updates task resource attributes for given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for task resource attributes from the config file tra.yaml @@ -18,34 +18,33 @@ eg: content of tra.yaml .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: "" + domain: development + project: flytectldemo defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" :: flytectl update task-resource-attribute -attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain .. code-block:: yaml - Domain: development - Project: flytectldemo - Workflow: core.control_flow.run_merge_sort.merge_sort + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort defaults: - cpu: "1" - memory: 150Mi + cpu: "1" + memory: "150Mi" limits: - cpu: "2" - memory: 450Mi + cpu: "2" + memory: "450Mi" :: diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 78996e38ce..e65582ff28 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -12,8 +12,19 @@ Nouns gen/flytectl_get_project gen/flytectl_get_workflow gen/flytectl_get_task + gen/flytectl_get_task-resource-attribute + gen/flytectl_get_cluster-resource-attribute gen/flytectl_get_launchplan + gen/flytectl_update_launchplan + gen/flytectl_update_workflow gen/flytectl_update_project + gen/flytectl_update_task + gen/flytectl_update_task-resource-attribute + gen/flytectl_update_cluster-resource-attribute gen/flytectl_register_files + gen/flytectl_delete_execution + gen/flytectl_delete_task-resource-attribute + gen/flytectl_delete_cluster-resource-attribute gen/flytectl_version gen/flytectl_config_validate + gen/flytectl_config_discover diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index f3ea76b369..0af146e8e1 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -2,6 +2,7 @@ package ext import ( "context" + "fmt" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) @@ -14,7 +15,13 @@ func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, pro Workflow: name, ResourceType: rsType, }) - return workflowAttr, err + if err != nil { + return nil, err + } + if workflowAttr.GetAttributes() == nil || workflowAttr.GetAttributes().GetMatchingAttributes() == nil { + return nil, fmt.Errorf("attribute doesn't exist") + } + return workflowAttr, nil } func (a *AdminFetcherExtClient) FetchProjectDomainAttributes(ctx context.Context, project, domain string, @@ -25,5 +32,11 @@ func (a *AdminFetcherExtClient) FetchProjectDomainAttributes(ctx context.Context Domain: domain, ResourceType: rsType, }) - return projectDomainAttr, err + if err != nil { + return nil, err + } + if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { + return nil, fmt.Errorf("attribute doesn't exist") + } + return projectDomainAttr, nil } diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index b91d18fe3a..ea7f29929a 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -12,38 +12,70 @@ import ( "github.com/stretchr/testify/mock" ) +var wResp *admin.WorkflowAttributesGetResponse + +var pResp *admin.ProjectDomainAttributesGetResponse + func getAttributeMatchFetcherSetup() { ctx = context.Background() adminClient = new(mocks.AdminServiceClient) adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + wResp = &admin.WorkflowAttributesGetResponse{Attributes: &admin.WorkflowAttributes{ + MatchingAttributes: &admin.MatchingAttributes{ + Target: nil, + }}} + pResp = &admin.ProjectDomainAttributesGetResponse{Attributes: &admin.ProjectDomainAttributes{ + Project: "dummyProject", + Domain: "dummyDomain", + MatchingAttributes: &admin.MatchingAttributes{ + Target: nil, + }}} } func TestFetchWorkflowAttributes(t *testing.T) { getAttributeMatchFetcherSetup() - resp := &admin.WorkflowAttributesGetResponse{} - adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(resp, nil) + adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(wResp, nil) _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) assert.Nil(t, err) } func TestFetchWorkflowAttributesError(t *testing.T) { - getAttributeMatchFetcherSetup() - adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) - assert.Equal(t, fmt.Errorf("failed"), err) + t.Run("failed api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) + }) + t.Run("empty data from api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + wResp := &admin.WorkflowAttributesGetResponse{} + adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(wResp, nil) + _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + }) } func TestFetchProjectDomainAttributes(t *testing.T) { getAttributeMatchFetcherSetup() - resp := &admin.ProjectDomainAttributesGetResponse{} - adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(resp, nil) + adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(pResp, nil) _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) assert.Nil(t, err) } func TestFetchProjectDomainAttributesError(t *testing.T) { - getAttributeMatchFetcherSetup() - adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) - assert.Equal(t, fmt.Errorf("failed"), err) + t.Run("failed api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) + }) + t.Run("empty data from api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + pResp := &admin.ProjectDomainAttributesGetResponse{} + adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(pResp, nil) + _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + }) } From 4d43aee9efe4a2ae689630d3ffb8a81c4fb821a4 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Fri, 14 May 2021 07:13:52 +0530 Subject: [PATCH 049/356] Added support for execution queue attribute (#66) * Added support for execution queue attribute Signed-off-by: Prafulla Mahindrakar --- .../attrdeleteconfig_flags.go | 46 ++++++ .../attrdeleteconfig_flags_test.go | 124 ++++++++++++++++ .../attrfetchconfig_flags.go | 46 ++++++ .../attrfetchconfig_flags_test.go | 124 ++++++++++++++++ .../attrupdateconfig_flags.go | 46 ++++++ .../attrupdateconfig_flags_test.go | 124 ++++++++++++++++ .../executionqueueattribute/delete_config.go | 10 ++ .../executionqueueattribute/fetch_config.go | 9 ++ .../executionqueueattribute/file_config.go | 47 ++++++ .../file_config_test.go | 46 ++++++ .../executionqueueattribute/update_config.go | 10 ++ flytectl/cmd/delete/delete.go | 4 + flytectl/cmd/delete/delete_test.go | 16 +- .../matchable_cluster_resource_attribute.go | 15 +- ...tchable_cluster_resource_attribute_test.go | 4 +- .../matchable_execution_queue_attribute.go | 82 +++++++++++ ...atchable_execution_queue_attribute_test.go | 134 +++++++++++++++++ .../matchable_task_resource_attribute.go | 21 +-- .../matchable_task_resource_attribute_test.go | 4 +- ...ject_domain_execution_queue_attribute.yaml | 7 + ...id_workflow_execution_queue_attribute.yaml | 8 + flytectl/cmd/get/get.go | 4 + flytectl/cmd/get/get_test.go | 15 +- .../matchable_cluster_resource_attribute.go | 30 ++-- ...tchable_cluster_resource_attribute_test.go | 6 +- .../matchable_execution_queue_attribute.go | 92 ++++++++++++ ...atchable_execution_queue_attribute_test.go | 138 ++++++++++++++++++ .../get/matchable_task_resource_attribute.go | 33 +++-- .../matchable_task_resource_attribute_test.go | 6 +- .../matchable_cluster_resource_attribute.go | 32 ++-- ...tchable_cluster_resource_attribute_test.go | 6 +- .../matchable_execution_queue_attribute.go | 84 +++++++++++ ...atchable_execution_queue_attribute_test.go | 94 ++++++++++++ .../matchable_task_resource_attribute.go | 42 +++--- .../matchable_task_resource_attribute_test.go | 6 +- ...ject_domain_execution_queue_attribute.yaml | 7 + ...id_workflow_execution_queue_attribute.yaml | 8 + flytectl/cmd/update/update.go | 3 + flytectl/cmd/update/update_test.go | 16 +- flytectl/docs/source/gen/flytectl_delete.rst | 1 + ...ectl_delete_cluster-resource-attribute.rst | 15 +- ...tectl_delete_execution-queue-attribute.rst | 112 ++++++++++++++ ...lytectl_delete_task-resource-attribute.rst | 21 +-- flytectl/docs/source/gen/flytectl_get.rst | 1 + ...lytectl_get_cluster-resource-attribute.rst | 30 ++-- ...flytectl_get_execution-queue-attribute.rst | 121 +++++++++++++++ .../flytectl_get_task-resource-attribute.rst | 33 +++-- flytectl/docs/source/gen/flytectl_update.rst | 1 + ...ectl_update_cluster-resource-attribute.rst | 32 ++-- ...tectl_update_execution-queue-attribute.rst | 119 +++++++++++++++ ...lytectl_update_task-resource-attribute.rst | 42 +++--- flytectl/docs/source/nouns.rst | 3 + 52 files changed, 1911 insertions(+), 169 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go create mode 100644 flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go create mode 100644 flytectl/cmd/delete/matchable_execution_queue_attribute.go create mode 100644 flytectl/cmd/delete/matchable_execution_queue_attribute_test.go create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml create mode 100644 flytectl/cmd/get/matchable_execution_queue_attribute.go create mode 100644 flytectl/cmd/get/matchable_execution_queue_attribute_test.go create mode 100644 flytectl/cmd/update/matchable_execution_queue_attribute.go create mode 100644 flytectl/cmd/update/matchable_execution_queue_attribute_test.go create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml create mode 100644 flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go new file mode 100755 index 0000000000..15852717de --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..d42fa0c9c7 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) +} + +func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) +} + +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go new file mode 100755 index 0000000000..0eed381d70 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go new file mode 100755 index 0000000000..449b82faae --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) +} + +func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) +} + +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go new file mode 100755 index 0000000000..c858ca34c8 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go new file mode 100755 index 0000000000..dbe6642165 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionqueueattribute + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) +} + +func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) +} + +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go new file mode 100644 index 0000000000..a6754eb4f4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go @@ -0,0 +1,10 @@ +package executionqueueattribute + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go new file mode 100644 index 0000000000..4c5c154f2b --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go @@ -0,0 +1,9 @@ +package executionqueueattribute + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go new file mode 100644 index 0000000000..1726f0b693 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go @@ -0,0 +1,47 @@ +package executionqueueattribute + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// AttrFileConfig shadow Config for ExecutionQueueAttributes. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type AttrFileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.ExecutionQueueAttributes +} + +// Decorate decorator over ExecutionQueueAttributes. +func (a AttrFileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: a.ExecutionQueueAttributes, + }, + } +} + +// UnDecorate to uncover ExecutionQueueAttributes. +func (a *AttrFileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + a.ExecutionQueueAttributes = matchingAttribute.GetExecutionQueueAttributes() +} + +// GetProject from the AttrFileConfig +func (a AttrFileConfig) GetProject() string { + return a.Project +} + +// GetDomain from the AttrFileConfig +func (a AttrFileConfig) GetDomain() string { + return a.Domain +} + +// GetWorkflow from the AttrFileConfig +func (a AttrFileConfig) GetWorkflow() string { + return a.Workflow +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go new file mode 100644 index 0000000000..8148d8b7cd --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go @@ -0,0 +1,46 @@ +package executionqueueattribute + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + executionQueueAttrFileConfig := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + ExecutionQueueAttributes: &admin.ExecutionQueueAttributes{ + Tags: []string{"foo", "bar"}, + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: executionQueueAttrFileConfig.ExecutionQueueAttributes, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, executionQueueAttrFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + executionAttrFileConfigNew := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + executionAttrFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, executionQueueAttrFileConfig, executionAttrFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + executionQueueAttrFileConfigNew := AttrFileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", executionQueueAttrFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", executionQueueAttrFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", executionQueueAttrFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go new file mode 100644 index 0000000000..11b319f1d1 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go @@ -0,0 +1,10 @@ +package executionqueueattribute + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index fe518f9ca0..5a64a58ce3 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -2,6 +2,7 @@ package delete import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdcore "github.com/flyteorg/flytectl/cmd/core" @@ -35,6 +36,9 @@ func RemoteDeleteCommand() *cobra.Command { "cluster-resource-attribute": {CmdFunc: deleteClusterResourceAttributes, Aliases: []string{"cluster-resource-attributes"}, Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, PFlagProvider: clusterresourceattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, + "execution-queue-attribute": {CmdFunc: deleteExecutionQueueAttributes, Aliases: []string{"execution-queue-attributes"}, + Short: executionQueueAttributesShort, + Long: executionQueueAttributesLong, PFlagProvider: executionqueueattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 52ea0e9090..3f5739c9cf 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -18,6 +18,12 @@ var ( mockClient *mocks.AdminServiceClient cmdCtx cmdCore.CommandContext ) + +const ( + testDataNonExistentFile = "testdata/non-existent-file" + testDataInvalidAttrFile = "testdata/invalid_attribute.yaml" +) + var setup = testutils.Setup var tearDownAndVerify = testutils.TearDownAndVerify @@ -26,16 +32,16 @@ func TestDeleteCommand(t *testing.T) { assert.Equal(t, deleteCommand.Use, "delete") assert.Equal(t, deleteCommand.Short, deleteCmdShort) assert.Equal(t, deleteCommand.Long, deleteCmdLong) - assert.Equal(t, len(deleteCommand.Commands()), 3) + assert.Equal(t, len(deleteCommand.Commands()), 4) cmdNouns := deleteCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution", "task-resource-attribute"} - aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"task-resource-attributes"}} - shortArray := []string{clusterResourceAttributesShort, execCmdShort, taskResourceAttributesShort} - longArray := []string{clusterResourceAttributesLong, execCmdLong, taskResourceAttributesLong} + useArray := []string{"cluster-resource-attribute", "execution", "execution-queue-attribute", "task-resource-attribute"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-queue-attributes"}, {"task-resource-attributes"}} + shortArray := []string{clusterResourceAttributesShort, execCmdShort, executionQueueAttributesShort, taskResourceAttributesShort} + longArray := []string{clusterResourceAttributesLong, execCmdLong, executionQueueAttributesLong, taskResourceAttributesLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index 18dfa582e8..9dd6bc526b 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -22,8 +22,9 @@ Here the command delete cluster resource attributes for project flytectldemo an flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deleting cluster resource attribute using config file which was used for creating it. +Deletes cluster resource attribute using config file which was used for creating it. Here the command deletes cluster resource attributes from the config file cra.yaml +Attributes are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource :: @@ -33,13 +34,13 @@ eg: content of cra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" -Deleting cluster resource attribute for a workflow +Deletes cluster resource attribute for a workflow Here the command deletes cluster resource attributes for a workflow :: diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index ef84023c45..f9290ad6b7 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -107,7 +107,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { setup() deleteClusterResourceAttributeSetup() // Empty attribute file - clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/non-existent" + clusterresourceattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -121,7 +121,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { setup() deleteClusterResourceAttributeSetup() // Empty attribute file - clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/invalid_attribute.yaml" + clusterresourceattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion err = deleteClusterResourceAttributes(ctx, args, cmdCtx) assert.NotNil(t, err) diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go new file mode 100644 index 0000000000..2f11ce5c5b --- /dev/null +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -0,0 +1,82 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + executionQueueAttributesShort = "Deletes matchable resources of execution queue attributes" + executionQueueAttributesLong = ` +Deletes execution queue attributes for given project and domain combination or additionally with workflow name. + +Deletes execution queue attribute for project and domain +Here the command delete execution queue attributes for project flytectldemo and development domain. +:: + + flytectl delete execution-queue-attribute -p flytectldemo -d development + + +Deletes execution queue attribute using config file which was used for creating it. +Here the command deletes execution queue attributes from the config file era.yaml +Tags are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of era.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete execution-queue-attribute --attrFile era.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +Deletes execution queue attribute for a workflow +Here the command deletes the execution queue attributes for a workflow + +:: + + flytectl delete execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deleteExecutionQueueAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := executionqueueattribute.DefaultDelConfig + + // Get the project domain workflowName from the config file or commandline params + if len(delConfig.AttrFile) > 0 { + // Initialize AttrFileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the attribute file + pwdGetter = &executionqueueattribute.AttrFileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { + return err + } + } + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the AttrFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_EXECUTION_QUEUE); err != nil { + return err + } + + return nil +} diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go new file mode 100644 index 0000000000..ef5b2975c0 --- /dev/null +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -0,0 +1,134 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deleteExecutionQueueAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionqueueattribute.DefaultDelConfig = &executionqueueattribute.AttrDeleteConfig{} + args = []string{} +} + +func TestDeleteExecutionQueueAttributes(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deleteExecutionQueueAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_EXECUTION_QUEUE) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deleteTaskResourceAttributeSetup() + // Empty attribute file + executionqueueattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile + // No args implying project domain attribute deletion + err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + }) +} diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index dbd8293cfe..cafc354714 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -22,8 +22,9 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file which was used for creating it. +Deletes task resource attribute using config file which was used for creating it. Here the command deletes task resource attributes from the config file tra.yaml +defaults/limits are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource :: @@ -33,16 +34,16 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" -Deleting task resource attribute for a workflow +Deletes task resource attribute for a workflow Here the command deletes task resource attributes for a workflow :: diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 16443ef270..204d46f8c7 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -107,7 +107,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/non-existent" + taskresourceattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -121,7 +121,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { setup() deleteTaskResourceAttributeSetup() // Empty attribute file - taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/invalid_attribute.yaml" + taskresourceattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion err = deleteTaskResourceAttributes(ctx, args, cmdCtx) assert.NotNil(t, err) diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml new file mode 100644 index 0000000000..d04a525b88 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml @@ -0,0 +1,7 @@ +domain: development +project: flytectldemo +tags: + - foo + - bar + - buzz + - lightyear \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml new file mode 100644 index 0000000000..7c69c43fec --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml @@ -0,0 +1,8 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +tags: + - foo + - bar + - buzz + - lightyear \ No newline at end of file diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index a03e4931b3..10f1e6bdb1 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -2,6 +2,7 @@ package get import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" cmdcore "github.com/flyteorg/flytectl/cmd/core" @@ -46,6 +47,9 @@ func CreateGetCommand() *cobra.Command { "cluster-resource-attribute": {CmdFunc: getClusterResourceAttributes, Aliases: []string{"cluster-resource-attributes"}, Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, PFlagProvider: clusterresourceattribute.DefaultFetchConfig}, + "execution-queue-attribute": {CmdFunc: getExecutionQueueAttributes, Aliases: []string{"execution-queue-attributes"}, + Short: executionQueueAttributesShort, + Long: executionQueueAttributesLong, PFlagProvider: executionqueueattribute.DefaultFetchConfig}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 1d0bebe97b..1f567dacc3 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -32,24 +32,29 @@ var ( var setup = testutils.Setup var tearDownAndVerify = testutils.TearDownAndVerify +const ( + testDataTempFile = "temp-output-file" + testDataNotExistentTempFile = "non-existent-dir/temp-output-file" +) + func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() assert.Equal(t, getCommand.Use, "get") assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) - assert.Equal(t, len(getCommand.Commands()), 7) + assert.Equal(t, len(getCommand.Commands()), 8) cmdNouns := getCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution", "launchplan", "project", + useArray := []string{"cluster-resource-attribute", "execution", "execution-queue-attribute", "launchplan", "project", "task", "task-resource-attribute", "workflow"} - aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"launchplans"}, {"projects"}, {"tasks"}, + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-queue-attributes"}, {"launchplans"}, {"projects"}, {"tasks"}, {"task-resource-attributes"}, {"workflows"}} - shortArray := []string{clusterResourceAttributesShort, executionShort, launchPlanShort, projectShort, + shortArray := []string{clusterResourceAttributesShort, executionShort, executionQueueAttributesShort, launchPlanShort, projectShort, taskShort, taskResourceAttributesShort, workflowShort} - longArray := []string{clusterResourceAttributesLong, executionLong, launchPlanLong, projectLong, taskLong, + longArray := []string{clusterResourceAttributesLong, executionLong, executionQueueAttributesLong, launchPlanLong, projectLong, taskLong, taskResourceAttributesLong, workflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 4ca0934cd4..7df8190d09 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -21,28 +21,40 @@ Here the command get cluster resource attributes for project flytectldemo and d flytectl get cluster-resource-attribute -p flytectldemo -d development -eg : O/P +eg : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} +Retrieves cluster resource attribute for project and domain and workflow +Here the command get cluster resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} + Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. -Here the command gets task resource attributes and writes the config file to tra.yaml -eg: content of tra.yaml +Here the command gets task resource attributes and writes the config file to cra.yaml +eg: content of cra.yaml :: - flytectl get task-resource-attribute --attrFile tra.yaml + flytectl get task-resource-attribute --attrFile cra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" Usage ` diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index dd93934a91..9991e3688d 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -20,7 +20,7 @@ func getClusterResourceAttributeSetup() { mockClient = u.MockClient clusterresourceattribute.DefaultFetchConfig = &clusterresourceattribute.AttrFetchConfig{} // Clean up the temp directory. - _ = os.Remove("temp-output-file") + _ = os.Remove(testDataTempFile) } func TestGetClusterResourceAttributes(t *testing.T) { @@ -67,7 +67,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { var args []string setup() getClusterResourceAttributeSetup() - clusterresourceattribute.DefaultFetchConfig.AttrFile = "temp-output-file" + clusterresourceattribute.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) @@ -81,7 +81,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { var args []string setup() getClusterResourceAttributeSetup() - clusterresourceattribute.DefaultFetchConfig.AttrFile = "non-existent-dir/temp-output-file" + clusterresourceattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go new file mode 100644 index 0000000000..07e51e3d91 --- /dev/null +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -0,0 +1,92 @@ +package get + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + executionQueueAttributesShort = "Gets matchable resources of execution queue attributes" + executionQueueAttributesLong = ` +Retrieves execution queue attributes for given project and domain combination or additionally with workflow name. + +Retrieves execution queue attribute for project and domain +Here the command get execution queue attributes for project flytectldemo and development domain. +:: + + flytectl get execution-queue-attribute -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} + +Retrieves execution queue attribute for project and domain and workflow +Here the command get execution queue attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} + +Writing the execution queue attribute to a file. If there are no execution queue attributes, command would return an error. +Here the command gets execution queue attributes and writes the config file to era.yaml +eg: content of era.yaml + +:: + + flytectl get execution-queue-attribute --attrFile era.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +Usage +` +) + +func getExecutionQueueAttributes(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for ExecutionQueueAttribute. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + executionQueueAttrFileConfig := executionqueueattribute.AttrFileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the attribute file name from the command line config + fileName := executionqueueattribute.DefaultFetchConfig.AttrFile + + // Updates the taskResourceAttrFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &executionQueueAttrFileConfig, admin.MatchableResource_EXECUTION_QUEUE); err != nil { + return err + } + + // Write the config to the file which can be used for update + if err := sconfig.DumpTaskResourceAttr(executionQueueAttrFileConfig, fileName); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go new file mode 100644 index 0000000000..92bf156d95 --- /dev/null +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -0,0 +1,138 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getExecutionQueueAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionqueueattribute.DefaultFetchConfig = &executionqueueattribute.AttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove(testDataTempFile) +} + +func TestGetExecutionQueueAttributes(t *testing.T) { + executionQueueAttr := &admin.ExecutionQueueAttributes{ + Tags: []string{"foo", "bar"}, + } + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: executionQueueAttr, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: executionQueueAttr, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","tags":["foo","bar"]}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + executionqueueattribute.DefaultFetchConfig.AttrFile = testDataTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + executionqueueattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, ``) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","tags":["foo","bar"]}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getExecutionQueueAttributeSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getExecutionQueueAttributes(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index e27367e8a2..b3ba8023c4 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -21,11 +21,24 @@ Here the command get task resource attributes for project flytectldemo and deve flytectl get task-resource-attribute -p flytectldemo -d development -eg : O/P +eg : output from the command .. code-block:: json - {"Project":"flytectldemo","Domain":"development","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + +Retrieves task resource attribute for project and domain and workflow +Here the command get task resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. Here the command gets task resource attributes and writes the config file to tra.yaml @@ -38,14 +51,14 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" Usage ` diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index 2477661d70..6df5479859 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -20,7 +20,7 @@ func getTaskResourceAttributeSetup() { mockClient = u.MockClient taskresourceattribute.DefaultFetchConfig = &taskresourceattribute.AttrFetchConfig{} // Clean up the temp directory. - _ = os.Remove("temp-output-file") + _ = os.Remove(testDataTempFile) } func TestGetTaskResourceAttributes(t *testing.T) { @@ -74,7 +74,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { var args []string setup() getTaskResourceAttributeSetup() - taskresourceattribute.DefaultFetchConfig.AttrFile = "temp-output-file" + taskresourceattribute.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) @@ -88,7 +88,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { var args []string setup() getTaskResourceAttributeSetup() - taskresourceattribute.DefaultFetchConfig.AttrFile = "non-existent-dir/temp-output-file" + taskresourceattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index ff0b42c9ef..77b0821c7c 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -16,35 +16,39 @@ Updates cluster resource attributes for given project and domain combination or Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for cluster resource attributes from the config file cra.yaml -eg: content of tra.yaml +eg: content of cra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" :: - flytectl update cluster-resource-attribute -attrFile cra.yaml + flytectl update cluster-resource-attribute --attrFile cra.yaml Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get cluster-resource-attribute section on how to generate this file Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + attributes: + foo: "bar" + buzz: "lightyear" :: - flytectl update cluster-resource-attribute -attrFile cra.yaml + flytectl update cluster-resource-attribute --attrFile cra.yaml Usage diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 1819c6cec4..8cb13ee340 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -76,16 +76,16 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { t.Run("non existent file", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/non-existent-filel" + clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-filel yaml file"), err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) tearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/invalid_attribute.yaml" + clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go new file mode 100644 index 0000000000..676c351396 --- /dev/null +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -0,0 +1,84 @@ +package update + +import ( + "context" + "fmt" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + executionQueueAttributesShort = "Updates matchable resources of execution queue attributes" + executionQueueAttributesLong = ` +Updates execution queue attributes for given project and domain combination or additionally with workflow name. + +Updating to the execution queue attribute is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get execution-queue-attribute section on how to generate this file +Here the command updates takes the input for execution queue attributes from the config file era.yaml +eg: content of era.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +:: + + flytectl update execution-queue-attribute --attrFile era.yaml + +Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other +execution queue attribute defined at project domain level. +Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + tags: + - foo + - bar + - buzz + - lightyear + +:: + + flytectl update execution-queue-attribute --attrFile era.yaml + +Usage + +` +) + +func updateExecutionQueueAttributesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := executionqueueattribute.DefaultUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for execution queue attribute") + } + + executionQueueAttrFileConfig := executionqueueattribute.AttrFileConfig{} + if err := sconfig.ReadConfigFromFile(&executionQueueAttrFileConfig, updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := executionQueueAttrFileConfig.Project + domain := executionQueueAttrFileConfig.Domain + workflowName := executionQueueAttrFileConfig.Workflow + + // Updates the admin matchable attribute from executionQueueAttrFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + executionQueueAttrFileConfig); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go new file mode 100644 index 0000000000..5659a35696 --- /dev/null +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -0,0 +1,94 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updateExecutionQueueAttributeSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} +} + +func TestExecutionQueueAttributes(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution queue attribute"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile + err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updateExecutionQueueAttributeSetup() + executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile + err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 84e3128145..3e351baa95 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -15,42 +15,46 @@ const ( Updates task resource attributes for given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get task-resource-attribute section on how to generate this file Here the command updates takes the input for task resource attributes from the config file tra.yaml eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" :: - flytectl update task-resource-attribute -attrFile tra.yaml + flytectl update task-resource-attribute --attrFile tra.yaml Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" :: - flytectl update task-resource-attribute -attrFile tra.yaml + flytectl update task-resource-attribute --attrFile tra.yaml Usage diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index 75aca56c29..a5dd5f7a02 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -76,16 +76,16 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("non existent file", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/non-existent-filel" + taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-filel yaml file"), err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) tearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { setup() updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/invalid_attribute.yaml" + taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) diff --git a/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml new file mode 100644 index 0000000000..d04a525b88 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml @@ -0,0 +1,7 @@ +domain: development +project: flytectldemo +tags: + - foo + - bar + - buzz + - lightyear \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml new file mode 100644 index 0000000000..7c69c43fec --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml @@ -0,0 +1,8 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +tags: + - foo + - bar + - buzz + - lightyear \ No newline at end of file diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 203407d306..5ea12d3899 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -2,6 +2,7 @@ package update import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -42,6 +43,8 @@ func CreateUpdateCommand() *cobra.Command { Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, ProjectDomainNotRequired: true}, "cluster-resource-attribute": {CmdFunc: updateClusterResourceAttributesFunc, Aliases: []string{}, PFlagProvider: clusterresourceattribute.DefaultUpdateConfig, Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, ProjectDomainNotRequired: true}, + "execution-queue-attribute": {CmdFunc: updateExecutionQueueAttributesFunc, Aliases: []string{}, PFlagProvider: executionqueueattribute.DefaultUpdateConfig, + Short: executionQueueAttributesShort, Long: executionQueueAttributesLong, ProjectDomainNotRequired: true}, } cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index abebad5236..953bc712ab 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -18,6 +18,12 @@ var ( mockClient *mocks.AdminServiceClient cmdCtx cmdCore.CommandContext ) + +const ( + testDataNonExistentFile = "testdata/non-existent-file" + testDataInvalidAttrFile = "testdata/invalid_attribute.yaml" +) + var setup = testutils.Setup var tearDownAndVerify = testutils.TearDownAndVerify @@ -26,18 +32,18 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 6) + assert.Equal(t, len(updateCommand.Commands()), 7) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "launchplan", "project", "task", + useArray := []string{"cluster-resource-attribute", "execution-queue-attribute", "launchplan", "project", "task", "task-resource-attribute", "workflow"} - aliases := [][]string{{}, {}, {}, {}, {}, {}} - shortArray := []string{clusterResourceAttributesShort, updateLPShort, projectShort, updateTaskShort, + aliases := [][]string{{}, {}, {}, {}, {}, {}, {}} + shortArray := []string{clusterResourceAttributesShort, executionQueueAttributesShort, updateLPShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort} - longArray := []string{clusterResourceAttributesLong, updateLPLong, projectLong, updateTaskLong, + longArray := []string{clusterResourceAttributesLong, executionQueueAttributesLong, updateLPLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index be95495573..f766162a09 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -73,5 +73,6 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes * :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. +* :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes * :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index bb342e1ed9..9971f0bc79 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -19,8 +19,9 @@ Here the command delete cluster resource attributes for project flytectldemo an flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deleting cluster resource attribute using config file which was used for creating it. +Deletes cluster resource attribute using config file which was used for creating it. Here the command deletes cluster resource attributes from the config file cra.yaml +Attributes are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource :: @@ -30,13 +31,13 @@ eg: content of cra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" -Deleting cluster resource attribute for a workflow +Deletes cluster resource attribute for a workflow Here the command deletes cluster resource attributes for a workflow :: diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst new file mode 100644 index 0000000000..d016f47ced --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -0,0 +1,112 @@ +.. _flytectl_delete_execution-queue-attribute: + +flytectl delete execution-queue-attribute +----------------------------------------- + +Deletes matchable resources of execution queue attributes + +Synopsis +~~~~~~~~ + + + +Deletes execution queue attributes for given project and domain combination or additionally with workflow name. + +Deletes execution queue attribute for project and domain +Here the command delete execution queue attributes for project flytectldemo and development domain. +:: + + flytectl delete execution-queue-attribute -p flytectldemo -d development + + +Deletes execution queue attribute using config file which was used for creating it. +Here the command deletes execution queue attributes from the config file era.yaml +Tags are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of era.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete execution-queue-attribute --attrFile era.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +Deletes execution queue attribute for a workflow +Here the command deletes the execution queue attributes for a workflow + +:: + + flytectl delete execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete execution-queue-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for execution-queue-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index d31faa8b9f..c393da6c54 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -19,8 +19,9 @@ Here the command delete task resource attributes for project flytectldemo and d flytectl delete task-resource-attribute -p flytectldemo -d development -Deleting task resource attribute using config file which was used for creating it. +Deletes task resource attribute using config file which was used for creating it. Here the command deletes task resource attributes from the config file tra.yaml +defaults/limits are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource :: @@ -30,16 +31,16 @@ eg: content of tra.yaml which will use the project domain and workflow name for .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" -Deleting task resource attribute for a workflow +Deletes task resource attribute for a workflow Here the command deletes task resource attributes for a workflow :: diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 7a37881b50..2852cda14a 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -73,6 +73,7 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes * :doc:`flytectl_get_execution` - Gets execution resources +* :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes * :doc:`flytectl_get_launchplan` - Gets launch plan resources * :doc:`flytectl_get_project` - Gets project resources * :doc:`flytectl_get_task` - Gets task resources diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index db51d52098..5dfa50b3e1 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -18,28 +18,40 @@ Here the command get cluster resource attributes for project flytectldemo and d flytectl get cluster-resource-attribute -p flytectldemo -d development -eg : O/P +eg : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} +Retrieves cluster resource attribute for project and domain and workflow +Here the command get cluster resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} + Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. -Here the command gets task resource attributes and writes the config file to tra.yaml -eg: content of tra.yaml +Here the command gets task resource attributes and writes the config file to cra.yaml +eg: content of cra.yaml :: - flytectl get task-resource-attribute --attrFile tra.yaml + flytectl get task-resource-attribute --attrFile cra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" Usage diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst new file mode 100644 index 0000000000..db008340a4 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -0,0 +1,121 @@ +.. _flytectl_get_execution-queue-attribute: + +flytectl get execution-queue-attribute +-------------------------------------- + +Gets matchable resources of execution queue attributes + +Synopsis +~~~~~~~~ + + + +Retrieves execution queue attributes for given project and domain combination or additionally with workflow name. + +Retrieves execution queue attribute for project and domain +Here the command get execution queue attributes for project flytectldemo and development domain. +:: + + flytectl get execution-queue-attribute -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} + +Retrieves execution queue attribute for project and domain and workflow +Here the command get execution queue attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} + +Writing the execution queue attribute to a file. If there are no execution queue attributes, command would return an error. +Here the command gets execution queue attributes and writes the config file to era.yaml +eg: content of era.yaml + +:: + + flytectl get execution-queue-attribute --attrFile era.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +Usage + + +:: + + flytectl get execution-queue-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for execution-queue-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 5c1d307eae..7b4fa5ba74 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -18,11 +18,24 @@ Here the command get task resource attributes for project flytectldemo and deve flytectl get task-resource-attribute -p flytectldemo -d development -eg : O/P +eg : output from the command .. code-block:: json - {"Project":"flytectldemo","Domain":"development","Workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + +Retrieves task resource attribute for project and domain and workflow +Here the command get task resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. Here the command gets task resource attributes and writes the config file to tra.yaml @@ -35,14 +48,14 @@ eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" Usage diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 4692575169..3fd3d51b06 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -74,6 +74,7 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes +* :doc:`flytectl_update_execution-queue-attribute` - Updates matchable resources of execution queue attributes * :doc:`flytectl_update_launchplan` - Updates launch plan metadata * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 96be5e1fa7..f17c81d62b 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -14,35 +14,39 @@ Updates cluster resource attributes for given project and domain combination or Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. Here the command updates takes the input for cluster resource attributes from the config file cra.yaml -eg: content of tra.yaml +eg: content of cra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + attributes: + foo: "bar" + buzz: "lightyear" :: - flytectl update cluster-resource-attribute -attrFile cra.yaml + flytectl update cluster-resource-attribute --attrFile cra.yaml Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get cluster-resource-attribute section on how to generate this file Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort - attributes: - foo: "bar" - buzz: "lightyear" + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + attributes: + foo: "bar" + buzz: "lightyear" :: - flytectl update cluster-resource-attribute -attrFile cra.yaml + flytectl update cluster-resource-attribute --attrFile cra.yaml Usage diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst new file mode 100644 index 0000000000..e7aa206301 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -0,0 +1,119 @@ +.. _flytectl_update_execution-queue-attribute: + +flytectl update execution-queue-attribute +----------------------------------------- + +Updates matchable resources of execution queue attributes + +Synopsis +~~~~~~~~ + + + +Updates execution queue attributes for given project and domain combination or additionally with workflow name. + +Updating to the execution queue attribute is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get execution-queue-attribute section on how to generate this file +Here the command updates takes the input for execution queue attributes from the config file era.yaml +eg: content of era.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + tags: + - foo + - bar + - buzz + - lightyear + +:: + + flytectl update execution-queue-attribute --attrFile era.yaml + +Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other +execution queue attribute defined at project domain level. +Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + tags: + - foo + - bar + - buzz + - lightyear + +:: + + flytectl update execution-queue-attribute --attrFile era.yaml + +Usage + + + +:: + + flytectl update execution-queue-attribute [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for execution-queue-attribute + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index fd4b141361..8e13080509 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -13,42 +13,46 @@ Synopsis Updates task resource attributes for given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination attributes. +Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Refer to get task-resource-attribute section on how to generate this file Here the command updates takes the input for task resource attributes from the config file tra.yaml eg: content of tra.yaml .. code-block:: yaml - domain: development - project: flytectldemo - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" :: - flytectl update task-resource-attribute -attrFile tra.yaml + flytectl update task-resource-attribute --attrFile tra.yaml Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + .. code-block:: yaml - domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort - defaults: - cpu: "1" - memory: "150Mi" - limits: - cpu: "2" - memory: "450Mi" + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + defaults: + cpu: "1" + memory: "150Mi" + limits: + cpu: "2" + memory: "450Mi" :: - flytectl update task-resource-attribute -attrFile tra.yaml + flytectl update task-resource-attribute --attrFile tra.yaml Usage diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index e65582ff28..3c546cbfab 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -14,6 +14,7 @@ Nouns gen/flytectl_get_task gen/flytectl_get_task-resource-attribute gen/flytectl_get_cluster-resource-attribute + gen/flytectl_get_execution-queue-attribute gen/flytectl_get_launchplan gen/flytectl_update_launchplan gen/flytectl_update_workflow @@ -21,10 +22,12 @@ Nouns gen/flytectl_update_task gen/flytectl_update_task-resource-attribute gen/flytectl_update_cluster-resource-attribute + gen/flytectl_update_execution-queue-attribute gen/flytectl_register_files gen/flytectl_delete_execution gen/flytectl_delete_task-resource-attribute gen/flytectl_delete_cluster-resource-attribute + gen/flytectl_delete_execution-queue-attribute gen/flytectl_version gen/flytectl_config_validate gen/flytectl_config_discover From 6cf6d1e042bfe3e9cfa42f1818cd7eaa0d7013f8 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Sat, 15 May 2021 06:30:44 +0530 Subject: [PATCH 050/356] Adding support for execution cluster label (#68) --- .../attrdeleteconfig_flags.go | 46 ++++++ .../attrdeleteconfig_flags_test.go | 124 +++++++++++++++ .../attrfetchconfig_flags.go | 46 ++++++ .../attrfetchconfig_flags_test.go | 124 +++++++++++++++ .../attrupdateconfig_flags.go | 46 ++++++ .../attrupdateconfig_flags_test.go | 124 +++++++++++++++ .../executionclusterlabel/delete_config.go | 10 ++ .../executionclusterlabel/fetch_config.go | 9 ++ .../executionclusterlabel/file_config.go | 47 ++++++ .../executionclusterlabel/file_config_test.go | 46 ++++++ .../executionclusterlabel/update_config.go | 10 ++ .../plugin_override/attrdeleteconfig_flags.go | 46 ++++++ .../attrdeleteconfig_flags_test.go | 124 +++++++++++++++ .../plugin_override/attrfetchconfig_flags.go | 46 ++++++ .../attrfetchconfig_flags_test.go | 124 +++++++++++++++ .../plugin_override/attrupdateconfig_flags.go | 46 ++++++ .../attrupdateconfig_flags_test.go | 124 +++++++++++++++ .../plugin_override/delete_config.go | 10 ++ .../plugin_override/fetch_config.go | 9 ++ .../subcommand/plugin_override/file_config.go | 47 ++++++ .../plugin_override/file_config_test.go | 58 +++++++ .../plugin_override/update_config.go | 10 ++ flytectl/cmd/delete/delete.go | 8 + flytectl/cmd/delete/delete_test.go | 10 +- .../matchable_cluster_resource_attribute.go | 2 +- .../matchable_execution_cluster_label.go | 78 +++++++++ .../matchable_execution_cluster_label_test.go | 134 ++++++++++++++++ .../matchable_execution_queue_attribute.go | 2 +- .../cmd/delete/matchable_plugin_override.go | 83 ++++++++++ .../delete/matchable_plugin_override_test.go | 134 ++++++++++++++++ .../matchable_task_resource_attribute.go | 2 +- ...roject_domain_execution_cluster_label.yaml | 3 + .../valid_project_domain_plugin_override.yaml | 8 + ...alid_workflow_execution_cluster_label.yaml | 4 + .../valid_workflow_plugin_override.yaml | 9 ++ flytectl/cmd/get/get.go | 10 +- flytectl/cmd/get/get_test.go | 18 +-- .../matchable_cluster_resource_attribute.go | 2 +- .../get/matchable_execution_cluster_label.go | 88 +++++++++++ .../matchable_execution_cluster_label_test.go | 138 ++++++++++++++++ .../matchable_execution_queue_attribute.go | 2 +- flytectl/cmd/get/matchable_plugin_override.go | 112 +++++++++++++ .../cmd/get/matchable_plugin_override_test.go | 148 ++++++++++++++++++ .../get/matchable_task_resource_attribute.go | 2 +- .../matchable_cluster_resource_attribute.go | 2 +- .../matchable_execution_cluster_label.go | 73 +++++++++ .../matchable_execution_cluster_label_test.go | 94 +++++++++++ .../matchable_execution_queue_attribute.go | 2 +- .../cmd/update/matchable_plugin_override.go | 86 ++++++++++ .../update/matchable_plugin_override_test.go | 94 +++++++++++ .../matchable_task_resource_attribute.go | 2 +- ...roject_domain_execution_cluster_label.yaml | 3 + .../valid_project_domain_plugin_override.yaml | 8 + ...alid_workflow_execution_cluster_label.yaml | 4 + .../valid_workflow_plugin_override.yaml | 9 ++ flytectl/cmd/update/update.go | 6 + flytectl/cmd/update/update_test.go | 16 +- flytectl/docs/source/gen/flytectl_delete.rst | 2 + ...ectl_delete_cluster-resource-attribute.rst | 2 +- ...lytectl_delete_execution-cluster-label.rst | 108 +++++++++++++ ...tectl_delete_execution-queue-attribute.rst | 2 +- .../gen/flytectl_delete_plugin-override.rst | 113 +++++++++++++ ...lytectl_delete_task-resource-attribute.rst | 2 +- flytectl/docs/source/gen/flytectl_get.rst | 4 +- ...lytectl_get_cluster-resource-attribute.rst | 2 +- .../flytectl_get_execution-cluster-label.rst | 117 ++++++++++++++ ...flytectl_get_execution-queue-attribute.rst | 2 +- .../gen/flytectl_get_plugin-override.rst | 141 +++++++++++++++++ .../flytectl_get_task-resource-attribute.rst | 2 +- flytectl/docs/source/gen/flytectl_update.rst | 2 + ...ectl_update_cluster-resource-attribute.rst | 2 +- ...lytectl_update_execution-cluster-label.rst | 108 +++++++++++++ ...tectl_update_execution-queue-attribute.rst | 2 +- .../gen/flytectl_update_plugin-override.rst | 121 ++++++++++++++ ...lytectl_update_task-resource-attribute.rst | 2 +- flytectl/docs/source/nouns.rst | 6 + 76 files changed, 3370 insertions(+), 42 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go create mode 100644 flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/plugin_override/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/plugin_override/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/plugin_override/file_config.go create mode 100644 flytectl/cmd/config/subcommand/plugin_override/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/plugin_override/update_config.go create mode 100644 flytectl/cmd/delete/matchable_execution_cluster_label.go create mode 100644 flytectl/cmd/delete/matchable_execution_cluster_label_test.go create mode 100644 flytectl/cmd/delete/matchable_plugin_override.go create mode 100644 flytectl/cmd/delete/matchable_plugin_override_test.go create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml create mode 100644 flytectl/cmd/get/matchable_execution_cluster_label.go create mode 100644 flytectl/cmd/get/matchable_execution_cluster_label_test.go create mode 100644 flytectl/cmd/get/matchable_plugin_override.go create mode 100644 flytectl/cmd/get/matchable_plugin_override_test.go create mode 100644 flytectl/cmd/update/matchable_execution_cluster_label.go create mode 100644 flytectl/cmd/update/matchable_execution_cluster_label_test.go create mode 100644 flytectl/cmd/update/matchable_plugin_override.go create mode 100644 flytectl/cmd/update/matchable_plugin_override_test.go create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml create mode 100644 flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst create mode 100644 flytectl/docs/source/gen/flytectl_delete_plugin-override.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_plugin-override.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_plugin-override.rst diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go new file mode 100755 index 0000000000..3dc56c9837 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..02ec1217d1 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) +} + +func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) +} + +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go new file mode 100755 index 0000000000..0e1d0d060f --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go new file mode 100755 index 0000000000..a99fd91933 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) +} + +func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) +} + +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go new file mode 100755 index 0000000000..f2f0d84852 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go new file mode 100755 index 0000000000..ca7e09eb4d --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package executionclusterlabel + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) +} + +func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) +} + +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go new file mode 100644 index 0000000000..5a96d6fdfa --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go @@ -0,0 +1,10 @@ +package executionclusterlabel + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go new file mode 100644 index 0000000000..8e7f878ede --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go @@ -0,0 +1,9 @@ +package executionclusterlabel + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go new file mode 100644 index 0000000000..c05c6ca167 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go @@ -0,0 +1,47 @@ +package executionclusterlabel + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// FileConfig shadow Config for ExecutionClusterLabel. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type FileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.ExecutionClusterLabel +} + +// Decorate decorator over ExecutionClusterLabel. +func (t FileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: t.ExecutionClusterLabel, + }, + } +} + +// UnDecorate to uncover ExecutionClusterLabel. +func (t *FileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + t.ExecutionClusterLabel = matchingAttribute.GetExecutionClusterLabel() +} + +// GetProject from the FileConfig +func (t FileConfig) GetProject() string { + return t.Project +} + +// GetDomain from the FileConfig +func (t FileConfig) GetDomain() string { + return t.Domain +} + +// GetWorkflow from the FileConfig +func (t FileConfig) GetWorkflow() string { + return t.Workflow +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go new file mode 100644 index 0000000000..662f6658a4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go @@ -0,0 +1,46 @@ +package executionclusterlabel + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + execClusterLabelFileConfig := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + ExecutionClusterLabel: &admin.ExecutionClusterLabel{ + Value: "foo", + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: execClusterLabelFileConfig.ExecutionClusterLabel, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, execClusterLabelFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + taskAttrFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + taskAttrFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, execClusterLabelFileConfig, taskAttrFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + taskAttrFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", taskAttrFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", taskAttrFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", taskAttrFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go new file mode 100644 index 0000000000..abd5600553 --- /dev/null +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go @@ -0,0 +1,10 @@ +package executionclusterlabel + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go new file mode 100755 index 0000000000..52fd144b99 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..7a5d60873c --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) +} + +func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) +} + +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go new file mode 100755 index 0000000000..1cf522b3ca --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go new file mode 100755 index 0000000000..e94f54e982 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) +} + +func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) +} + +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go new file mode 100755 index 0000000000..21c58dbb9d --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go @@ -0,0 +1,46 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go new file mode 100755 index 0000000000..37ee0382c1 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go @@ -0,0 +1,124 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package pluginoverride + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) +} + +func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) +} + +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + t.Run("DefaultValue", func(t *testing.T) { + // Test that default value is set properly + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) + } else { + assert.FailNow(t, err.Error()) + } + }) + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/delete_config.go b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go new file mode 100644 index 0000000000..beec54fd95 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go @@ -0,0 +1,10 @@ +package pluginoverride + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go b/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go new file mode 100644 index 0000000000..9976d8b33f --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go @@ -0,0 +1,9 @@ +package pluginoverride + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config.go b/flytectl/cmd/config/subcommand/plugin_override/file_config.go new file mode 100644 index 0000000000..af40066dd4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config.go @@ -0,0 +1,47 @@ +package pluginoverride + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// FileConfig shadow Config for PluginOverrides. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type FileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.PluginOverrides +} + +// Decorate decorator over PluginOverrides. +func (t FileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: t.PluginOverrides, + }, + } +} + +// UnDecorate to uncover PluginOverrides. +func (t *FileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + t.PluginOverrides = matchingAttribute.GetPluginOverrides() +} + +// GetProject from the FileConfig +func (t FileConfig) GetProject() string { + return t.Project +} + +// GetDomain from the FileConfig +func (t FileConfig) GetDomain() string { + return t.Domain +} + +// GetWorkflow from the FileConfig +func (t FileConfig) GetWorkflow() string { + return t.Workflow +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go new file mode 100644 index 0000000000..e2ecaa5d06 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go @@ -0,0 +1,58 @@ +package pluginoverride + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + pluginOverride1 := &admin.PluginOverride{ + TaskType: "python_task", + PluginId: []string{"plugin-override1", "plugin-override2"}, + MissingPluginBehavior: admin.PluginOverride_FAIL, + } + pluginOverride2 := &admin.PluginOverride{ + TaskType: "java_task", + PluginId: []string{"plugin-override3", "plugin-override3"}, + MissingPluginBehavior: admin.PluginOverride_USE_DEFAULT, + } + pluginOverrides := []*admin.PluginOverride{pluginOverride1, pluginOverride2} + + pluginOverrideFileConfig := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + PluginOverrides: &admin.PluginOverrides{ + Overrides: pluginOverrides, + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: pluginOverrideFileConfig.PluginOverrides, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, pluginOverrideFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + taskAttrFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + taskAttrFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, pluginOverrideFileConfig, taskAttrFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + taskAttrFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", taskAttrFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", taskAttrFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", taskAttrFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/plugin_override/update_config.go b/flytectl/cmd/config/subcommand/plugin_override/update_config.go new file mode 100644 index 0000000000..e2daefa8f3 --- /dev/null +++ b/flytectl/cmd/config/subcommand/plugin_override/update_config.go @@ -0,0 +1,10 @@ +package pluginoverride + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 5a64a58ce3..94ce8e801f 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -2,7 +2,9 @@ package delete import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdcore "github.com/flyteorg/flytectl/cmd/core" @@ -36,9 +38,15 @@ func RemoteDeleteCommand() *cobra.Command { "cluster-resource-attribute": {CmdFunc: deleteClusterResourceAttributes, Aliases: []string{"cluster-resource-attributes"}, Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, PFlagProvider: clusterresourceattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, + "execution-cluster-label": {CmdFunc: deleteExecutionClusterLabel, Aliases: []string{"execution-cluster-labels"}, + Short: executionClusterLabelShort, + Long: executionClusterLabelLong, PFlagProvider: executionclusterlabel.DefaultDelConfig, ProjectDomainNotRequired: true}, "execution-queue-attribute": {CmdFunc: deleteExecutionQueueAttributes, Aliases: []string{"execution-queue-attributes"}, Short: executionQueueAttributesShort, Long: executionQueueAttributesLong, PFlagProvider: executionqueueattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, + "plugin-override": {CmdFunc: deletePluginOverride, Aliases: []string{"plugin-overrides"}, + Short: pluginOverrideShort, + Long: pluginOverrideLong, PFlagProvider: pluginoverride.DefaultDelConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 3f5739c9cf..e26a1d7a9d 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -32,16 +32,16 @@ func TestDeleteCommand(t *testing.T) { assert.Equal(t, deleteCommand.Use, "delete") assert.Equal(t, deleteCommand.Short, deleteCmdShort) assert.Equal(t, deleteCommand.Long, deleteCmdLong) - assert.Equal(t, len(deleteCommand.Commands()), 4) + assert.Equal(t, len(deleteCommand.Commands()), 6) cmdNouns := deleteCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution", "execution-queue-attribute", "task-resource-attribute"} - aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-queue-attributes"}, {"task-resource-attributes"}} - shortArray := []string{clusterResourceAttributesShort, execCmdShort, executionQueueAttributesShort, taskResourceAttributesShort} - longArray := []string{clusterResourceAttributesLong, execCmdLong, executionQueueAttributesLong, taskResourceAttributesLong} + useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", "execution-queue-attribute", "plugin-override", "task-resource-attribute"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-cluster-labels"}, {"execution-queue-attributes"}, {"plugin-overrides"}, {"task-resource-attributes"}} + shortArray := []string{clusterResourceAttributesShort, execCmdShort, executionClusterLabelShort, executionQueueAttributesShort, pluginOverrideShort, taskResourceAttributesShort} + longArray := []string{clusterResourceAttributesLong, execCmdLong, executionClusterLabelLong, executionQueueAttributesLong, pluginOverrideLong, taskResourceAttributesLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index 9dd6bc526b..e6b41941c0 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -41,7 +41,7 @@ eg: content of cra.yaml which will use the project domain and workflow name for buzz: "lightyear" Deletes cluster resource attribute for a workflow -Here the command deletes cluster resource attributes for a workflow +Here the command deletes cluster resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go new file mode 100644 index 0000000000..65ab8f7405 --- /dev/null +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -0,0 +1,78 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + executionClusterLabelShort = "Deletes matchable resources of execution cluster label" + executionClusterLabelLong = ` +Deletes execution cluster label for given project and domain combination or additionally with workflow name. + +Deletes execution cluster label for project and domain +Here the command delete execution cluster label for project flytectldemo and development domain. +:: + + flytectl delete execution-cluster-label -p flytectldemo -d development + + +Deletes execution cluster label using config file which was used for creating it. +Here the command deletes execution cluster label from the config file ecl.yaml +Value is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of ecl.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete execution-cluster-label --attrFile ecl.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +Deletes execution cluster label for a workflow +Here the command deletes execution cluster label for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deleteExecutionClusterLabel(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := executionclusterlabel.DefaultDelConfig + + // Get the project domain workflowName from the config file or commandline params + if len(delConfig.AttrFile) > 0 { + // Initialize FileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the cluster label file + pwdGetter = &executionclusterlabel.FileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { + return err + } + } + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the ExecClusterLabelFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_EXECUTION_CLUSTER_LABEL); err != nil { + return err + } + + return nil +} diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go new file mode 100644 index 0000000000..fe90153dbf --- /dev/null +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -0,0 +1,134 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deleteExecutionClusterLabelSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionclusterlabel.DefaultDelConfig = &executionclusterlabel.AttrDeleteConfig{} + args = []string{} +} + +func TestDeleteExecutionClusterLabels(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = testDataNonExistentFile + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deleteExecutionClusterLabelSetup() + // Empty attribute file + executionclusterlabel.DefaultDelConfig.AttrFile = testDataInvalidAttrFile + // No args implying project domain attribute deletion + err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + }) +} diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index 2f11ce5c5b..392157a03f 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -43,7 +43,7 @@ eg: content of era.yaml which will use the project domain and workflow name for - lightyear Deletes execution queue attribute for a workflow -Here the command deletes the execution queue attributes for a workflow +Here the command deletes the execution queue attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go new file mode 100644 index 0000000000..09353a83f8 --- /dev/null +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -0,0 +1,83 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + pluginOverrideShort = "Deletes matchable resources of plugin overrides" + pluginOverrideLong = ` +Deletes plugin override for given project and domain combination or additionally with workflow name. + +Deletes plugin override for project and domain +Here the command deletes plugin override for project flytectldemo and development domain. +:: + + flytectl delete plugin-override -p flytectldemo -d development + + +Deletes plugin override using config file which was used for creating it. +Here the command deletes plugin overrides from the config file po.yaml +Overrides are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of po.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete plugin-override --attrFile po.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +Deletes plugin override for a workflow +Here the command deletes the plugin override for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deletePluginOverride(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := pluginoverride.DefaultDelConfig + + // Get the project domain workflowName from the config file or commandline params + if len(delConfig.AttrFile) > 0 { + // Initialize AttrFileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the attribute file + pwdGetter = &pluginoverride.FileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { + return err + } + } + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the AttrFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_PLUGIN_OVERRIDE); err != nil { + return err + } + + return nil +} diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go new file mode 100644 index 0000000000..d8ed34818f --- /dev/null +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -0,0 +1,134 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deletePluginOverrideSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + pluginoverride.DefaultDelConfig = &pluginoverride.AttrDeleteConfig{} + args = []string{} +} + +func TestPluginOverride(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = testDataNonExistentFile + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deletePluginOverride(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_PLUGIN_OVERRIDE) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deletePluginOverrideSetup() + // Empty attribute file + pluginoverride.DefaultDelConfig.AttrFile = testDataInvalidAttrFile + // No args implying project domain attribute deletion + err = deletePluginOverride(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + }) +} diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index cafc354714..3f1a719ca7 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -44,7 +44,7 @@ eg: content of tra.yaml which will use the project domain and workflow name for memory: "450Mi" Deletes task resource attribute for a workflow -Here the command deletes task resource attributes for a workflow +Here the command deletes task resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml new file mode 100644 index 0000000000..37f8a630c2 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml @@ -0,0 +1,3 @@ +domain: development +project: flytectldemo +value: foo \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml new file mode 100644 index 0000000000..a8ffc0fef8 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml @@ -0,0 +1,8 @@ +domain: development +project: flytectldemo +overrides: + - task_type: python_task + plugin_id: + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # 0 : FAIL , 1: DEFAULT diff --git a/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml b/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml new file mode 100644 index 0000000000..ccd978fa76 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml @@ -0,0 +1,4 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +value: foo \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml b/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml new file mode 100644 index 0000000000..6fbb58eae0 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml @@ -0,0 +1,9 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +overrides: + - task_type: python_task + plugin_id: + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # 0 : FAIL , 1: DEFAULT \ No newline at end of file diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 10f1e6bdb1..b78bc4f67d 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -2,7 +2,9 @@ package get import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" cmdcore "github.com/flyteorg/flytectl/cmd/core" @@ -17,7 +19,7 @@ const ( Example get projects. :: - bin/flytectl get project + flytectl get project ` ) @@ -50,6 +52,12 @@ func CreateGetCommand() *cobra.Command { "execution-queue-attribute": {CmdFunc: getExecutionQueueAttributes, Aliases: []string{"execution-queue-attributes"}, Short: executionQueueAttributesShort, Long: executionQueueAttributesLong, PFlagProvider: executionqueueattribute.DefaultFetchConfig}, + "execution-cluster-label": {CmdFunc: getExecutionClusterLabel, Aliases: []string{"execution-cluster-labels"}, + Short: executionClusterLabelShort, + Long: executionClusterLabelLong, PFlagProvider: executionclusterlabel.DefaultFetchConfig}, + "plugin-override": {CmdFunc: getPluginOverridesFunc, Aliases: []string{"plugin-overrides"}, + Short: pluginOverrideShort, + Long: pluginOverrideLong, PFlagProvider: pluginoverride.DefaultFetchConfig}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 1f567dacc3..5b513ccd47 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -42,20 +42,20 @@ func TestCreateGetCommand(t *testing.T) { assert.Equal(t, getCommand.Use, "get") assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) - assert.Equal(t, len(getCommand.Commands()), 8) + assert.Equal(t, len(getCommand.Commands()), 10) cmdNouns := getCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution", "execution-queue-attribute", "launchplan", "project", - "task", "task-resource-attribute", "workflow"} - aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-queue-attributes"}, {"launchplans"}, {"projects"}, {"tasks"}, - {"task-resource-attributes"}, {"workflows"}} - shortArray := []string{clusterResourceAttributesShort, executionShort, executionQueueAttributesShort, launchPlanShort, projectShort, - taskShort, taskResourceAttributesShort, workflowShort} - longArray := []string{clusterResourceAttributesLong, executionLong, executionQueueAttributesLong, launchPlanLong, projectLong, taskLong, - taskResourceAttributesLong, workflowLong} + useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", + "execution-queue-attribute", "launchplan", "plugin-override", "project", "task", "task-resource-attribute", "workflow"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-cluster-labels"}, + {"execution-queue-attributes"}, {"launchplans"}, {"plugin-overrides"}, {"projects"}, {"tasks"}, {"task-resource-attributes"}, {"workflows"}} + shortArray := []string{clusterResourceAttributesShort, executionShort, executionClusterLabelShort, executionQueueAttributesShort, launchPlanShort, + pluginOverrideShort, projectShort, taskShort, taskResourceAttributesShort, workflowShort} + longArray := []string{clusterResourceAttributesLong, executionLong, executionClusterLabelLong, executionQueueAttributesLong, launchPlanLong, + pluginOverrideLong, projectLong, taskLong, taskResourceAttributesLong, workflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 7df8190d09..e29f61d5a1 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -28,7 +28,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} Retrieves cluster resource attribute for project and domain and workflow -Here the command get cluster resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get cluster resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go new file mode 100644 index 0000000000..56e9e7b94c --- /dev/null +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -0,0 +1,88 @@ +package get + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + executionClusterLabelShort = "Gets matchable resources of execution cluster label" + executionClusterLabelLong = ` +Retrieves execution cluster label for given project and domain combination or additionally with workflow name. + +Retrieves execution cluster label for project and domain +Here the command get execution cluster label for project flytectldemo and development domain. +:: + + flytectl get execution-cluster-label -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","value":"foo"} + +Retrieves execution cluster label for project and domain and workflow +Here the command get execution cluster label for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} + +Writing the execution cluster label to a file. If there are no execution cluster label, command would return an error. +Here the command gets execution cluster label and writes the config file to ecl.yaml +eg: content of ecl.yaml + +:: + + flytectl get execution-cluster-label --attrFile ecl.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +Usage +` +) + +func getExecutionClusterLabel(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for ExecutionClusterLabel. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + executionClusterLabelFileConfig := executionclusterlabel.FileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the attribute file name from the command line config + fileName := executionclusterlabel.DefaultFetchConfig.AttrFile + + // Updates the taskResourceAttrFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &executionClusterLabelFileConfig, admin.MatchableResource_EXECUTION_CLUSTER_LABEL); err != nil { + return err + } + + // Write the config to the file which can be used for update + if err := sconfig.DumpTaskResourceAttr(executionClusterLabelFileConfig, fileName); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go new file mode 100644 index 0000000000..04231373a3 --- /dev/null +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -0,0 +1,138 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getExecutionClusterLabelSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionclusterlabel.DefaultFetchConfig = &executionclusterlabel.AttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove(testDataTempFile) +} + +func TestGetExecutionClusterLabel(t *testing.T) { + executionClusterLabel := &admin.ExecutionClusterLabel{ + Value: "foo", + } + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: executionClusterLabel, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: executionClusterLabel, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","value":"foo"}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + executionclusterlabel.DefaultFetchConfig.AttrFile = testDataTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + executionclusterlabel.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, ``) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getExecutionClusterLabelSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getExecutionClusterLabel(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 07e51e3d91..b51517e595 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -28,7 +28,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} Retrieves execution queue attribute for project and domain and workflow -Here the command get execution queue attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get execution queue attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go new file mode 100644 index 0000000000..7c42a35219 --- /dev/null +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -0,0 +1,112 @@ +package get + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + pluginOverrideShort = "Gets matchable resources of plugin override" + pluginOverrideLong = ` +Retrieves plugin overrides for given project and domain combination or additionally with workflow name. + +Retrieves plugin overrides for project and domain +Here the command get plugin override for project flytectldemo and development domain. + +:: + + flytectl get plugin-override -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "overrides": [{ + "task_type": "python_task", + "plugin_id": ["pluginoverride1", "pluginoverride2"], + "missing_plugin_behavior": 0 + }] + } + +Retrieves plugin override for project and domain and workflow +Here the command get plugin override for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "workflow": "core.control_flow.run_merge_sort.merge_sort" + "overrides": [{ + "task_type": "python_task", + "plugin_id": ["pluginoverride1", "pluginoverride2"], + "missing_plugin_behavior": 0 + }] + } + +Writing the plugin override to a file. If there are no plugin overrides, command would return an error. +Here the command gets plugin overrides and writes the config file to po.yaml +eg: content of po.yaml + +:: + + flytectl get plugin-override --attrFile po.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +Usage +` +) + +func getPluginOverridesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for PluginOverrides. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + pluginOverrideFileConfig := pluginoverride.FileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the plugin overrides from the command line config + fileName := pluginoverride.DefaultFetchConfig.AttrFile + + // Updates the pluginOverrideFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &pluginOverrideFileConfig, admin.MatchableResource_PLUGIN_OVERRIDE); err != nil { + return err + } + + // Write the config to the file which can be used for update + if err := sconfig.DumpTaskResourceAttr(pluginOverrideFileConfig, fileName); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go new file mode 100644 index 0000000000..b72ab6524e --- /dev/null +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -0,0 +1,148 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getPluginOverrideSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + pluginoverride.DefaultFetchConfig = &pluginoverride.AttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove(testDataTempFile) +} + +func TestGetPluginOverride(t *testing.T) { + pluginOverride1 := &admin.PluginOverride{ + TaskType: "python_task", + PluginId: []string{"plugin-override1", "plugin-override2"}, + MissingPluginBehavior: admin.PluginOverride_FAIL, + } + pluginOverride2 := &admin.PluginOverride{ + TaskType: "java_task", + PluginId: []string{"plugin-override3", "plugin-override3"}, + MissingPluginBehavior: admin.PluginOverride_USE_DEFAULT, + } + pluginOverrides := []*admin.PluginOverride{pluginOverride1, pluginOverride2} + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: &admin.PluginOverrides{ + Overrides: pluginOverrides, + }, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: &admin.PluginOverrides{ + Overrides: pluginOverrides, + }, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + pluginoverride.DefaultFetchConfig.AttrFile = testDataTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + pluginoverride.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, ``) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getPluginOverrideSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getPluginOverridesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index b3ba8023c4..74c8a9a99d 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -28,7 +28,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Retrieves task resource attribute for project and domain and workflow -Here the command get task resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get task resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 77b0821c7c..c41b74f23c 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -35,7 +35,7 @@ resource attribute defined at project domain level. Also this will completely overwrite any existing custom project and domain and workflow combination attributes. Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values Refer to get cluster-resource-attribute section on how to generate this file -Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go new file mode 100644 index 0000000000..0a3eb6965c --- /dev/null +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -0,0 +1,73 @@ +package update + +import ( + "context" + "fmt" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + executionClusterLabelShort = "Updates matchable resources of execution cluster label" + executionClusterLabelLong = ` +Updates execution cluster label for given project and domain combination or additionally with workflow name. + +Updating to the execution cluster label is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for execution cluster label from the config file ecl.yaml +eg: content of ecl.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +:: + + flytectl update execution-cluster-label --attrFile ecl.yaml + +Updating execution cluster label for project and domain and workflow combination. This will take precedence over any other +execution cluster label defined at project domain level. +Update the execution cluster label for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + value: foo + +:: + + flytectl update execution-cluster-label --attrFile ecl.yaml + +Usage + +` +) + +func updateExecutionClusterLabelFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := executionclusterlabel.DefaultUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for execution cluster label") + } + + executionClusterLabelFileConfig := executionclusterlabel.FileConfig{} + if err := sconfig.ReadConfigFromFile(&executionClusterLabelFileConfig, updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := executionClusterLabelFileConfig.Project + domain := executionClusterLabelFileConfig.Domain + workflowName := executionClusterLabelFileConfig.Workflow + + // Updates the admin matchable attribute from executionClusterLabelFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + executionClusterLabelFileConfig); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go new file mode 100644 index 0000000000..b22b444b7a --- /dev/null +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -0,0 +1,94 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updateExecutionClusterLabelSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} +} + +func TestExecutionClusterLabel(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution cluster label"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataNonExistentFile + err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updateExecutionClusterLabelSetup() + executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile + err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index 676c351396..f48bfa2d3b 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -37,7 +37,7 @@ eg: content of era.yaml Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go new file mode 100644 index 0000000000..ceeaca0d96 --- /dev/null +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -0,0 +1,86 @@ +package update + +import ( + "context" + "fmt" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + pluginOverrideShort = "Updates matchable resources of plugin overrides" + pluginOverrideLong = ` +Updates plugin overrides for given project and domain combination or additionally with workflow name. + +Updating to the plugin override is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing plugins overrides on custom project and domain and workflow combination. +Would be preferable to do get and generate an plugin override file if there is an existing override already set and then update it to have new values +Refer to get plugin-override section on how to generate this file +Here the command updates takes the input for plugin overrides from the config file po.yaml +eg: content of po.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +:: + + flytectl update plugin-override --attrFile po.yaml + +Updating plugin override for project and domain and workflow combination. This will take precedence over any other +plugin overrides defined at project domain level. +Update the plugin overrides for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +:: + + flytectl update plugin-override --attrFile po.yaml + +Usage + +` +) + +func updatePluginOverridesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := pluginoverride.DefaultUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for plugin override") + } + + pluginOverrideFileConfig := pluginoverride.FileConfig{} + if err := sconfig.ReadConfigFromFile(&pluginOverrideFileConfig, updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := pluginOverrideFileConfig.Project + domain := pluginOverrideFileConfig.Domain + workflowName := pluginOverrideFileConfig.Workflow + + // Updates the admin matchable attribute from pluginOverrideFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + pluginOverrideFileConfig); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go new file mode 100644 index 0000000000..8ca9cff072 --- /dev/null +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -0,0 +1,94 @@ +package update + +import ( + "fmt" + "testing" + + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updatePluginOverrideSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} +} + +func TestPluginOverride(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + err = updatePluginOverridesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for plugin override"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updatePluginOverridesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updatePluginOverridesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = testDataNonExistentFile + err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updatePluginOverrideSetup() + pluginoverride.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile + err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 3e351baa95..1719dc9c40 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -38,7 +38,7 @@ eg: content of tra.yaml Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml b/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml new file mode 100644 index 0000000000..37f8a630c2 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml @@ -0,0 +1,3 @@ +domain: development +project: flytectldemo +value: foo \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml b/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml new file mode 100644 index 0000000000..a8ffc0fef8 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml @@ -0,0 +1,8 @@ +domain: development +project: flytectldemo +overrides: + - task_type: python_task + plugin_id: + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # 0 : FAIL , 1: DEFAULT diff --git a/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml b/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml new file mode 100644 index 0000000000..ccd978fa76 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml @@ -0,0 +1,4 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +value: foo \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml b/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml new file mode 100644 index 0000000000..6fbb58eae0 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml @@ -0,0 +1,9 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +overrides: + - task_type: python_task + plugin_id: + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # 0 : FAIL , 1: DEFAULT \ No newline at end of file diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 5ea12d3899..34ab70c21c 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -2,7 +2,9 @@ package update import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -45,6 +47,10 @@ func CreateUpdateCommand() *cobra.Command { Short: clusterResourceAttributesShort, Long: clusterResourceAttributesLong, ProjectDomainNotRequired: true}, "execution-queue-attribute": {CmdFunc: updateExecutionQueueAttributesFunc, Aliases: []string{}, PFlagProvider: executionqueueattribute.DefaultUpdateConfig, Short: executionQueueAttributesShort, Long: executionQueueAttributesLong, ProjectDomainNotRequired: true}, + "execution-cluster-label": {CmdFunc: updateExecutionClusterLabelFunc, Aliases: []string{}, PFlagProvider: executionclusterlabel.DefaultUpdateConfig, + Short: executionClusterLabelShort, Long: executionClusterLabelLong, ProjectDomainNotRequired: true}, + "plugin-override": {CmdFunc: updatePluginOverridesFunc, Aliases: []string{}, PFlagProvider: pluginoverride.DefaultUpdateConfig, + Short: pluginOverrideShort, Long: pluginOverrideLong, ProjectDomainNotRequired: true}, } cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 953bc712ab..3afcd4ae70 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -32,19 +32,19 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 7) + assert.Equal(t, len(updateCommand.Commands()), 9) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution-queue-attribute", "launchplan", "project", "task", - "task-resource-attribute", "workflow"} - aliases := [][]string{{}, {}, {}, {}, {}, {}, {}} - shortArray := []string{clusterResourceAttributesShort, executionQueueAttributesShort, updateLPShort, projectShort, updateTaskShort, - taskResourceAttributesShort, updateWorkflowShort} - longArray := []string{clusterResourceAttributesLong, executionQueueAttributesLong, updateLPLong, projectLong, updateTaskLong, - taskResourceAttributesLong, updateWorkflowLong} + useArray := []string{"cluster-resource-attribute", "execution-cluster-label", "execution-queue-attribute", "launchplan", + "plugin-override", "project", "task", "task-resource-attribute", "workflow"} + aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}} + shortArray := []string{clusterResourceAttributesShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, + pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort} + longArray := []string{clusterResourceAttributesLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, + pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index f766162a09..d22416441d 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -73,6 +73,8 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes * :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. +* :doc:`flytectl_delete_execution-cluster-label` - Deletes matchable resources of execution cluster label * :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes +* :doc:`flytectl_delete_plugin-override` - Deletes matchable resources of plugin overrides * :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 9971f0bc79..ee2e26a889 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -38,7 +38,7 @@ eg: content of cra.yaml which will use the project domain and workflow name for buzz: "lightyear" Deletes cluster resource attribute for a workflow -Here the command deletes cluster resource attributes for a workflow +Here the command deletes cluster resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst new file mode 100644 index 0000000000..9290a5444b --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -0,0 +1,108 @@ +.. _flytectl_delete_execution-cluster-label: + +flytectl delete execution-cluster-label +--------------------------------------- + +Deletes matchable resources of execution cluster label + +Synopsis +~~~~~~~~ + + + +Deletes execution cluster label for given project and domain combination or additionally with workflow name. + +Deletes execution cluster label for project and domain +Here the command delete execution cluster label for project flytectldemo and development domain. +:: + + flytectl delete execution-cluster-label -p flytectldemo -d development + + +Deletes execution cluster label using config file which was used for creating it. +Here the command deletes execution cluster label from the config file ecl.yaml +Value is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of ecl.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete execution-cluster-label --attrFile ecl.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +Deletes execution cluster label for a workflow +Here the command deletes execution cluster label for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete execution-cluster-label [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for execution-cluster-label + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index d016f47ced..20c4f4506c 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -40,7 +40,7 @@ eg: content of era.yaml which will use the project domain and workflow name for - lightyear Deletes execution queue attribute for a workflow -Here the command deletes the execution queue attributes for a workflow +Here the command deletes the execution queue attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst new file mode 100644 index 0000000000..f76d01d2f3 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -0,0 +1,113 @@ +.. _flytectl_delete_plugin-override: + +flytectl delete plugin-override +------------------------------- + +Deletes matchable resources of plugin overrides + +Synopsis +~~~~~~~~ + + + +Deletes plugin override for given project and domain combination or additionally with workflow name. + +Deletes plugin override for project and domain +Here the command deletes plugin override for project flytectldemo and development domain. +:: + + flytectl delete plugin-override -p flytectldemo -d development + + +Deletes plugin override using config file which was used for creating it. +Here the command deletes plugin overrides from the config file po.yaml +Overrides are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of po.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete plugin-override --attrFile po.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +Deletes plugin override for a workflow +Here the command deletes the plugin override for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete plugin-override [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for plugin-override + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index c393da6c54..91b3f785b0 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -41,7 +41,7 @@ eg: content of tra.yaml which will use the project domain and workflow name for memory: "450Mi" Deletes task resource attribute for a workflow -Here the command deletes task resource attributes for a workflow +Here the command deletes task resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort :: diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 2852cda14a..4a0608a262 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -13,7 +13,7 @@ Synopsis Example get projects. :: - bin/flytectl get project + flytectl get project Options @@ -73,8 +73,10 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes * :doc:`flytectl_get_execution` - Gets execution resources +* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label * :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes * :doc:`flytectl_get_launchplan` - Gets launch plan resources +* :doc:`flytectl_get_plugin-override` - Gets matchable resources of plugin override * :doc:`flytectl_get_project` - Gets project resources * :doc:`flytectl_get_task` - Gets task resources * :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 5dfa50b3e1..0606779729 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -25,7 +25,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} Retrieves cluster resource attribute for project and domain and workflow -Here the command get cluster resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get cluster resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst new file mode 100644 index 0000000000..e8752979d7 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -0,0 +1,117 @@ +.. _flytectl_get_execution-cluster-label: + +flytectl get execution-cluster-label +------------------------------------ + +Gets matchable resources of execution cluster label + +Synopsis +~~~~~~~~ + + + +Retrieves execution cluster label for given project and domain combination or additionally with workflow name. + +Retrieves execution cluster label for project and domain +Here the command get execution cluster label for project flytectldemo and development domain. +:: + + flytectl get execution-cluster-label -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","value":"foo"} + +Retrieves execution cluster label for project and domain and workflow +Here the command get execution cluster label for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +:: + + flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} + +Writing the execution cluster label to a file. If there are no execution cluster label, command would return an error. +Here the command gets execution cluster label and writes the config file to ecl.yaml +eg: content of ecl.yaml + +:: + + flytectl get execution-cluster-label --attrFile ecl.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +Usage + + +:: + + flytectl get execution-cluster-label [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for execution-cluster-label + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index db008340a4..b9eff077be 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -25,7 +25,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} Retrieves execution queue attribute for project and domain and workflow -Here the command get execution queue attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get execution queue attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst new file mode 100644 index 0000000000..1735945a10 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -0,0 +1,141 @@ +.. _flytectl_get_plugin-override: + +flytectl get plugin-override +---------------------------- + +Gets matchable resources of plugin override + +Synopsis +~~~~~~~~ + + + +Retrieves plugin overrides for given project and domain combination or additionally with workflow name. + +Retrieves plugin overrides for project and domain +Here the command get plugin override for project flytectldemo and development domain. + +:: + + flytectl get plugin-override -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "overrides": [{ + "task_type": "python_task", + "plugin_id": ["pluginoverride1", "pluginoverride2"], + "missing_plugin_behavior": 0 + }] + } + +Retrieves plugin override for project and domain and workflow +Here the command get plugin override for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "workflow": "core.control_flow.run_merge_sort.merge_sort" + "overrides": [{ + "task_type": "python_task", + "plugin_id": ["pluginoverride1", "pluginoverride2"], + "missing_plugin_behavior": 0 + }] + } + +Writing the plugin override to a file. If there are no plugin overrides, command would return an error. +Here the command gets plugin overrides and writes the config file to po.yaml +eg: content of po.yaml + +:: + + flytectl get plugin-override --attrFile po.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +Usage + + +:: + + flytectl get plugin-override [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for plugin-override + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 7b4fa5ba74..a49cb1f96d 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -25,7 +25,7 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Retrieves task resource attribute for project and domain and workflow -Here the command get task resource attributes for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Here the command get task resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 3fd3d51b06..1372e09809 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -74,8 +74,10 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes +* :doc:`flytectl_update_execution-cluster-label` - Updates matchable resources of execution cluster label * :doc:`flytectl_update_execution-queue-attribute` - Updates matchable resources of execution queue attributes * :doc:`flytectl_update_launchplan` - Updates launch plan metadata +* :doc:`flytectl_update_plugin-override` - Updates matchable resources of plugin overrides * :doc:`flytectl_update_project` - Updates project resources * :doc:`flytectl_update_task` - Updates task metadata * :doc:`flytectl_update_task-resource-attribute` - Updates matchable resources of task attributes diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index f17c81d62b..1646cdfc90 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -33,7 +33,7 @@ resource attribute defined at project domain level. Also this will completely overwrite any existing custom project and domain and workflow combination attributes. Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values Refer to get cluster-resource-attribute section on how to generate this file -Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst new file mode 100644 index 0000000000..325dda91a6 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -0,0 +1,108 @@ +.. _flytectl_update_execution-cluster-label: + +flytectl update execution-cluster-label +--------------------------------------- + +Updates matchable resources of execution cluster label + +Synopsis +~~~~~~~~ + + + +Updates execution cluster label for given project and domain combination or additionally with workflow name. + +Updating to the execution cluster label is only available from a generated file. See the get section for generating this file. +Here the command updates takes the input for execution cluster label from the config file ecl.yaml +eg: content of ecl.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + value: foo + +:: + + flytectl update execution-cluster-label --attrFile ecl.yaml + +Updating execution cluster label for project and domain and workflow combination. This will take precedence over any other +execution cluster label defined at project domain level. +Update the execution cluster label for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + value: foo + +:: + + flytectl update execution-cluster-label --attrFile ecl.yaml + +Usage + + + +:: + + flytectl update execution-cluster-label [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for execution-cluster-label + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index e7aa206301..85f28eec5b 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -35,7 +35,7 @@ eg: content of era.yaml Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst new file mode 100644 index 0000000000..3cff796b1d --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -0,0 +1,121 @@ +.. _flytectl_update_plugin-override: + +flytectl update plugin-override +------------------------------- + +Updates matchable resources of plugin overrides + +Synopsis +~~~~~~~~ + + + +Updates plugin overrides for given project and domain combination or additionally with workflow name. + +Updating to the plugin override is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing plugins overrides on custom project and domain and workflow combination. +Would be preferable to do get and generate an plugin override file if there is an existing override already set and then update it to have new values +Refer to get plugin-override section on how to generate this file +Here the command updates takes the input for plugin overrides from the config file po.yaml +eg: content of po.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +:: + + flytectl update plugin-override --attrFile po.yaml + +Updating plugin override for project and domain and workflow combination. This will take precedence over any other +plugin overrides defined at project domain level. +Update the plugin overrides for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + overrides: + - task_type: python_task # Task type for which to apply plugin implementation overrides + plugin_id: # Plugin id(s) to be used in place of the default for the task type. + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT + +:: + + flytectl update plugin-override --attrFile po.yaml + +Usage + + + +:: + + flytectl update plugin-override [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for plugin-override + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 8e13080509..37c3439eff 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -36,7 +36,7 @@ eg: content of tra.yaml Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain .. code-block:: yaml diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 3c546cbfab..89d3c74a3d 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -14,7 +14,9 @@ Nouns gen/flytectl_get_task gen/flytectl_get_task-resource-attribute gen/flytectl_get_cluster-resource-attribute + gen/flytectl_get_execution-cluster-label gen/flytectl_get_execution-queue-attribute + gen/flytectl_get_plugin-override gen/flytectl_get_launchplan gen/flytectl_update_launchplan gen/flytectl_update_workflow @@ -22,12 +24,16 @@ Nouns gen/flytectl_update_task gen/flytectl_update_task-resource-attribute gen/flytectl_update_cluster-resource-attribute + gen/flytectl_update_execution-cluster-label gen/flytectl_update_execution-queue-attribute + gen/flytectl_update_plugin-override gen/flytectl_register_files gen/flytectl_delete_execution gen/flytectl_delete_task-resource-attribute gen/flytectl_delete_cluster-resource-attribute + gen/flytectl_delete_execution-cluster-label gen/flytectl_delete_execution-queue-attribute + gen/flytectl_delete_plugin-override gen/flytectl_version gen/flytectl_config_validate gen/flytectl_config_discover From 7b0145f0df086201362740a0ccd6421fcebf184a Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Thu, 20 May 2021 08:39:49 +0530 Subject: [PATCH 051/356] Using the new pflags which has --bind-default-var functionality (#70) * Using the new pflags which has --bind-default-var functionality Signed-off-by: Prafulla Mahindrakar * Using released version of stdlib Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/create/projectconfig_flags.go | 10 +++++----- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flytectl/cmd/create/projectconfig_flags.go b/flytectl/cmd/create/projectconfig_flags.go index db17e4882b..55a3eb8eed 100755 --- a/flytectl/cmd/create/projectconfig_flags.go +++ b/flytectl/cmd/create/projectconfig_flags.go @@ -50,10 +50,10 @@ func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(projectConfig.ID), fmt.Sprintf("%v%v", prefix, "id"), *new(string), "id for the project specified as argument.") - cmdFlags.StringVar(&(projectConfig.Name), fmt.Sprintf("%v%v", prefix, "name"), *new(string), "name for the project specified as argument.") - cmdFlags.StringVar(&(projectConfig.File), fmt.Sprintf("%v%v", prefix, "file"), *new(string), "file for the project definition.") - cmdFlags.StringVar(&(projectConfig.Description), fmt.Sprintf("%v%v", prefix, "description"), *new(string), "description for the project specified as argument.") - cmdFlags.StringToStringVar(&(projectConfig.Labels), fmt.Sprintf("%v%v", prefix, "labels"), map[string]string{}, "labels for the project specified as argument.") + cmdFlags.StringVar(&projectConfig.ID, fmt.Sprintf("%v%v", prefix, "id"), projectConfig.ID, "id for the project specified as argument.") + cmdFlags.StringVar(&projectConfig.Name, fmt.Sprintf("%v%v", prefix, "name"), projectConfig.Name, "name for the project specified as argument.") + cmdFlags.StringVar(&projectConfig.File, fmt.Sprintf("%v%v", prefix, "file"), projectConfig.File, "file for the project definition.") + cmdFlags.StringVar(&projectConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), projectConfig.Description, "description for the project specified as argument.") + cmdFlags.StringToStringVar(&projectConfig.Labels, fmt.Sprintf("%v%v", prefix, "labels"), projectConfig.Labels, "labels for the project specified as argument.") return cmdFlags } diff --git a/flytectl/go.mod b/flytectl/go.mod index cd987f766a..0f387bf4d7 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/flyteorg/flyteidl v0.18.40 - github.com/flyteorg/flytestdlib v0.3.15 + github.com/flyteorg/flytestdlib v0.3.21 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.2 diff --git a/flytectl/go.sum b/flytectl/go.sum index a1ceb251bd..b8d3df4f31 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -176,8 +176,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.18.40 h1:YuLBNpIotOFwyLSXSs0aj3B9N9vwPhzLRAQTWxYSI/w= github.com/flyteorg/flyteidl v0.18.40/go.mod h1:IJD02cc/95QMkGDBJNibsr5aWd6V7TlQiJ8Iz5mVZ28= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.15 h1:vzsfqriENyavv6EBwsIm55di2wC+j0jkmjw30JGHAkM= -github.com/flyteorg/flytestdlib v0.3.15/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= +github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= +github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From 0f708dd43e103a24ce13cab4166a5ba9a2c469c8 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Mon, 24 May 2021 21:46:15 +0530 Subject: [PATCH 052/356] Added non zero return code on error and AlreadyExists as success condition (#71) * Added non zero return code on error and also made AlreadyExists as success condition Signed-off-by: Prafulla Mahindrakar * Added coverage Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/register/files.go | 2 +- flytectl/cmd/register/register_util.go | 16 ++- flytectl/cmd/register/register_util_test.go | 99 ++++++++++++++++-- .../69_core.flyte_basics.lp.greet_1.pb | Bin 0 -> 718 bytes flytectl/main.go | 7 +- 5 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 flytectl/cmd/register/testdata/69_core.flyte_basics.lp.greet_1.pb diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index cf4f957e3a..78cf87a15c 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -94,5 +94,5 @@ func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Co logger.Errorf(ctx, "unable to delete temp dir %v due to %v", tmpDir, _err) } } - return nil + return _err } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 031b0e836d..3bb5a5d6f7 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -23,6 +23,8 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const registrationProjectPattern = "{{ registration.project }}" @@ -40,10 +42,10 @@ type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } -var Client HTTPClient +var httpClient HTTPClient func init() { - Client = &http.Client{} + httpClient = &http.Client{} } var projectColumns = []printer.Column{ @@ -214,7 +216,7 @@ func DownloadFileFromHTTP(ctx context.Context, ref storage.DataReference) (io.Re if err != nil { return nil, err } - resp, err := Client.Do(req) + resp, err := httpClient.Do(req) if err != nil { return nil, err } @@ -320,7 +322,13 @@ func registerFile(ctx context.Context, fileName string, registerResults []Result } logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) if err := register(ctx, spec, cmdCtx); err != nil { - registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} + // If error is AlreadyExists then dont consider this to be an error but just a warning state + if grpcError := status.Code(err); grpcError == codes.AlreadyExists { + registerResult = Result{Name: fileName, Status: "Success", Info: fmt.Sprintf("%v", grpcError.String())} + err = nil + } else { + registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error registering file due to %v", err)} + } registerResults = append(registerResults, registerResult) return registerResults, err } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index f551efc80c..ce5805fd7b 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -10,26 +10,36 @@ import ( "strings" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) -type MockClient struct { +type MockHTTPClient struct { DoFunc func(req *http.Request) (*http.Response, error) } -func (m *MockClient) Do(req *http.Request) (*http.Response, error) { +func (m *MockHTTPClient) Do(req *http.Request) (*http.Response, error) { return GetDoFunc(req) } var ( - ctx context.Context - args []string - GetDoFunc func(req *http.Request) (*http.Response, error) + ctx context.Context + mockAdminClient *mocks.AdminServiceClient + cmdCtx cmdCore.CommandContext + args []string + GetDoFunc func(req *http.Request) (*http.Response, error) ) -func setup() { - ctx = context.Background() - Client = &MockClient{} +var setup = u.Setup + +func registerFilesSetup() { + httpClient = &MockHTTPClient{} validTar, err := os.Open("testdata/valid-register.tar") if err != nil { fmt.Printf("unexpected error: %v", err) @@ -41,10 +51,14 @@ func setup() { GetDoFunc = func(*http.Request) (*http.Response, error) { return response, nil } + ctx = u.Ctx + mockAdminClient = u.MockClient + cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) } func TestGetSortedFileList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = false args = []string{"file2", "file1"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -56,6 +70,7 @@ func TestGetSortedFileList(t *testing.T) { func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/valid-parent-folder-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -72,6 +87,7 @@ func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { func TestGetSortedArchivedFileList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/valid-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -88,6 +104,7 @@ func TestGetSortedArchivedFileList(t *testing.T) { func TestGetSortedArchivedFileUnorderedList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/valid-unordered-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -104,6 +121,7 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { func TestGetSortedArchivedCorruptedFileList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/invalid.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -116,6 +134,7 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { func TestGetSortedArchivedTgzList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/valid-register.tgz"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -144,6 +163,7 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"testdata/invalid-extension-register.zip"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -169,6 +189,7 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -185,6 +206,7 @@ func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) { setup() + registerFilesSetup() filesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} ctx = nil @@ -196,3 +218,64 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) // Clean up the temp directory. assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) } + +func TestRegisterFile(t *testing.T) { + t.Run("Successful run", func(t *testing.T) { + setup() + registerFilesSetup() + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + var registerResults []Result + results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + assert.Equal(t, 1, len(results)) + assert.Nil(t, err) + }) + t.Run("Non existent file", func(t *testing.T) { + setup() + registerFilesSetup() + args = []string{"testdata/non-existent.pb"} + var registerResults []Result + results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + assert.Equal(t, 1, len(results)) + assert.Equal(t, "Failed", results[0].Status) + assert.Equal(t, "Error reading file due to open testdata/non-existent.pb: no such file or directory", results[0].Info) + assert.NotNil(t, err) + }) + t.Run("unmarhal failure", func(t *testing.T) { + setup() + registerFilesSetup() + args = []string{"testdata/valid-register.tar"} + var registerResults []Result + results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + assert.Equal(t, 1, len(results)) + assert.Equal(t, "Failed", results[0].Status) + assert.Equal(t, "Error unmarshalling file due to failed unmarshalling file testdata/valid-register.tar", results[0].Info) + assert.NotNil(t, err) + }) + t.Run("AlreadyExists", func(t *testing.T) { + setup() + registerFilesSetup() + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, + status.Error(codes.AlreadyExists, "AlreadyExists")) + args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + var registerResults []Result + results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + assert.Equal(t, 1, len(results)) + assert.Equal(t, "Success", results[0].Status) + assert.Equal(t, "AlreadyExists", results[0].Info) + assert.Nil(t, err) + }) + t.Run("Registration Error", func(t *testing.T) { + setup() + registerFilesSetup() + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, + status.Error(codes.InvalidArgument, "Invalid")) + args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + var registerResults []Result + results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + assert.Equal(t, 1, len(results)) + assert.Equal(t, "Failed", results[0].Status) + assert.Equal(t, "Error registering file due to rpc error: code = InvalidArgument desc = Invalid", results[0].Info) + assert.NotNil(t, err) + }) +} diff --git a/flytectl/cmd/register/testdata/69_core.flyte_basics.lp.greet_1.pb b/flytectl/cmd/register/testdata/69_core.flyte_basics.lp.greet_1.pb new file mode 100644 index 0000000000000000000000000000000000000000..0fc9d10c8007969204f096939d5950dc43bdb597 GIT binary patch literal 718 zcmbtR&u8&kb`*yQc^D{tP1e(s^~wFj7Nw=E5eC^MRyNF`pX)i)5Pb#p_W-{+)S@hGuW zn+T=B3*(Ie7Vs<*nHQ(tLIar2Uy(mRXExgUa6R3auPUL2XG_w=*ltkuy_ZAJC)FL* zDZMVWzo7T1h3b-Tm{S&yDtg`;@BOSeT|7!e~tnEV)B29bh$0N;SW})k$vn zt+;8$mYTVQx0bl`AnSol#rCk|*e$Y*jOQxZ9g*?eC?-^5Y+s-~2_es8!-})BJ8PLz zQZFF7QZkQ$H2&2pdE_JsUjf;34Yy03WAx(e;`4mWCe!)&YC5`LZ)Vf8$@! Date: Mon, 24 May 2021 15:55:37 -0400 Subject: [PATCH 053/356] add mainnav icons (#72) Signed-off-by: cosmicBboy --- flytectl/doc-requirements.in | 1 + flytectl/doc-requirements.txt | 17 ++++++++++------- flytectl/docs/source/conf.py | 6 ++++++ flytectl/docs/source/index.rst | 12 ++++++------ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 3cf9da6f2f..90287527fb 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -5,3 +5,4 @@ sphinx-prompt sphinx-material sphinx-code-include sphinx-copybutton +sphinx_fontawesome diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 8df6e8b686..2517816f12 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -27,21 +27,21 @@ idna==2.10 # via requests imagesize==1.2.0 # via sphinx -jinja2==2.11.3 +jinja2==3.0.1 # via sphinx lxml==4.6.3 # via sphinx-material -markupsafe==1.1.1 +markupsafe==2.0.1 # via jinja2 packaging==20.9 # via sphinx -pygments==2.8.1 +pygments==2.9.0 # via # sphinx # sphinx-prompt pyparsing==2.4.7 # via packaging -python-slugify[unidecode]==4.0.1 +python-slugify[unidecode]==5.0.2 # via sphinx-material pytz==2021.1 # via babel @@ -49,7 +49,7 @@ readthedocs-sphinx-search==0.1.0 # via -r doc-requirements.in requests==2.25.1 # via sphinx -six==1.15.0 +six==1.16.0 # via sphinx-code-include snowballstemmer==2.1.0 # via sphinx @@ -59,6 +59,8 @@ sphinx-code-include==1.1.1 # via -r doc-requirements.in sphinx-copybutton==0.3.1 # via -r doc-requirements.in +sphinx-fontawesome==0.0.6 + # via -r doc-requirements.in sphinx-material==0.0.32 # via -r doc-requirements.in sphinx-prompt==1.4.0 @@ -69,19 +71,20 @@ sphinx==3.5.4 # furo # sphinx-code-include # sphinx-copybutton + # sphinx-fontawesome # sphinx-material # sphinx-prompt sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==1.0.3 +sphinxcontrib-htmlhelp==2.0.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx -sphinxcontrib-serializinghtml==1.1.4 +sphinxcontrib-serializinghtml==1.1.5 # via sphinx text-unidecode==1.3 # via python-slugify diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 9874c85aa7..02a1bab91d 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -42,6 +42,7 @@ "sphinx-prompt", "sphinx_copybutton", "sphinx_search.extension", + "sphinx_fontawesome", ] # build the templated autosummary files @@ -98,6 +99,11 @@ "color-brand-primary": "#9D68E4", "color-brand-content": "#9D68E4", }, + # custom flyteorg furo theme options + "github_repo": "flytectl", + "github_username": "flyteorg", + "github_commit": "master", + "docs_path": "docs/source", # path to documentation source } html_context = { diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index d615f2fe7e..39399d4065 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -46,12 +46,12 @@ Basic Configuration :maxdepth: 1 :hidden: - Getting Started - User Guide - Tutorials - Concepts - API Reference - Community + |plane| Getting Started + |book-reader| User Guide + |chalkboard| Tutorials + |project-diagram| Concepts + |book| API Reference + |hands-helping| Community .. toctree:: :maxdepth: -1 From 514375fb72c0db2754591ad62e918014c0c30a1d Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Thu, 27 May 2021 10:03:22 +0530 Subject: [PATCH 054/356] Flytectl get started updated (#58) Signed-off-by: yuvraj --- flytectl/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flytectl/README.md b/flytectl/README.md index 18d1afe748..b23d3cf373 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -24,7 +24,20 @@ Generating docs locally can be accomplished by running make gendocs from within $ brew tap flyteorg/homebrew-tap $ brew install flytectl ``` +## Get Started +### Create a sandbox cluster +```bash +$ docker run --rm --privileged -p 30081:30081 -p 30082:30082 -p 30084:30084 ghcr.io/flyteorg/flyte-sandbox +``` + +### Register your first workflow + +```bash +# Run Core workflows +$ flytectl register files https://github.com/flyteorg/flytesnacks/releases/download/v0.2.89/flytesnacks-core.tgz -d development -p flytesnacks --archive +# You can find all example at flytesnacks release page https://github.com/flyteorg/flytesnacks/releases/tag/v0.2.89 +``` ## Contributing [Contribution guidelines for this project](docs/CONTRIBUTING.md) From 852d7abc39edb7b2617fcae4e9fbeea074808cc3 Mon Sep 17 00:00:00 2001 From: Yuvraj <10830562+evalsocket@users.noreply.github.com> Date: Sat, 29 May 2021 20:03:24 +0530 Subject: [PATCH 055/356] Added boilerplate automation (#74) Signed-off-by: Yuvraj --- .../workflows/boilerplate-automation.yml | 36 + flytectl/.golangci.yml | 4 +- flytectl/Makefile | 3 +- .../golang_support_tools/go.mod | 8 +- .../flyte/golang_support_tools/go.sum | 1267 +++++++++++++++++ .../golang_support_tools/tools.go | 2 +- .../golang_test_targets/Makefile | 8 +- .../golang_test_targets/Readme.rst | 6 +- .../golang_test_targets/download_tooling.sh | 4 +- .../golang_test_targets/goimports | 4 +- .../golangci_file/.golangci.yml | 4 +- .../{lyft => flyte}/golangci_file/Readme.rst | 2 +- .../{lyft => flyte}/golangci_file/update.sh | 4 +- .../pull_request_template/Readme.rst | 2 +- .../pull_request_template.md | 10 +- .../pull_request_template/update.sh | 4 +- .../flyte/{ => welcome_bot}/Readme.rst | 0 .../flyte/{ => welcome_bot}/config.yml | 0 .../flyte/{ => welcome_bot}/update.sh | 6 +- .../lyft/golang_support_tools/go.sum | 558 -------- flytectl/boilerplate/update.cfg | 10 +- flytectl/boilerplate/update.sh | 18 +- flytectl/pull_request_template.md | 32 + 23 files changed, 1387 insertions(+), 605 deletions(-) create mode 100644 flytectl/.github/workflows/boilerplate-automation.yml rename flytectl/boilerplate/{lyft => flyte}/golang_support_tools/go.mod (61%) create mode 100644 flytectl/boilerplate/flyte/golang_support_tools/go.sum rename flytectl/boilerplate/{lyft => flyte}/golang_support_tools/tools.go (100%) rename flytectl/boilerplate/{lyft => flyte}/golang_test_targets/Makefile (82%) rename flytectl/boilerplate/{lyft => flyte}/golang_test_targets/Readme.rst (75%) rename flytectl/boilerplate/{lyft => flyte}/golang_test_targets/download_tooling.sh (92%) rename flytectl/boilerplate/{lyft => flyte}/golang_test_targets/goimports (56%) rename flytectl/boilerplate/{lyft => flyte}/golangci_file/.golangci.yml (72%) rename flytectl/boilerplate/{lyft => flyte}/golangci_file/Readme.rst (60%) rename flytectl/boilerplate/{lyft => flyte}/golangci_file/update.sh (67%) rename flytectl/boilerplate/{lyft => flyte}/pull_request_template/Readme.rst (55%) rename flytectl/boilerplate/{lyft => flyte}/pull_request_template/pull_request_template.md (54%) rename flytectl/boilerplate/{lyft => flyte}/pull_request_template/update.sh (61%) rename flytectl/boilerplate/flyte/{ => welcome_bot}/Readme.rst (100%) rename flytectl/boilerplate/flyte/{ => welcome_bot}/config.yml (100%) rename flytectl/boilerplate/flyte/{ => welcome_bot}/update.sh (55%) delete mode 100644 flytectl/boilerplate/lyft/golang_support_tools/go.sum create mode 100644 flytectl/pull_request_template.md diff --git a/flytectl/.github/workflows/boilerplate-automation.yml b/flytectl/.github/workflows/boilerplate-automation.yml new file mode 100644 index 0000000000..c6c8a2a53b --- /dev/null +++ b/flytectl/.github/workflows/boilerplate-automation.yml @@ -0,0 +1,36 @@ +name: Update Boilerplate Automation +on: + workflow_dispatch: + +jobs: + update-boilerplate: + name: Update Boilerplate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Update Boilerplate + run: | + make update_boilerplate + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Boilerplate + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-boilerplate + delete-branch: true + title: 'Update Boilerplate' + body: | + Update Boilerplate + - Auto-generated by [flyte-bot] + labels: | + boilerplate + team-reviewers: | + owners + maintainers + draft: false \ No newline at end of file diff --git a/flytectl/.golangci.yml b/flytectl/.golangci.yml index a414f33f79..5d53f35295 100644 --- a/flytectl/.golangci.yml +++ b/flytectl/.golangci.yml @@ -1,7 +1,7 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst run: skip-dirs: diff --git a/flytectl/Makefile b/flytectl/Makefile index 118f40cf06..69ab4e6c49 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -1,5 +1,5 @@ export REPOSITORY=flytectl -include boilerplate/lyft/golang_test_targets/Makefile +include boilerplate/flyte/golang_test_targets/Makefile GIT_VERSION := $(shell git describe --always --tags) GIT_HASH := $(shell git rev-parse --short HEAD) @@ -25,6 +25,7 @@ compile_debug: .PHONY: update_boilerplate update_boilerplate: + @curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh @boilerplate/update.sh .PHONY: install-piptools diff --git a/flytectl/boilerplate/lyft/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod similarity index 61% rename from flytectl/boilerplate/lyft/golang_support_tools/go.mod rename to flytectl/boilerplate/flyte/golang_support_tools/go.mod index 6816461a59..7afee48e45 100644 --- a/flytectl/boilerplate/lyft/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -1,11 +1,11 @@ -module github.com/lyft/boilerplate +module github.com/flyteorg/boilerplate -go 1.13 +go 1.16 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/golangci/golangci-lint v1.22.2 - github.com/lyft/flytestdlib v0.2.31 + github.com/flyteorg/flytestdlib v0.3.22 + github.com/golangci/golangci-lint v1.38.0 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum new file mode 100644 index 0000000000..49939b689d --- /dev/null +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -0,0 +1,1267 @@ +4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw= +4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= +github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= +github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= +github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= +github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= +github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo v1.1.0 h1:SJOPJyqsrVL3CvR0veFZFmIM0fXS/Kvyikqvfphd0Z4= +github.com/ashanbrown/forbidigo v1.1.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a h1:/U9tbJzDRof4fOR51vwzWdIBsIH6R2yU0KG1MBRM2Js= +github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= +github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/bombsimon/wsl/v3 v3.2.0 h1:x3QUbwW7tPGcCNridvqmhSRthZMTALnkg5/1J+vaUas= +github.com/bombsimon/wsl/v3 v3.2.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.6 h1:Tsy7EppNow2pDC0jN7Hsmcb6mHd71ZbI1vFissRBtc0= +github.com/charithe/durationcheck v0.0.6/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +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/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= +github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= +github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= +github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= +github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +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/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/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= +github.com/esimonov/ifshort v1.0.1/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= +github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fzipp/gocyclo v0.3.1 h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc= +github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.5.4 h1:fPNMqImVjELN6Du7NVVuvKA4cgASNmc7e4zSYQCOnv8= +github.com/go-critic/go-critic v0.5.4/go.mod h1:cjB4YGw+n/+X8gREApej7150Uyy1Tg8If6F2XOAUXNE= +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.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= +github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.38.0 h1:hgZsLRzZrjhpp44Ak+fhXNzgrbDF39ETf22a+Jd3fJQ= +github.com/golangci/golangci-lint v1.38.0/go.mod h1:Knp/sd5ATrVp7EOzWzwIIFH+c8hUfpW+oOQb8NvdZDo= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc= +github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gookit/color v1.3.6/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1 h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= +github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +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.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jgautheron/goconst v1.4.0 h1:hp9XKUpe/MPyDamUbfsrGpe+3dnY2whNK4EtB86dvLM= +github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d h1:BYDZtm80MLJpTWalkwHxNnIbO/2akQHERcfLq4TbIWE= +github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d/go.mod h1:/EZlaYCnEX24i7qdVhT9du5JrtFWYRQr67bVgR7JJC8= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 h1:exZBMUS/kB/AhxSj/9lIIxhqkCpXXdKScjFWQUTbi3M= +github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +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.3/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.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.4.0 h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM= +github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= +github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= +github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= +github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= +github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= +github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.0.3 h1:z3FL6IFFN3JKzHYHD8O1ExH9g/4lAGJ5x1+9rPZgsFg= +github.com/mgechev/revive v1.0.3/go.mod h1:POGGZagSo/0frdr7VeAifzS5Uka0d0GPiM35MsTO8nE= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= +github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 h1:o+O3Cd1HO9CTgxE3/C8p5I5Y4C0yYWbF8d4IkfOLtcQ= +github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= +github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= +github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= +github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= +github.com/nishanths/predeclared v0.2.1 h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw= +github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= +github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= +github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= +github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= +github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= +github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210106184943-e47d54850b18/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210115110123-c73ee1cbff1f/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.0 h1:YWfhGOrXwLGiqcC/u5EqG6YeS8nh+1fw0HEc85CVZro= +github.com/ryancurrah/gomodguard v1.2.0/go.mod h1:rNqbC4TOIdUDcVMSIpNNAzTbzXAZa6W5lnUepvuMMgQ= +github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= +github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= +github.com/securego/gosec/v2 v2.6.1/go.mod h1:I76p3NTHBXsGhybUW+cEQ692q2Vp+A0Z6ZLzDIZy+Ao= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil/v3 v3.21.1/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkUcCLlYhZzdr/4= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= +github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA= +github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= +github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tetafro/godot v1.4.4 h1:VAtLEoAMmopIzHVWVBrztjVWDeYm1OD/DKqhqXR4828= +github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJjGeaz4= +github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= +github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 h1:zV5mu0ESwb+WnzqVaW2z1DdbAP0S46UtjY8DHQupQP4= +github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0= +github.com/tommy-muehle/go-mnd/v2 v2.3.1 h1:a1S4+4HSXDJMgeODJH/t0EEKxcVla6Tasw+Zx9JJMog= +github.com/tommy-muehle/go-mnd/v2 v2.3.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= +github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= +github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= +github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +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.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/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.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +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/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= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= +golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/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= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210102185154-773b96fafca2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.38.0 h1:vDyWk6eup8eQAidaZ31sNWIn8tZEL8qpbtGkBD4ytQo= +google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +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-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= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= +honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= +mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytectl/boilerplate/lyft/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go similarity index 100% rename from flytectl/boilerplate/lyft/golang_support_tools/tools.go rename to flytectl/boilerplate/flyte/golang_support_tools/tools.go index a256d868f1..71163a57d9 100644 --- a/flytectl/boilerplate/lyft/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -4,7 +4,7 @@ package tools import ( _ "github.com/alvaroloes/enumer" - _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/flyteorg/flytestdlib/cli/pflags" + _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/vektra/mockery/cmd/mockery" ) diff --git a/flytectl/boilerplate/lyft/golang_test_targets/Makefile b/flytectl/boilerplate/flyte/golang_test_targets/Makefile similarity index 82% rename from flytectl/boilerplate/lyft/golang_test_targets/Makefile rename to flytectl/boilerplate/flyte/golang_test_targets/Makefile index 5abd2ed607..21d8b5b776 100644 --- a/flytectl/boilerplate/lyft/golang_test_targets/Makefile +++ b/flytectl/boilerplate/flyte/golang_test_targets/Makefile @@ -1,12 +1,12 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst .PHONY: download_tooling download_tooling: #download dependencies (including test deps) for the package - @boilerplate/lyft/golang_test_targets/download_tooling.sh + @boilerplate/flyte/golang_test_targets/download_tooling.sh .PHONY: lint lint: download_tooling #lints the package for common code smells @@ -16,7 +16,7 @@ lint: download_tooling #lints the package for common code smells # skips 'vendor' .PHONY: goimports goimports: - @boilerplate/lyft/golang_test_targets/goimports + @boilerplate/flyte/golang_test_targets/goimports .PHONY: mod_download mod_download: #download dependencies (including test deps) for the package diff --git a/flytectl/boilerplate/lyft/golang_test_targets/Readme.rst b/flytectl/boilerplate/flyte/golang_test_targets/Readme.rst similarity index 75% rename from flytectl/boilerplate/lyft/golang_test_targets/Readme.rst rename to flytectl/boilerplate/flyte/golang_test_targets/Readme.rst index 3466e30c55..f9d890fdd7 100644 --- a/flytectl/boilerplate/lyft/golang_test_targets/Readme.rst +++ b/flytectl/boilerplate/flyte/golang_test_targets/Readme.rst @@ -15,17 +15,17 @@ Provides a ``test_benchmark`` target for benchmark tests. **To Enable:** -Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golang_test_targets`` to your ``boilerplate/update.cfg`` file. Make sure you're using ``go mod`` for dependency management. Provide a ``.golangci`` configuration (the lint target requires it). -Add ``include boilerplate/lyft/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable +Add ``include boilerplate/flyte/golang_test_targets/Makefile`` in your main ``Makefile`` _after_ your REPOSITORY environment variable :: REPOSITORY= - include boilerplate/lyft/golang_test_targets/Makefile + include boilerplate/flyte/golang_test_targets/Makefile (this ensures the extra make targets get included in your main Makefile) diff --git a/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh similarity index 92% rename from flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh rename to flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index bc51af5646..25d4ac3dc1 100755 --- a/flytectl/boilerplate/lyft/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -7,7 +7,7 @@ # pins. To facilitate this, we're maintaining two sets of go.mod/sum files - the second one only for tooling. This is # the same approach that go 1.14 will take as well. # See: -# https://github.com/lyft/flyte/issues/129 +# https://github.com/flyteorg/flyte/issues/129 # https://github.com/golang/go/issues/30515 for some background context # https://github.com/go-modules-by-example/index/blob/5ec250b4b78114a55001bd7c9cb88f6e07270ea5/010_tools/README.md @@ -24,7 +24,7 @@ tools=( tmp_dir=$(mktemp -d -t gotooling-XXX) echo "Using temp directory ${tmp_dir}" -cp -R boilerplate/lyft/golang_support_tools/* $tmp_dir +cp -R boilerplate/flyte/golang_support_tools/* $tmp_dir pushd "$tmp_dir" for tool in "${tools[@]}" diff --git a/flytectl/boilerplate/lyft/golang_test_targets/goimports b/flytectl/boilerplate/flyte/golang_test_targets/goimports similarity index 56% rename from flytectl/boilerplate/lyft/golang_test_targets/goimports rename to flytectl/boilerplate/flyte/golang_test_targets/goimports index 160525a8cc..ba0d6d8718 100755 --- a/flytectl/boilerplate/lyft/golang_test_targets/goimports +++ b/flytectl/boilerplate/flyte/golang_test_targets/goimports @@ -1,8 +1,8 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") diff --git a/flytectl/boilerplate/lyft/golangci_file/.golangci.yml b/flytectl/boilerplate/flyte/golangci_file/.golangci.yml similarity index 72% rename from flytectl/boilerplate/lyft/golangci_file/.golangci.yml rename to flytectl/boilerplate/flyte/golangci_file/.golangci.yml index a414f33f79..5d53f35295 100644 --- a/flytectl/boilerplate/lyft/golangci_file/.golangci.yml +++ b/flytectl/boilerplate/flyte/golangci_file/.golangci.yml @@ -1,7 +1,7 @@ # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst run: skip-dirs: diff --git a/flytectl/boilerplate/lyft/golangci_file/Readme.rst b/flytectl/boilerplate/flyte/golangci_file/Readme.rst similarity index 60% rename from flytectl/boilerplate/lyft/golangci_file/Readme.rst rename to flytectl/boilerplate/flyte/golangci_file/Readme.rst index ba5d2b61ce..e4cbd18b96 100644 --- a/flytectl/boilerplate/lyft/golangci_file/Readme.rst +++ b/flytectl/boilerplate/flyte/golangci_file/Readme.rst @@ -5,4 +5,4 @@ Provides a ``.golangci`` file with the linters we've agreed upon. **To Enable:** -Add ``lyft/golangci_file`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golangci_file`` to your ``boilerplate/update.cfg`` file. diff --git a/flytectl/boilerplate/lyft/golangci_file/update.sh b/flytectl/boilerplate/flyte/golangci_file/update.sh similarity index 67% rename from flytectl/boilerplate/lyft/golangci_file/update.sh rename to flytectl/boilerplate/flyte/golangci_file/update.sh index 9e9e6c1f46..ab2f85c680 100755 --- a/flytectl/boilerplate/lyft/golangci_file/update.sh +++ b/flytectl/boilerplate/flyte/golangci_file/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e diff --git a/flytectl/boilerplate/lyft/pull_request_template/Readme.rst b/flytectl/boilerplate/flyte/pull_request_template/Readme.rst similarity index 55% rename from flytectl/boilerplate/lyft/pull_request_template/Readme.rst rename to flytectl/boilerplate/flyte/pull_request_template/Readme.rst index b85a4ea121..ee54437252 100644 --- a/flytectl/boilerplate/lyft/pull_request_template/Readme.rst +++ b/flytectl/boilerplate/flyte/pull_request_template/Readme.rst @@ -5,4 +5,4 @@ Provides a Pull Request template. **To Enable:** -Add ``lyft/golang_test_targets`` to your ``boilerplate/update.cfg`` file. +Add ``flyteorg/golang_test_targets`` to your ``boilerplate/update.cfg`` file. diff --git a/flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md b/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md similarity index 54% rename from flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md rename to flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md index d2becf38b7..d7699558be 100644 --- a/flytectl/boilerplate/lyft/pull_request_template/pull_request_template.md +++ b/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md @@ -1,3 +1,9 @@ +## Read then delete + +- Make sure to use a concise title for the pull-request. +- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) + # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -18,9 +24,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/lyft/flyte/issues/ +https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ OR -_https://github.com/lyft/flyte/issues/_ +_https://github.com/flyteorg/flyte/issues/_ diff --git a/flytectl/boilerplate/lyft/pull_request_template/update.sh b/flytectl/boilerplate/flyte/pull_request_template/update.sh similarity index 61% rename from flytectl/boilerplate/lyft/pull_request_template/update.sh rename to flytectl/boilerplate/flyte/pull_request_template/update.sh index 13f0c3b57d..051e9dbce0 100755 --- a/flytectl/boilerplate/lyft/pull_request_template/update.sh +++ b/flytectl/boilerplate/flyte/pull_request_template/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e diff --git a/flytectl/boilerplate/flyte/Readme.rst b/flytectl/boilerplate/flyte/welcome_bot/Readme.rst similarity index 100% rename from flytectl/boilerplate/flyte/Readme.rst rename to flytectl/boilerplate/flyte/welcome_bot/Readme.rst diff --git a/flytectl/boilerplate/flyte/config.yml b/flytectl/boilerplate/flyte/welcome_bot/config.yml similarity index 100% rename from flytectl/boilerplate/flyte/config.yml rename to flytectl/boilerplate/flyte/welcome_bot/config.yml diff --git a/flytectl/boilerplate/flyte/update.sh b/flytectl/boilerplate/flyte/welcome_bot/update.sh similarity index 55% rename from flytectl/boilerplate/flyte/update.sh rename to flytectl/boilerplate/flyte/welcome_bot/update.sh index 506c3221b7..120dbd365c 100755 --- a/flytectl/boilerplate/flyte/update.sh +++ b/flytectl/boilerplate/flyte/welcome_bot/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e @@ -11,4 +11,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # Clone the config.yml file echo " - copying ${DIR}/config.yml to the root directory." -cp ${DIR}/config.yml ${DIR}/../../.github/config.yml +cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml diff --git a/flytectl/boilerplate/lyft/golang_support_tools/go.sum b/flytectl/boilerplate/lyft/golang_support_tools/go.sum deleted file mode 100644 index 81e0469630..0000000000 --- a/flytectl/boilerplate/lyft/golang_support_tools/go.sum +++ /dev/null @@ -1,558 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.47.0 h1:1JUtpcY9E7+eTospEwWS2QXP3DEn7poB3E2j0jN74mM= -cloud.google.com/go v0.47.0/go.mod h1:5p3Ky/7f3N10VBkhuR5LFtddroTiMyjZV/Kj5qOQFxU= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible h1:/x4W7ZQV4PHJYnLUgKubojM8T+zlFEDdaBazAnA/QCY= -github.com/Azure/azure-sdk-for-go v10.2.1-beta+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest/autorest v0.9.2 h1:6AWuh3uWrsZJcNoCHrCF/+g4aKPCU39kaMO6/qrnK/4= -github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= -github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= -github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= -github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coocood/freecache v1.1.0 h1:ENiHOsWdj1BrrlPwblhbn4GdAsMymK3pZORJ+bJGAjA= -github.com/coocood/freecache v1.1.0/go.mod h1:ePwxCDzOYvARfHdr1pByNct1at3CoKnsipOHwKlNbzI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= -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/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structtag v1.1.0 h1:6j4mUV/ES2duvnAzKMFkN6/A5mCaNYPD3xfbAkLLOF8= -github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783 h1:SmsgwFZy9pdTk/k8BZz40D3P5umP5+Ejt3hAi0paBNQ= -github.com/fsnotify/fsnotify v1.4.8-0.20191012010759-4bf2d1fec783/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.4.0 h1:sXD3pix0wDemuPuSlrXpJNNYXlUiKiysLrtPVQmxkzI= -github.com/go-critic/go-critic v0.4.0/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw= -github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc h1:55rEp52jU6bkyslZ1+C/7NGfpQsEc6pxGLAGDOctqbw= -github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.22.2 h1:iaihss3Tf6NvZVjun3lHimKSgofPV1+FqE/cbehoiRQ= -github.com/golangci/golangci-lint v1.22.2/go.mod h1:2Bj42k6hPQFTRxkDb7S3TQ+EsnumZXOmIYNqlQrp0FI= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7 h1:oIYi27Ruo2k5dxukdOisCSZrowkg70jxxuaPZck9+ic= -github.com/graymeta/stow v0.0.0-20190522170649-903027f87de7/go.mod h1:B24dekNjtWVeREK+dyMHtI22d85VzCT+sX5bVWDtjoA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -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.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -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/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -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 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lyft/flytestdlib v0.2.31 h1:JAOSGwy/wLprhq1KR9zxekBqnKdSlAQQG1x4KQe+hlI= -github.com/lyft/flytestdlib v0.2.31/go.mod h1:/fqNXKCGChEvMzcRapVq6vDM69Vlusl+bCj7foToaUQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE= -github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7 h1:2FttUGr9cza0JNOUDHeVWo4wVGk92m8bralgdbAeYJY= -github.com/ncw/swift v1.0.49-0.20190728102658-a24ef33bc9b7/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= -github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.5.0 h1:5BakdOZdtKJ1FFk6QdL8iSGrMWsXgchNJcrnarjbmJQ= -github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/satori/uuid v1.2.0 h1:6TFY4nxn5XwBx0gDfzbEMCNT6k4N/4FNIuN8RACZ0KI= -github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU= -github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d h1:BzRvVq1EHuIjxpijCEKpAxzKUUMurOQ4sknehIATRh8= -github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do= -github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= -github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q= -github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tommy-muehle/go-mnd v1.1.1 h1:4D0wuPKjOTiK2garzuPGGvm4zZ/wLYDOH8TJSABC7KU= -github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= -github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= -github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -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= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -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= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= -golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2 h1:nq114VpM8lsSlP+lyUbANecYHYiFcSNFtqcBlxRV+gA= -golang.org/x/sys v0.0.0-20191020212454-3e7259c5e7c2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/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-20180525024113-a5b4c53f6e8b/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-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010171213-8abd42400456/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6 h1:BP62y4oUl8+/CvHuvVqHIPmVRixgDl6y6a+tR7pXXIA= -golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9 h1:DcDldKT1PaijNBNDNPaGtfl+LvUHR1xsw5DpipSI1CE= -google.golang.org/api v0.11.1-0.20191020000718-bf72a15fd9e9/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93 h1:tT6oQBi0qwLbbZSfDkdIsb23EwaLY85hoAV4SpXfdao= -k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31 h1:OH3z6khCtxnJBAc0C5CMYWLl1CoK5R5fngX7wrwdN5c= -k8s.io/client-go v0.0.0-20181213151034-8d9ed539ba31/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4= -mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg index 468bf2cb80..2f61a97b0e 100644 --- a/flytectl/boilerplate/update.cfg +++ b/flytectl/boilerplate/update.cfg @@ -1,6 +1,6 @@ -lyft/golang_test_targets -lyft/golangci_file -lyft/golang_support_tools -lyft/pull_request_template -flyte/ +flyte/golang_test_targets +flyte/golangci_file +flyte/golang_support_tools +flyte/pull_request_template +flyte/welcome_bot diff --git a/flytectl/boilerplate/update.sh b/flytectl/boilerplate/update.sh index 374e4b930e..9173b662de 100755 --- a/flytectl/boilerplate/update.sh +++ b/flytectl/boilerplate/update.sh @@ -1,23 +1,21 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -trap "rm -fr $OUT" EXIT +trap 'rm -fr $OUT' EXIT -git clone git@github.com:flyteorg/boilerplate.git "${OUT}" +git clone https://github.com/flyteorg/boilerplate.git "${OUT}" echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" -echo "" - CONFIG_FILE="${DIR}/update.cfg" README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" @@ -30,12 +28,12 @@ if [ ! -f "$CONFIG_FILE" ]; then fi if [ -z "$REPOSITORY" ]; then - echo '$REPOSITORY is required to run this script' + echo "$REPOSITORY is required to run this script" echo "See $README for more details." exit 1 fi -while read directory junk; do +while read -r directory junk; do # Skip comment lines (which can have leading whitespace) if [[ "$directory" == '#'* ]]; then continue @@ -63,8 +61,8 @@ while read directory junk; do echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." - rm -rf "${DIR}/${directory}" - mkdir -p $(dirname "${DIR}/${directory}") + rm -rf "${DIR:?}/${directory}" + mkdir -p "$(dirname "${DIR}"/"${directory}")" cp -r "$dir_path" "${DIR}/${directory}" if [ -f "${DIR}/${directory}/update.sh" ]; then echo "executing ${DIR}/${directory}/update.sh" diff --git a/flytectl/pull_request_template.md b/flytectl/pull_request_template.md new file mode 100644 index 0000000000..d7699558be --- /dev/null +++ b/flytectl/pull_request_template.md @@ -0,0 +1,32 @@ +## Read then delete + +- Make sure to use a concise title for the pull-request. +- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) + +# TL;DR +_Please replace this text with a description of what this PR accomplishes._ + +## Type + - [ ] Bug Fix + - [ ] Feature + - [ ] Plugin + +## Are all requirements met? + + - [ ] Code completed + - [ ] Smoke tested + - [ ] Unit tests added + - [ ] Code documentation added + - [ ] Any pending items have an associated Issue + +## Complete description + _How did you fix the bug, make the feature etc. Link to any design docs etc_ + +## Tracking Issue +https://github.com/flyteorg/flyte/issues/ + +## Follow-up issue +_NA_ +OR +_https://github.com/flyteorg/flyte/issues/_ From 4bb967592ebf1f67cedf6a4f1f357202e4b17aa7 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Wed, 2 Jun 2021 11:55:29 +0530 Subject: [PATCH 056/356] Added transparent Get call when fetching latest version of workflow objects (#73) Signed-off-by: Prafulla Mahindrakar --- flytectl/pkg/ext/workflow_fetcher.go | 3 +-- flytectl/pkg/ext/workflow_fetcher_test.go | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 3abcb04fab..86fe88abda 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -38,8 +38,7 @@ func (a *AdminFetcherExtClient) FetchWorkflowLatestVersion(ctx context.Context, if err != nil { return nil, err } - w := wVersions[0] - return w, nil + return a.FetchWorkflowVersion(ctx, name, wVersions[0].Id.Version, project, domain) } // FetchWorkflowVersion fetches particular version of workflow diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index 91c6818c72..c18d04842a 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -16,6 +16,7 @@ import ( var ( workflowListResponse *admin.WorkflowList + workflowResponse *admin.Workflow ) func getWorkflowFetcherSetup() { @@ -80,6 +81,7 @@ func getWorkflowFetcherSetup() { workflowListResponse = &admin.WorkflowList{ Workflows: workflows, } + workflowResponse = workflows[0] } func TestFetchAllVerOfWorkflow(t *testing.T) { @@ -106,6 +108,7 @@ func TestFetchAllVerOfWorkflowEmptyResponse(t *testing.T) { func TestFetchWorkflowLatestVersion(t *testing.T) { getWorkflowFetcherSetup() + adminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(workflowResponse, nil) adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") assert.Nil(t, err) @@ -115,6 +118,7 @@ func TestFetchWorkflowLatestVersionError(t *testing.T) { workflowListResponse := &admin.WorkflowList{} getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) + adminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(workflowResponse, nil) _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") assert.Equal(t, fmt.Errorf("no workflow retrieved for workflowName"), err) } From 712fdf8b9d6fa34bd17303ee3924208586217b11 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Thu, 3 Jun 2021 01:01:01 +0530 Subject: [PATCH 057/356] Added customizable fields during registration (#80) Signed-off-by: Prafulla Mahindrakar --- .../subcommand/register/files_config.go | 20 +++++ .../subcommand/register/filesconfig_flags.go | 23 ++++++ .../register/filesconfig_flags_test.go | 64 +++++++++------ flytectl/cmd/create/execution_util.go | 11 ++- flytectl/cmd/register/files.go | 36 +++++---- flytectl/cmd/register/files_test.go | 32 ++++++++ flytectl/cmd/register/filesconfig_flags.go | 48 ------------ flytectl/cmd/register/register.go | 6 +- flytectl/cmd/register/register_test.go | 16 ++++ flytectl/cmd/register/register_util.go | 29 +++++-- flytectl/cmd/register/register_util_test.go | 77 +++++++++++++------ flytectl/docs/source/gen/flytectl.rst | 2 + flytectl/docs/source/gen/flytectl_config.rst | 2 + .../source/gen/flytectl_config_discover.rst | 2 + .../source/gen/flytectl_config_validate.rst | 2 + flytectl/docs/source/gen/flytectl_create.rst | 2 + .../source/gen/flytectl_create_execution.rst | 2 + .../source/gen/flytectl_create_project.rst | 2 + flytectl/docs/source/gen/flytectl_delete.rst | 2 + ...ectl_delete_cluster-resource-attribute.rst | 2 + ...lytectl_delete_execution-cluster-label.rst | 2 + ...tectl_delete_execution-queue-attribute.rst | 2 + .../source/gen/flytectl_delete_execution.rst | 2 + .../gen/flytectl_delete_plugin-override.rst | 2 + ...lytectl_delete_task-resource-attribute.rst | 2 + flytectl/docs/source/gen/flytectl_get.rst | 2 + ...lytectl_get_cluster-resource-attribute.rst | 2 + .../flytectl_get_execution-cluster-label.rst | 2 + ...flytectl_get_execution-queue-attribute.rst | 2 + .../source/gen/flytectl_get_execution.rst | 2 + .../source/gen/flytectl_get_launchplan.rst | 2 + .../gen/flytectl_get_plugin-override.rst | 2 + .../docs/source/gen/flytectl_get_project.rst | 2 + .../flytectl_get_task-resource-attribute.rst | 2 + .../docs/source/gen/flytectl_get_task.rst | 2 + .../docs/source/gen/flytectl_get_workflow.rst | 2 + .../docs/source/gen/flytectl_register.rst | 2 + .../source/gen/flytectl_register_files.rst | 31 +++++++- flytectl/docs/source/gen/flytectl_update.rst | 2 + ...ectl_update_cluster-resource-attribute.rst | 2 + ...lytectl_update_execution-cluster-label.rst | 2 + ...tectl_update_execution-queue-attribute.rst | 2 + .../source/gen/flytectl_update_launchplan.rst | 2 + .../gen/flytectl_update_plugin-override.rst | 2 + .../source/gen/flytectl_update_project.rst | 2 + ...lytectl_update_task-resource-attribute.rst | 2 + .../docs/source/gen/flytectl_update_task.rst | 2 + .../source/gen/flytectl_update_workflow.rst | 2 + flytectl/docs/source/gen/flytectl_version.rst | 2 + flytectl/go.mod | 2 +- flytectl/go.sum | 14 ++-- 51 files changed, 347 insertions(+), 136 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/register/files_config.go create mode 100755 flytectl/cmd/config/subcommand/register/filesconfig_flags.go rename flytectl/cmd/{ => config/subcommand}/register/filesconfig_flags_test.go (78%) create mode 100644 flytectl/cmd/register/files_test.go delete mode 100755 flytectl/cmd/register/filesconfig_flags.go diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go new file mode 100644 index 0000000000..a384ec83d5 --- /dev/null +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -0,0 +1,20 @@ +package register + +//go:generate pflags FilesConfig --default-var DefaultFilesConfig --bind-default-var + +var ( + DefaultFilesConfig = &FilesConfig{ + Version: "v1", + ContinueOnError: false, + } +) + +// FilesConfig containing flags used for registration +type FilesConfig struct { + Version string `json:"version" pflag:",version of the entity to be registered with flyte."` + ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` + Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` + AssumableIamRole string `json:"assumableIamRole" pflag:", custom assumable iam auth role to register launch plans with."` + K8ServiceAccount string `json:"k8ServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` + OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` +} diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go new file mode 100755 index 0000000000..dce52b6c8b --- /dev/null +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -0,0 +1,23 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package register + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +// GetPFlagSet will return strongly types pflags for all fields in FilesConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) + cmdFlags.StringVarP(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), "v", DefaultFilesConfig.Version, "version of the entity to be registered with flyte.") + cmdFlags.BoolVarP(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), "c", DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") + cmdFlags.BoolVarP(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), "a", DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") + cmdFlags.StringVarP(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), "i", DefaultFilesConfig.AssumableIamRole, " Custom assumable iam auth role to register launch plans with.") + cmdFlags.StringVarP(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), "k", DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") + cmdFlags.StringVarP(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), "l", DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") + return cmdFlags +} diff --git a/flytectl/cmd/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go similarity index 78% rename from flytectl/cmd/register/filesconfig_flags_test.go rename to flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 2a78db2a9a..56a85f9234 100755 --- a/flytectl/cmd/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_FilesConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_FilesConfig(val, result)) } -func testDecodeSlice_FilesConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_FilesConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_FilesConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestFilesConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_version", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, "v1", vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestFilesConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_continueOnError", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("continueOnError"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -144,21 +128,55 @@ func TestFilesConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_archive", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) if vBool, err := cmdFlags.GetBool("archive"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_assumableIamRole", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("archive", testValue) - if vBool, err := cmdFlags.GetBool("archive"); err == nil { - testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + cmdFlags.Set("assumableIamRole", testValue) + if vString, err := cmdFlags.GetString("assumableIamRole"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.AssumableIamRole) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_k8ServiceAccount", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("k8ServiceAccount", testValue) + if vString, err := cmdFlags.GetString("k8ServiceAccount"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.K8ServiceAccount) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_outputLocationPrefix", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("outputLocationPrefix", testValue) + if vString, err := cmdFlags.GetString("outputLocationPrefix"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.OutputLocationPrefix) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 25721d14e4..13a1ab51a9 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -57,12 +57,11 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project Literals: variableLiterals, } var authRole *admin.AuthRole - if executionConfig.KubeServiceAcct != "" { - authRole = &admin.AuthRole{Method: &admin.AuthRole_KubernetesServiceAccount{ - KubernetesServiceAccount: executionConfig.KubeServiceAcct}} - } else { - authRole = &admin.AuthRole{Method: &admin.AuthRole_AssumableIamRole{ - AssumableIamRole: executionConfig.IamRoleARN}} + if executionConfig.KubeServiceAcct != "" || executionConfig.IamRoleARN != "" { + authRole = &admin.AuthRole{ + AssumableIamRole: executionConfig.IamRoleARN, + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + } } ID := &core.Identifier{ ResourceType: core.ResourceType_TASK, diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 78cf87a15c..f0762d89a0 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -5,26 +5,12 @@ import ( "encoding/json" "os" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flytestdlib/logger" ) -//go:generate pflags FilesConfig -var ( - filesConfig = &FilesConfig{ - Version: "v1", - ContinueOnError: false, - } -) - -// FilesConfig -type FilesConfig struct { - Version string `json:"version" pflag:",version of the entity to be registered with flyte."` - ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` - Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` -} - const ( registerFilesShort = "Registers file resources" registerFilesLong = ` @@ -70,6 +56,24 @@ Change the o/p format has not effect on registration. The O/p is currently avail bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -o yaml +Override IamRole during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -i "arn:aws:iam::123456789:role/dummy" + +Override Kubernetes service account during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -k "kubernetes-service-account" + +Override Output location prefix during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -l "s3://dummy/prefix" + Usage ` ) @@ -81,7 +85,7 @@ func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Co return _err } logger.Infof(ctx, "Parsing files... Total(%v)", len(dataRefs)) - fastFail := !filesConfig.ContinueOnError + fastFail := !rconfig.DefaultFilesConfig.ContinueOnError var registerResults []Result for i := 0; i < len(dataRefs) && !(fastFail && _err != nil); i++ { registerResults, _err = registerFile(ctx, dataRefs[i], registerResults, cmdCtx) diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go new file mode 100644 index 0000000000..b1ead898a7 --- /dev/null +++ b/flytectl/cmd/register/files_test.go @@ -0,0 +1,32 @@ +package register + +import ( + "testing" + + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestRegisterFromFiles(t *testing.T) { + t.Run("Valid registration", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.Archive = true + args = []string{"testdata/valid-parent-folder-register.tar"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := registerFromFilesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Invalid registration file", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.Archive = true + args = []string{"testdata/invalid.tar"} + err := registerFromFilesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + }) +} diff --git a/flytectl/cmd/register/filesconfig_flags.go b/flytectl/cmd/register/filesconfig_flags.go deleted file mode 100755 index 2600e6024e..0000000000 --- a/flytectl/cmd/register/filesconfig_flags.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package register - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (FilesConfig) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in FilesConfig and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.StringVarP(&(filesConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), "v", "v1", "version of the entity to be registered with flyte.") - cmdFlags.BoolVarP(&(filesConfig.ContinueOnError), fmt.Sprintf("%v%v", prefix, "continueOnError"), "c", *new(bool), "continue on error when registering files.") - cmdFlags.BoolVarP(&(filesConfig.Archive), fmt.Sprintf("%v%v", prefix, "archive"), "a", *new(bool), "pass in archive file either an http link or local path.") - return cmdFlags -} diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 476080dd2c..0ae04aaaaa 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -1,7 +1,9 @@ package register import ( + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdcore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" ) @@ -24,8 +26,8 @@ func RemoteRegisterCommand() *cobra.Command { Long: registercmdLong, } registerResourcesFuncs := map[string]cmdcore.CommandEntry{ - "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: filesConfig, Short: registerFilesShort, - Long: registerFilesLong}, + "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: rconfig.DefaultFilesConfig, + Short: registerFilesShort, Long: registerFilesLong}, } cmdcore.AddCommands(registerCmd, registerResourcesFuncs) return registerCmd diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index 476e7b31bc..6943979912 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -1,13 +1,29 @@ package register import ( + "context" "fmt" + "net/http" "sort" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" ) +var ( + ctx context.Context + mockAdminClient *mocks.AdminServiceClient + cmdCtx cmdCore.CommandContext + args []string + GetDoFunc func(req *http.Request) (*http.Response, error) +) + +var setup = u.Setup + func TestRegisterCommand(t *testing.T) { registerCommand := RemoteRegisterCommand() assert.Equal(t, registerCommand.Use, "register") diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 3bb5a5d6f7..34afc816b2 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -14,6 +14,7 @@ import ( "strings" "github.com/flyteorg/flytectl/cmd/config" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -84,7 +85,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: launchPlan.Id.Name, - Version: filesConfig.Version, + Version: rconfig.DefaultFilesConfig.Version, }, Spec: launchPlan.Spec, }) @@ -97,7 +98,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: workflowSpec.Template.Id.Name, - Version: filesConfig.Version, + Version: rconfig.DefaultFilesConfig.Version, }, Spec: workflowSpec, }) @@ -110,7 +111,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: taskSpec.Template.Id.Name, - Version: filesConfig.Version, + Version: rconfig.DefaultFilesConfig.Version, }, Spec: taskSpec, }) @@ -177,7 +178,24 @@ func hydrateIdentifier(identifier *core.Identifier) { identifier.Domain = config.GetConfig().Domain } if identifier.Version == "" || identifier.Version == registrationVersionPattern { - identifier.Version = filesConfig.Version + identifier.Version = rconfig.DefaultFilesConfig.Version + } +} + +func hydrateLaunchPlanSpec(lpSpec *admin.LaunchPlanSpec) { + assumableIamRole := len(rconfig.DefaultFilesConfig.AssumableIamRole) > 0 + k8ServiceAcct := len(rconfig.DefaultFilesConfig.K8ServiceAccount) > 0 + outputLocationPrefix := len(rconfig.DefaultFilesConfig.OutputLocationPrefix) > 0 + if assumableIamRole || k8ServiceAcct { + lpSpec.AuthRole = &admin.AuthRole{ + AssumableIamRole: rconfig.DefaultFilesConfig.AssumableIamRole, + KubernetesServiceAccount: rconfig.DefaultFilesConfig.K8ServiceAccount, + } + } + if outputLocationPrefix { + lpSpec.RawOutputDataConfig = &admin.RawOutputDataConfig{ + OutputLocationPrefix: rconfig.DefaultFilesConfig.OutputLocationPrefix, + } } } @@ -186,6 +204,7 @@ func hydrateSpec(message proto.Message) error { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) hydrateIdentifier(launchPlan.Spec.WorkflowId) + hydrateLaunchPlanSpec(launchPlan.Spec) case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) for _, Noderef := range workflowSpec.Template.Nodes { @@ -229,7 +248,7 @@ If the archive flag is on then download the archives to temp directory and extra The o/p of this function would be sorted list of the file locations. */ func getSortedFileList(ctx context.Context, args []string) ([]string, string, error) { - if !filesConfig.Archive { + if !rconfig.DefaultFilesConfig.Archive { /* * Sorting is required for non-archived case since its possible for the user to pass in a list of unordered * serialized protobuf files , but flyte expects them to be registered in topologically sorted order that it had diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index ce5805fd7b..a30c6016e3 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -1,7 +1,6 @@ package register import ( - "context" "errors" "fmt" "net/http" @@ -10,9 +9,10 @@ import ( "strings" "testing" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -28,16 +28,6 @@ func (m *MockHTTPClient) Do(req *http.Request) (*http.Response, error) { return GetDoFunc(req) } -var ( - ctx context.Context - mockAdminClient *mocks.AdminServiceClient - cmdCtx cmdCore.CommandContext - args []string - GetDoFunc func(req *http.Request) (*http.Response, error) -) - -var setup = u.Setup - func registerFilesSetup() { httpClient = &MockHTTPClient{} validTar, err := os.Open("testdata/valid-register.tar") @@ -54,12 +44,16 @@ func registerFilesSetup() { ctx = u.Ctx mockAdminClient = u.MockClient cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) + + rconfig.DefaultFilesConfig.AssumableIamRole = "" + rconfig.DefaultFilesConfig.K8ServiceAccount = "" + rconfig.DefaultFilesConfig.OutputLocationPrefix = "" } func TestGetSortedFileList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = false + rconfig.DefaultFilesConfig.Archive = false args = []string{"file2", "file1"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, "file1", fileList[0]) @@ -71,7 +65,7 @@ func TestGetSortedFileList(t *testing.T) { func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-parent-folder-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 4) @@ -88,7 +82,7 @@ func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { func TestGetSortedArchivedFileList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 4) @@ -105,7 +99,7 @@ func TestGetSortedArchivedFileList(t *testing.T) { func TestGetSortedArchivedFileUnorderedList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-unordered-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 4) @@ -122,7 +116,7 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { func TestGetSortedArchivedCorruptedFileList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 0) @@ -135,7 +129,7 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { func TestGetSortedArchivedTgzList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tgz"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 4) @@ -151,7 +145,7 @@ func TestGetSortedArchivedTgzList(t *testing.T) { func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { setup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tgz"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, 0, len(fileList)) @@ -164,7 +158,7 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid-extension-register.zip"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, 0, len(fileList)) @@ -177,7 +171,7 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { setup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, 0, len(fileList)) @@ -190,7 +184,7 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} fileList, tmpDir, err := getSortedFileList(ctx, args) assert.Equal(t, len(fileList), 4) @@ -207,7 +201,7 @@ func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) { setup() registerFilesSetup() - filesConfig.Archive = true + rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} ctx = nil fileList, tmpDir, err := getSortedFileList(ctx, args) @@ -279,3 +273,40 @@ func TestRegisterFile(t *testing.T) { assert.NotNil(t, err) }) } + +func TestHydrateLaunchPlanSpec(t *testing.T) { + t.Run("IamRole override", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" + lpSpec := &admin.LaunchPlanSpec{} + hydrateLaunchPlanSpec(lpSpec) + assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) + }) + t.Run("k8Service account override", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.K8ServiceAccount = "k8Account" + lpSpec := &admin.LaunchPlanSpec{} + hydrateLaunchPlanSpec(lpSpec) + assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) + }) + t.Run("Both k8Service and IamRole", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" + rconfig.DefaultFilesConfig.K8ServiceAccount = "k8Account" + lpSpec := &admin.LaunchPlanSpec{} + hydrateLaunchPlanSpec(lpSpec) + assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole", + KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) + }) + t.Run("Output prefix", func(t *testing.T) { + setup() + registerFilesSetup() + rconfig.DefaultFilesConfig.OutputLocationPrefix = "prefix" + lpSpec := &admin.LaunchPlanSpec{} + hydrateLaunchPlanSpec(lpSpec) + assert.Equal(t, &admin.RawOutputDataConfig{OutputLocationPrefix: "prefix"}, lpSpec.RawOutputDataConfig) + }) +} diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index c878c96298..22fabc9f41 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -25,6 +25,8 @@ Options --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index a2f96c1e7a..aea876904b 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -34,6 +34,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index c5e86530a1..c1c625d72a 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -36,6 +36,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 7223e1a240..a55952f1de 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -38,6 +38,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 7233aa611a..67aff79271 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -37,6 +37,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index ade3a51e11..2d99025dfa 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -110,6 +110,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index b99b60268f..994e53e825 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -61,6 +61,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index d22416441d..6795a572e4 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -37,6 +37,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index ee2e26a889..e29fb6b821 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -73,6 +73,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 9290a5444b..801b28f333 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -71,6 +71,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 20c4f4506c..43b59d3878 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -75,6 +75,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 60dda389ad..14a769ccb0 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -80,6 +80,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index f76d01d2f3..5431cb54f9 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -76,6 +76,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 91b3f785b0..19ee6daf95 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -76,6 +76,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 4a0608a262..2faf6997b8 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -37,6 +37,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 0606779729..d650498f75 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -82,6 +82,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index e8752979d7..e2da0f360d 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -80,6 +80,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index b9eff077be..667fe0fd96 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -84,6 +84,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index fad935ec01..43e7134dba 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -66,6 +66,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index fa45e3f85f..fbbef2cace 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -106,6 +106,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 1735945a10..25fbfbf288 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -104,6 +104,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index e47f0061c2..9d9eec43cf 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -66,6 +66,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index a49cb1f96d..613da8d7b3 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -86,6 +86,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 494ee1b7a1..e7c2c75968 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -105,6 +105,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 89e4c688db..e951129aa5 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -80,6 +80,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index f02dbed437..76ba262247 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -37,6 +37,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index c3c90edb5e..39f7601c8d 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -52,6 +52,24 @@ Change the o/p format has not effect on registration. The O/p is currently avail bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -o yaml +Override IamRole during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -i "arn:aws:iam::123456789:role/dummy" + +Override Kubernetes service account during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -k "kubernetes-service-account" + +Override Output location prefix during registration. + +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -l "s3://dummy/prefix" + Usage @@ -64,10 +82,13 @@ Options :: - -a, --archive pass in archive file either an http link or local path. - -c, --continueOnError continue on error when registering files. - -h, --help help for files - -v, --version string version of the entity to be registered with flyte. (default "v1") + -a, --archive pass in archive file either an http link or local path. + -i, --assumableIamRole string Custom assumable iam auth role to register launch plans with. + -c, --continueOnError continue on error when registering files. + -h, --help help for files + -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + -v, --version string version of the entity to be registered with flyte. (default "v1") Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -83,6 +104,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 1372e09809..43dfbae8df 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -39,6 +39,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 1646cdfc90..3bc41ae646 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -78,6 +78,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 325dda91a6..8f22a1f327 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -71,6 +71,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 85f28eec5b..19d10aa050 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -82,6 +82,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index cc76a1ab93..f0e7838f61 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -56,6 +56,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 3cff796b1d..b4cf04600f 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -84,6 +84,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 8a2e2525ca..e7954f31dd 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -81,6 +81,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 37c3439eff..496a79779e 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -84,6 +84,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index ba02121a13..9d4c95142b 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -56,6 +56,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 7320bb5423..5899dfa220 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -56,6 +56,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 84df72ed64..4ba5a821ef 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -41,6 +41,8 @@ Options inherited from parent commands --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") --admin.maxRetries int Max number of gRPC retries (default 4) --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. diff --git a/flytectl/go.mod b/flytectl/go.mod index 0f387bf4d7..56161e8041 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.18.40 + github.com/flyteorg/flyteidl v0.18.51 github.com/flyteorg/flytestdlib v0.3.21 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index b8d3df4f31..1049bf193a 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -84,7 +84,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -173,8 +172,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.40 h1:YuLBNpIotOFwyLSXSs0aj3B9N9vwPhzLRAQTWxYSI/w= -github.com/flyteorg/flyteidl v0.18.40/go.mod h1:IJD02cc/95QMkGDBJNibsr5aWd6V7TlQiJ8Iz5mVZ28= +github.com/flyteorg/flyteidl v0.18.51 h1:fp4Qq9WtO3QeDbFpKk0uQqB/cF78+Ul7D3DhvQPlV5Q= +github.com/flyteorg/flyteidl v0.18.51/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= @@ -309,8 +308,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.2 h1:D0EVSTwQoQOyfY35QNSuPJA4jpZRtkoGYWQMB7XNg5o= -github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -681,7 +680,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -902,7 +900,6 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -918,6 +915,7 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/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= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -944,7 +942,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -955,6 +952,7 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= From fdd1b15a6414be9e5dd28164a486ec8982be85f4 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Fri, 4 Jun 2021 01:49:32 +0530 Subject: [PATCH 058/356] Added error data and abort data in get execution output (#79) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/get/execution.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 3f378b6c1d..e77bea6f61 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -53,6 +53,8 @@ var executionColumns = []printer.Column{ {Header: "Phase", JSONPath: "$.closure.phase"}, {Header: "Started", JSONPath: "$.closure.startedAt"}, {Header: "Elapsed Time", JSONPath: "$.closure.duration"}, + {Header: "Abort data", JSONPath: "$.closure.abortMetadata[\"cause\"]"}, + {Header: "Error data", JSONPath: "$.closure.error[\"message\"]"}, } func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { From 2d2c145d52f4c5e82a48b89bce3a3dac04a2aa24 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 5 Jun 2021 10:25:23 +0530 Subject: [PATCH 059/356] Added filters flag (#82) --- flytectl/cmd/config/config_flags.go | 11 +- flytectl/cmd/config/config_flags_test.go | 28 ++- .../subcommand/execution/config_flags.go | 58 ++++++ .../subcommand/execution/config_flags_test.go | 158 ++++++++++++++++ .../subcommand/execution/execution_config.go | 17 ++ .../subcommand/launchplan/config_flags.go | 62 +++++++ .../launchplan/config_flags_test.go} | 110 ++++++++---- .../launchplan/launchplan_config.go | 20 +++ .../config/subcommand/project/config_flags.go | 58 ++++++ .../subcommand/project/config_flags_test.go | 158 ++++++++++++++++ .../subcommand/project/project_config.go | 17 ++ .../config/subcommand/task/config_flags.go | 62 +++++++ .../subcommand/task/config_flags_test.go} | 110 ++++++++---- .../cmd/config/subcommand/task/task_config.go | 18 ++ .../subcommand/workflow/config_flags.go | 18 +- .../subcommand/workflow/config_flags_test.go | 70 ++++++-- .../subcommand/workflow/workflow_config.go | 11 +- flytectl/cmd/get/execution.go | 32 ++-- flytectl/cmd/get/get.go | 12 +- flytectl/cmd/get/launch_plan.go | 74 +++++--- flytectl/cmd/get/launch_plan_test.go | 86 ++++----- flytectl/cmd/get/launchplanconfig_flags.go | 48 ----- flytectl/cmd/get/named_entity.go | 11 -- flytectl/cmd/get/project.go | 21 ++- flytectl/cmd/get/project_test.go | 83 +++++++++ flytectl/cmd/get/task.go | 58 +++--- flytectl/cmd/get/task_test.go | 121 ++++++++----- flytectl/cmd/get/taskconfig_flags.go | 48 ----- flytectl/cmd/get/workflow.go | 45 ++++- flytectl/cmd/get/workflow_test.go | 59 +++++- flytectl/docs/source/gen/flytectl.rst | 2 - flytectl/docs/source/gen/flytectl_config.rst | 2 - .../source/gen/flytectl_config_discover.rst | 2 - .../source/gen/flytectl_config_validate.rst | 2 - flytectl/docs/source/gen/flytectl_create.rst | 2 - .../source/gen/flytectl_create_execution.rst | 2 - .../source/gen/flytectl_create_project.rst | 2 - flytectl/docs/source/gen/flytectl_delete.rst | 2 - ...ectl_delete_cluster-resource-attribute.rst | 2 - ...lytectl_delete_execution-cluster-label.rst | 2 - ...tectl_delete_execution-queue-attribute.rst | 2 - .../source/gen/flytectl_delete_execution.rst | 2 - .../gen/flytectl_delete_plugin-override.rst | 2 - ...lytectl_delete_task-resource-attribute.rst | 2 - flytectl/docs/source/gen/flytectl_get.rst | 2 - ...lytectl_get_cluster-resource-attribute.rst | 2 - .../flytectl_get_execution-cluster-label.rst | 2 - ...flytectl_get_execution-queue-attribute.rst | 2 - .../source/gen/flytectl_get_execution.rst | 25 ++- .../source/gen/flytectl_get_launchplan.rst | 32 +++- .../gen/flytectl_get_plugin-override.rst | 2 - .../docs/source/gen/flytectl_get_project.rst | 19 +- .../flytectl_get_task-resource-attribute.rst | 2 - .../docs/source/gen/flytectl_get_task.rst | 33 ++-- .../docs/source/gen/flytectl_get_workflow.rst | 26 ++- .../docs/source/gen/flytectl_register.rst | 2 - .../source/gen/flytectl_register_files.rst | 2 - flytectl/docs/source/gen/flytectl_update.rst | 2 - ...ectl_update_cluster-resource-attribute.rst | 2 - ...lytectl_update_execution-cluster-label.rst | 2 - ...tectl_update_execution-queue-attribute.rst | 2 - .../source/gen/flytectl_update_launchplan.rst | 2 - .../gen/flytectl_update_plugin-override.rst | 2 - .../source/gen/flytectl_update_project.rst | 2 - ...lytectl_update_task-resource-attribute.rst | 2 - .../docs/source/gen/flytectl_update_task.rst | 2 - .../source/gen/flytectl_update_workflow.rst | 2 - flytectl/docs/source/gen/flytectl_version.rst | 2 - flytectl/pkg/ext/deleter_test.go | 17 ++ flytectl/pkg/ext/fetcher.go | 14 +- flytectl/pkg/ext/fetcher_test.go | 17 ++ flytectl/pkg/ext/launch_plan_fetcher.go | 25 ++- flytectl/pkg/ext/launch_plan_fetcher_test.go | 32 +++- .../ext/mocks/admin_fetcher_ext_interface.go | 110 ++++++------ flytectl/pkg/ext/task_fetcher.go | 25 ++- flytectl/pkg/ext/task_fetcher_test.go | 34 +++- flytectl/pkg/ext/updater_test.go | 17 ++ flytectl/pkg/ext/workflow_fetcher.go | 25 ++- flytectl/pkg/ext/workflow_fetcher_test.go | 14 +- flytectl/pkg/filters/coverage.out | 68 +++++++ flytectl/pkg/filters/filters.go | 168 ++++++++++++++++++ flytectl/pkg/filters/filters_test.go | 73 ++++++++ flytectl/pkg/filters/operator.go | 12 ++ flytectl/pkg/filters/type.go | 17 ++ flytectl/pkg/filters/util.go | 54 ++++++ flytectl/pkg/filters/util_test.go | 111 ++++++++++++ 86 files changed, 2094 insertions(+), 624 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/execution/config_flags.go create mode 100755 flytectl/cmd/config/subcommand/execution/config_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/execution/execution_config.go create mode 100755 flytectl/cmd/config/subcommand/launchplan/config_flags.go rename flytectl/cmd/{get/taskconfig_flags_test.go => config/subcommand/launchplan/config_flags_test.go} (55%) create mode 100644 flytectl/cmd/config/subcommand/launchplan/launchplan_config.go create mode 100755 flytectl/cmd/config/subcommand/project/config_flags.go create mode 100755 flytectl/cmd/config/subcommand/project/config_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/project/project_config.go create mode 100755 flytectl/cmd/config/subcommand/task/config_flags.go rename flytectl/cmd/{get/launchplanconfig_flags_test.go => config/subcommand/task/config_flags_test.go} (55%) create mode 100644 flytectl/cmd/config/subcommand/task/task_config.go delete mode 100755 flytectl/cmd/get/launchplanconfig_flags.go delete mode 100644 flytectl/cmd/get/named_entity.go create mode 100644 flytectl/cmd/get/project_test.go delete mode 100755 flytectl/cmd/get/taskconfig_flags.go create mode 100644 flytectl/pkg/ext/deleter_test.go create mode 100644 flytectl/pkg/ext/fetcher_test.go create mode 100644 flytectl/pkg/ext/updater_test.go create mode 100644 flytectl/pkg/filters/coverage.out create mode 100644 flytectl/pkg/filters/filters.go create mode 100644 flytectl/pkg/filters/filters_test.go create mode 100644 flytectl/pkg/filters/operator.go create mode 100644 flytectl/pkg/filters/type.go create mode 100644 flytectl/pkg/filters/util.go create mode 100644 flytectl/pkg/filters/util_test.go diff --git a/flytectl/cmd/config/config_flags.go b/flytectl/cmd/config/config_flags.go index 2722dde8f8..3a1616b7e6 100755 --- a/flytectl/cmd/config/config_flags.go +++ b/flytectl/cmd/config/config_flags.go @@ -28,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (Config) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -43,6 +52,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.String(fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Domain, "Specified the output type.") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Output, "Specified the output type.") return cmdFlags } diff --git a/flytectl/cmd/config/config_flags_test.go b/flytectl/cmd/config/config_flags_test.go index 1297f83032..88446ff3e3 100755 --- a/flytectl/cmd/config/config_flags_test.go +++ b/flytectl/cmd/config/config_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_Config(t *testing.T, val, result interface{}) { assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_Config(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_project", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("project"); err == nil { - assert.Equal(t, string(defaultConfig.Project), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,21 +114,27 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_domain", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("domain", testValue) if vString, err := cmdFlags.GetString("domain"); err == nil { - assert.Equal(t, string(defaultConfig.Domain), vString) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Domain) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_output", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("domain", testValue) - if vString, err := cmdFlags.GetString("domain"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Domain) + cmdFlags.Set("output", testValue) + if vString, err := cmdFlags.GetString("output"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Output) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/execution/config_flags.go b/flytectl/cmd/config/subcommand/execution/config_flags.go new file mode 100755 index 0000000000..5fcc9b332c --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/config_flags.go @@ -0,0 +1,58 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") + cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") + cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") + cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/execution/config_flags_test.go b/flytectl/cmd/config/subcommand/execution/config_flags_test.go new file mode 100755 index 0000000000..7be80b6d67 --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/config_flags_test.go @@ -0,0 +1,158 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_filter.field-selector", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.field-selector", testValue) + if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.sort-by", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.sort-by", testValue) + if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.limit", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.limit", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.limit"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Limit) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.asc", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.asc", testValue) + if vBool, err := cmdFlags.GetBool("filter.asc"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Filter.Asc) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/execution/execution_config.go b/flytectl/cmd/config/subcommand/execution/execution_config.go new file mode 100644 index 0000000000..b0737aee64 --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/execution_config.go @@ -0,0 +1,17 @@ +package execution + +import ( + "github.com/flyteorg/flytectl/pkg/filters" +) + +//go:generate pflags Config --default-var DefaultConfig +var ( + DefaultConfig = &Config{ + Filter: filters.DefaultFilter, + } +) + +// Config +type Config struct { + Filter filters.Filters `json:"filter" pflag:","` +} diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags.go b/flytectl/cmd/config/subcommand/launchplan/config_flags.go new file mode 100755 index 0000000000..db572d98ea --- /dev/null +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags.go @@ -0,0 +1,62 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package launchplan + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") + cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the launchplan to be fetched.") + cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + + cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") + cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") + cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") + cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + return cmdFlags +} diff --git a/flytectl/cmd/get/taskconfig_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go similarity index 55% rename from flytectl/cmd/get/taskconfig_flags_test.go rename to flytectl/cmd/config/subcommand/launchplan/config_flags_test.go index b945e78619..ec536464bc 100755 --- a/flytectl/cmd/get/taskconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package get +package launchplan import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsTaskConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementTaskConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsTaskConfig[t] +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookTaskConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementTaskConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookTaskConfig(_, to reflect.Type, data interface{}) (interf return data, nil } -func decode_TaskConfig(input, result interface{}) error { +func decode_Config(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_TaskConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookTaskConfig, + jsonUnmarshalerHookConfig, ), } @@ -70,7 +70,7 @@ func decode_TaskConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_TaskConfig(arr interface{}, sep string) string { +func join_Config(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,85 +80,117 @@ func join_TaskConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_TaskConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_TaskConfig(val, result)) +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_TaskConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_TaskConfig(vStringSlice, result)) +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) } -func TestTaskConfig_GetPFlagSet(t *testing.T) { - val := TaskConfig{} +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestTaskConfig_SetFlags(t *testing.T) { - actual := TaskConfig{} +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) t.Run("Test_execFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("execFile", testValue) if vString, err := cmdFlags.GetString("execFile"); err == nil { - assert.Equal(t, string(taskConfig.ExecFile), vString) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_version", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("execFile", testValue) - if vString, err := cmdFlags.GetString("execFile"); err == nil { - testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Version) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_version", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string(taskConfig.Version), vString) + t.Run("Test_latest", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Latest) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_filter.field-selector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("version", testValue) - if vString, err := cmdFlags.GetString("version"); err == nil { - testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + cmdFlags.Set("filter.field-selector", testValue) + if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_latest", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("latest"); err == nil { - assert.Equal(t, bool(taskConfig.Latest), vBool) + t.Run("Test_filter.sort-by", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.sort-by", testValue) + if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_filter.limit", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("latest", testValue) - if vBool, err := cmdFlags.GetBool("latest"); err == nil { - testDecodeJson_TaskConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + cmdFlags.Set("filter.limit", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.limit"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Limit) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.asc", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.asc", testValue) + if vBool, err := cmdFlags.GetBool("filter.asc"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Filter.Asc) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go new file mode 100644 index 0000000000..5e245deb48 --- /dev/null +++ b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go @@ -0,0 +1,20 @@ +package launchplan + +import ( + "github.com/flyteorg/flytectl/pkg/filters" +) + +//go:generate pflags Config --default-var DefaultConfig +var ( + DefaultConfig = &Config{ + Filter: filters.DefaultFilter, + } +) + +// Config +type Config struct { + ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single launchplan."` + Version string `json:"version" pflag:",version of the launchplan to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` + Filter filters.Filters `json:"filter" pflag:","` +} diff --git a/flytectl/cmd/config/subcommand/project/config_flags.go b/flytectl/cmd/config/subcommand/project/config_flags.go new file mode 100755 index 0000000000..3a3e9bb5df --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/config_flags.go @@ -0,0 +1,58 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package project + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") + cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") + cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") + cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/project/config_flags_test.go b/flytectl/cmd/config/subcommand/project/config_flags_test.go new file mode 100755 index 0000000000..50fcfad9d2 --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/config_flags_test.go @@ -0,0 +1,158 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package project + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_filter.field-selector", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.field-selector", testValue) + if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.sort-by", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.sort-by", testValue) + if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.limit", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.limit", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.limit"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Limit) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.asc", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.asc", testValue) + if vBool, err := cmdFlags.GetBool("filter.asc"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Filter.Asc) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go new file mode 100644 index 0000000000..e5a7850595 --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -0,0 +1,17 @@ +package project + +import ( + "github.com/flyteorg/flytectl/pkg/filters" +) + +//go:generate pflags Config --default-var DefaultConfig +var ( + DefaultConfig = &Config{ + Filter: filters.DefaultFilter, + } +) + +// Config +type Config struct { + Filter filters.Filters `json:"filter" pflag:","` +} diff --git a/flytectl/cmd/config/subcommand/task/config_flags.go b/flytectl/cmd/config/subcommand/task/config_flags.go new file mode 100755 index 0000000000..4c48a38e6c --- /dev/null +++ b/flytectl/cmd/config/subcommand/task/config_flags.go @@ -0,0 +1,62 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package task + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&(DefaultConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") + cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the task to be fetched.") + cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") + + cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") + cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") + cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") + cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + return cmdFlags +} diff --git a/flytectl/cmd/get/launchplanconfig_flags_test.go b/flytectl/cmd/config/subcommand/task/config_flags_test.go similarity index 55% rename from flytectl/cmd/get/launchplanconfig_flags_test.go rename to flytectl/cmd/config/subcommand/task/config_flags_test.go index 2b9271b278..bea2ff142e 100755 --- a/flytectl/cmd/get/launchplanconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/task/config_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package get +package task import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsLaunchPlanConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementLaunchPlanConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsLaunchPlanConfig[t] +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookLaunchPlanConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementLaunchPlanConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookLaunchPlanConfig(_, to reflect.Type, data interface{}) ( return data, nil } -func decode_LaunchPlanConfig(input, result interface{}) error { +func decode_Config(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_LaunchPlanConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookLaunchPlanConfig, + jsonUnmarshalerHookConfig, ), } @@ -70,7 +70,7 @@ func decode_LaunchPlanConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_LaunchPlanConfig(arr interface{}, sep string) string { +func join_Config(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,85 +80,117 @@ func join_LaunchPlanConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_LaunchPlanConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_LaunchPlanConfig(val, result)) +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_LaunchPlanConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_LaunchPlanConfig(vStringSlice, result)) +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) } -func TestLaunchPlanConfig_GetPFlagSet(t *testing.T) { - val := LaunchPlanConfig{} +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestLaunchPlanConfig_SetFlags(t *testing.T) { - actual := LaunchPlanConfig{} +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) t.Run("Test_execFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("execFile", testValue) if vString, err := cmdFlags.GetString("execFile"); err == nil { - assert.Equal(t, string(launchPlanConfig.ExecFile), vString) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_version", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("execFile", testValue) - if vString, err := cmdFlags.GetString("execFile"); err == nil { - testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vString), &actual.ExecFile) + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Version) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_version", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string(launchPlanConfig.Version), vString) + t.Run("Test_latest", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) + if vBool, err := cmdFlags.GetBool("latest"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Latest) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_filter.field-selector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("version", testValue) - if vString, err := cmdFlags.GetString("version"); err == nil { - testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + cmdFlags.Set("filter.field-selector", testValue) + if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_latest", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("latest"); err == nil { - assert.Equal(t, bool(launchPlanConfig.Latest), vBool) + t.Run("Test_filter.sort-by", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.sort-by", testValue) + if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_filter.limit", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("latest", testValue) - if vBool, err := cmdFlags.GetBool("latest"); err == nil { - testDecodeJson_LaunchPlanConfig(t, fmt.Sprintf("%v", vBool), &actual.Latest) + cmdFlags.Set("filter.limit", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.limit"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Limit) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.asc", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.asc", testValue) + if vBool, err := cmdFlags.GetBool("filter.asc"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Filter.Asc) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/task/task_config.go b/flytectl/cmd/config/subcommand/task/task_config.go new file mode 100644 index 0000000000..241a1c1fab --- /dev/null +++ b/flytectl/cmd/config/subcommand/task/task_config.go @@ -0,0 +1,18 @@ +package task + +import "github.com/flyteorg/flytectl/pkg/filters" + +//go:generate pflags Config --default-var DefaultConfig +var ( + DefaultConfig = &Config{ + Filter: filters.DefaultFilter, + } +) + +// Config +type Config struct { + ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single task."` + Version string `json:"version" pflag:",version of the task to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` + Filter filters.Filters `json:"filter" pflag:","` +} diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags.go b/flytectl/cmd/config/subcommand/workflow/config_flags.go index 3db237e852..61f6245c05 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags.go @@ -28,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (Config) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,7 +50,12 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the workflow to be fetched.") - cmdFlags.BoolVar(&(DefaultConfig.Latest),fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), *new(string), "version of the workflow to be fetched.") + cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), *new(bool), " flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") + cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") + cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") + cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go index e3d3eae412..86998d7788 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_Config(t *testing.T, val, result interface{}) { assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_Config(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_version", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("version"); err == nil { - assert.Equal(t, string(DefaultConfig.Version), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,21 +114,69 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_latest", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("latest", testValue) if vBool, err := cmdFlags.GetBool("latest"); err == nil { - assert.Equal(t, bool(DefaultConfig.Latest), vBool) + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Latest) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_filter.field-selector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("latest", testValue) - if vBool, err := cmdFlags.GetBool("latest"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Latest) + cmdFlags.Set("filter.field-selector", testValue) + if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.sort-by", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.sort-by", testValue) + if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.limit", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.limit", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.limit"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Limit) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_filter.asc", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.asc", testValue) + if vBool, err := cmdFlags.GetBool("filter.asc"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Filter.Asc) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/workflow/workflow_config.go b/flytectl/cmd/config/subcommand/workflow/workflow_config.go index d4890f84c2..8051d4547f 100644 --- a/flytectl/cmd/config/subcommand/workflow/workflow_config.go +++ b/flytectl/cmd/config/subcommand/workflow/workflow_config.go @@ -1,13 +1,18 @@ package workflow +import "github.com/flyteorg/flytectl/pkg/filters" + //go:generate pflags Config --default-var DefaultConfig var ( - DefaultConfig = &Config{} + DefaultConfig = &Config{ + Filter: filters.DefaultFilter, + } ) // Config commandline configuration type Config struct { - Version string `json:"version" pflag:",version of the workflow to be fetched."` - Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` + Version string `json:"version" pflag:",version of the workflow to be fetched."` + Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` + Filter filters.Filters `json:"filter" pflag:","` } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index e77bea6f61..73c2e36b78 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -3,7 +3,10 @@ package get import ( "context" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -25,10 +28,17 @@ Retrieves execution by name within project and domain. bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieves execution by filters +Retrieves all the executions with filters. :: + + bin/flytectl get execution -p flytesnacks -d development --filter.field-selector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" - Not yet implemented + +Retrieves all the execution with limit and sorting. +:: + + bin/flytectl get execution -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + Retrieves all the execution within project and domain in yaml format @@ -76,23 +86,17 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command } executions = append(executions, execution) } else { - executionList, err := cmdCtx.AdminClient().ListExecutions(ctx, &admin.ResourceListRequest{ - Limit: 100, - Id: &admin.NamedEntityIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - }, - }) + transformFilters, err := filters.BuildResourceListRequestWithName(execution.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") + if err != nil { + return err + } + executionList, err := cmdCtx.AdminClient().ListExecutions(ctx, transformFilters) if err != nil { return err } executions = executionList.Executions } logger.Infof(ctx, "Retrieved %v executions", len(executions)) - err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) - if err != nil { - return err - } - return nil } diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index b78bc4f67d..6b3b077794 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -2,9 +2,13 @@ package get import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + "github.com/flyteorg/flytectl/cmd/config/subcommand/task" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" cmdcore "github.com/flyteorg/flytectl/cmd/core" @@ -34,15 +38,15 @@ func CreateGetCommand() *cobra.Command { getResourcesFuncs := map[string]cmdcore.CommandEntry{ "project": {CmdFunc: getProjectsFunc, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, Short: projectShort, - Long: projectLong}, + Long: projectLong, PFlagProvider: project.DefaultConfig}, "task": {CmdFunc: getTaskFunc, Aliases: []string{"tasks"}, Short: taskShort, - Long: taskLong, PFlagProvider: taskConfig}, + Long: taskLong, PFlagProvider: task.DefaultConfig}, "workflow": {CmdFunc: getWorkflowFunc, Aliases: []string{"workflows"}, Short: workflowShort, Long: workflowLong, PFlagProvider: workflow.DefaultConfig}, "launchplan": {CmdFunc: getLaunchPlanFunc, Aliases: []string{"launchplans"}, Short: launchPlanShort, - Long: launchPlanLong, PFlagProvider: launchPlanConfig}, + Long: launchPlanLong, PFlagProvider: launchplan.DefaultConfig}, "execution": {CmdFunc: getExecutionFunc, Aliases: []string{"executions"}, Short: executionShort, - Long: executionLong}, + Long: executionLong, PFlagProvider: execution.DefaultConfig}, "task-resource-attribute": {CmdFunc: getTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, PFlagProvider: taskresourceattribute.DefaultFetchConfig}, diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 22ff6660fe..994f0d84f2 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -3,14 +3,15 @@ package get import ( "context" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/adminutils" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" - "github.com/golang/protobuf/proto" ) @@ -41,10 +42,22 @@ Retrieves particular version of launchplan by name within project and domain. flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves launchplan by filters. +Retrieves all the launch plans with filters. :: - - Not yet implemented + + bin/flytectl get launchplan -p flytesnacks -d development --filter.field-selector="name=core.basic.lp.go_greet" + +Retrieves launch plans entity search across all versions with filters. +:: + + bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="version=v1" + + +Retrieves all the launch plans with limit and sorting. +:: + + bin/flytectl get launchplan -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + Retrieves all the launchplan within project and domain in yaml format. @@ -86,18 +99,7 @@ Usage ` ) -//go:generate pflags LaunchPlanConfig --default-var launchPlanConfig -var ( - launchPlanConfig = &LaunchPlanConfig{} -) - -// LaunchPlanConfig -type LaunchPlanConfig struct { - ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single launchplan."` - Version string `json:"version" pflag:",version of the launchplan to be fetched."` - Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` -} - +// Column structure for get specific launchplan var launchplanColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -106,6 +108,14 @@ var launchplanColumns = []printer.Column{ {Header: "Schedule", JSONPath: "$.spec.entityMetadata.schedule"}, } +// Column structure for get all launchplans +var launchplansColumns = []printer.Column{ + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Type", JSONPath: "$.id.resourceType"}, + {Header: "CreatedAt", JSONPath: "$.closure.createdAt"}, +} + func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { @@ -133,15 +143,21 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman } return nil } - - launchPlans, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListLaunchPlanIds, - adminutils.ListRequest{Project: project, Domain: domain}) + transformFilters, err := filters.BuildResourceListRequestWithName(launchplan.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") + if err != nil { + return err + } + launchPlanList, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, transformFilters) + if err != nil { + return err + } + launchPlans := launchPlanList.LaunchPlans if err != nil { return err } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) - return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, - adminutils.NamedEntityToProtoMessage(launchPlans)...) + return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplansColumns, + LaunchplanToProtoMessages(launchPlans)...) } // FetchLPForName fetches the launchplan give it name. @@ -150,28 +166,28 @@ func FetchLPForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, n var launchPlans []*admin.LaunchPlan var lp *admin.LaunchPlan var err error - if launchPlanConfig.Latest { - if lp, err = fetcher.FetchLPLatestVersion(ctx, name, project, domain); err != nil { + if launchplan.DefaultConfig.Latest { + if lp, err = fetcher.FetchLPLatestVersion(ctx, name, project, domain, launchplan.DefaultConfig.Filter); err != nil { return nil, err } launchPlans = append(launchPlans, lp) - } else if launchPlanConfig.Version != "" { - if lp, err = fetcher.FetchLPVersion(ctx, name, launchPlanConfig.Version, project, domain); err != nil { + } else if launchplan.DefaultConfig.Version != "" { + if lp, err = fetcher.FetchLPVersion(ctx, name, launchplan.DefaultConfig.Version, project, domain); err != nil { return nil, err } launchPlans = append(launchPlans, lp) } else { - launchPlans, err = fetcher.FetchAllVerOfLP(ctx, name, project, domain) + launchPlans, err = fetcher.FetchAllVerOfLP(ctx, name, project, domain, launchplan.DefaultConfig.Filter) if err != nil { return nil, err } } - if launchPlanConfig.ExecFile != "" { + if launchplan.DefaultConfig.ExecFile != "" { // There would be atleast one launchplan object when code reaches here and hence the length // assertion is not required. lp = launchPlans[0] // Only write the first task from the tasks object. - if err = CreateAndWriteExecConfigForWorkflow(lp, launchPlanConfig.ExecFile); err != nil { + if err = CreateAndWriteExecConfigForWorkflow(lp, launchplan.DefaultConfig.ExecFile); err != nil { return nil, err } } diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 5933746acb..9757a35c1d 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,6 +5,9 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/pkg/filters" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" @@ -18,6 +21,7 @@ import ( var ( resourceListRequest *admin.ResourceListRequest + resourceGetRequest *admin.ResourceListRequest objectGetRequest *admin.ObjectGetRequest namedIDRequest *admin.NamedEntityIdentifierListRequest launchPlanListResponse *admin.LaunchPlanList @@ -121,13 +125,15 @@ func getLaunchPlanSetup() { Id: &admin.NamedEntityIdentifier{ Project: projectValue, Domain: domainValue, - Name: argsLp[0], }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, + } + + resourceGetRequest = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: argsLp[0], }, - Limit: 100, } launchPlanListResponse = &admin.LaunchPlanList{ @@ -147,11 +153,6 @@ func getLaunchPlanSetup() { namedIDRequest = &admin.NamedEntityIdentifierListRequest{ Project: projectValue, Domain: domainValue, - SortBy: &admin.Sort{ - Key: "name", - Direction: admin.Sort_ASCENDING, - }, - Limit: 100, } var entities []*admin.NamedEntityIdentifier @@ -170,9 +171,10 @@ func getLaunchPlanSetup() { Entities: entities, } - launchPlanConfig.Latest = false - launchPlanConfig.Version = "" - launchPlanConfig.ExecFile = "" + launchplan.DefaultConfig.Latest = false + launchplan.DefaultConfig.Version = "" + launchplan.DefaultConfig.ExecFile = "" + launchplan.DefaultConfig.Filter = filters.Filters{} } func TestGetLaunchPlanFuncWithError(t *testing.T) { @@ -180,9 +182,10 @@ func TestGetLaunchPlanFuncWithError(t *testing.T) { setup() getLaunchPlanSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - launchPlanConfig.Latest = true + launchplan.DefaultConfig.Latest = true + launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchLPLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -191,7 +194,8 @@ func TestGetLaunchPlanFuncWithError(t *testing.T) { setup() getLaunchPlanSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - launchPlanConfig.Version = "v1" + launchplan.DefaultConfig.Version = "v1" + launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchLPVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) @@ -201,9 +205,11 @@ func TestGetLaunchPlanFuncWithError(t *testing.T) { t.Run("failure fetching all version ", func(t *testing.T) { setup() getLaunchPlanSetup() + launchplan.DefaultConfig.Filter = filters.Filters{} + launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher := new(mocks.AdminFetcherExtInterface) mockFetcher.OnFetchAllVerOfLPMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -211,23 +217,32 @@ func TestGetLaunchPlanFuncWithError(t *testing.T) { t.Run("failure fetching ", func(t *testing.T) { setup() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(nil, fmt.Errorf("error fetching all version")) + mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(nil, fmt.Errorf("error fetching all version")) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(nil, fmt.Errorf("error fetching lanuch plan")) mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(nil, fmt.Errorf("error listing lanuch plan ids")) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.NotNil(t, err) }) + + t.Run("failure fetching list", func(t *testing.T) { + setup() + getLaunchPlanSetup() + argsLp = []string{} + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(nil, fmt.Errorf("error fetching all version")) + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.NotNil(t, err) + }) } func TestGetLaunchPlanFunc(t *testing.T) { setup() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) + mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) tearDownAndVerify(t, `[ { "id": { @@ -393,13 +408,13 @@ func TestGetLaunchPlanFunc(t *testing.T) { func TestGetLaunchPlanFuncLatest(t *testing.T) { setup() getLaunchPlanSetup() - launchPlanConfig.Latest = true - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + launchplan.DefaultConfig.Latest = true + launchplan.DefaultConfig.Filter = filters.Filters{} + mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceListRequest) + mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) tearDownAndVerify(t, `{ "id": { "name": "launchplan1", @@ -484,7 +499,7 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { func TestGetLaunchPlanWithVersion(t *testing.T) { setup() getLaunchPlanSetup() - launchPlanConfig.Version = "v2" + launchplan.DefaultConfig.Version = "v2" mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) @@ -577,23 +592,10 @@ func TestGetLaunchPlans(t *testing.T) { getLaunchPlanSetup() mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) argsLp = []string{} err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlanIds", ctx, namedIDRequest) - tearDownAndVerify(t, `[ - { - "project": "dummyProject", - "domain": "dummyDomain", - "name": "launchplan1" - }, - { - "project": "dummyProject", - "domain": "dummyDomain", - "name": "launchplan2" - } -]`) + tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlansWithExecFile(t *testing.T) { @@ -602,10 +604,10 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) - launchPlanConfig.Version = "v2" - launchPlanConfig.ExecFile = testDataFolder + "exec_file" + launchplan.DefaultConfig.Version = "v2" + launchplan.DefaultConfig.ExecFile = testDataFolder + "exec_file" err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) - os.Remove(launchPlanConfig.ExecFile) + os.Remove(launchplan.DefaultConfig.ExecFile) assert.Nil(t, err) mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) tearDownAndVerify(t, `{ diff --git a/flytectl/cmd/get/launchplanconfig_flags.go b/flytectl/cmd/get/launchplanconfig_flags.go deleted file mode 100755 index f4e37ea0c4..0000000000 --- a/flytectl/cmd/get/launchplanconfig_flags.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package get - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (LaunchPlanConfig) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (LaunchPlanConfig) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in LaunchPlanConfig and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg LaunchPlanConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("LaunchPlanConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(launchPlanConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), launchPlanConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") - cmdFlags.StringVar(&(launchPlanConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), launchPlanConfig.Version, "version of the launchplan to be fetched.") - cmdFlags.BoolVar(&(launchPlanConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), launchPlanConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") - return cmdFlags -} diff --git a/flytectl/cmd/get/named_entity.go b/flytectl/cmd/get/named_entity.go deleted file mode 100644 index 617542f5ec..0000000000 --- a/flytectl/cmd/get/named_entity.go +++ /dev/null @@ -1,11 +0,0 @@ -package get - -import ( - "github.com/flyteorg/flytectl/pkg/printer" -) - -var entityColumns = []printer.Column{ - {Header: "Domain", JSONPath: "$.domain"}, - {Header: "Name", JSONPath: "$.name"}, - {Header: "Project", JSONPath: "$.project"}, -} diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 0fa2f70450..535cb16af4 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -3,6 +3,10 @@ package get import ( "context" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" @@ -26,10 +30,15 @@ Retrieves project by name bin/flytectl get project flytesnacks -Retrieves project by filters +Retrieves all the projects with filters. :: - - Not yet implemented + + bin/flytectl get project --filter.field-selector="project.name=flytesnacks" + +Retrieves all the projects with limit and sorting. +:: + + bin/flytectl get project --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the projects in yaml format @@ -63,7 +72,11 @@ func ProjectToProtoMessages(l []*admin.Project) []proto.Message { func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} - projects, err := cmdCtx.AdminClient().ListProjects(ctx, &admin.ProjectListRequest{}) + transformFilters, err := filters.BuildProjectListRequest(project.DefaultConfig.Filter) + if err != nil { + return err + } + projects, err := cmdCtx.AdminClient().ListProjects(ctx, transformFilters) if err != nil { return err } diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go new file mode 100644 index 0000000000..2419ceda6c --- /dev/null +++ b/flytectl/cmd/get/project_test.go @@ -0,0 +1,83 @@ +package get + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" +) + +var ( + resourceListRequestProject *admin.ProjectListRequest + projectListResponse *admin.Projects + argsProject []string + project1 *admin.Project +) + +func getProjectSetup() { + argsProject = []string{"flyteexample"} + resourceListRequestProject = &admin.ProjectListRequest{} + + project1 = &admin.Project{ + Id: "flyteexample", + Name: "flyteexample", + Domains: []*admin.Domain{ + { + Id: "development", + Name: "development", + }, + }, + } + + project2 := &admin.Project{ + Id: "flytesnacks", + Name: "flytesnacks", + Domains: []*admin.Domain{ + { + Id: "development", + Name: "development", + }, + }, + } + + projects := []*admin.Project{project1, project2} + + projectListResponse = &admin.Projects{ + Projects: projects, + } +} + +func TestProjectFunc(t *testing.T) { + setup() + getProjectSetup() + project.DefaultConfig.Filter = filters.Filters{} + mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) + err = getProjectsFunc(ctx, argsProject, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListProjects", ctx, resourceListRequestProject) +} + +func TestGetProjectFunc(t *testing.T) { + setup() + getProjectSetup() + project.DefaultConfig.Filter = filters.Filters{} + mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) + err = getProjectsFunc(ctx, argsProject, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListProjects", ctx, resourceListRequestProject) +} + +func TestGetProjectFuncError(t *testing.T) { + setup() + getProjectSetup() + project.DefaultConfig.Filter = filters.Filters{ + FieldSelector: "hello=", + } + mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(nil, fmt.Errorf("Please add a valid field selector")) + err = getProjectsFunc(ctx, argsProject, cmdCtx) + assert.NotNil(t, err) +} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index eb40e9cb23..fd02d17b40 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -4,9 +4,10 @@ import ( "context" "github.com/flyteorg/flytectl/cmd/config" + taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/adminutils" "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" @@ -38,15 +39,24 @@ Retrieves particular version of task by name within project and domain. :: - flytectl get workflow -p flytesnacks -d development core.basic.lp.greet --version v2 + flytectl get task -p flytesnacks -d development core.basic.lp.greet --version v2 -Retrieves project by filters. +Retrieves all the tasks with filters. :: - - Not yet implemented + + bin/flytectl get task -p flytesnacks -d development --filter.field-selector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + +Retrieve a specific task with filters. +:: + + bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.field-selector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + +Retrieves all the task with limit and sorting. +:: + + bin/flytectl get -p flytesnacks -d development task --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the tasks within project and domain in yaml format. - :: bin/flytectl get task -p flytesnacks -d development -o yaml @@ -85,18 +95,6 @@ Usage ` ) -//go:generate pflags TaskConfig --default-var taskConfig -var ( - taskConfig = &TaskConfig{} -) - -// FilesConfig -type TaskConfig struct { - ExecFile string `json:"execFile" pflag:",execution file name to be used for generating execution spec of a single task."` - Version string `json:"version" pflag:",version of the task to be fetched."` - Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` -} - var taskColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -128,12 +126,18 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte logger.Debugf(ctx, "Retrieved Task", tasks) return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } - tasks, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListTaskIds, adminutils.ListRequest{Project: project, Domain: domain}) + transformFilters, err := filters.BuildResourceListRequestWithName(taskConfig.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") + if err != nil { + return err + } + taskList, err := cmdCtx.AdminClient().ListTasks(ctx, transformFilters) if err != nil { return err } + tasks := taskList.Tasks + logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) - return taskPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(tasks)...) + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } // FetchTaskForName Reads the task config to drive fetching the correct tasks. @@ -141,27 +145,27 @@ func FetchTaskForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, var tasks []*admin.Task var err error var task *admin.Task - if taskConfig.Latest { - if task, err = fetcher.FetchTaskLatestVersion(ctx, name, project, domain); err != nil { + if taskConfig.DefaultConfig.Latest { + if task, err = fetcher.FetchTaskLatestVersion(ctx, name, project, domain, taskConfig.DefaultConfig.Filter); err != nil { return nil, err } tasks = append(tasks, task) - } else if taskConfig.Version != "" { - if task, err = fetcher.FetchTaskVersion(ctx, name, taskConfig.Version, project, domain); err != nil { + } else if taskConfig.DefaultConfig.Version != "" { + if task, err = fetcher.FetchTaskVersion(ctx, name, taskConfig.DefaultConfig.Version, project, domain); err != nil { return nil, err } tasks = append(tasks, task) } else { - tasks, err = fetcher.FetchAllVerOfTask(ctx, name, project, domain) + tasks, err = fetcher.FetchAllVerOfTask(ctx, name, project, domain, taskConfig.DefaultConfig.Filter) if err != nil { return nil, err } } - if taskConfig.ExecFile != "" { + if taskConfig.DefaultConfig.ExecFile != "" { // There would be atleast one task object when code reaches here and hence the length assertion is not required. task = tasks[0] // Only write the first task from the tasks object. - if err = CreateAndWriteExecConfigForTask(task, taskConfig.ExecFile); err != nil { + if err = CreateAndWriteExecConfigForTask(task, taskConfig.DefaultConfig.ExecFile); err != nil { return nil, err } } diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 7164840518..b72545487d 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,6 +5,10 @@ import ( "os" "testing" + taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" + + "github.com/flyteorg/flytectl/pkg/filters" + cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" @@ -17,13 +21,17 @@ import ( ) var ( - resourceListRequestTask *admin.ResourceListRequest - objectGetRequestTask *admin.ObjectGetRequest - namedIDRequestTask *admin.NamedEntityIdentifierListRequest - taskListResponse *admin.TaskList - argsTask []string - namedIdentifierListTask *admin.NamedEntityIdentifierList - task2 *admin.Task + resourceListRequestTask *admin.ResourceListRequest + resourceListFilterRequestTask *admin.ResourceListRequest + resourceListTaskRequest *admin.ResourceListRequest + resourceListLimitRequestTask *admin.ResourceListRequest + objectGetRequestTask *admin.ObjectGetRequest + namedIDRequestTask *admin.NamedEntityIdentifierListRequest + taskListResponse *admin.TaskList + taskListFilterResponse *admin.TaskList + argsTask []string + namedIdentifierListTask *admin.NamedEntityIdentifierList + task2 *admin.Task ) func getTaskSetup() { @@ -87,23 +95,44 @@ func getTaskSetup() { } tasks := []*admin.Task{task2, task1} + resourceListLimitRequestTask = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: argsTask[0], + }, + Limit: 100, + } resourceListRequestTask = &admin.ResourceListRequest{ Id: &admin.NamedEntityIdentifier{ Project: projectValue, Domain: domainValue, Name: argsTask[0], }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, + } + + resourceListTaskRequest = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, }, - Limit: 100, + } + + resourceListFilterRequestTask = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + Name: argsTask[0], + }, + Filters: "eq(task.name,task1)+eq(task.version,v1)", } taskListResponse = &admin.TaskList{ Tasks: tasks, } - + taskListFilterResponse = &admin.TaskList{ + Tasks: []*admin.Task{task1}, + } objectGetRequestTask = &admin.ObjectGetRequest{ Id: &core.Identifier{ ResourceType: core.ResourceType_TASK, @@ -139,9 +168,9 @@ func getTaskSetup() { Entities: taskEntities, } - taskConfig.Latest = false - taskConfig.ExecFile = "" - taskConfig.Version = "" + taskConfig.DefaultConfig.Latest = false + taskConfig.DefaultConfig.ExecFile = "" + taskConfig.DefaultConfig.Version = "" } func TestGetTaskFuncWithError(t *testing.T) { @@ -149,9 +178,10 @@ func TestGetTaskFuncWithError(t *testing.T) { setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - taskConfig.Latest = true + taskConfig.DefaultConfig.Latest = true + taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchTaskLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -160,9 +190,10 @@ func TestGetTaskFuncWithError(t *testing.T) { setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) - taskConfig.Version = "v1" + taskConfig.DefaultConfig.Version = "v1" + taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchTaskVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -171,8 +202,9 @@ func TestGetTaskFuncWithError(t *testing.T) { setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) + taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -186,6 +218,18 @@ func TestGetTaskFuncWithError(t *testing.T) { err = getTaskFunc(ctx, argsTask, cmdCtx) assert.NotNil(t, err) }) + + t.Run("failure fetching list task", func(t *testing.T) { + setup() + getLaunchPlanSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} + argsTask = []string{} + mockClient.OnListTasksMatch(ctx, resourceListTaskRequest).Return(nil, fmt.Errorf("error fetching all version")) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) + mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.NotNil(t, err) + }) } func TestGetTaskFunc(t *testing.T) { @@ -193,7 +237,6 @@ func TestGetTaskFunc(t *testing.T) { getTaskSetup() mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) @@ -273,7 +316,7 @@ func TestGetTaskFuncLatest(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) - taskConfig.Latest = true + taskConfig.DefaultConfig.Latest = true err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) @@ -318,7 +361,7 @@ func TestGetTaskWithVersion(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) - taskConfig.Version = "v2" + taskConfig.DefaultConfig.Version = "v2" objectGetRequestTask.Id.ResourceType = core.ResourceType_TASK err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) @@ -363,23 +406,21 @@ func TestGetTasks(t *testing.T) { getTaskSetup() mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) - argsTask = []string{} err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListTaskIds", ctx, namedIDRequest) - tearDownAndVerify(t, `[ - { - "project": "dummyProject", - "domain": "dummyDomain", - "name": "task1" - }, - { - "project": "dummyProject", - "domain": "dummyDomain", - "name": "task2" + tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) +} + +func TestGetTasksFilters(t *testing.T) { + setup() + getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{ + FieldSelector: "task.name=task1,task.version=v1", } -]`) + mockClient.OnListTasksMatch(ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) } func TestGetTaskWithExecFile(t *testing.T) { @@ -388,10 +429,10 @@ func TestGetTaskWithExecFile(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) - taskConfig.Version = "v2" - taskConfig.ExecFile = testDataFolder + "task_exec_file" + taskConfig.DefaultConfig.Version = "v2" + taskConfig.DefaultConfig.ExecFile = testDataFolder + "task_exec_file" err = getTaskFunc(ctx, argsTask, cmdCtx) - os.Remove(taskConfig.ExecFile) + os.Remove(taskConfig.DefaultConfig.ExecFile) assert.Nil(t, err) mockClient.AssertCalled(t, "GetTask", ctx, objectGetRequestTask) tearDownAndVerify(t, `{ diff --git a/flytectl/cmd/get/taskconfig_flags.go b/flytectl/cmd/get/taskconfig_flags.go deleted file mode 100755 index 525884466b..0000000000 --- a/flytectl/cmd/get/taskconfig_flags.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package get - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (TaskConfig) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (TaskConfig) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in TaskConfig and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg TaskConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("TaskResourceAttrConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(taskConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), taskConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") - cmdFlags.StringVar(&(taskConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), taskConfig.Version, "version of the task to be fetched.") - cmdFlags.BoolVar(&(taskConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), taskConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") - return cmdFlags -} diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 4de25ace61..c87cc3406b 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,6 +3,8 @@ package get import ( "context" + "github.com/flyteorg/flytectl/pkg/filters" + workflowconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytestdlib/logger" @@ -10,7 +12,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/adminutils" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -42,10 +43,20 @@ Retrieves particular version of workflow by name within project and domain. flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves workflow by filters. +Retrieves all the workflows with filters. :: - - Not yet implemented + + bin/flytectl get workflow -p flytesnacks -d development --filter.field-selector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + +Retrieve specific workflow with filters. +:: + + bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="workflow.version=v1" + +Retrieves all the workflows with limit and sorting. +:: + + bin/flytectl get -p flytesnacks -d development workflow --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the workflow within project and domain in yaml format. @@ -63,6 +74,18 @@ Usage ` ) +//go:generate pflags WorkflowConfig --default-var workflowConfig +var ( + workflowConfig = &WorkflowConfig{ + Filter: filters.DefaultFilter, + } +) + +// WorkflowConfig +type WorkflowConfig struct { + Filter filters.Filters `json:"filter" pflag:","` +} + var workflowColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -94,12 +117,18 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return nil } - workflows, err := adminutils.GetAllNamedEntities(ctx, cmdCtx.AdminClient().ListWorkflowIds, adminutils.ListRequest{Project: config.GetConfig().Project, Domain: config.GetConfig().Domain}) + transformFilters, err := filters.BuildResourceListRequestWithName(workflowConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") + if err != nil { + return err + } + workflowList, err := cmdCtx.AdminClient().ListWorkflows(ctx, transformFilters) if err != nil { return err } + workflows := workflowList.Workflows + logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), entityColumns, adminutils.NamedEntityToProtoMessage(workflows)...) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) } // FetchWorkflowForName fetches the workflow give it name. @@ -109,7 +138,7 @@ func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterf var workflow *admin.Workflow var err error if workflowconfig.DefaultConfig.Latest { - if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain); err != nil { + if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain, workflowConfig.Filter); err != nil { return nil, err } workflows = append(workflows, workflow) @@ -119,7 +148,7 @@ func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterf } workflows = append(workflows, workflow) } else { - workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain) + workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain, workflowConfig.Filter) if err != nil { return nil, err } diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index bb9f88d356..29f3274afc 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,17 +4,51 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" + u "github.com/flyteorg/flytectl/cmd/testutils" +) + +var ( + resourceListRequestWorkflow *admin.ResourceListRequest + workflowListResponse *admin.WorkflowList ) func getWorkflowSetup() { ctx = u.Ctx mockClient = u.MockClient cmdCtx = u.CmdCtx + resourceListRequestWorkflow = &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: projectValue, + Domain: domainValue, + }, + } + + workflow1 := &admin.Workflow{ + Id: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: "workflow1", + }, + } + workflow2 := &admin.Workflow{ + Id: &core.Identifier{ + Project: projectValue, + Domain: domainValue, + Name: "workflow2", + }, + } + workflows := []*admin.Workflow{workflow1, workflow2} + workflowListResponse = &admin.WorkflowList{ + Workflows: workflows, + } workflow.DefaultConfig.Latest = false workflow.DefaultConfig.Version = "" } @@ -25,8 +59,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) workflow.DefaultConfig.Latest = true - mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -37,7 +70,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { mockFetcher := new(mocks.AdminFetcherExtInterface) workflow.DefaultConfig.Version = "v1" mockFetcher.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -47,7 +80,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) mockFetcher.OnFetchAllVerOfWorkflowMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -58,8 +91,20 @@ func TestGetWorkflowFuncWithError(t *testing.T) { workflow.DefaultConfig.Latest = true args := []string{"workflowName"} u.FetcherExt.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) err = getWorkflowFunc(ctx, args, cmdCtx) assert.NotNil(t, err) }) + +} + +func TestGetWorkflowFunc(t *testing.T) { + setup() + getWorkflowSetup() + workflowConfig.Filter = filters.Filters{} + argsWorkflow := []string{} + mockClient.OnListWorkflowsMatch(ctx, resourceListRequestWorkflow).Return(workflowListResponse, nil) + err = getWorkflowFunc(ctx, argsWorkflow, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListWorkflows", ctx, resourceListRequestWorkflow) } diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 22fabc9f41..35598ae7a2 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -30,8 +30,6 @@ Options --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. -h, --help help for flytectl diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index aea876904b..5039c54e4f 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -39,8 +39,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index c1c625d72a..932addfa42 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -41,8 +41,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index a55952f1de..984231c587 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -43,8 +43,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 67aff79271..b2463ade5f 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -42,8 +42,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 2d99025dfa..aac5479c3b 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -115,8 +115,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 994e53e825..a0670e5f92 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -66,8 +66,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 6795a572e4..9cfd95edad 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -42,8 +42,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index e29fb6b821..17eae9ec87 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -78,8 +78,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 801b28f333..2524bc63e8 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -76,8 +76,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 43b59d3878..c9935a0f7f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -80,8 +80,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 14a769ccb0..f87a174752 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -85,8 +85,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 5431cb54f9..03b9f01b0e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -81,8 +81,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 19ee6daf95..2d782bb68b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -81,8 +81,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 2faf6997b8..82dcafb42f 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -42,8 +42,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index d650498f75..a713afac14 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -87,8 +87,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index e2da0f360d..0f043d8cd4 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -85,8 +85,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 667fe0fd96..1f0593a125 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -89,8 +89,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 43e7134dba..1726008f38 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -21,10 +21,21 @@ Retrieves execution by name within project and domain. bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieves execution by filters +Retrieves all the execution with filters. :: - - Not yet implemented + + bin/flytectl get execution -p flytesnacks -d development --filter.field-selector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + +Retrieve specific execution with filters. +:: + + bin/flytectl get execution -p flytesnacks -d development y8n2wtuspj --filter.field-selector="execution.phase in (FAILED),execution.duration<200" + +Retrieves all the execution with limit and sorting. +:: + + bin/flytectl get execution -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + Retrieves all the execution within project and domain in yaml format @@ -50,7 +61,11 @@ Options :: - -h, --help help for execution + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.field-selector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sort-by string Specifies which field to sort results (default "created_at") + -h, --help help for execution Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -71,8 +86,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index fbbef2cace..23b06925cd 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -34,10 +34,22 @@ Retrieves particular version of launchplan by name within project and domain. flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves launchplan by filters. +Retrieves all the launch plans with filters. :: - - Not yet implemented + + bin/flytectl get launchplan -p flytesnacks -d development --filter.field-selector="name=core.basic.lp.go_greet" + +Retrieves specific launch plans with filters. +:: + + bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="version=v1" + + +Retrieves all the launch plans with limit and sorting. +:: + + bin/flytectl get launchplan -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + Retrieves all the launchplan within project and domain in yaml format. @@ -87,10 +99,14 @@ Options :: - --execFile string execution file name to be used for generating execution spec of a single launchplan. - -h, --help help for launchplan - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the launchplan to be fetched. + --execFile string execution file name to be used for generating execution spec of a single launchplan. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.field-selector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sort-by string Specifies which field to sort results (default "created_at") + -h, --help help for launchplan + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the launchplan to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -111,8 +127,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 25fbfbf288..fcc8e5c9be 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -109,8 +109,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 9d9eec43cf..ba86d53cd0 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -21,10 +21,15 @@ Retrieves project by name bin/flytectl get project flytesnacks -Retrieves project by filters +Retrieves all the projects with filters. :: - - Not yet implemented + + bin/flytectl get project --filter.field-selector="project.name=flytesnacks" + +Retrieves all the projects with limit and sorting. +:: + + bin/flytectl get project --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the projects in yaml format @@ -50,7 +55,11 @@ Options :: - -h, --help help for project + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.field-selector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sort-by string Specifies which field to sort results (default "created_at") + -h, --help help for project Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -71,8 +80,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 613da8d7b3..dfd44d3c32 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -91,8 +91,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index e7c2c75968..f49501561d 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -31,15 +31,24 @@ Retrieves particular version of task by name within project and domain. :: - flytectl get workflow -p flytesnacks -d development core.basic.lp.greet --version v2 + flytectl get task -p flytesnacks -d development core.basic.lp.greet --version v2 -Retrieves project by filters. +Retrieves all the tasks with filters. :: - - Not yet implemented + + bin/flytectl get task -p flytesnacks -d development --filter.field-selector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + +Retrieve a specific task with filters. +:: + + bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.field-selector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + +Retrieves all the task with limit and sorting. +:: + + bin/flytectl get -p flytesnacks -d development task --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the tasks within project and domain in yaml format. - :: bin/flytectl get task -p flytesnacks -d development -o yaml @@ -86,10 +95,14 @@ Options :: - --execFile string execution file name to be used for generating execution spec of a single task. - -h, --help help for task - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the task to be fetched. + --execFile string execution file name to be used for generating execution spec of a single task. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.field-selector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sort-by string Specifies which field to sort results (default "created_at") + -h, --help help for task + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the task to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -110,8 +123,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index e951129aa5..846afb9682 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -33,10 +33,20 @@ Retrieves particular version of workflow by name within project and domain. flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves workflow by filters. +Retrieves all the workflows with filters. :: - - Not yet implemented + + bin/flytectl get workflow -p flytesnacks -d development --filter.field-selector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + +Retrieve specific workflow with filters. +:: + + bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="workflow.version=v1" + +Retrieves all the workflows with limit and sorting. +:: + + bin/flytectl get -p flytesnacks -d development workflow --filter.sort-by=created_at --filter.limit=1 --filter.asc Retrieves all the workflow within project and domain in yaml format. @@ -62,9 +72,11 @@ Options :: - -h, --help help for workflow - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the workflow to be fetched. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.field-selector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sort-by string Specifies which field to sort results (default "created_at") + -h, --help help for workflow Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -85,8 +97,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 76ba262247..98d8c02b4a 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -42,8 +42,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 39f7601c8d..8d79a9df13 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -109,8 +109,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 43dfbae8df..17ba39721e 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -44,8 +44,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 3bc41ae646..b8000b4d3c 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -83,8 +83,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 8f22a1f327..2431eedd01 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -76,8 +76,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 19d10aa050..a32e711f12 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -87,8 +87,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index f0e7838f61..aeb20a9f16 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -61,8 +61,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index b4cf04600f..657efbfb94 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -89,8 +89,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index e7954f31dd..742db693b9 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -86,8 +86,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 496a79779e..d4ae5db9c9 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -89,8 +89,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index 9d4c95142b..26d9237800 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -61,8 +61,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 5899dfa220..b79c81977d 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -61,8 +61,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 4ba5a821ef..7d125dcfb9 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -46,8 +46,6 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) - --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") diff --git a/flytectl/pkg/ext/deleter_test.go b/flytectl/pkg/ext/deleter_test.go new file mode 100644 index 0000000000..17666b021d --- /dev/null +++ b/flytectl/pkg/ext/deleter_test.go @@ -0,0 +1,17 @@ +package ext + +import ( + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" +) + +var deleterFetcherClient *AdminDeleterExtClient + +func TestAdminDeleterExtClient_AdminServiceClient(t *testing.T) { + adminClient = new(mocks.AdminServiceClient) + deleterFetcherClient = nil + client := deleterFetcherClient.AdminServiceClient() + assert.Nil(t, client) +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 8601ec7e71..ecc3b6371c 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -3,6 +3,8 @@ package ext import ( "context" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" ) @@ -18,28 +20,28 @@ type AdminFetcherExtInterface interface { FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) // FetchAllVerOfLP fetches all versions of launch plan in a project, domain - FetchAllVerOfLP(ctx context.Context, lpName, project, domain string) ([]*admin.LaunchPlan, error) + FetchAllVerOfLP(ctx context.Context, lpName, project, domain string, filter filters.Filters) ([]*admin.LaunchPlan, error) // FetchLPLatestVersion fetches latest version of launch plan in a project, domain - FetchLPLatestVersion(ctx context.Context, name, project, domain string) (*admin.LaunchPlan, error) + FetchLPLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.LaunchPlan, error) // FetchLPVersion fetches particular version of launch plan in a project, domain FetchLPVersion(ctx context.Context, name, version, project, domain string) (*admin.LaunchPlan, error) // FetchAllVerOfTask fetches all versions of task in a project, domain - FetchAllVerOfTask(ctx context.Context, name, project, domain string) ([]*admin.Task, error) + FetchAllVerOfTask(ctx context.Context, name, project, domain string, filter filters.Filters) ([]*admin.Task, error) // FetchTaskLatestVersion fetches latest version of task in a project, domain - FetchTaskLatestVersion(ctx context.Context, name, project, domain string) (*admin.Task, error) + FetchTaskLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.Task, error) // FetchTaskVersion fetches particular version of task in a project, domain FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) // FetchAllVerOfWorkflow fetches all versions of task in a project, domain - FetchAllVerOfWorkflow(ctx context.Context, name, project, domain string) ([]*admin.Workflow, error) + FetchAllVerOfWorkflow(ctx context.Context, name, project, domain string, filter filters.Filters) ([]*admin.Workflow, error) // FetchWorkflowLatestVersion fetches latest version of workflow in a project, domain - FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string) (*admin.Workflow, error) + FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.Workflow, error) // FetchWorkflowVersion fetches particular version of workflow in a project, domain FetchWorkflowVersion(ctx context.Context, name, version, project, domain string) (*admin.Workflow, error) diff --git a/flytectl/pkg/ext/fetcher_test.go b/flytectl/pkg/ext/fetcher_test.go new file mode 100644 index 0000000000..f0ddffebd4 --- /dev/null +++ b/flytectl/pkg/ext/fetcher_test.go @@ -0,0 +1,17 @@ +package ext + +import ( + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" +) + +var fetcherClient *AdminFetcherExtClient + +func TestAdminFetcherExtClient_AdminServiceClient(t *testing.T) { + adminClient = new(mocks.AdminServiceClient) + fetcherClient = nil + client := fetcherClient.AdminServiceClient() + assert.Nil(t, client) +} diff --git a/flytectl/pkg/ext/launch_plan_fetcher.go b/flytectl/pkg/ext/launch_plan_fetcher.go index e7aa21b124..ad24b3abb5 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher.go +++ b/flytectl/pkg/ext/launch_plan_fetcher.go @@ -4,24 +4,19 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) // FetchAllVerOfLP fetches all the versions for give launch plan name -func (a *AdminFetcherExtClient) FetchAllVerOfLP(ctx context.Context, lpName, project, domain string) ([]*admin.LaunchPlan, error) { - tList, err := a.AdminServiceClient().ListLaunchPlans(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: lpName, - }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) +func (a *AdminFetcherExtClient) FetchAllVerOfLP(ctx context.Context, lpName, project, domain string, filter filters.Filters) ([]*admin.LaunchPlan, error) { + transformFilters, err := filters.BuildResourceListRequestWithName(filter, project, domain, lpName) + if err != nil { + return nil, err + } + tList, err := a.AdminServiceClient().ListLaunchPlans(ctx, transformFilters) if err != nil { return nil, err } @@ -32,9 +27,9 @@ func (a *AdminFetcherExtClient) FetchAllVerOfLP(ctx context.Context, lpName, pro } // FetchLPLatestVersion fetches latest version for give launch plan name -func (a *AdminFetcherExtClient) FetchLPLatestVersion(ctx context.Context, name, project, domain string) (*admin.LaunchPlan, error) { +func (a *AdminFetcherExtClient) FetchLPLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.LaunchPlan, error) { // Fetch the latest version of the task. - lpVersions, err := a.FetchAllVerOfLP(ctx, name, project, domain) + lpVersions, err := a.FetchAllVerOfLP(ctx, name, project, domain, filter) if err != nil { return nil, err } diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index 7b40fbde89..39d0121c93 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -5,6 +5,8 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -16,6 +18,8 @@ import ( var ( launchPlanListResponse *admin.LaunchPlanList + lpFilters = filters.Filters{} + launchPlan1 *admin.LaunchPlan ) func getLaunchPlanFetcherSetup() { @@ -71,7 +75,7 @@ func getLaunchPlanFetcherSetup() { }, }, } - launchPlan1 := &admin.LaunchPlan{ + launchPlan1 = &admin.LaunchPlan{ Id: &core.Identifier{ Name: "launchplan1", Version: "v1", @@ -116,29 +120,45 @@ func getLaunchPlanFetcherSetup() { func TestFetchAllVerOfLP(t *testing.T) { getLaunchPlanFetcherSetup() adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain", lpFilters) + assert.Nil(t, err) +} + +func TestFetchLPVersion(t *testing.T) { + getLaunchPlanFetcherSetup() + adminClient.OnGetLaunchPlanMatch(mock.Anything, mock.Anything).Return(launchPlan1, nil) + _, err := adminFetcherExt.FetchLPVersion(ctx, "launchplan1", "v1", "project", "domain") assert.Nil(t, err) } func TestFetchAllVerOfLPError(t *testing.T) { getLaunchPlanFetcherSetup() adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain", lpFilters) assert.Equal(t, fmt.Errorf("failed"), err) } +func TestFetchAllVerOfLPFilterError(t *testing.T) { + getLaunchPlanFetcherSetup() + lpFilters.FieldSelector = "hello=" + adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("Please add a valid field selector")) + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain", lpFilters) + assert.Equal(t, fmt.Errorf("Please add a valid field selector"), err) +} + func TestFetchAllVerOfLPEmptyResponse(t *testing.T) { launchPlanListResponse := &admin.LaunchPlanList{} getLaunchPlanFetcherSetup() + lpFilters.FieldSelector = "" adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfLP(ctx, "lpName", "project", "domain", lpFilters) assert.Equal(t, fmt.Errorf("no launchplans retrieved for lpName"), err) } func TestFetchLPLatestVersion(t *testing.T) { getLaunchPlanFetcherSetup() adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) - _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain") + _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain", lpFilters) assert.Nil(t, err) } @@ -146,6 +166,6 @@ func TestFetchLPLatestVersionError(t *testing.T) { launchPlanListResponse := &admin.LaunchPlanList{} getLaunchPlanFetcherSetup() adminClient.OnListLaunchPlansMatch(mock.Anything, mock.Anything).Return(launchPlanListResponse, nil) - _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain") + _, err := adminFetcherExt.FetchLPLatestVersion(ctx, "lpName", "project", "domain", lpFilters) assert.Equal(t, fmt.Errorf("no launchplans retrieved for lpName"), err) } diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 902121ef88..8ae7cde8f8 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -7,6 +7,8 @@ import ( admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + filters "github.com/flyteorg/flytectl/pkg/filters" + mock "github.com/stretchr/testify/mock" service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" @@ -59,8 +61,8 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfLP) Return(_a0 []*admin.LaunchPla return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfLP { - c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfLP { + c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain, filter) return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} } @@ -69,13 +71,13 @@ func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLPMatch(matchers ...interface return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} } -// FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain -func (_m *AdminFetcherExtInterface) FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string) ([]*admin.LaunchPlan, error) { - ret := _m.Called(ctx, lpName, project, domain) +// FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, filter filters.Filters) ([]*admin.LaunchPlan, error) { + ret := _m.Called(ctx, lpName, project, domain, filter) var r0 []*admin.LaunchPlan - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.LaunchPlan); ok { - r0 = rf(ctx, lpName, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) []*admin.LaunchPlan); ok { + r0 = rf(ctx, lpName, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*admin.LaunchPlan) @@ -83,8 +85,8 @@ func (_m *AdminFetcherExtInterface) FetchAllVerOfLP(ctx context.Context, lpName } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, lpName, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, lpName, project, domain, filter) } else { r1 = ret.Error(1) } @@ -100,8 +102,8 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfTask) Return(_a0 []*admin.Task, _ return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfTask { - c := _m.On("FetchAllVerOfTask", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfTask { + c := _m.On("FetchAllVerOfTask", ctx, name, project, domain, filter) return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} } @@ -110,13 +112,13 @@ func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTaskMatch(matchers ...interfa return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} } -// FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name string, project string, domain string) ([]*admin.Task, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name string, project string, domain string, filter filters.Filters) ([]*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain, filter) var r0 []*admin.Task - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.Task); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) []*admin.Task); ok { + r0 = rf(ctx, name, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*admin.Task) @@ -124,8 +126,8 @@ func (_m *AdminFetcherExtInterface) FetchAllVerOfTask(ctx context.Context, name } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, name, project, domain, filter) } else { r1 = ret.Error(1) } @@ -141,8 +143,8 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfWorkflow) Return(_a0 []*admin.Wor return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { - c := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { + c := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain, filter) return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} } @@ -151,13 +153,13 @@ func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflowMatch(matchers ...int return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} } -// FetchAllVerOfWorkflow provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string) ([]*admin.Workflow, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchAllVerOfWorkflow provides a mock function with given fields: ctx, name, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string, filter filters.Filters) ([]*admin.Workflow, error) { + ret := _m.Called(ctx, name, project, domain, filter) var r0 []*admin.Workflow - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) []*admin.Workflow); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) []*admin.Workflow); ok { + r0 = rf(ctx, name, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*admin.Workflow) @@ -165,8 +167,8 @@ func (_m *AdminFetcherExtInterface) FetchAllVerOfWorkflow(ctx context.Context, n } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, name, project, domain, filter) } else { r1 = ret.Error(1) } @@ -223,8 +225,8 @@ func (_m AdminFetcherExtInterface_FetchLPLatestVersion) Return(_a0 *admin.Launch return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchLPLatestVersion { - c := _m.On("FetchLPLatestVersion", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchLPLatestVersion { + c := _m.On("FetchLPLatestVersion", ctx, name, project, domain, filter) return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} } @@ -233,13 +235,13 @@ func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersionMatch(matchers ...inte return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} } -// FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchLPLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.LaunchPlan, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchLPLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) (*admin.LaunchPlan, error) { + ret := _m.Called(ctx, name, project, domain, filter) var r0 *admin.LaunchPlan - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.LaunchPlan); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) *admin.LaunchPlan); ok { + r0 = rf(ctx, name, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.LaunchPlan) @@ -247,8 +249,8 @@ func (_m *AdminFetcherExtInterface) FetchLPLatestVersion(ctx context.Context, na } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, name, project, domain, filter) } else { r1 = ret.Error(1) } @@ -346,8 +348,8 @@ func (_m AdminFetcherExtInterface_FetchTaskLatestVersion) Return(_a0 *admin.Task return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchTaskLatestVersion { - c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchTaskLatestVersion { + c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain, filter) return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} } @@ -356,13 +358,13 @@ func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersionMatch(matchers ...in return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} } -// FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.Task, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) (*admin.Task, error) { + ret := _m.Called(ctx, name, project, domain, filter) var r0 *admin.Task - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Task); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) *admin.Task); ok { + r0 = rf(ctx, name, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.Task) @@ -370,8 +372,8 @@ func (_m *AdminFetcherExtInterface) FetchTaskLatestVersion(ctx context.Context, } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, name, project, domain, filter) } else { r1 = ret.Error(1) } @@ -469,8 +471,8 @@ func (_m AdminFetcherExtInterface_FetchWorkflowLatestVersion) Return(_a0 *admin. return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { - c := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { + c := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain, filter) return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} } @@ -479,13 +481,13 @@ func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersionMatch(matchers . return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} } -// FetchWorkflowLatestVersion provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string) (*admin.Workflow, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchWorkflowLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) (*admin.Workflow, error) { + ret := _m.Called(ctx, name, project, domain, filter) var r0 *admin.Workflow - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.Workflow); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, filters.Filters) *admin.Workflow); ok { + r0 = rf(ctx, name, project, domain, filter) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.Workflow) @@ -493,8 +495,8 @@ func (_m *AdminFetcherExtInterface) FetchWorkflowLatestVersion(ctx context.Conte } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, filters.Filters) error); ok { + r1 = rf(ctx, name, project, domain, filter) } else { r1 = ret.Error(1) } diff --git a/flytectl/pkg/ext/task_fetcher.go b/flytectl/pkg/ext/task_fetcher.go index 96984549a2..2c3366a5c0 100644 --- a/flytectl/pkg/ext/task_fetcher.go +++ b/flytectl/pkg/ext/task_fetcher.go @@ -4,23 +4,18 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) -func (a *AdminFetcherExtClient) FetchAllVerOfTask(ctx context.Context, name, project, domain string) ([]*admin.Task, error) { - tList, err := a.AdminServiceClient().ListTasks(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: name, - }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) +func (a *AdminFetcherExtClient) FetchAllVerOfTask(ctx context.Context, name, project, domain string, filter filters.Filters) ([]*admin.Task, error) { + transformFilters, err := filters.BuildResourceListRequestWithName(filter, project, domain, name) + if err != nil { + return nil, err + } + tList, err := a.AdminServiceClient().ListTasks(ctx, transformFilters) if err != nil { return nil, err } @@ -30,12 +25,12 @@ func (a *AdminFetcherExtClient) FetchAllVerOfTask(ctx context.Context, name, pro return tList.Tasks, nil } -func (a *AdminFetcherExtClient) FetchTaskLatestVersion(ctx context.Context, name, project, domain string) (*admin.Task, error) { +func (a *AdminFetcherExtClient) FetchTaskLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.Task, error) { var t *admin.Task var err error // Fetch the latest version of the task. var taskVersions []*admin.Task - taskVersions, err = a.FetchAllVerOfTask(ctx, name, project, domain) + taskVersions, err = a.FetchAllVerOfTask(ctx, name, project, domain, filter) if err != nil { return nil, err } diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index 7f7476b2c0..0bfc9ef8dd 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -5,6 +5,8 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -19,6 +21,8 @@ var ( adminClient *mocks.AdminServiceClient ctx context.Context taskListResponse *admin.TaskList + taskFilter = filters.Filters{} + task1 *admin.Task ) func getTaskFetcherSetup() { @@ -90,29 +94,49 @@ func getTaskFetcherSetup() { func TestFetchAllVerOfTask(t *testing.T) { getTaskFetcherSetup() adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain", taskFilter) + assert.Nil(t, err) +} + +func TestFetchTaskVersion(t *testing.T) { + getTaskFetcherSetup() + adminClient.OnGetTaskMatch(mock.Anything, mock.Anything).Return(task1, nil) + _, err := adminFetcherExt.FetchTaskVersion(ctx, "task1", "v1", "project", "domain") assert.Nil(t, err) } func TestFetchAllVerOfTaskError(t *testing.T) { getTaskFetcherSetup() adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain", taskFilter) assert.Equal(t, fmt.Errorf("failed"), err) } +func TestFetchAllVerOfTaskFilterError(t *testing.T) { + getTaskFetcherSetup() + taskFilter = filters.Filters{ + FieldSelector: "hello=", + } + adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain", taskFilter) + assert.NotNil(t, err) +} + func TestFetchAllVerOfTaskEmptyResponse(t *testing.T) { taskListResponse := &admin.TaskList{} getTaskFetcherSetup() + taskFilter = filters.Filters{ + FieldSelector: "", + } adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfTask(ctx, "taskName", "project", "domain", taskFilter) assert.Equal(t, fmt.Errorf("no tasks retrieved for taskName"), err) } func TestFetchTaskLatestVersion(t *testing.T) { getTaskFetcherSetup() adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) - _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain") + _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain", taskFilter) assert.Nil(t, err) } @@ -120,6 +144,6 @@ func TestFetchTaskLatestVersionError(t *testing.T) { taskListResponse := &admin.TaskList{} getTaskFetcherSetup() adminClient.OnListTasksMatch(mock.Anything, mock.Anything).Return(taskListResponse, nil) - _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain") + _, err := adminFetcherExt.FetchTaskLatestVersion(ctx, "taskName", "project", "domain", taskFilter) assert.Equal(t, fmt.Errorf("no tasks retrieved for taskName"), err) } diff --git a/flytectl/pkg/ext/updater_test.go b/flytectl/pkg/ext/updater_test.go new file mode 100644 index 0000000000..6e692c44cf --- /dev/null +++ b/flytectl/pkg/ext/updater_test.go @@ -0,0 +1,17 @@ +package ext + +import ( + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/stretchr/testify/assert" +) + +var updaterFetcherClient *AdminUpdaterExtClient + +func TestAdminUpdaterExtClient_AdminServiceClient(t *testing.T) { + adminClient = new(mocks.AdminServiceClient) + updaterFetcherClient = nil + client := updaterFetcherClient.AdminServiceClient() + assert.Nil(t, client) +} diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 86fe88abda..734298a5d4 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -4,24 +4,19 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) // FetchAllVerOfWorkflow fetches all the versions for give workflow name -func (a *AdminFetcherExtClient) FetchAllVerOfWorkflow(ctx context.Context, workflowName, project, domain string) ([]*admin.Workflow, error) { - wList, err := a.AdminServiceClient().ListWorkflows(ctx, &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: workflowName, - }, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Limit: 100, - }) +func (a *AdminFetcherExtClient) FetchAllVerOfWorkflow(ctx context.Context, workflowName, project, domain string, filter filters.Filters) ([]*admin.Workflow, error) { + tranformFilters, err := filters.BuildResourceListRequestWithName(filter, project, domain, workflowName) + if err != nil { + return nil, err + } + wList, err := a.AdminServiceClient().ListWorkflows(ctx, tranformFilters) if err != nil { return nil, err } @@ -32,9 +27,9 @@ func (a *AdminFetcherExtClient) FetchAllVerOfWorkflow(ctx context.Context, workf } // FetchWorkflowLatestVersion fetches latest version for given workflow name -func (a *AdminFetcherExtClient) FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string) (*admin.Workflow, error) { +func (a *AdminFetcherExtClient) FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.Workflow, error) { // Fetch the latest version of the workflow. - wVersions, err := a.FetchAllVerOfWorkflow(ctx, name, project, domain) + wVersions, err := a.FetchAllVerOfWorkflow(ctx, name, project, domain, filter) if err != nil { return nil, err } diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index c18d04842a..9ae96612a6 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -5,6 +5,8 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -16,6 +18,7 @@ import ( var ( workflowListResponse *admin.WorkflowList + workflowFilter = filters.Filters{} workflowResponse *admin.Workflow ) @@ -87,14 +90,14 @@ func getWorkflowFetcherSetup() { func TestFetchAllVerOfWorkflow(t *testing.T) { getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain", workflowFilter) assert.Nil(t, err) } func TestFetchAllVerOfWorkflowError(t *testing.T) { getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain", workflowFilter) assert.Equal(t, fmt.Errorf("failed"), err) } @@ -102,7 +105,7 @@ func TestFetchAllVerOfWorkflowEmptyResponse(t *testing.T) { workflowListResponse := &admin.WorkflowList{} getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) - _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain") + _, err := adminFetcherExt.FetchAllVerOfWorkflow(ctx, "workflowName", "project", "domain", workflowFilter) assert.Equal(t, fmt.Errorf("no workflow retrieved for workflowName"), err) } @@ -110,7 +113,7 @@ func TestFetchWorkflowLatestVersion(t *testing.T) { getWorkflowFetcherSetup() adminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(workflowResponse, nil) adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) - _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") + _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain", workflowFilter) assert.Nil(t, err) } @@ -118,7 +121,6 @@ func TestFetchWorkflowLatestVersionError(t *testing.T) { workflowListResponse := &admin.WorkflowList{} getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) - adminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(workflowResponse, nil) - _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain") + _, err := adminFetcherExt.FetchWorkflowLatestVersion(ctx, "workflowName", "project", "domain", workflowFilter) assert.Equal(t, fmt.Errorf("no workflow retrieved for workflowName"), err) } diff --git a/flytectl/pkg/filters/coverage.out b/flytectl/pkg/filters/coverage.out new file mode 100644 index 0000000000..937e698b18 --- /dev/null +++ b/flytectl/pkg/filters/coverage.out @@ -0,0 +1,68 @@ +mode: set +github.com/flyteorg/flytectl/pkg/filters/filters.go:18.41,19.18 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:22.2,22.19 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:19.18,21.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:26.50,28.28 2 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:47.2,47.25 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:28.28,29.39 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:29.39,31.18 2 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:34.4,34.36 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:31.18,33.5 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:34.36,36.29 2 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:36.29,38.6 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:38.11,40.6 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:41.10,44.5 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:51.37,53.34 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:56.2,56.14 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:53.34,55.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:64.47,66.2 1 0 +github.com/flyteorg/flytectl/pkg/filters/filters.go:70.46,72.36 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:76.2,78.22 3 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:104.2,104.13 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:108.2,108.24 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:72.36,74.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:78.22,79.14 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:92.3,92.12 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:79.14,80.13 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:88.4,89.12 2 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:81.24,83.19 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:84.12,86.72 1 0 +github.com/flyteorg/flytectl/pkg/filters/filters.go:93.13,94.18 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:95.17,97.34 1 0 +github.com/flyteorg/flytectl/pkg/filters/filters.go:98.11,99.18 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:104.13,106.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:116.39,118.2 1 0 +github.com/flyteorg/flytectl/pkg/filters/filters.go:121.58,122.24 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:144.2,144.26 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:122.24,125.36 3 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:125.36,126.22 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:126.22,127.40 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:127.40,130.6 2 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:131.10,131.23 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:131.23,132.34 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:132.34,136.6 3 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:137.10,138.41 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:138.41,140.6 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:148.44,149.12 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:167.2,167.11 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:150.25,151.45 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:152.22,153.45 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:154.19,155.44 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:156.16,157.44 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:158.16,159.50 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:160.17,161.44 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:162.14,163.44 1 1 +github.com/flyteorg/flytectl/pkg/filters/filters.go:164.10,165.50 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:7.116,9.16 2 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:12.2,20.19 2 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:23.2,23.49 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:26.2,26.21 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:9.16,11.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:20.19,22.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:23.49,25.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:29.76,31.16 2 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:34.2,39.21 2 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:31.16,33.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:42.49,44.11 2 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:47.2,50.3 1 1 +github.com/flyteorg/flytectl/pkg/filters/util.go:44.11,46.3 1 1 diff --git a/flytectl/pkg/filters/filters.go b/flytectl/pkg/filters/filters.go new file mode 100644 index 0000000000..629b6a25c8 --- /dev/null +++ b/flytectl/pkg/filters/filters.go @@ -0,0 +1,168 @@ +package filters + +import ( + "bytes" + "fmt" + "regexp" + "strings" +) + +var ( + InReg = regexp.MustCompile(` in `) + ContainsReg = regexp.MustCompile(` contains `) + InRegValue = regexp.MustCompile(`(?s)\((.*)\)`) + termOperators = []string{NotEquals, Equals, GreaterThanEquals, GreaterThan, LessThanEquals, LessThan, Contains, In} +) + +// SplitTerms split the filter string and returns the map of strings +func SplitTerms(filter string) []string { + if filter != "" { + return strings.Split(filter, ",") + } + return []string{} +} + +// Transform transform the field selector term from string to flyteadmin field selector syntax +func Transform(filters []string) (string, error) { + adminFilter := "" + for _, f := range filters { + if lhs, op, rhs, ok := parse(f); ok { + unescapedRHS, err := UnescapeValue(rhs) + if err != nil { + return "", err + } + if ok := validate(lhs, rhs); ok { + transformFilter := transform(lhs, op, unescapedRHS) + if len(adminFilter) > 0 { + adminFilter = fmt.Sprintf("%v+%v", adminFilter, transformFilter) + } else { + adminFilter = fmt.Sprintf("%v", transformFilter) + } + } else { + // TODO(Yuvraj): Add filters docs in error + return "", fmt.Errorf("Please add a valid field selector") + } + } + } + return adminFilter, nil +} + +// validate validate the field selector operation +func validate(lhs, rhs string) bool { + // TODO Add Validation check with regular expression + if len(lhs) > 0 && len(rhs) > 0 { + return true + } + return false +} + +// InvalidEscapeSequence indicates an error occurred unescaping a field selector +type InvalidEscapeSequence struct { + sequence string +} + +func (i InvalidEscapeSequence) Error() string { + return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence) +} + +// UnescapeValue unescapes a fieldSelector value and returns the original literal value. +// May return the original string if it contains no escaped or special characters. +func UnescapeValue(s string) (string, error) { + // if there's no escaping or special characters, just return to avoid allocation + if !strings.ContainsAny(s, `\,=`) { + return s, nil + } + + v := bytes.NewBuffer(make([]byte, 0, len(s))) + inSlash := false + for _, c := range s { + if inSlash { + switch c { + case '\\', ',', '=': + // omit the \ for recognized escape sequences + v.WriteRune(c) + default: + // error on unrecognized escape sequences + return "", InvalidEscapeSequence{sequence: string([]rune{'\\', c})} + } + inSlash = false + continue + } + + switch c { + case '\\': + inSlash = true + case ',', '=': + // unescaped , and = characters are not allowed in field selector values + return "", UnescapedRune{r: c} + default: + v.WriteRune(c) + } + } + + // Ending with a single backslash is an invalid sequence + if inSlash { + return "", InvalidEscapeSequence{sequence: "\\"} + } + + return v.String(), nil +} + +// UnescapedRune indicates an error occurred unescaping a field selector +type UnescapedRune struct { + r rune +} + +func (i UnescapedRune) Error() string { + return fmt.Sprintf("invalid field selector: unescaped character in value: %v", i.r) +} + +// parse parse the filter string into an operation string and return the lhs,rhs value and operation type +func parse(filter string) (lhs, op, rhs string, ok bool) { + for i := range filter { + remaining := filter[i:] + var results []string + for _, op := range termOperators { + if op == Contains { + if ContainsReg.MatchString(filter) { + results = ContainsReg.Split(filter, 2) + return results[0], op, results[1], true + } + } else if op == In { + if InReg.MatchString(filter) { + results = InReg.Split(filter, 2) + values := InRegValue.FindAllStringSubmatch(strings.TrimSpace(results[1]), -1) + return results[0], op, values[0][1], true + } + } else { + if strings.HasPrefix(remaining, op) { + return filter[0:i], op, filter[i+len(op):], true + } + } + } + } + return "", "", "", false +} + +// transform it transform the field selector operation and return flyteadmin filter syntax +func transform(lhs, op, rhs string) string { + switch op { + case GreaterThanEquals: + return fmt.Sprintf("gte(%v,%v)", lhs, rhs) + case LessThanEquals: + return fmt.Sprintf("lte(%v,%v)", lhs, rhs) + case GreaterThan: + return fmt.Sprintf("gt(%v,%v)", lhs, rhs) + case LessThan: + return fmt.Sprintf("lt(%v,%v)", lhs, rhs) + case Contains: + return fmt.Sprintf("contains(%v,%v)", lhs, rhs) + case NotEquals: + return fmt.Sprintf("ne(%v,%v)", lhs, rhs) + case Equals: + return fmt.Sprintf("eq(%v,%v)", lhs, rhs) + case In: + return fmt.Sprintf("value_in(%v,%v)", lhs, rhs) + } + return "" +} diff --git a/flytectl/pkg/filters/filters_test.go b/flytectl/pkg/filters/filters_test.go new file mode 100644 index 0000000000..cd988f0c58 --- /dev/null +++ b/flytectl/pkg/filters/filters_test.go @@ -0,0 +1,73 @@ +package filters + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +type TestCase struct { + Input string `json:"input"` + Output string `json:"output"` +} + +func TestTransformFilter(t *testing.T) { + tests := []TestCase{ + { + Input: "project.name=flytesnacks,execution.duration<200,execution.duration<=200,execution.duration>=200,name contains flyte,name!=flyte", + Output: "eq(project.name,flytesnacks)+lt(execution.duration,200)+lte(execution.duration,200)+gte(execution.duration,200)+contains(name,flyte)+ne(name,flyte)", + }, + { + Input: "execution.phase in (FAILED;SUCCEEDED),execution.name=y8n2wtuspj,execution.duration>200", + Output: "value_in(execution.phase,FAILED;SUCCEEDED)+eq(execution.name,y8n2wtuspj)+gt(execution.duration,200)", + }, + { + Input: `k=\\,,k2=v2`, + Output: "eq(k,\\)+eq(k2,v2)", + }, + } + for _, test := range tests { + filters := SplitTerms(test.Input) + + result, err := Transform(filters) + assert.Nil(t, err) + assert.Equal(t, test.Output, result) + } +} + +func TestTransformFilterError(t *testing.T) { + tests := []TestCase{ + { + Input: `\=\,\`, + Output: "", + }, + { + Input: `foo=bar,baz=blah,complex=\=value\\\,\\`, + Output: "", + }, + } + for _, test := range tests { + filters := SplitTerms(test.Input) + result, err := Transform(filters) + assert.NotNil(t, err) + assert.Equal(t, "", result) + } +} + +func TestParseFailed(t *testing.T) { + tests := []TestCase{ + { + Input: ``, + Output: "", + }, + } + for _, test := range tests { + lhs, op, rhs, ok := parse(test.Input) + result := transform(lhs, op, rhs) + assert.Equal(t, "", result) + assert.Equal(t, false, ok) + assert.Equal(t, "", lhs) + assert.Equal(t, "", rhs) + assert.Equal(t, "", op) + } +} diff --git a/flytectl/pkg/filters/operator.go b/flytectl/pkg/filters/operator.go new file mode 100644 index 0000000000..37d8c94d2e --- /dev/null +++ b/flytectl/pkg/filters/operator.go @@ -0,0 +1,12 @@ +package filters + +const ( + Equals string = "=" + In string = "in" + Contains string = "contains" + NotEquals string = "!=" + GreaterThan string = ">" + GreaterThanEquals string = ">=" + LessThan string = "<" + LessThanEquals string = "<=" +) diff --git a/flytectl/pkg/filters/type.go b/flytectl/pkg/filters/type.go new file mode 100644 index 0000000000..83b7d18a74 --- /dev/null +++ b/flytectl/pkg/filters/type.go @@ -0,0 +1,17 @@ +package filters + +var ( + DefaultLimit int32 = 100 + DefaultFilter = Filters{ + Limit: DefaultLimit, + Asc: false, + } +) + +type Filters struct { + FieldSelector string `json:"field-selector" pflag:",Specifies the Field selector"` + SortBy string `json:"sort-by" pflag:",Specifies which field to sort results "` + // TODO: Support paginated queries + Limit int32 `json:"limit" pflag:",Specifies the limit"` + Asc bool `json:"asc" pflag:",Specifies the sorting order. By default flytectl sort result in descending order"` +} diff --git a/flytectl/pkg/filters/util.go b/flytectl/pkg/filters/util.go new file mode 100644 index 0000000000..2c2515326a --- /dev/null +++ b/flytectl/pkg/filters/util.go @@ -0,0 +1,54 @@ +package filters + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func BuildResourceListRequestWithName(c Filters, project, domain, name string) (*admin.ResourceListRequest, error) { + fieldSelector, err := Transform(SplitTerms(c.FieldSelector)) + if err != nil { + return nil, err + } + request := &admin.ResourceListRequest{ + Limit: uint32(c.Limit), + Filters: fieldSelector, + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + }, + } + if len(name) > 0 { + request.Id.Name = name + } + if sort := buildSortingRequest(c); sort != nil { + request.SortBy = sort + } + return request, nil +} + +func BuildProjectListRequest(c Filters) (*admin.ProjectListRequest, error) { + fieldSelector, err := Transform(SplitTerms(c.FieldSelector)) + if err != nil { + return nil, err + } + request := &admin.ProjectListRequest{ + Limit: uint32(c.Limit), + Filters: fieldSelector, + SortBy: buildSortingRequest(c), + } + return request, nil +} + +func buildSortingRequest(c Filters) *admin.Sort { + sortingOrder := admin.Sort_DESCENDING + if c.Asc { + sortingOrder = admin.Sort_ASCENDING + } + if len(c.SortBy) > 0 { + return &admin.Sort{ + Key: c.SortBy, + Direction: sortingOrder, + } + } + return nil +} diff --git a/flytectl/pkg/filters/util_test.go b/flytectl/pkg/filters/util_test.go new file mode 100644 index 0000000000..6edcc79786 --- /dev/null +++ b/flytectl/pkg/filters/util_test.go @@ -0,0 +1,111 @@ +package filters + +import ( + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" +) + +var ( + project = "flytesnack" + domain = "staging" + name = "test" + output = "json" +) + +func TestListRequestWithoutNameFunc(t *testing.T) { + config.GetConfig().Output = output + config.GetConfig().Project = project + config.GetConfig().Domain = domain + filter := Filters{ + Limit: 100, + SortBy: "created_at", + Asc: true, + } + request, err := BuildResourceListRequestWithName(filter, project, domain, "") + expectedResponse := &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + }, + Limit: 100, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_ASCENDING, + }, + Filters: "", + } + assert.Nil(t, err) + assert.Equal(t, expectedResponse, request) +} + +func TestProjectListRequestFunc(t *testing.T) { + config.GetConfig().Output = output + config.GetConfig().Project = project + config.GetConfig().Domain = domain + filter := Filters{ + Limit: 100, + SortBy: "created_at", + } + request, err := BuildProjectListRequest(filter) + expectedResponse := &admin.ProjectListRequest{ + Limit: 100, + Filters: "", + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + } + assert.Nil(t, err) + assert.Equal(t, expectedResponse, request) +} + +func TestProjectListWithRequestFuncError(t *testing.T) { + config.GetConfig().Output = output + config.GetConfig().Project = project + config.GetConfig().Domain = domain + filter := Filters{ + FieldSelector: "Hello=", + Limit: 100, + } + request, err := BuildProjectListRequest(filter) + assert.NotNil(t, err) + assert.Nil(t, request) +} + +func TestListRequestWithNameFunc(t *testing.T) { + config.GetConfig().Output = output + filter := Filters{ + Limit: 100, + SortBy: "created_at", + } + request, err := BuildResourceListRequestWithName(filter, project, domain, name) + expectedResponse := &admin.ResourceListRequest{ + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + Limit: 100, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, + } + assert.Nil(t, err) + assert.Equal(t, expectedResponse, request) +} + +func TestListRequestWithNameFuncError(t *testing.T) { + config.GetConfig().Output = output + filter := Filters{ + Limit: 100, + SortBy: "created_at", + FieldSelector: "hello=", + } + request, err := BuildResourceListRequestWithName(filter, project, domain, name) + assert.NotNil(t, err) + assert.Nil(t, request) +} From caa38e5516f1d24cc5a73914715ee0825b656a96 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 5 Jun 2021 15:04:26 +0530 Subject: [PATCH 060/356] Added unit test for covarage (#83) Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 5 +- flytectl/.gitignore | 3 +- flytectl/cmd/config/config_test.go | 32 +++++++ .../matchable_attr_file_config_utils.go | 2 +- flytectl/cmd/get/execution_util.go | 2 +- flytectl/cmd/get/launch_plan.go | 5 +- flytectl/cmd/root.go | 7 +- flytectl/pkg/adminutils/config_test.go | 17 ++++ flytectl/pkg/adminutils/iterator.go | 71 ---------------- flytectl/pkg/commandutils/command_utils.go | 20 ++--- .../pkg/commandutils/command_utils_test.go | 51 ++++++++++++ flytectl/pkg/printer/printer_test.go | 83 +++++++++++++++++++ 12 files changed, 202 insertions(+), 96 deletions(-) create mode 100644 flytectl/cmd/config/config_test.go create mode 100644 flytectl/pkg/adminutils/config_test.go delete mode 100644 flytectl/pkg/adminutils/iterator.go create mode 100644 flytectl/pkg/commandutils/command_utils_test.go diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index a7d933fed4..9f4ae2c1d6 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -2,7 +2,8 @@ name: build on: pull_request: - push: + branches: + - master jobs: build: @@ -23,7 +24,7 @@ jobs: with: args: make install && make test_unit_codecov - name: Push CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v1.0.5 with: file: coverage.txt flags: unittests diff --git a/flytectl/.gitignore b/flytectl/.gitignore index 5f7a3898d1..1715663b54 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -5,5 +5,4 @@ bin .DS_Store _test ./config.yaml -docs/build/* -cmd/get/temp-output-file +docs/build/* \ No newline at end of file diff --git a/flytectl/cmd/config/config_test.go b/flytectl/cmd/config/config_test.go new file mode 100644 index 0000000000..f11ee07ae7 --- /dev/null +++ b/flytectl/cmd/config/config_test.go @@ -0,0 +1,32 @@ +package config + +import ( + "testing" + + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/stretchr/testify/assert" +) + +func TestOutputFormat(t *testing.T) { + c := &Config{ + Output: "json", + } + result, err := c.OutputFormat() + assert.Nil(t, err) + assert.Equal(t, printer.OutputFormat(1), result) +} + +func TestInvalidOutputFormat(t *testing.T) { + c := &Config{ + Output: "test", + } + var result printer.OutputFormat + defer func() { + if r := recover(); r != nil { + assert.Equal(t, printer.OutputFormat(0), result) + assert.NotNil(t, r) + } + }() + result = c.MustOutputFormat() + +} diff --git a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go index c29b3f23a7..b21e7832a9 100644 --- a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go +++ b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go @@ -17,7 +17,7 @@ func WriteConfigToFile(matchableAttrConfig interface{}, fileName string) error { return fmt.Errorf("error: %v", err) } if _, err = os.Stat(fileName); err == nil { - if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { + if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName), os.Stdin) { return fmt.Errorf("backup the file before continuing") } } diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index da330af39e..2d70450af3 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -33,7 +33,7 @@ func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) err fmt.Printf("error: %v", err) } if _, err = os.Stat(fileName); err == nil { - if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName)) { + if !cmdUtil.AskForConfirmation(fmt.Sprintf("warning file %v will be overwritten", fileName), os.Stdin) { return errors.New("backup the file before continuing") } } diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 994f0d84f2..9619bd1fde 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -75,7 +75,7 @@ Retrieves a launch plans within project and domain for a version and generate th :: - flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yam + flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml The generated file would look similar to this @@ -152,9 +152,6 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman return err } launchPlans := launchPlanList.LaunchPlans - if err != nil { - return err - } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplansColumns, LaunchplanToProtoMessages(launchPlans)...) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 200d6d4115..15533fd625 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/create" @@ -12,7 +14,6 @@ import ( "github.com/flyteorg/flytectl/cmd/register" "github.com/flyteorg/flytectl/cmd/update" "github.com/flyteorg/flytectl/cmd/version" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/config/viper" @@ -41,7 +42,7 @@ func newRootCmd() *cobra.Command { DisableAutoGenTag: true, } - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName), "config file (default is $HOME/.flyte/config.yaml)") configAccessor.InitializePflags(rootCmd.PersistentFlags()) @@ -69,7 +70,7 @@ func newRootCmd() *cobra.Command { func initConfig(_ *cobra.Command, _ []string) error { configAccessor = viper.NewAccessor(stdConfig.Options{ StrictMode: true, - SearchPaths: []string{cfgFile, f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName)}, + SearchPaths: []string{cfgFile}, }) err := configAccessor.UpdateConfig(context.TODO()) diff --git a/flytectl/pkg/adminutils/config_test.go b/flytectl/pkg/adminutils/config_test.go new file mode 100644 index 0000000000..5a8fd5134d --- /dev/null +++ b/flytectl/pkg/adminutils/config_test.go @@ -0,0 +1,17 @@ +package adminutils + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGetConfig(t *testing.T) { + defaultConfig = &Config{ + MaxRecords: 500, + BatchSize: 100, + } + c := GetConfig() + assert.Equal(t, defaultConfig.BatchSize, c.BatchSize) + assert.Equal(t, defaultConfig.MaxRecords, c.MaxRecords) +} diff --git a/flytectl/pkg/adminutils/iterator.go b/flytectl/pkg/adminutils/iterator.go deleted file mode 100644 index 3e90690b43..0000000000 --- a/flytectl/pkg/adminutils/iterator.go +++ /dev/null @@ -1,71 +0,0 @@ -package adminutils - -import ( - "context" - - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/golang/protobuf/proto" - "google.golang.org/grpc" -) - -type NamedEntityIDLister func(ctx context.Context, in *admin.NamedEntityIdentifierListRequest, opts ...grpc.CallOption) (*admin.NamedEntityIdentifierList, error) - -type NamedEntityVisitor func(entities []*admin.NamedEntityIdentifier) error - -type ListRequest struct { - Project string - Domain string - Filters string -} - -func IterateThroughAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, visitor NamedEntityVisitor, req ListRequest, opts ...grpc.CallOption) error { - adminReq := &admin.NamedEntityIdentifierListRequest{ - Project: req.Project, - Domain: req.Domain, - Filters: req.Filters, - SortBy: &admin.Sort{ - Key: "name", - Direction: admin.Sort_ASCENDING, - }, - Limit: uint32(GetConfig().BatchSize), - } - - i := 0 - for i < GetConfig().MaxRecords { - res, err := lister(ctx, adminReq, opts...) - if err != nil { - return err - } - if len(res.Entities) != 0 { - if err := visitor(res.Entities); err != nil { - return err - } - } - i = i + len(res.Entities) - if len(res.Entities) == 0 || res.Token == "" { - break - } - adminReq.Token = res.Token - } - return nil -} - -func GetAllNamedEntities(ctx context.Context, lister NamedEntityIDLister, req ListRequest, opts ...grpc.CallOption) ([]*admin.NamedEntityIdentifier, error) { - var allEntities []*admin.NamedEntityIdentifier - err := IterateThroughAllNamedEntities(ctx, lister, func(entities []*admin.NamedEntityIdentifier) error { - allEntities = append(allEntities, entities...) - return nil - }, req) - if err != nil { - return nil, err - } - return allEntities, nil -} - -func NamedEntityToProtoMessage(l []*admin.NamedEntityIdentifier) []proto.Message { - messages := make([]proto.Message, 0, len(l)) - for _, m := range l { - messages = append(messages, m) - } - return messages -} diff --git a/flytectl/pkg/commandutils/command_utils.go b/flytectl/pkg/commandutils/command_utils.go index acee518a5f..1593abf880 100644 --- a/flytectl/pkg/commandutils/command_utils.go +++ b/flytectl/pkg/commandutils/command_utils.go @@ -3,24 +3,20 @@ package commandutils import ( "bufio" "fmt" - "log" - "os" + "io" "strings" ) -func AskForConfirmation(s string) bool { - reader := bufio.NewReader(os.Stdin) - for { - fmt.Printf("%s [y/n]: ", s) - response, err := reader.ReadString('\n') - if err != nil { - log.Fatal(err) - } - response = strings.ToLower(strings.TrimSpace(response)) +func AskForConfirmation(s string, reader io.Reader) bool { + fmt.Printf("%s [y/n]: ", s) + r := bufio.NewScanner(reader) + for r.Scan() { + response := strings.ToLower(strings.TrimSpace(r.Text())) if response == "y" || response == "yes" { return true - } else if response == "n" || response == "no" { + } else if response == "n" || response == "No" { return false } } + return false } diff --git a/flytectl/pkg/commandutils/command_utils_test.go b/flytectl/pkg/commandutils/command_utils_test.go new file mode 100644 index 0000000000..57fc4f82f6 --- /dev/null +++ b/flytectl/pkg/commandutils/command_utils_test.go @@ -0,0 +1,51 @@ +package commandutils + +import ( + "io" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +type TestCase struct { + Input io.Reader `json:"input"` + Output bool `json:"output"` +} + +func TestAskForConfirmation(t *testing.T) { + tests := []TestCase{ + { + Input: strings.NewReader("yes"), + Output: true, + }, + { + Input: strings.NewReader("y"), + Output: true, + }, + { + Input: strings.NewReader("no"), + Output: false, + }, + { + Input: strings.NewReader("n"), + Output: false, + }, + { + Input: strings.NewReader("No"), + Output: false, + }, + { + Input: strings.NewReader("Yes"), + Output: true, + }, + { + Input: strings.NewReader(""), + Output: false, + }, + } + for _, test := range tests { + answer := AskForConfirmation("Testing for yes", test.Input) + assert.Equal(t, test.Output, answer) + } +} diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 8f5f2f3dfd..5db910544c 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -2,9 +2,15 @@ package printer import ( "encoding/json" + "fmt" "testing" "time" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/stretchr/testify/assert" ) @@ -13,6 +19,14 @@ type Inner struct { Y *time.Time `json:"y"` } +func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + // TODO Convert this to a Testable Example. For some reason the comparison fails func TestJSONToTable(t *testing.T) { d := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) @@ -41,3 +55,72 @@ func TestJSONToTable(t *testing.T) { // | hello | | // 3 rows } + +func TestOutputFormats(t *testing.T) { + expected := []string{"TABLE", "JSON", "YAML"} + outputs := OutputFormats() + assert.Equal(t, 3, len(outputs)) + assert.Equal(t, expected, outputs) +} + +func TestOutputFormatString(t *testing.T) { + o, err := OutputFormatString("JSON") + assert.Nil(t, err) + assert.Equal(t, OutputFormat(1), o) +} + +func TestOutputFormatStringErr(t *testing.T) { + o, err := OutputFormatString("FLYTE") + assert.NotNil(t, err) + assert.Equal(t, OutputFormat(0), o) + assert.Equal(t, fmt.Errorf("%s does not belong to OutputFormat values", "FLYTE"), err) +} + +func TestIsAOutputFormat(t *testing.T) { + o := OutputFormat(4) + check := o.IsAOutputFormat() + assert.Equal(t, false, check) + + o = OutputFormat(1) + check = o.IsAOutputFormat() + assert.Equal(t, true, check) +} + +func TestMarshalJson(t *testing.T) { + o := OutputFormat(1) + check, err := o.MarshalJSON() + assert.Nil(t, err) + assert.Equal(t, []byte(`"JSON"`), check) + + result, err := o.MarshalYAML() + assert.Nil(t, err) + assert.Equal(t, "JSON", result) +} + +func TestPrint(t *testing.T) { + p := Printer{} + lp := []Column{ + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + } + launchPlan := &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: "launchplan1", + Version: "v2", + }, + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{}, + }, + Closure: &admin.LaunchPlanClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + ExpectedInputs: &core.ParameterMap{}, + }, + } + launchPlans := []*admin.LaunchPlan{launchPlan} + err := p.Print(OutputFormat(0), lp, LaunchplanToProtoMessages(launchPlans)...) + assert.Nil(t, err) + err = p.Print(OutputFormat(1), lp, LaunchplanToProtoMessages(launchPlans)...) + assert.Nil(t, err) + err = p.Print(OutputFormat(2), lp, LaunchplanToProtoMessages(launchPlans)...) + assert.Nil(t, err) +} From e2082c00b2a195b8f4c452653575756e55fecb49 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Mon, 7 Jun 2021 10:34:43 +0530 Subject: [PATCH 061/356] Supporting generic types through flytectl (#78) * Supporting generic types through flytectl Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/create/execution.go | 45 +++++++++++++++++++ flytectl/cmd/create/execution_test.go | 2 +- flytectl/cmd/create/execution_util.go | 9 ++-- .../task_execution_spec_with_iamrole.yaml | 15 +++++++ flytectl/docs/source/conf.py | 8 ++-- .../source/gen/flytectl_create_execution.rst | 45 +++++++++++++++++++ flytectl/docs/source/index.rst | 18 +++++--- flytectl/docs/source/nouns.rst | 2 +- flytectl/docs/source/verbs.rst | 4 +- flytectl/go.mod | 2 + flytectl/go.sum | 4 +- 11 files changed, 132 insertions(+), 22 deletions(-) create mode 100644 flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index d80f310b90..f765e786b2 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -78,6 +78,51 @@ Also an execution can be relaunched by passing in current execution id. flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development +Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. +As usual the spec file should be generated first and then run the execution using the spec file. + +:: + + flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml + +The generated file would look similar to this. Here you can see empty values dumped for generic data type x and y. + +:: + + iamRoleARN: "" + inputs: + "x": {} + "y": {} + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.type_system.custom_objects.add + version: v3 + +Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add + +:: + + iamRoleARN: "arn:aws:iam::123456789:role/dummy" + inputs: + "x": + "x": 2 + "y": ydatafory + "z": + 1 : "foo" + 2 : "bar" + "y": + "x": 3 + "y": ydataforx + "z": + 3 : "buzz" + 4 : "lightyear" + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.type_system.custom_objects.add + version: v3 + Usage ` ) diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index d83d99ae96..00544c4f55 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -144,7 +144,7 @@ func TestCreateTaskExecutionFunc(t *testing.T) { }, } mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) - executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" err = createExecutionCommand(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 13a1ab51a9..94924fbfaa 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -57,11 +57,10 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project Literals: variableLiterals, } var authRole *admin.AuthRole - if executionConfig.KubeServiceAcct != "" || executionConfig.IamRoleARN != "" { - authRole = &admin.AuthRole{ - AssumableIamRole: executionConfig.IamRoleARN, - KubernetesServiceAccount: executionConfig.KubeServiceAcct, - } + if executionConfig.KubeServiceAcct != "" { + authRole = &admin.AuthRole{KubernetesServiceAccount: executionConfig.KubeServiceAcct} + } else { + authRole = &admin.AuthRole{AssumableIamRole: executionConfig.IamRoleARN} } ID := &core.Identifier{ ResourceType: core.ResourceType_TASK, diff --git a/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml new file mode 100644 index 0000000000..14cd2df32d --- /dev/null +++ b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml @@ -0,0 +1,15 @@ +iamRoleARN: "iamRoleARN" +inputs: + sorted_list1: + - 0 + - 2 + - 4 + sorted_list2: + - 1 + - 3 + - 5 +kubeServiceAcct: "" +targetDomain: "development" +targetProject: "flytesnacks" +task: core.advanced.run_merge_sort.merge +version: v2 diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 02a1bab91d..b3c1bfbbab 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -99,6 +99,10 @@ "color-brand-primary": "#9D68E4", "color-brand-content": "#9D68E4", }, +} + +html_context = { + "home_page": "https://docs.flyte.org", # custom flyteorg furo theme options "github_repo": "flytectl", "github_username": "flyteorg", @@ -106,10 +110,6 @@ "docs_path": "docs/source", # path to documentation source } -html_context = { - "home_page": "https://docs.flyte.org", -} - # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index aac5479c3b..dc646888cb 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -76,6 +76,51 @@ Also an execution can be relaunched by passing in current execution id. flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development +Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. +As usual the spec file should be generated first and then run the execution using the spec file. + +:: + + flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml + +The generated file would look similar to this. Here you can see empty values dumped for generic data type x and y. + +:: + + iamRoleARN: "" + inputs: + "x": {} + "y": {} + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.type_system.custom_objects.add + version: v3 + +Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add + +:: + + iamRoleARN: "arn:aws:iam::123456789:role/dummy" + inputs: + "x": + "x": 2 + "y": ydatafory + "z": + 1 : "foo" + 2 : "bar" + "y": + "x": 3 + "y": ydataforx + "z": + 3 : "buzz" + 4 : "lightyear" + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.type_system.custom_objects.add + version: v3 + Usage diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 39399d4065..2cf449aeb6 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -18,13 +18,7 @@ golang. To install simply copy paste the following into the command-line: Configure ========= Flytectl allows configuring using a YAML file or pass every configuration value -on command-line. The follow configuration is useful to setup. -Place this in $HOME/.flyte directory with name config.yaml. -This file is searched in -* $HOME/.flyte -* currDir from where you run flytectl -* /etc/flyte/config -* You can pass it commandline using --config +on command-line. The following configuration is useful to setup. Basic Configuration -------------------- @@ -34,6 +28,7 @@ Basic Configuration admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///flyte.lyft.net + authType: Pkce # Change insecure flag to ensure that you use the right setting for your environment insecure: true logger: @@ -42,6 +37,15 @@ Basic Configuration level: 1 +Place this in $HOME/.flyte directory with name config.yaml. +This file is searched in + +- $HOME/.flyte +- currDir from where you run flytectl +- /etc/flyte/config +- You can pass it commandline using --config + + .. toctree:: :maxdepth: 1 :hidden: diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 89d3c74a3d..756ccc8b0b 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -1,10 +1,10 @@ Nouns ------ +Flytectl noun specify the resource on which the action needs to be performed eg: resources like project/workflow/task/execution .. toctree:: :maxdepth: 1 :caption: Nouns - :hidden: gen/flytectl_create_project gen/flytectl_create_execution diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index 49f90367b0..8fb0ba88f2 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -1,14 +1,14 @@ Verbs ------ +Flytectl verbs specify the actions to be performed on the resources like create/get/update/delete .. toctree:: :maxdepth: 1 :caption: Verbs - :hidden: gen/flytectl_create gen/flytectl_get gen/flytectl_update gen/flytectl_delete gen/flytectl_register - gen/flytectl_config \ No newline at end of file + gen/flytectl_config diff --git a/flytectl/go.mod b/flytectl/go.mod index 56161e8041..ace309880f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -28,3 +28,5 @@ require ( gopkg.in/yaml.v2 v2.4.0 sigs.k8s.io/yaml v1.2.0 ) + +replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e diff --git a/flytectl/go.sum b/flytectl/go.sum index 1049bf193a..2397a7141f 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -172,8 +172,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.51 h1:fp4Qq9WtO3QeDbFpKk0uQqB/cF78+Ul7D3DhvQPlV5Q= -github.com/flyteorg/flyteidl v0.18.51/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e h1:J3Uaju9mBrJhrU4kiv3ozpZNkDdjDepkn0X6ueB8iag= +github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= From 052316d88afa9ab1892bc8eec65fada0bed9cee4 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 7 Jun 2021 11:33:57 +0530 Subject: [PATCH 062/356] Refactor get command (#84) * Refactor get command Signed-off-by: Yuvraj * Fix unit test Signed-off-by: Yuvraj --- flytectl/cmd/get/execution.go | 23 ++---- flytectl/cmd/get/launch_plan.go | 13 +-- flytectl/cmd/get/project.go | 9 +- flytectl/cmd/get/project_test.go | 18 +++- flytectl/cmd/get/task.go | 13 +-- flytectl/cmd/get/workflow.go | 35 ++------ flytectl/cmd/get/workflow_test.go | 12 --- flytectl/pkg/ext/execution_fetcher.go | 14 ++++ flytectl/pkg/ext/fetcher.go | 6 ++ .../ext/mocks/admin_fetcher_ext_interface.go | 82 +++++++++++++++++++ flytectl/pkg/ext/project_fetcher.go | 21 +++++ flytectl/pkg/ext/project_fetcher_test.go | 45 ++++++++++ 12 files changed, 209 insertions(+), 82 deletions(-) create mode 100644 flytectl/pkg/ext/project_fetcher.go create mode 100644 flytectl/pkg/ext/project_fetcher_test.go diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 73c2e36b78..e7164ca90e 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -3,8 +3,6 @@ package get import ( "context" - "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -85,18 +83,15 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command return err } executions = append(executions, execution) - } else { - transformFilters, err := filters.BuildResourceListRequestWithName(execution.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") - if err != nil { - return err - } - executionList, err := cmdCtx.AdminClient().ListExecutions(ctx, transformFilters) - if err != nil { - return err - } - executions = executionList.Executions + logger.Infof(ctx, "Retrieved %v executions", len(executions)) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, + ExecutionToProtoMessages(executions)...) + } + executionList, err := cmdCtx.AdminFetcherExt().ListExecution(ctx, config.GetConfig().Project, config.GetConfig().Domain, execution.DefaultConfig.Filter) + if err != nil { + return err } - logger.Infof(ctx, "Retrieved %v executions", len(executions)) + logger.Infof(ctx, "Retrieved %v executions", len(executionList.Executions)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, - ExecutionToProtoMessages(executions)...) + ExecutionToProtoMessages(executionList.Executions)...) } diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 9619bd1fde..9edff6ab92 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -3,8 +3,6 @@ package get import ( "context" - "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -126,11 +124,11 @@ func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { launchPlanPrinter := printer.Printer{} + var launchPlans []*admin.LaunchPlan project := config.GetConfig().Project domain := config.GetConfig().Domain if len(args) == 1 { name := args[0] - var launchPlans []*admin.LaunchPlan var err error if launchPlans, err = FetchLPForName(ctx, cmdCtx.AdminFetcherExt(), name, project, domain); err != nil { return err @@ -143,15 +141,12 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman } return nil } - transformFilters, err := filters.BuildResourceListRequestWithName(launchplan.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") - if err != nil { - return err - } - launchPlanList, err := cmdCtx.AdminClient().ListLaunchPlans(ctx, transformFilters) + + launchPlans, err := cmdCtx.AdminFetcherExt().FetchAllVerOfLP(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, launchplan.DefaultConfig.Filter) if err != nil { return err } - launchPlans := launchPlanList.LaunchPlans + logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplansColumns, LaunchplanToProtoMessages(launchPlans)...) diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 535cb16af4..4d13950e1e 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -5,8 +5,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" @@ -72,11 +70,8 @@ func ProjectToProtoMessages(l []*admin.Project) []proto.Message { func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} - transformFilters, err := filters.BuildProjectListRequest(project.DefaultConfig.Filter) - if err != nil { - return err - } - projects, err := cmdCtx.AdminClient().ListProjects(ctx, transformFilters) + + projects, err := cmdCtx.AdminFetcherExt().ListProjects(ctx, project.DefaultConfig.Filter) if err != nil { return err } diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go index 2419ceda6c..264aa35c1c 100644 --- a/flytectl/cmd/get/project_test.go +++ b/flytectl/cmd/get/project_test.go @@ -2,11 +2,15 @@ package get import ( "fmt" + "io" "testing" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) @@ -19,6 +23,10 @@ var ( ) func getProjectSetup() { + + mockOutStream := new(io.Writer) + cmdCtx = cmdCore.NewCommandContext(mockClient, *mockOutStream) + argsProject = []string{"flyteexample"} resourceListRequestProject = &admin.ProjectListRequest{} @@ -51,12 +59,17 @@ func getProjectSetup() { } } -func TestProjectFunc(t *testing.T) { +func TestListProjectFunc(t *testing.T) { setup() getProjectSetup() + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + project.DefaultConfig.Filter = filters.Filters{} mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) err = getProjectsFunc(ctx, argsProject, cmdCtx) + assert.Nil(t, err) mockClient.AssertCalled(t, "ListProjects", ctx, resourceListRequestProject) } @@ -64,6 +77,9 @@ func TestProjectFunc(t *testing.T) { func TestGetProjectFunc(t *testing.T) { setup() getProjectSetup() + + argsProject = []string{} + project.DefaultConfig.Filter = filters.Filters{} mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) err = getProjectsFunc(ctx, argsProject, cmdCtx) diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index fd02d17b40..e25206a55f 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -7,7 +7,6 @@ import ( taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" @@ -114,28 +113,22 @@ func TaskToProtoMessages(l []*admin.Task) []proto.Message { func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { taskPrinter := printer.Printer{} + var tasks []*admin.Task + var err error project := config.GetConfig().Project domain := config.GetConfig().Domain if len(args) == 1 { name := args[0] - var tasks []*admin.Task - var err error if tasks, err = FetchTaskForName(ctx, cmdCtx.AdminFetcherExt(), name, project, domain); err != nil { return err } logger.Debugf(ctx, "Retrieved Task", tasks) return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } - transformFilters, err := filters.BuildResourceListRequestWithName(taskConfig.DefaultConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") - if err != nil { - return err - } - taskList, err := cmdCtx.AdminClient().ListTasks(ctx, transformFilters) + tasks, err = cmdCtx.AdminFetcherExt().FetchAllVerOfTask(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, taskConfig.DefaultConfig.Filter) if err != nil { return err } - tasks := taskList.Tasks - logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index c87cc3406b..cdefe89410 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,8 +3,6 @@ package get import ( "context" - "github.com/flyteorg/flytectl/pkg/filters" - workflowconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytestdlib/logger" @@ -74,18 +72,6 @@ Usage ` ) -//go:generate pflags WorkflowConfig --default-var workflowConfig -var ( - workflowConfig = &WorkflowConfig{ - Filter: filters.DefaultFilter, - } -) - -// WorkflowConfig -type WorkflowConfig struct { - Filter filters.Filters `json:"filter" pflag:","` -} - var workflowColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, @@ -102,30 +88,21 @@ func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} + var workflows []*admin.Workflow + var err error if len(args) > 0 { name := args[0] - var workflows []*admin.Workflow - var err error if workflows, err = FetchWorkflowForName(ctx, cmdCtx.AdminFetcherExt(), name, config.GetConfig().Project, config.GetConfig().Domain); err != nil { return err } logger.Debugf(ctx, "Retrieved %v workflow", len(workflows)) - err = adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) - if err != nil { - return err - } - return nil + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) } - transformFilters, err := filters.BuildResourceListRequestWithName(workflowConfig.Filter, config.GetConfig().Project, config.GetConfig().Domain, "") - if err != nil { - return err - } - workflowList, err := cmdCtx.AdminClient().ListWorkflows(ctx, transformFilters) + workflows, err = cmdCtx.AdminFetcherExt().FetchAllVerOfWorkflow(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, workflowconfig.DefaultConfig.Filter) if err != nil { return err } - workflows := workflowList.Workflows logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) @@ -138,7 +115,7 @@ func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterf var workflow *admin.Workflow var err error if workflowconfig.DefaultConfig.Latest { - if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain, workflowConfig.Filter); err != nil { + if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain, workflowconfig.DefaultConfig.Filter); err != nil { return nil, err } workflows = append(workflows, workflow) @@ -148,7 +125,7 @@ func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterf } workflows = append(workflows, workflow) } else { - workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain, workflowConfig.Filter) + workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain, workflowconfig.DefaultConfig.Filter) if err != nil { return nil, err } diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 29f3274afc..a3e47e8332 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" @@ -97,14 +96,3 @@ func TestGetWorkflowFuncWithError(t *testing.T) { }) } - -func TestGetWorkflowFunc(t *testing.T) { - setup() - getWorkflowSetup() - workflowConfig.Filter = filters.Filters{} - argsWorkflow := []string{} - mockClient.OnListWorkflowsMatch(ctx, resourceListRequestWorkflow).Return(workflowListResponse, nil) - err = getWorkflowFunc(ctx, argsWorkflow, cmdCtx) - assert.Nil(t, err) - mockClient.AssertCalled(t, "ListWorkflows", ctx, resourceListRequestWorkflow) -} diff --git a/flytectl/pkg/ext/execution_fetcher.go b/flytectl/pkg/ext/execution_fetcher.go index e96351c8b8..4e30a708bb 100644 --- a/flytectl/pkg/ext/execution_fetcher.go +++ b/flytectl/pkg/ext/execution_fetcher.go @@ -3,6 +3,8 @@ package ext import ( "context" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) @@ -20,3 +22,15 @@ func (a *AdminFetcherExtClient) FetchExecution(ctx context.Context, name, projec } return e, nil } + +func (a *AdminFetcherExtClient) ListExecution(ctx context.Context, project, domain string, filter filters.Filters) (*admin.ExecutionList, error) { + transformFilters, err := filters.BuildResourceListRequestWithName(filter, project, domain, "") + if err != nil { + return nil, err + } + e, err := a.AdminServiceClient().ListExecutions(ctx, transformFilters) + if err != nil { + return nil, err + } + return e, nil +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index ecc3b6371c..83a4753401 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -19,6 +19,9 @@ type AdminFetcherExtInterface interface { // FetchExecution fetches the execution based on name, project, domain FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) + // ListExecution fetches the all versions of based on name, project, domain + ListExecution(ctx context.Context, project, domain string, filter filters.Filters) (*admin.ExecutionList, error) + // FetchAllVerOfLP fetches all versions of launch plan in a project, domain FetchAllVerOfLP(ctx context.Context, lpName, project, domain string, filter filters.Filters) ([]*admin.LaunchPlan, error) @@ -51,6 +54,9 @@ type AdminFetcherExtInterface interface { // FetchProjectDomainAttributes fetches project domain attributes particular resource type in a project, domain FetchProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) + + // ListProjects fetches all projects + ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) } // AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 8ae7cde8f8..23b64e3696 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -544,3 +544,85 @@ func (_m *AdminFetcherExtInterface) FetchWorkflowVersion(ctx context.Context, na return r0, r1 } + +type AdminFetcherExtInterface_ListExecution struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_ListExecution) Return(_a0 *admin.ExecutionList, _a1 error) *AdminFetcherExtInterface_ListExecution { + return &AdminFetcherExtInterface_ListExecution{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnListExecution(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_ListExecution { + c := _m.On("ListExecution", ctx, project, domain, filter) + return &AdminFetcherExtInterface_ListExecution{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnListExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListExecution { + c := _m.On("ListExecution", matchers...) + return &AdminFetcherExtInterface_ListExecution{Call: c} +} + +// ListExecution provides a mock function with given fields: ctx, project, domain, filter +func (_m *AdminFetcherExtInterface) ListExecution(ctx context.Context, project string, domain string, filter filters.Filters) (*admin.ExecutionList, error) { + ret := _m.Called(ctx, project, domain, filter) + + var r0 *admin.ExecutionList + if rf, ok := ret.Get(0).(func(context.Context, string, string, filters.Filters) *admin.ExecutionList); ok { + r0 = rf(ctx, project, domain, filter) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ExecutionList) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, filters.Filters) error); ok { + r1 = rf(ctx, project, domain, filter) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AdminFetcherExtInterface_ListProjects struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_ListProjects) Return(_a0 *admin.Projects, _a1 error) *AdminFetcherExtInterface_ListProjects { + return &AdminFetcherExtInterface_ListProjects{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnListProjects(ctx context.Context, filter filters.Filters) *AdminFetcherExtInterface_ListProjects { + c := _m.On("ListProjects", ctx, filter) + return &AdminFetcherExtInterface_ListProjects{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnListProjectsMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListProjects { + c := _m.On("ListProjects", matchers...) + return &AdminFetcherExtInterface_ListProjects{Call: c} +} + +// ListProjects provides a mock function with given fields: ctx, filter +func (_m *AdminFetcherExtInterface) ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) { + ret := _m.Called(ctx, filter) + + var r0 *admin.Projects + if rf, ok := ret.Get(0).(func(context.Context, filters.Filters) *admin.Projects); ok { + r0 = rf(ctx, filter) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Projects) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, filters.Filters) error); ok { + r1 = rf(ctx, filter) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/ext/project_fetcher.go b/flytectl/pkg/ext/project_fetcher.go new file mode 100644 index 0000000000..4367bef9a6 --- /dev/null +++ b/flytectl/pkg/ext/project_fetcher.go @@ -0,0 +1,21 @@ +package ext + +import ( + "context" + + "github.com/flyteorg/flytectl/pkg/filters" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +func (a *AdminFetcherExtClient) ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) { + transformFilters, err := filters.BuildProjectListRequest(filter) + if err != nil { + return nil, err + } + e, err := a.AdminServiceClient().ListProjects(ctx, transformFilters) + if err != nil { + return nil, err + } + return e, nil +} diff --git a/flytectl/pkg/ext/project_fetcher_test.go b/flytectl/pkg/ext/project_fetcher_test.go new file mode 100644 index 0000000000..4b9c505485 --- /dev/null +++ b/flytectl/pkg/ext/project_fetcher_test.go @@ -0,0 +1,45 @@ +package ext + +import ( + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestAdminFetcherExtClient_ListProjects(t *testing.T) { + + project1 := &admin.Project{ + Id: "flyteexample", + Name: "flyteexample", + Domains: []*admin.Domain{ + { + Id: "development", + Name: "development", + }, + }, + } + + project2 := &admin.Project{ + Id: "flytesnacks", + Name: "flytesnacks", + Domains: []*admin.Domain{ + { + Id: "development", + Name: "development", + }, + }, + } + + adminClient = new(mocks.AdminServiceClient) + adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} + + projects := &admin.Projects{ + Projects: []*admin.Project{project1, project2}, + } + adminClient.OnListProjectsMatch(mock.Anything, mock.Anything).Return(projects, nil) + _, err := adminFetcherExt.ListProjects(ctx, taskFilter) + assert.Nil(t, err) +} From bb499a90ca07dada4a75df035df6f6b620c7b0eb Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 8 Jun 2021 15:24:46 +0530 Subject: [PATCH 063/356] Added Github workflow for generating docs (#85) --- flytectl/.github/workflows/generate-docs.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 flytectl/.github/workflows/generate-docs.yaml diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml new file mode 100644 index 0000000000..2a1b631b50 --- /dev/null +++ b/flytectl/.github/workflows/generate-docs.yaml @@ -0,0 +1,54 @@ +name: Generate Documentation + +on: + push: + branches: + - master + +jobs: + build: + name: Generate documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + lfs: true + - uses: actions/setup-go@v1 + with: + go-version: '1.16' + - uses: actions/setup-python@v1 + with: + python-version: 3.9 + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: docs-pip-${{ runner.os }}-${{ hashFiles('doc-requirements.txt') }}-${{ hashFiles('doc-requirements.in') }} + restore-keys: docs-pip- + - name: Install Dependencies + run: | + # Install all requirments + pip install -r doc-requirements.txt + - name: Generate documentation + run: | + make -C docs gendocs + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update documentation + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-documentation + delete-branch: true + title: 'Update documentation' + body: | + Update documentation + - Auto-generated by [flyte-bot] + labels: | + documentation + team-reviewers: | + owners + maintainers + draft: false From 38aae27c4998a3981e4dd4836457384ed470b6df Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 8 Jun 2021 18:14:47 +0530 Subject: [PATCH 064/356] downgrade python version (#87) --- flytectl/.github/workflows/generate-docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml index 2a1b631b50..818a154b1d 100644 --- a/flytectl/.github/workflows/generate-docs.yaml +++ b/flytectl/.github/workflows/generate-docs.yaml @@ -18,7 +18,7 @@ jobs: go-version: '1.16' - uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.8 - uses: actions/cache@v2 with: path: ~/.cache/pip From 3a07da0e4ff8f5b2fc666d6613ac69b7f637f952 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Sun, 13 Jun 2021 02:12:32 -0700 Subject: [PATCH 065/356] Updated version of flyteidl and removed the pinned version (#90) --- flytectl/go.mod | 3 +-- flytectl/go.sum | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index ace309880f..07874fe435 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.18.51 + github.com/flyteorg/flyteidl v0.19.2 github.com/flyteorg/flytestdlib v0.3.21 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 @@ -29,4 +29,3 @@ require ( sigs.k8s.io/yaml v1.2.0 ) -replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e diff --git a/flytectl/go.sum b/flytectl/go.sum index 2397a7141f..039b42b856 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -174,6 +174,8 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e h1:J3Uaju9mBrJhrU4kiv3ozpZNkDdjDepkn0X6ueB8iag= github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.2 h1:jXuRrLJEzSo33N9pw7bMEd6mRYSL7LCz/vnazz5XcOg= +github.com/flyteorg/flyteidl v0.19.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= From 517beb9a8771028cdddf300fb56851899c79847a Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 14 Jun 2021 00:06:13 +0530 Subject: [PATCH 066/356] Added flytectl config by env variable (#91) * Added flytectl config by env variable * remove -c short command from register flags Signed-off-by: Yuvraj --- .../config/subcommand/register/filesconfig_flags.go | 2 +- flytectl/cmd/register/files.go | 10 +++++----- flytectl/cmd/root.go | 13 ++++++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index dce52b6c8b..ffcb0d7ec4 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -14,7 +14,7 @@ import ( func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) cmdFlags.StringVarP(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), "v", DefaultFilesConfig.Version, "version of the entity to be registered with flyte.") - cmdFlags.BoolVarP(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), "c", DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") + cmdFlags.BoolVarP(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), "", DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") cmdFlags.BoolVarP(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), "a", DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") cmdFlags.StringVarP(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), "i", DefaultFilesConfig.AssumableIamRole, " Custom assumable iam auth role to register launch plans with.") cmdFlags.StringVarP(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), "k", DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index f0762d89a0..f8d07c969e 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -43,7 +43,7 @@ the continueOnError flag. Using short format of continueOnError flag :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError Overriding the default version v1 using version string. :: @@ -54,25 +54,25 @@ Change the o/p format has not effect on registration. The O/p is currently avail :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -o yaml + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml Override IamRole during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -i "arn:aws:iam::123456789:role/dummy" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -i "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -k "kubernetes-service-account" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -k "kubernetes-service-account" Override Output location prefix during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -l "s3://dummy/prefix" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" Usage ` diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 15533fd625..cadeba379d 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "os" f "github.com/flyteorg/flytectl/pkg/filesystemutils" @@ -42,8 +43,7 @@ func newRootCmd() *cobra.Command { DisableAutoGenTag: true, } - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName), - "config file (default is $HOME/.flyte/config.yaml)") + rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.flyte/config.yaml)") configAccessor.InitializePflags(rootCmd.PersistentFlags()) @@ -68,9 +68,16 @@ func newRootCmd() *cobra.Command { } func initConfig(_ *cobra.Command, _ []string) error { + configFile := f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName) + if len(os.Getenv("FLYTECTL_CONFIG")) > 0 { + configFile = os.Getenv("FLYTECTL_CONFIG") + } + if len(cfgFile) > 0 { + configFile = cfgFile + } configAccessor = viper.NewAccessor(stdConfig.Options{ StrictMode: true, - SearchPaths: []string{cfgFile}, + SearchPaths: []string{configFile}, }) err := configAccessor.UpdateConfig(context.TODO()) From c5ab11ae3bdc9bd5fc0c8c33cdf2b23af2bfab55 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 14 Jun 2021 15:33:32 +0530 Subject: [PATCH 067/356] Added sandbox command (#86) --- flytectl/README.md | 12 +- flytectl/cmd/register/examples.go | 44 +++ flytectl/cmd/register/files.go | 4 + flytectl/cmd/register/register.go | 2 + flytectl/cmd/register/register_test.go | 13 +- flytectl/cmd/register/register_util.go | 43 +++ flytectl/cmd/register/register_util_test.go | 8 + flytectl/cmd/root.go | 3 + flytectl/cmd/sandbox/sandbox.go | 45 +++ flytectl/cmd/sandbox/sandbox_test.go | 31 ++ flytectl/cmd/sandbox/sandbox_util.go | 160 ++++++++ flytectl/cmd/sandbox/sandbox_util_test.go | 100 +++++ flytectl/cmd/sandbox/start.go | 74 ++++ flytectl/cmd/sandbox/teardown.go | 53 +++ flytectl/config.yaml | 4 +- flytectl/docs/source/index.rst | 13 +- flytectl/go.mod | 16 +- flytectl/go.sum | 396 +++++++++++++++++++- 18 files changed, 988 insertions(+), 33 deletions(-) create mode 100644 flytectl/cmd/register/examples.go create mode 100644 flytectl/cmd/sandbox/sandbox.go create mode 100644 flytectl/cmd/sandbox/sandbox_test.go create mode 100644 flytectl/cmd/sandbox/sandbox_util.go create mode 100644 flytectl/cmd/sandbox/sandbox_util_test.go create mode 100644 flytectl/cmd/sandbox/start.go create mode 100644 flytectl/cmd/sandbox/teardown.go diff --git a/flytectl/README.md b/flytectl/README.md index b23d3cf373..9fb726e145 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -21,23 +21,21 @@ Generating docs locally can be accomplished by running make gendocs from within ## Installation ```bash -$ brew tap flyteorg/homebrew-tap -$ brew install flytectl +$ brew tap flyteorg/homebrew-tap/flytectl ``` ## Get Started ### Create a sandbox cluster ```bash -$ docker run --rm --privileged -p 30081:30081 -p 30082:30082 -p 30084:30084 ghcr.io/flyteorg/flyte-sandbox +$ flytectl sandbox start ``` -### Register your first workflow - +### Register flytesnacks example ```bash # Run Core workflows -$ flytectl register files https://github.com/flyteorg/flytesnacks/releases/download/v0.2.89/flytesnacks-core.tgz -d development -p flytesnacks --archive -# You can find all example at flytesnacks release page https://github.com/flyteorg/flytesnacks/releases/tag/v0.2.89 +$ flytectl register examples -d development -p flytesnacks ``` + ## Contributing [Contribution guidelines for this project](docs/CONTRIBUTING.md) diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go new file mode 100644 index 0000000000..9de4cfcf86 --- /dev/null +++ b/flytectl/cmd/register/examples.go @@ -0,0 +1,44 @@ +package register + +import ( + "context" + "fmt" + + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + registerExampleShort = "Registers flytesnack example" + registerExampleLong = ` +Registers all latest flytesnacks example +:: + + bin/flytectl register examples -d development -p flytesnacks + + +Usage +` + githubOrg = "flyteorg" + githubRepository = "flytesnacks" + archive = true + snackReleaseURL = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flytesnacks-%s.tgz" + flyteManifest = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flyte_tests_manifest.json" +) + +func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + flytesnacks, tag, err := getFlyteTestManifest() + if err != nil { + return err + } + rconfig.DefaultFilesConfig.Archive = archive + for _, v := range flytesnacks { + args := []string{ + fmt.Sprintf(snackReleaseURL, tag, v.Name), + } + if err := Register(ctx, args, cmdCtx); err != nil { + return fmt.Errorf("Example %v failed to register %v", v.Name, err) + } + } + return nil +} diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index f8d07c969e..a33d7eea78 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -79,6 +79,10 @@ Usage ) func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + return Register(ctx, args, cmdCtx) +} + +func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { dataRefs, tmpDir, _err := getSortedFileList(ctx, args) if _err != nil { logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", _err) diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 0ae04aaaaa..ccc95a5127 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -28,6 +28,8 @@ func RemoteRegisterCommand() *cobra.Command { registerResourcesFuncs := map[string]cmdcore.CommandEntry{ "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: rconfig.DefaultFilesConfig, Short: registerFilesShort, Long: registerFilesLong}, + "examples": {CmdFunc: registerExamplesFunc, Aliases: []string{"example", "flytesnack", "flytesnacks"}, PFlagProvider: rconfig.DefaultFilesConfig, + Short: registerExampleShort, Long: registerExampleLong}, } cmdcore.AddCommands(registerCmd, registerResourcesFuncs) return registerCmd diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index 6943979912..33f48dddd3 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -29,13 +29,18 @@ func TestRegisterCommand(t *testing.T) { assert.Equal(t, registerCommand.Use, "register") assert.Equal(t, registerCommand.Short, "Registers tasks/workflows/launchplans from list of generated serialized files.") fmt.Println(registerCommand.Commands()) - assert.Equal(t, len(registerCommand.Commands()), 1) + assert.Equal(t, len(registerCommand.Commands()), 2) cmdNouns := registerCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "files") - assert.Equal(t, cmdNouns[0].Aliases, []string{"file"}) - assert.Equal(t, cmdNouns[0].Short, "Registers file resources") + + assert.Equal(t, cmdNouns[0].Use, "examples") + assert.Equal(t, cmdNouns[0].Aliases, []string{"example", "flytesnack", "flytesnacks"}) + assert.Equal(t, cmdNouns[0].Short, "Registers flytesnack example") + + assert.Equal(t, cmdNouns[1].Use, "files") + assert.Equal(t, cmdNouns[1].Aliases, []string{"file"}) + assert.Equal(t, cmdNouns[1].Short, "Registers file resources") } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 34afc816b2..8f3883a573 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -4,6 +4,7 @@ import ( "archive/tar" "compress/gzip" "context" + "encoding/json" "errors" "fmt" "io" @@ -13,6 +14,8 @@ import ( "sort" "strings" + "github.com/google/go-github/github" + "github.com/flyteorg/flytectl/cmd/config" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -43,6 +46,21 @@ type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } +var FlyteSnacksRelease []FlyteSnack + +// FlyteSnack Defines flyte test manifest structure +type FlyteSnack struct { + Name string `json:"name"` + Priority string `json:"priority"` + Path string `json:"path"` + ExitCondition Condition `json:"exitCondition"` +} + +type Condition struct { + ExitSuccess bool `json:"exit_success"` + ExitMessage string `json:"exit_message"` +} + var httpClient HTTPClient func init() { @@ -395,3 +413,28 @@ func getJSONSpec(message proto.Message) string { jsonSpec, _ := marshaller.MarshalToString(message) return jsonSpec } + +func getFlyteTestManifest() ([]FlyteSnack, string, error) { + c := github.NewClient(nil) + opt := &github.ListOptions{Page: 1, PerPage: 1} + releases, _, err := c.Repositories.ListReleases(context.Background(), githubOrg, githubRepository, opt) + if err != nil { + return nil, "", err + } + response, err := http.Get(fmt.Sprintf(flyteManifest, *releases[0].TagName)) + if err != nil { + return nil, "", err + } + defer response.Body.Close() + + data, err := ioutil.ReadAll(response.Body) + if err != nil { + return nil, "", err + } + + err = json.Unmarshal(data, &FlyteSnacksRelease) + if err != nil { + return nil, "", err + } + return FlyteSnacksRelease, *releases[0].TagName, nil +} diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index a30c6016e3..b7d66ada8c 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -310,3 +310,11 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { assert.Equal(t, &admin.RawOutputDataConfig{OutputLocationPrefix: "prefix"}, lpSpec.RawOutputDataConfig) }) } + +func TestFlyteManifest(t *testing.T) { + flytesnacks, tag, err := getFlyteTestManifest() + assert.Nil(t, err) + assert.Contains(t, tag, "v") + assert.NotEmpty(t, tag) + assert.Greater(t, len(flytesnacks), 1) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index cadeba379d..a3e942b4fc 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,6 +5,8 @@ import ( "fmt" "os" + "github.com/flyteorg/flytectl/cmd/sandbox" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/cmd/config" @@ -58,6 +60,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) + rootCmd.AddCommand(sandbox.CreateSandboxCommand()) // Added version command versioncmd := version.GetVersionCommand(rootCmd) cmdCore.AddCommands(rootCmd, versioncmd) diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go new file mode 100644 index 0000000000..995c6c6890 --- /dev/null +++ b/flytectl/cmd/sandbox/sandbox.go @@ -0,0 +1,45 @@ +package sandbox + +import ( + cmdcore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + sandboxShort = `Used for testing flyte sandbox.` + sandboxLong = ` +Example Create sandbox cluster. +:: + + bin/flytectl sandbox start + + +Example Remove sandbox cluster. +:: + + bin/flytectl sandbox teardown +` +) + +// CreateSandboxCommand will return sandbox command +func CreateSandboxCommand() *cobra.Command { + sandbox := &cobra.Command{ + Use: "sandbox", + Short: sandboxShort, + Long: sandboxLong, + } + + sandboxResourcesFuncs := map[string]cmdcore.CommandEntry{ + "start": {CmdFunc: startSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: startShort, + Long: startLong}, + "teardown": {CmdFunc: teardownSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: teardownShort, + Long: teardownLong}, + } + + cmdcore.AddCommands(sandbox, sandboxResourcesFuncs) + + return sandbox +} diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go new file mode 100644 index 0000000000..fe3f964572 --- /dev/null +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -0,0 +1,31 @@ +package sandbox + +import ( + "fmt" + "sort" + "testing" + + "gotest.tools/assert" +) + +func TestCreateSandboxCommand(t *testing.T) { + sandboxCommand := CreateSandboxCommand() + assert.Equal(t, sandboxCommand.Use, "sandbox") + assert.Equal(t, sandboxCommand.Short, "Used for testing flyte sandbox.") + fmt.Println(sandboxCommand.Commands()) + assert.Equal(t, len(sandboxCommand.Commands()), 2) + cmdNouns := sandboxCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + + assert.Equal(t, cmdNouns[0].Use, "start") + assert.Equal(t, cmdNouns[0].Short, startShort) + assert.Equal(t, cmdNouns[0].Long, startLong) + + assert.Equal(t, cmdNouns[1].Use, "teardown") + assert.Equal(t, cmdNouns[1].Short, teardownShort) + assert.Equal(t, cmdNouns[1].Long, teardownLong) + +} diff --git a/flytectl/cmd/sandbox/sandbox_util.go b/flytectl/cmd/sandbox/sandbox_util.go new file mode 100644 index 0000000000..d739e671a7 --- /dev/null +++ b/flytectl/cmd/sandbox/sandbox_util.go @@ -0,0 +1,160 @@ +package sandbox + +import ( + "bufio" + "context" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + "strings" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/client" + "github.com/docker/go-connections/nat" + + "github.com/enescakir/emoji" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" +) + +var ( + Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") + FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config.yaml") + SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" + ImageName = "ghcr.io/flyteorg/flyte-sandbox:dind" + SandboxClusterName = "flyte-sandbox" + Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} +) + +func setupFlytectlConfig() error { + response, err := http.Get("https://raw.githubusercontent.com/flyteorg/flytectl/master/config.yaml") + if err != nil { + return err + } + defer response.Body.Close() + + data, err := ioutil.ReadAll(response.Body) + if err != nil { + return err + } + + err = ioutil.WriteFile(FlytectlConfig, data, 0600) + if err != nil { + fmt.Printf("Please create ~/.flyte dir %v \n", emoji.ManTechnologist) + return err + } + return nil +} + +func configCleanup() error { + err := os.Remove(FlytectlConfig) + if err != nil { + return err + } + err = os.RemoveAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s")) + if err != nil { + return err + } + return nil +} + +func getSandbox(cli *client.Client) *types.Container { + containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{ + All: true, + }) + if err != nil { + return nil + } + for _, v := range containers { + if strings.Contains(v.Names[0], SandboxClusterName) { + return &v + } + } + return nil +} + +func startContainer(cli *client.Client) (string, error) { + ExposedPorts, PortBindings, _ := nat.ParsePortSpecs([]string{ + "127.0.0.1:30086:30086", + "127.0.0.1:30081:30081", + "127.0.0.1:30082:30082", + "127.0.0.1:30084:30084", + }) + r, err := cli.ImagePull(context.Background(), ImageName, types.ImagePullOptions{}) + if err != nil { + return "", err + } + + if _, err := io.Copy(os.Stdout, r); err != nil { + return "", err + } + + resp, err := cli.ContainerCreate(context.Background(), &container.Config{ + Env: Environment, + Image: ImageName, + Tty: false, + ExposedPorts: ExposedPorts, + }, &container.HostConfig{ + Mounts: []mount.Mount{ + { + Type: mount.TypeBind, + Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), + Target: "/etc/rancher/", + }, + // TODO (Yuvraj) Add flytectl config in sandbox and mount with host file system + //{ + // Type: mount.TypeBind, + // Source: f.FilePathJoin(f.UserHomeDir(), ".flyte", "config.yaml"), + // Target: "/.flyte/", + //}, + }, + PortBindings: PortBindings, + Privileged: true, + }, nil, + nil, SandboxClusterName) + if err != nil { + return "", err + } + + if err := cli.ContainerStart(context.Background(), resp.ID, types.ContainerStartOptions{}); err != nil { + return "", err + } + return resp.ID, nil +} + +func watchError(cli *client.Client, id string) { + statusCh, errCh := cli.ContainerWait(context.Background(), id, container.WaitConditionNotRunning) + select { + case err := <-errCh: + if err != nil { + panic(err) + } + case <-statusCh: + } +} + +func readLogs(cli *client.Client, id string) error { + reader, err := cli.ContainerLogs(context.Background(), id, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }) + if err != nil { + return err + } + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + if strings.Contains(scanner.Text(), SuccessMessage) { + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, SuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) + fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") + break + } + fmt.Println(scanner.Text()) + } + return nil +} diff --git a/flytectl/cmd/sandbox/sandbox_util_test.go b/flytectl/cmd/sandbox/sandbox_util_test.go new file mode 100644 index 0000000000..269152a9ba --- /dev/null +++ b/flytectl/cmd/sandbox/sandbox_util_test.go @@ -0,0 +1,100 @@ +package sandbox + +import ( + "context" + "io/ioutil" + "os" + "strings" + "testing" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/client" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" + + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + + "github.com/stretchr/testify/assert" +) + +var ( + cmdCtx cmdCore.CommandContext +) + +func cleanup(client *client.Client) error { + containers, err := client.ContainerList(context.Background(), types.ContainerListOptions{ + All: true, + }) + if err != nil { + return err + } + for _, v := range containers { + if strings.Contains(v.Names[0], SandboxClusterName) { + if err := client.ContainerRemove(context.Background(), v.ID, types.ContainerRemoveOptions{}); err != nil { + return err + } + } + } + return nil +} + +func setupSandbox() { + mockAdminClient := u.MockClient + cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + _ = setupFlytectlConfig() +} + +func TestConfigCleanup(t *testing.T) { + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + _ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600) + _ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600) + + err = configCleanup() + assert.Nil(t, err) + + _, err = os.Stat(FlytectlConfig) + check := os.IsNotExist(err) + assert.Equal(t, check, true) + + _, err = os.Stat(Kubeconfig) + check = os.IsNotExist(err) + assert.Equal(t, check, true) + _ = configCleanup() +} + +func TestSetupFlytectlConfig(t *testing.T) { + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + err = setupFlytectlConfig() + assert.Nil(t, err) + _, err = os.Stat(FlytectlConfig) + assert.Nil(t, err) + check := os.IsNotExist(err) + assert.Equal(t, check, false) + _ = configCleanup() +} + +func TestTearDownSandbox(t *testing.T) { + setupSandbox() + cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + err := teardownSandboxCluster(context.Background(), []string{}, cmdCtx) + assert.Nil(t, err) + assert.Nil(t, cleanup(cli)) +} + +func TestStartContainer(t *testing.T) { + setupSandbox() + cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + assert.Nil(t, cleanup(cli)) + err := startSandboxCluster(context.Background(), []string{}, cmdCtx) + assert.Nil(t, err) +} diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go new file mode 100644 index 0000000000..6a620603dd --- /dev/null +++ b/flytectl/cmd/sandbox/start.go @@ -0,0 +1,74 @@ +package sandbox + +import ( + "context" + "fmt" + "os" + + "github.com/docker/docker/client" + "github.com/enescakir/emoji" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" +) + +const ( + startShort = "Start the flyte sandbox" + startLong = ` +Start will run the flyte sandbox cluster inside a docker container and setup the config that is required +:: + + bin/flytectl start + +Usage + ` +) + +type ExecResult struct { + StdOut string + StdErr string + ExitCode int +} + +func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + fmt.Printf("%v It will take some time, We will start a fresh flyte cluster for you %v %v\n", emoji.ManTechnologist, emoji.Rocket, emoji.Rocket) + cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + if err != nil { + fmt.Printf("Please Check your docker client %v \n", emoji.ManTechnologist) + return err + } + + if err := setupFlytectlConfig(); err != nil { + return err + } + + if container := getSandbox(cli); container != nil { + if cmdUtil.AskForConfirmation("delete existing sandbox cluster", os.Stdin) { + if err := teardownSandboxCluster(ctx, []string{}, cmdCtx); err != nil { + return err + } + } + } + + ID, err := startContainer(cli) + if err == nil { + os.Setenv("KUBECONFIG", Kubeconfig) + + defer func() { + if r := recover(); r != nil { + fmt.Println("Something goes wrong with container status", r) + } + }() + + go watchError(cli, ID) + if err := readLogs(cli, ID); err != nil { + return err + } + + fmt.Printf("Add (KUBECONFIG) to your environment variabl \n") + fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) + return nil + } + fmt.Println("Something goes wrong. We are not able to start sandbox container, Please check your docker client and try again \n", emoji.Rocket) + fmt.Printf("error: %v", err) + return nil +} diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go new file mode 100644 index 0000000000..9e0c9c5d50 --- /dev/null +++ b/flytectl/cmd/sandbox/teardown.go @@ -0,0 +1,53 @@ +package sandbox + +import ( + "context" + "fmt" + + "github.com/enescakir/emoji" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/client" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + teardownShort = "Teardown will cleanup the sandbox environment" + teardownLong = ` +Teardown will remove docker container and all the flyte config +:: + + bin/flytectl sandbox teardown + +Stop will remove docker container and all the flyte config +:: + + bin/flytectl sandbox stop + + +Usage +` +) + +func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + + cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + if err != nil { + return err + } + + container := getSandbox(cli) + if container != nil { + if err := cli.ContainerRemove(ctx, container.ID, types.ContainerRemoveOptions{ + Force: true, + }); err != nil { + return err + } + } + + if err := configCleanup(); err != nil { + fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) + } + fmt.Printf("Sandbox cluster is removed successfully %v \n", emoji.Rocket) + return nil +} diff --git a/flytectl/config.yaml b/flytectl/config.yaml index a4505fccf6..eccd8b7498 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,7 +1,7 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///flyte.myexample.com - authType: Pkce + endpoint: dns:///localhost:30081 + insecure: true logger: show-source: true level: 1 diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 2cf449aeb6..3ac81e83d6 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -8,12 +8,19 @@ Install ======= Flytectl is a Golang binary and can be installed on any platform supported by -golang. To install simply copy paste the following into the command-line: +golang + +Install flytectl with homebrew tap .. prompt:: bash - curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + brew tap flyteorg/homebrew-tap/flytectl + +Install flytectl with shell script +.. prompt:: bash + + curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash Configure ========= @@ -29,8 +36,6 @@ Basic Configuration # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///flyte.lyft.net authType: Pkce - # Change insecure flag to ensure that you use the right setting for your environment - insecure: true logger: # Logger settings to control logger output. Useful to debug logger: show-source: true diff --git a/flytectl/go.mod b/flytectl/go.mod index 07874fe435..e5bac1bdc0 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -3,17 +3,25 @@ module github.com/flyteorg/flytectl go 1.13 require ( - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/flyteorg/flyteidl v0.19.2 + github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/containerd/containerd v1.5.2 // indirect + github.com/docker/docker v20.10.7+incompatible + github.com/docker/go-connections v0.4.0 + github.com/enescakir/emoji v1.0.0 + github.com/flyteorg/flyteidl v0.18.51 github.com/flyteorg/flytestdlib v0.3.21 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 - github.com/google/uuid v1.1.2 + github.com/google/go-github v17.0.0+incompatible + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/uuid v1.2.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.4.1 + github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect + github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 @@ -26,6 +34,6 @@ require ( google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 + gotest.tools v2.2.0+incompatible sigs.k8s.io/yaml v1.2.0 ) - diff --git a/flytectl/go.sum b/flytectl/go.sum index 039b42b856..5138a2d9b5 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -39,16 +40,22 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= @@ -57,6 +64,7 @@ github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8K github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= @@ -70,11 +78,31 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= +github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -84,27 +112,40 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -112,11 +153,16 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -124,14 +170,103 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= +github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= +github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= +github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= +github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= +github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= +github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.2 h1:MG/Bg1pbmMb61j3wHCFWPxESXHieiKr2xG64px/k8zQ= +github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= +github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= +github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= +github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= +github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -139,15 +274,40 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -159,6 +319,9 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= +github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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= @@ -172,10 +335,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e h1:J3Uaju9mBrJhrU4kiv3ozpZNkDdjDepkn0X6ueB8iag= -github.com/flyteorg/flyteidl v0.18.51-0.20210602050605-9ebebd25056e/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= -github.com/flyteorg/flyteidl v0.19.2 h1:jXuRrLJEzSo33N9pw7bMEd6mRYSL7LCz/vnazz5XcOg= -github.com/flyteorg/flyteidl v0.19.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.18.51 h1:fp4Qq9WtO3QeDbFpKk0uQqB/cF78+Ul7D3DhvQPlV5Q= +github.com/flyteorg/flyteidl v0.18.51/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= @@ -183,15 +344,19 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTg github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -213,13 +378,22 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -264,6 +438,10 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -286,8 +464,9 @@ github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -295,9 +474,13 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= @@ -316,10 +499,12 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -342,9 +527,15 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK 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.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -369,12 +560,16 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= 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/konsorten/go-windows-terminal-sequences v1.0.3/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.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -387,11 +582,14 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -402,9 +600,13 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -415,13 +617,25 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= @@ -432,23 +646,54 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -470,6 +715,7 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -479,15 +725,19 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -495,23 +745,30 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -520,13 +777,18 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +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.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -534,6 +796,7 @@ github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -547,7 +810,9 @@ github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= @@ -555,21 +820,26 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -579,22 +849,47 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -613,7 +908,9 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -623,9 +920,11 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/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.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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= @@ -664,6 +963,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -675,13 +975,16 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -697,13 +1000,15 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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= @@ -738,23 +1043,38 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -764,19 +1084,29 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -810,6 +1140,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -861,6 +1192,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -893,11 +1225,13 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -907,6 +1241,7 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -929,12 +1264,14 @@ google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -944,6 +1281,7 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -970,8 +1308,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= @@ -980,12 +1320,17 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -1001,6 +1346,11 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1010,22 +1360,44 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= -k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 h1:d+LBRNY3c/KGp7lDblRlUJkayx4Vla7WUTIazoGMdYo= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6 h1:R5p3SlhaABYShQSO6LpPsYHjV05Q+79eBUR0Ut/f4tk= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.6 h1:nJZOfolnsVtDtbGJNCxzOtKUAu7zvXjB8+pMo9UNxZo= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= +k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From c7d02dfdbe733bd834fbade8b5eae21fe716ce6e Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss <77798312+pmahindrakar-oss@users.noreply.github.com> Date: Tue, 15 Jun 2021 09:46:22 +0530 Subject: [PATCH 068/356] Bumped up flyteidl to 0.19.2 (#94) Signed-off-by: Prafulla Mahindrakar --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index e5bac1bdc0..badf4b152a 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.18.51 + github.com/flyteorg/flyteidl v0.19.2 github.com/flyteorg/flytestdlib v0.3.21 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index 5138a2d9b5..34735a6953 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -335,8 +335,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.18.51 h1:fp4Qq9WtO3QeDbFpKk0uQqB/cF78+Ul7D3DhvQPlV5Q= -github.com/flyteorg/flyteidl v0.18.51/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.2 h1:jXuRrLJEzSo33N9pw7bMEd6mRYSL7LCz/vnazz5XcOg= +github.com/flyteorg/flyteidl v0.19.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= From 122d1628748dc92884b68342ed83f202b2a7fd7f Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 15 Jun 2021 22:34:33 +0530 Subject: [PATCH 069/356] new flytestd libe version added (#93) * new flytestd libe version added Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 2 + flytectl/README.md | 12 ++++- flytectl/docs/source/index.rst | 4 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- flytectl/pkg/filters/coverage.out | 68 --------------------------- 6 files changed, 19 insertions(+), 73 deletions(-) delete mode 100644 flytectl/pkg/filters/coverage.out diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 9f4ae2c1d6..43e996590c 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: "0" - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: diff --git a/flytectl/README.md b/flytectl/README.md index 9fb726e145..1dab7131eb 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -20,9 +20,19 @@ Generating docs locally can be accomplished by running make gendocs from within ## Installation +Install flytectl with homebrew tap ```bash -$ brew tap flyteorg/homebrew-tap/flytectl +$ brew install flyteorg/homebrew-tap/flytectl + +# Upgrade flytectl +$ brew upgrade flytectl ``` + +Install flytectl with shell script +```bash +$ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash +``` + ## Get Started ### Create a sandbox cluster diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 3ac81e83d6..1113458744 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -14,7 +14,9 @@ Install flytectl with homebrew tap .. prompt:: bash - brew tap flyteorg/homebrew-tap/flytectl + brew install flyteorg/homebrew-tap/flytectl + # Upgrade flytectl + brew upgrade flytectl Install flytectl with shell script diff --git a/flytectl/go.mod b/flytectl/go.mod index badf4b152a..522426121a 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v0.19.2 - github.com/flyteorg/flytestdlib v0.3.21 + github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible diff --git a/flytectl/go.sum b/flytectl/go.sum index 34735a6953..a6fadab413 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -338,8 +338,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.19.2 h1:jXuRrLJEzSo33N9pw7bMEd6mRYSL7LCz/vnazz5XcOg= github.com/flyteorg/flyteidl v0.19.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.21 h1:AF+y6wI64DNfoi4WtZU/v18Cfwksg32fijy7PZJ8d+I= -github.com/flyteorg/flytestdlib v0.3.21/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= +github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= diff --git a/flytectl/pkg/filters/coverage.out b/flytectl/pkg/filters/coverage.out deleted file mode 100644 index 937e698b18..0000000000 --- a/flytectl/pkg/filters/coverage.out +++ /dev/null @@ -1,68 +0,0 @@ -mode: set -github.com/flyteorg/flytectl/pkg/filters/filters.go:18.41,19.18 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:22.2,22.19 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:19.18,21.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:26.50,28.28 2 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:47.2,47.25 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:28.28,29.39 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:29.39,31.18 2 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:34.4,34.36 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:31.18,33.5 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:34.36,36.29 2 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:36.29,38.6 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:38.11,40.6 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:41.10,44.5 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:51.37,53.34 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:56.2,56.14 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:53.34,55.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:64.47,66.2 1 0 -github.com/flyteorg/flytectl/pkg/filters/filters.go:70.46,72.36 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:76.2,78.22 3 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:104.2,104.13 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:108.2,108.24 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:72.36,74.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:78.22,79.14 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:92.3,92.12 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:79.14,80.13 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:88.4,89.12 2 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:81.24,83.19 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:84.12,86.72 1 0 -github.com/flyteorg/flytectl/pkg/filters/filters.go:93.13,94.18 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:95.17,97.34 1 0 -github.com/flyteorg/flytectl/pkg/filters/filters.go:98.11,99.18 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:104.13,106.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:116.39,118.2 1 0 -github.com/flyteorg/flytectl/pkg/filters/filters.go:121.58,122.24 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:144.2,144.26 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:122.24,125.36 3 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:125.36,126.22 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:126.22,127.40 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:127.40,130.6 2 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:131.10,131.23 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:131.23,132.34 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:132.34,136.6 3 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:137.10,138.41 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:138.41,140.6 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:148.44,149.12 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:167.2,167.11 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:150.25,151.45 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:152.22,153.45 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:154.19,155.44 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:156.16,157.44 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:158.16,159.50 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:160.17,161.44 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:162.14,163.44 1 1 -github.com/flyteorg/flytectl/pkg/filters/filters.go:164.10,165.50 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:7.116,9.16 2 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:12.2,20.19 2 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:23.2,23.49 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:26.2,26.21 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:9.16,11.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:20.19,22.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:23.49,25.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:29.76,31.16 2 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:34.2,39.21 2 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:31.16,33.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:42.49,44.11 2 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:47.2,50.3 1 1 -github.com/flyteorg/flytectl/pkg/filters/util.go:44.11,46.3 1 1 From 400d4b6c6cd39f65021809f14b0676824219c484 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 16 Jun 2021 10:07:54 +0530 Subject: [PATCH 070/356] Added gpg sign commit for flyte-bot (#92) * Added gpg sign Signed-off-by: Yuvraj --- .../workflows/boilerplate-automation.yml | 6 +++ flytectl/.github/workflows/generate-docs.yaml | 6 +++ .../.github/workflows/release-automation.yml | 47 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 flytectl/.github/workflows/release-automation.yml diff --git a/flytectl/.github/workflows/boilerplate-automation.yml b/flytectl/.github/workflows/boilerplate-automation.yml index c6c8a2a53b..1692c7059e 100644 --- a/flytectl/.github/workflows/boilerplate-automation.yml +++ b/flytectl/.github/workflows/boilerplate-automation.yml @@ -10,6 +10,12 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: "0" + - uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} + git-user-signingkey: true + git-commit-gpgsign: true - name: Update Boilerplate run: | make update_boilerplate diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml index 818a154b1d..21c0aad628 100644 --- a/flytectl/.github/workflows/generate-docs.yaml +++ b/flytectl/.github/workflows/generate-docs.yaml @@ -24,6 +24,12 @@ jobs: path: ~/.cache/pip key: docs-pip-${{ runner.os }}-${{ hashFiles('doc-requirements.txt') }}-${{ hashFiles('doc-requirements.in') }} restore-keys: docs-pip- + - uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} + git-user-signingkey: true + git-commit-gpgsign: true - name: Install Dependencies run: | # Install all requirments diff --git a/flytectl/.github/workflows/release-automation.yml b/flytectl/.github/workflows/release-automation.yml new file mode 100644 index 0000000000..0c16bd1c00 --- /dev/null +++ b/flytectl/.github/workflows/release-automation.yml @@ -0,0 +1,47 @@ +name: Update flyteidl version +on: + workflow_dispatch: + +jobs: + update-flyte-releases: + name: Update Flyteidl version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} + git-user-signingkey: true + git-commit-gpgsign: true + - name: Update Flyte component + run: | + FLYTEIDL_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteidl/releases/latest" | jq -r .tag_name) + go get -u github.com/flyteorg/flyteidl@$FLYTEIDL_VERSION + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update Flyteidl version + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-flyteidl + delete-branch: true + title: 'Update Flyteidl version' + body: | + Update Flyteidl version + - Auto-generated by [flyte-bot] + labels: | + flyteidl + team-reviewers: | + owners + maintainers + draft: false \ No newline at end of file From d98708da2e4c4582b8adbf8c88b8bb657e0127be Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 16 Jun 2021 21:21:11 +0530 Subject: [PATCH 071/356] Release a new version for each master merge (#96) * release a new version in each master merge Signed-off-by: Yuvraj --- flytectl/.github/workflows/master.yml | 63 ++++++++++++++++++++++++++ flytectl/.github/workflows/release.yml | 19 -------- 2 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 flytectl/.github/workflows/master.yml delete mode 100644 flytectl/.github/workflows/release.yml diff --git a/flytectl/.github/workflows/master.yml b/flytectl/.github/workflows/master.yml new file mode 100644 index 0000000000..3e21b83bd7 --- /dev/null +++ b/flytectl/.github/workflows/master.yml @@ -0,0 +1,63 @@ +name: Master + +on: + push: + branches: + - master + +jobs: + bump-version: + name: Bump Version + if: github.event.head_commit.name != 'flyte-bot' + runs-on: ubuntu-latest + outputs: + version: ${{ steps.bump-version.outputs.tag }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + - name: Bump version and push tag + id: bump-version + uses: anothrNick/github-tag-action@1.17.2 + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} + WITH_V: true + DEFAULT_BUMP: patch + + goreleaser: + name: Release flytectl + runs-on: ubuntu-latest + needs: [ bump-version ] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} + + test: + name: Run tests and lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Unit Tests + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make test_unit_codecov + - name: Lint + uses: cedrickring/golang-action@1.5.2 + env: + GO111MODULE: "on" + with: + args: make install && make lint \ No newline at end of file diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml deleted file mode 100644 index 6f27d86990..0000000000 --- a/flytectl/.github/workflows/release.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: releaser -on: - push: - tags: - - 'v*' - -jobs: - create-release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist --debug - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} From 1cfb915554615a4e954a7b68eaa05c05e92926cd Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 16 Jun 2021 16:24:44 -0700 Subject: [PATCH 072/356] Pass k8s account on LP Execution (#100) Signed-off-by: Haytham Abuelfutuh --- flytectl/cmd/create/execution_util.go | 67 ++++++++++++++++++--------- 1 file changed, 44 insertions(+), 23 deletions(-) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 94924fbfaa..4442301327 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -16,60 +16,79 @@ import ( func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { - var lp *admin.LaunchPlan - var err error - // Fetch the launch plan - if lp, err = cmdCtx.AdminFetcherExt().FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain); err != nil { + lp, err := cmdCtx.AdminFetcherExt().FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain) + if err != nil { return nil, err } // Create workflow params literal map - var paramLiterals map[string]*core.Literal workflowParams := cmdGet.WorkflowParams(lp) - - if paramLiterals, err = MakeLiteralForParams(executionConfig.Inputs, workflowParams); err != nil { + paramLiterals, err := MakeLiteralForParams(executionConfig.Inputs, workflowParams) + if err != nil { return nil, err } + var inputs = &core.LiteralMap{ Literals: paramLiterals, } - ID := lp.Id - return createExecutionRequest(ID, inputs, nil), nil + // Set both deprecated field and new field for security identity passing + authRole := &admin.AuthRole{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + AssumableIamRole: executionConfig.IamRoleARN, + } + + securityContext := &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: executionConfig.KubeServiceAcct, + IamRole: executionConfig.IamRoleARN, + }, + } + + return createExecutionRequest(lp.Id, inputs, securityContext, authRole), nil } func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { - var task *admin.Task - var err error // Fetch the task - if task, err = cmdCtx.AdminFetcherExt().FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain); err != nil { + task, err := cmdCtx.AdminFetcherExt().FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain) + if err != nil { return nil, err } // Create task variables literal map - var variableLiterals map[string]*core.Literal taskInputs := cmdGet.TaskInputs(task) - if variableLiterals, err = MakeLiteralForVariables(executionConfig.Inputs, taskInputs); err != nil { + variableLiterals, err := MakeLiteralForVariables(executionConfig.Inputs, taskInputs) + if err != nil { return nil, err } + var inputs = &core.LiteralMap{ Literals: variableLiterals, } - var authRole *admin.AuthRole - if executionConfig.KubeServiceAcct != "" { - authRole = &admin.AuthRole{KubernetesServiceAccount: executionConfig.KubeServiceAcct} - } else { - authRole = &admin.AuthRole{AssumableIamRole: executionConfig.IamRoleARN} + + // Set both deprecated field and new field for security identity passing + authRole := &admin.AuthRole{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + AssumableIamRole: executionConfig.IamRoleARN, } - ID := &core.Identifier{ + + securityContext := &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: executionConfig.KubeServiceAcct, + IamRole: executionConfig.IamRoleARN, + }, + } + + id := &core.Identifier{ ResourceType: core.ResourceType_TASK, Project: project, Domain: domain, Name: task.Id.Name, Version: task.Id.Version, } - return createExecutionRequest(ID, inputs, authRole), nil + + return createExecutionRequest(id, inputs, securityContext, authRole), nil } func relaunchExecution(ctx context.Context, executionName string, project string, domain string, @@ -88,8 +107,9 @@ func relaunchExecution(ctx context.Context, executionName string, project string return nil } -func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, +func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securityContext *core.SecurityContext, authRole *admin.AuthRole) *admin.ExecutionCreateRequest { + return &admin.ExecutionCreateRequest{ Project: executionConfig.TargetProject, Domain: executionConfig.TargetDomain, @@ -101,7 +121,8 @@ func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, Principal: "sdk", Nesting: 0, }, - AuthRole: authRole, + AuthRole: authRole, + SecurityContext: securityContext, }, Inputs: inputs, } From f9dbf79d3e8ad7bddeeb6379c33e87cd90588b24 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 17 Jun 2021 09:34:00 -0700 Subject: [PATCH 073/356] Update Flyteidl to avoid having string literal when the value is a simple empty/nil string (#103) Signed-off-by: Haytham Abuelfutuh --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 522426121a..9c2e7a55d8 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.19.2 + github.com/flyteorg/flyteidl v0.19.3 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index a6fadab413..3b2f083536 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -335,8 +335,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.19.2 h1:jXuRrLJEzSo33N9pw7bMEd6mRYSL7LCz/vnazz5XcOg= -github.com/flyteorg/flyteidl v0.19.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.3 h1:Rba35Qi3eG/lExzWUnjQOgX+HpHHLWj+N/QBw9TlFBo= +github.com/flyteorg/flyteidl v0.19.3/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= From 5e967f7146a9c1383d94097e0c4f641187189aeb Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 17 Jun 2021 13:00:01 -0700 Subject: [PATCH 074/356] Only pass literals to execution if they users provided values (#105) * Only pass literals to execution if they users provided values Signed-off-by: Haytham Abuelfutuh * Adding unit tests and a bit of refactoring Signed-off-by: Haytham Abuelfutuh --- flytectl/cmd/create/serialization_utils.go | 49 +++++- .../cmd/create/serialization_utils_test.go | 148 ++++++++++++++++++ 2 files changed, 189 insertions(+), 8 deletions(-) create mode 100644 flytectl/cmd/create/serialization_utils_test.go diff --git a/flytectl/cmd/create/serialization_utils.go b/flytectl/cmd/create/serialization_utils.go index b9759ca7c1..53045d2c9e 100644 --- a/flytectl/cmd/create/serialization_utils.go +++ b/flytectl/cmd/create/serialization_utils.go @@ -1,29 +1,62 @@ package create import ( + "fmt" + "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) // TODO: Move all functions to flyteidl +// MakeLiteralForVariables builds a map of literals for the provided serialized values. If a provided value does not have +// a corresponding variable or if that variable is invalid (e.g. doesn't have Type property populated), it returns an +// error. func MakeLiteralForVariables(serialize map[string]interface{}, variables map[string]*core.Variable) (map[string]*core.Literal, error) { - result := make(map[string]*core.Literal) - var err error + types := make(map[string]*core.LiteralType) for k, v := range variables { - if result[k], err = coreutils.MakeLiteralForType(v.Type, serialize[k]); err != nil { - return nil, err + t := v.GetType() + if t == nil { + return nil, fmt.Errorf("variable [%v] has nil type", k) } + + types[k] = t } - return result, nil + + return MakeLiteralForTypes(serialize, types) } +// MakeLiteralForParams builds a map of literals for the provided serialized values. If a provided value does not have +// a corresponding parameter or if that parameter is invalid (e.g. doesn't have Type property populated), it returns an +// error. func MakeLiteralForParams(serialize map[string]interface{}, parameters map[string]*core.Parameter) (map[string]*core.Literal, error) { + types := make(map[string]*core.LiteralType) + for k, v := range parameters { + if variable := v.GetVar(); variable == nil { + return nil, fmt.Errorf("parameter [%v] has nil Variable", k) + } else if t := variable.GetType(); t == nil { + return nil, fmt.Errorf("parameter [%v] has nil variable type", k) + } else { + types[k] = t + } + } + + return MakeLiteralForTypes(serialize, types) +} + +// MakeLiteralForTypes builds a map of literals for the provided serialized values. If a provided value does not have +// a corresponding type or if it fails to create a literal for the given type and value, it returns an error. +func MakeLiteralForTypes(serialize map[string]interface{}, types map[string]*core.LiteralType) (map[string]*core.Literal, error) { result := make(map[string]*core.Literal) var err error - for k, v := range parameters { - if result[k], err = coreutils.MakeLiteralForType(v.GetVar().Type, serialize[k]); err != nil { - return nil, err + for k, v := range serialize { + if t, typeFound := types[k]; typeFound { + if result[k], err = coreutils.MakeLiteralForType(t, v); err != nil { + return nil, err + } + } else { + return nil, fmt.Errorf("no matching type for [%v]", k) } } + return result, nil } diff --git a/flytectl/cmd/create/serialization_utils_test.go b/flytectl/cmd/create/serialization_utils_test.go new file mode 100644 index 0000000000..5c7326493d --- /dev/null +++ b/flytectl/cmd/create/serialization_utils_test.go @@ -0,0 +1,148 @@ +package create + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" +) + +func TestMakeLiteralForTypes(t *testing.T) { + inputTypes := map[string]*core.LiteralType{ + "a": { + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + "x": { + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + "b": { + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, + }, + }, + "y": { + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, + }, + }, + } + + t.Run("Happy path", func(t *testing.T) { + inputValues := map[string]interface{}{ + "a": 5, + "b": "hello", + } + + m, err := MakeLiteralForTypes(inputValues, inputTypes) + assert.NoError(t, err) + assert.Len(t, m, len(inputValues)) + }) + + t.Run("Type not found", func(t *testing.T) { + inputValues := map[string]interface{}{ + "notfound": 5, + } + + _, err := MakeLiteralForTypes(inputValues, inputTypes) + assert.Error(t, err) + }) + + t.Run("Invalid value", func(t *testing.T) { + inputValues := map[string]interface{}{ + "a": "hello", + } + + _, err := MakeLiteralForTypes(inputValues, inputTypes) + assert.Error(t, err) + }) +} + +func TestMakeLiteralForParams(t *testing.T) { + inputValues := map[string]interface{}{ + "a": "hello", + } + + t.Run("Happy path", func(t *testing.T) { + inputParams := map[string]*core.Parameter{ + "a": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, + }, + }, + }, + }, + } + + m, err := MakeLiteralForParams(inputValues, inputParams) + assert.NoError(t, err) + assert.Len(t, m, len(inputValues)) + }) + + t.Run("Invalid Param", func(t *testing.T) { + inputParams := map[string]*core.Parameter{ + "a": nil, + } + + _, err := MakeLiteralForParams(inputValues, inputParams) + assert.Error(t, err) + }) + + t.Run("Invalid Type", func(t *testing.T) { + inputParams := map[string]*core.Parameter{ + "a": { + Var: &core.Variable{}, + }, + } + + _, err := MakeLiteralForParams(inputValues, inputParams) + assert.Error(t, err) + }) +} + +func TestMakeLiteralForVariables(t *testing.T) { + inputValues := map[string]interface{}{ + "a": "hello", + } + + t.Run("Happy path", func(t *testing.T) { + inputVariables := map[string]*core.Variable{ + "a": { + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, + }, + }, + }, + } + + m, err := MakeLiteralForVariables(inputValues, inputVariables) + assert.NoError(t, err) + assert.Len(t, m, len(inputValues)) + }) + + t.Run("Invalid Variable", func(t *testing.T) { + inputVariables := map[string]*core.Variable{ + "a": nil, + } + + _, err := MakeLiteralForVariables(inputValues, inputVariables) + assert.Error(t, err) + }) + + t.Run("Invalid Type", func(t *testing.T) { + inputVariables := map[string]*core.Variable{ + "a": { + Type: nil, + }, + } + + _, err := MakeLiteralForVariables(inputValues, inputVariables) + assert.Error(t, err) + }) +} From b5f332a6377ff7e221fade8bee403feb42e24f18 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 18 Jun 2021 15:18:31 +0530 Subject: [PATCH 075/356] Added dco signoff preecommit (#89) * Added dco signoff preecommit Signed-off-by: Yuvraj --- flytectl/Makefile | 2 + .../flyte/golang_support_tools/go.mod | 3 + .../flyte/golang_support_tools/go.sum | 26 ++++++++ .../flyte/golang_support_tools/tools.go | 1 + .../golang_test_targets/download_tooling.sh | 1 + flytectl/boilerplate/flyte/precommit/Makefile | 9 +++ .../flyte/precommit/hooks/pre-push | 41 +++++++++++++ .../flyte/precommit/hooks/prepare-commit-msg | 16 +++++ .../boilerplate/flyte/precommit/update.sh | 60 +++++++++++++++++++ .../boilerplate/flyte/welcome_bot/update.sh | 1 + flytectl/boilerplate/update.cfg | 1 + flytectl/boilerplate/update.sh | 2 +- flytectl/docs/CONTRIBUTING.md | 11 +++- 13 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 flytectl/boilerplate/flyte/precommit/Makefile create mode 100755 flytectl/boilerplate/flyte/precommit/hooks/pre-push create mode 100755 flytectl/boilerplate/flyte/precommit/hooks/prepare-commit-msg create mode 100755 flytectl/boilerplate/flyte/precommit/update.sh diff --git a/flytectl/Makefile b/flytectl/Makefile index 69ab4e6c49..8d1c049c43 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -1,5 +1,6 @@ export REPOSITORY=flytectl include boilerplate/flyte/golang_test_targets/Makefile +include boilerplate/flyte/precommit/Makefile GIT_VERSION := $(shell git describe --always --tags) GIT_HASH := $(shell git rev-parse --short HEAD) @@ -35,3 +36,4 @@ install-piptools: .PHONY: doc-requirements.txt doc-requirements.txt: doc-requirements.in install-piptools $(call PIP_COMPILE,doc-requirements.in) + diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 7afee48e45..53f645159a 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -6,7 +6,10 @@ require ( github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.3.22 github.com/golangci/golangci-lint v1.38.0 + github.com/pseudomuto/protoc-gen-doc v1.4.1 // indirect github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 + +replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index 49939b689d..261048f745 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -75,8 +75,11 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -99,6 +102,8 @@ github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cv github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -164,6 +169,7 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -191,6 +197,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m 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.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0= +github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 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/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= @@ -204,6 +212,8 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= +github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -271,6 +281,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -355,8 +366,10 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= @@ -418,9 +431,13 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= 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.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -543,6 +560,8 @@ github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1: github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= @@ -616,6 +635,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= @@ -655,6 +675,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= @@ -737,6 +759,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -797,6 +820,7 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -905,6 +929,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1121,6 +1146,7 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index 71163a57d9..eee691d8c3 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -7,4 +7,5 @@ import ( _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/vektra/mockery/cmd/mockery" + - "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index 25d4ac3dc1..c0ab06b063 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -20,6 +20,7 @@ tools=( "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" + "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) tmp_dir=$(mktemp -d -t gotooling-XXX) diff --git a/flytectl/boilerplate/flyte/precommit/Makefile b/flytectl/boilerplate/flyte/precommit/Makefile new file mode 100644 index 0000000000..3c6f17d6b2 --- /dev/null +++ b/flytectl/boilerplate/flyte/precommit/Makefile @@ -0,0 +1,9 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + + +.PHONY: setup-precommit +setup-precommit: #setup the precommit + @boilerplate/flyte/precommit/update.sh diff --git a/flytectl/boilerplate/flyte/precommit/hooks/pre-push b/flytectl/boilerplate/flyte/precommit/hooks/pre-push new file mode 100755 index 0000000000..f161cfe856 --- /dev/null +++ b/flytectl/boilerplate/flyte/precommit/hooks/pre-push @@ -0,0 +1,41 @@ +DUMMY_SHA=0000000000000000000000000000000000000000 + +echo "Running pre-push check; to skip this step use 'push --no-verify'" + +while read LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA +do + if [ "$LOCAL_SHA" = $DUMMY_SHA ] + then + # Branch deleted. Do nothing. + exit 0 + else + if [ "$REMOTE_SHA" = $DUMMY_SHA ] + then + # New branch. Verify the last commit, since this is very likely where the new code is + # (though there is no way to know for sure). In the extremely uncommon case in which someone + # pushes more than 1 new commit to a branch, CI will enforce full checking. + RANGE="$LOCAL_SHA~1..$LOCAL_SHA" + else + # Updating branch. Verify new commits. + RANGE="$REMOTE_SHA..$LOCAL_SHA" + fi + + # Verify DCO signoff. We do this before the format checker, since it has + # some probability of failing spuriously, while this check never should. + # + # In general, we can't assume that the commits are signed off by author + # pushing, so we settle for just checking that there is a signoff at all. + SIGNED_OFF=$(git rev-list --no-merges --grep "^Signed-off-by: " "$RANGE") + NOT_SIGNED_OFF=$(git rev-list --no-merges "$RANGE" | grep -Fxv "$SIGNED_OFF") + if [ -n "$NOT_SIGNED_OFF" ] + then + echo >&2 "ERROR: The following commits do not have DCO signoff:" + while read -r commit; do + echo " $(git log --pretty=oneline --abbrev-commit -n 1 $commit)" + done <<< "$NOT_SIGNED_OFF" + exit 1 + fi + fi +done + +exit 0 diff --git a/flytectl/boilerplate/flyte/precommit/hooks/prepare-commit-msg b/flytectl/boilerplate/flyte/precommit/hooks/prepare-commit-msg new file mode 100755 index 0000000000..8148d104b8 --- /dev/null +++ b/flytectl/boilerplate/flyte/precommit/hooks/prepare-commit-msg @@ -0,0 +1,16 @@ +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst +# $ ln -s ../../support/hooks/prepare-commit-msg .git/hooks/prepare-commit-msg + +COMMIT_MESSAGE_FILE="$1" +AUTHOR=$(git var GIT_AUTHOR_IDENT) +SIGNOFF=$(echo $AUTHOR | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') + +# Check for DCO signoff message. If one doesn't exist, append one and then warn +# the user that you did so. +if ! $(grep -qs "^$SIGNOFF" "$COMMIT_MESSAGE_FILE") ; then + echo "\n$SIGNOFF" >> "$COMMIT_MESSAGE_FILE" + echo "Appended the following signoff to the end of the commit message:\n $SIGNOFF\n" +fi diff --git a/flytectl/boilerplate/flyte/precommit/update.sh b/flytectl/boilerplate/flyte/precommit/update.sh new file mode 100755 index 0000000000..971c8386c1 --- /dev/null +++ b/flytectl/boilerplate/flyte/precommit/update.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +# Helper script for Automatically add DCO signoff with commit hooks +# Taken from Envoy https://gitlab.cncf.ci/envoyproxy/envoy +if [ ! "$PWD" == "$(git rev-parse --show-toplevel)" ]; then + cat >&2 <<__EOF__ +ERROR: this script must be run at the root of the envoy source tree +__EOF__ + exit 1 +fi + +# Helper functions that calculate `abspath` and `relpath`. Taken from Mesos +# commit 82b040a60561cf94dec3197ea88ae15e57bcaa97, which also carries the Apache +# V2 license, and has deployed this code successfully for some time. +abspath() { + cd "$(dirname "${1}")" + echo "${PWD}"/"$(basename "${1}")" + cd "${OLDPWD}" +} +relpath() { + local FROM TO UP + FROM="$(abspath "${1%/}")" TO="$(abspath "${2%/}"/)" + while test "${TO}" = "${TO#"${FROM}"/}" \ + -a "${TO}" != "${FROM}"; do + FROM="${FROM%/*}" UP="../${UP}" + done + TO="${UP%/}${TO#${FROM}}" + echo "${TO:-.}" +} + +# Try to find the `.git` directory, even if it's not in Flyte project root (as +# it wouldn't be if, say, this were in a submodule). The "blessed" but fairly +# new way to do this is to use `--git-common-dir`. +DOT_GIT_DIR=$(git rev-parse --git-common-dir) +if test ! -d "${DOT_GIT_DIR}"; then + # If `--git-common-dir` is not available, fall back to older way of doing it. + DOT_GIT_DIR=$(git rev-parse --git-dir) +fi + +mkdir -p ${DOT_GIT_DIR}/hooks + +HOOKS_DIR="${DOT_GIT_DIR}/hooks" +HOOKS_DIR_RELPATH=$(relpath "${HOOKS_DIR}" "${PWD}") + +if [ ! -e "${HOOKS_DIR}/prepare-commit-msg" ]; then + echo "Installing hook 'prepare-commit-msg'" + ln -s "${HOOKS_DIR_RELPATH}/boilerplate/flyte/precommit/hooks/prepare-commit-msg" "${HOOKS_DIR}/prepare-commit-msg" +fi + +if [ ! -e "${HOOKS_DIR}/pre-push" ]; then + echo "Installing hook 'pre-push'" + ln -s "${HOOKS_DIR_RELPATH}/boilerplate/flyte/precommit/hooks/pre-push" "${HOOKS_DIR}/pre-push" +fi diff --git a/flytectl/boilerplate/flyte/welcome_bot/update.sh b/flytectl/boilerplate/flyte/welcome_bot/update.sh index 120dbd365c..2db64ac3f1 100755 --- a/flytectl/boilerplate/flyte/welcome_bot/update.sh +++ b/flytectl/boilerplate/flyte/welcome_bot/update.sh @@ -12,3 +12,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # Clone the config.yml file echo " - copying ${DIR}/config.yml to the root directory." cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml + diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg index 2f61a97b0e..45cc5569cf 100644 --- a/flytectl/boilerplate/update.cfg +++ b/flytectl/boilerplate/update.cfg @@ -3,4 +3,5 @@ flyte/golangci_file flyte/golang_support_tools flyte/pull_request_template flyte/welcome_bot +flyte/precommit diff --git a/flytectl/boilerplate/update.sh b/flytectl/boilerplate/update.sh index 9173b662de..73de4dc91c 100755 --- a/flytectl/boilerplate/update.sh +++ b/flytectl/boilerplate/update.sh @@ -70,4 +70,4 @@ while read -r directory junk; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" \ No newline at end of file +done < "$CONFIG_FILE" diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md index 5758d747b2..7aecdba71e 100644 --- a/flytectl/docs/CONTRIBUTING.md +++ b/flytectl/docs/CONTRIBUTING.md @@ -4,7 +4,6 @@ A local cluster can be setup via --> https://lyft.github.io/flyte/administrator/ Then, if having trouble connecting to local cluster see the following: - #1) Find/Set/Verify gRPC port for your local Flyte service: FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec.ports[] | select(.name=="grpc").port'` @@ -14,3 +13,13 @@ FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec. #3) Update config line in https://github.com/flyteorg/flytectl/blob/master/config.yaml to dns:///localhost:8081 #4) All new flags introduced for flytectl commands and subcommands should be camelcased. eg: bin/flytectl update project -p flytesnacks --activateProject + +# DCO: Sign your work + +Flyte ships commit hooks that allow you to auto-generate the DCO signoff line if +it doesn't exist when you run `git commit`. Simply navigate to the flytectl project root and run + +```bash +make dco +``` + From c6ef3e70bd7e9b048ea1e710137de1c0f6aa1580 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:48:12 -0700 Subject: [PATCH 076/356] Visualize graphs on command line (#75) --- .../subcommand/workflow/config_flags.go | 13 +- .../subcommand/workflow/workflow_config.go | 6 +- flytectl/cmd/get/workflow.go | 12 + flytectl/cmd/root.go | 2 +- flytectl/docs/source/gen/flytectl.rst | 5 +- flytectl/docs/source/gen/flytectl_config.rst | 4 +- .../source/gen/flytectl_config_discover.rst | 4 +- .../source/gen/flytectl_config_validate.rst | 4 +- flytectl/docs/source/gen/flytectl_create.rst | 4 +- .../source/gen/flytectl_create_execution.rst | 4 +- .../source/gen/flytectl_create_project.rst | 4 +- flytectl/docs/source/gen/flytectl_delete.rst | 4 +- ...ectl_delete_cluster-resource-attribute.rst | 4 +- ...lytectl_delete_execution-cluster-label.rst | 4 +- ...tectl_delete_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_delete_execution.rst | 4 +- .../gen/flytectl_delete_plugin-override.rst | 4 +- ...lytectl_delete_task-resource-attribute.rst | 4 +- flytectl/docs/source/gen/flytectl_get.rst | 4 +- ...lytectl_get_cluster-resource-attribute.rst | 4 +- .../flytectl_get_execution-cluster-label.rst | 4 +- ...flytectl_get_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_get_execution.rst | 14 +- .../source/gen/flytectl_get_launchplan.rst | 10 +- .../gen/flytectl_get_plugin-override.rst | 4 +- .../docs/source/gen/flytectl_get_project.rst | 6 +- .../flytectl_get_task-resource-attribute.rst | 4 +- .../docs/source/gen/flytectl_get_task.rst | 6 +- .../docs/source/gen/flytectl_get_workflow.rst | 20 +- .../docs/source/gen/flytectl_register.rst | 5 +- .../source/gen/flytectl_register_examples.rst | 87 +++ .../source/gen/flytectl_register_files.rst | 16 +- flytectl/docs/source/gen/flytectl_sandbox.rst | 82 +++ .../source/gen/flytectl_sandbox_start.rst | 80 +++ .../source/gen/flytectl_sandbox_teardown.rst | 86 +++ flytectl/docs/source/gen/flytectl_update.rst | 4 +- ...ectl_update_cluster-resource-attribute.rst | 4 +- ...lytectl_update_execution-cluster-label.rst | 4 +- ...tectl_update_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_update_launchplan.rst | 4 +- .../gen/flytectl_update_plugin-override.rst | 4 +- .../source/gen/flytectl_update_project.rst | 4 +- ...lytectl_update_task-resource-attribute.rst | 4 +- .../docs/source/gen/flytectl_update_task.rst | 4 +- .../source/gen/flytectl_update_workflow.rst | 4 +- flytectl/docs/source/gen/flytectl_version.rst | 4 +- flytectl/go.mod | 3 + flytectl/go.sum | 16 + flytectl/pkg/printer/outputformat_enumer.go | 14 +- flytectl/pkg/printer/printer.go | 32 + flytectl/pkg/printer/printer_test.go | 134 ++++- flytectl/pkg/visualize/graphviz.go | 381 ++++++++++++ flytectl/pkg/visualize/graphviz_test.go | 470 +++++++++++++++ flytectl/pkg/visualize/graphvizer.go | 35 ++ flytectl/pkg/visualize/mocks/graphvizer.go | 273 +++++++++ .../compiled_closure_branch_nested.json | 553 ++++++++++++++++++ .../testdata/compiled_subworkflows.json | 482 +++++++++++++++ 57 files changed, 2849 insertions(+), 114 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_register_examples.rst create mode 100644 flytectl/docs/source/gen/flytectl_sandbox.rst create mode 100644 flytectl/docs/source/gen/flytectl_sandbox_start.rst create mode 100644 flytectl/docs/source/gen/flytectl_sandbox_teardown.rst create mode 100644 flytectl/pkg/visualize/graphviz.go create mode 100644 flytectl/pkg/visualize/graphviz_test.go create mode 100644 flytectl/pkg/visualize/graphvizer.go create mode 100644 flytectl/pkg/visualize/mocks/graphvizer.go create mode 100644 flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json create mode 100644 flytectl/pkg/visualize/testdata/compiled_subworkflows.json diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags.go b/flytectl/cmd/config/subcommand/workflow/config_flags.go index 61f6245c05..5765379fe6 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags.go @@ -50,12 +50,11 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), *new(string), "version of the workflow to be fetched.") - cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), *new(bool), " flag to indicate to fetch the latest version, version flag will be ignored in this case") - cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") - cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") - cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") - cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") - + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the workflow to be fetched.") + cmdFlags.BoolVar(&DefaultConfig.Latest, fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.field-selector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sort-by"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") + cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflow/workflow_config.go b/flytectl/cmd/config/subcommand/workflow/workflow_config.go index 8051d4547f..34049e08b9 100644 --- a/flytectl/cmd/config/subcommand/workflow/workflow_config.go +++ b/flytectl/cmd/config/subcommand/workflow/workflow_config.go @@ -1,8 +1,10 @@ package workflow -import "github.com/flyteorg/flytectl/pkg/filters" +import ( + "github.com/flyteorg/flytectl/pkg/filters" +) -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index cdefe89410..4174f96c1a 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -68,6 +68,18 @@ Retrieves all the workflow within project and domain in json format. flytectl get workflow -p flytesnacks -d development -o json +Visualize the graph for a workflow within project and domain in dot format. + +:: + + flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o dot + +Visualize the graph for a workflow within project and domain in a dot content render. + +:: + + flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o doturl + Usage ` ) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index a3e942b4fc..40bc92ed69 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -53,7 +53,7 @@ func newRootCmd() *cobra.Command { // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") - rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s", printer.OutputFormats())) + rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats())) rootCmd.AddCommand(viper.GetConfigCommand()) rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(create.RemoteCreateCommand()) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 35598ae7a2..446c0f39a8 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -30,14 +30,14 @@ Options --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. @@ -64,6 +64,7 @@ SEE ALSO * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_version` - Used for fetching flyte version diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 5039c54e4f..918923db8b 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -39,13 +39,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 932addfa42..c8c73a0302 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -41,7 +41,7 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. @@ -49,7 +49,7 @@ Options inherited from parent commands --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 984231c587..e0fe692b8a 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -43,7 +43,7 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. @@ -51,7 +51,7 @@ Options inherited from parent commands --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index b2463ade5f..dea24a3367 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -42,13 +42,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index dc646888cb..d2f3f7e880 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -160,13 +160,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index a0670e5f92..e7f6580eae 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -66,13 +66,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 9cfd95edad..42881783d7 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -42,13 +42,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 17eae9ec87..29aac116f0 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -78,13 +78,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 2524bc63e8..daa247a473 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -76,13 +76,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index c9935a0f7f..5e6e03520f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -80,13 +80,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index f87a174752..2a12a2b381 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -85,13 +85,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 03b9f01b0e..e69560d99e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -81,13 +81,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 2d782bb68b..17cb700393 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -81,13 +81,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 82dcafb42f..8442a4e4a0 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -42,13 +42,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index a713afac14..7cf9ff55b1 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -87,13 +87,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 0f043d8cd4..58abf2ab26 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -85,13 +85,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 1f0593a125..4b92076d7f 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -89,13 +89,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 1726008f38..4040492e0f 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -21,15 +21,11 @@ Retrieves execution by name within project and domain. bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieves all the execution with filters. +Retrieves all the executions with filters. :: bin/flytectl get execution -p flytesnacks -d development --filter.field-selector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" - -Retrieve specific execution with filters. -:: - - bin/flytectl get execution -p flytesnacks -d development y8n2wtuspj --filter.field-selector="execution.phase in (FAILED),execution.duration<200" + Retrieves all the execution with limit and sorting. :: @@ -64,7 +60,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") + --filter.sort-by string Specifies which field to sort result by -h, --help help for execution Options inherited from parent commands @@ -86,13 +82,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 23b06925cd..37f816171a 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -39,7 +39,7 @@ Retrieves all the launch plans with filters. bin/flytectl get launchplan -p flytesnacks -d development --filter.field-selector="name=core.basic.lp.go_greet" -Retrieves specific launch plans with filters. +Retrieves launch plans entity search across all versions with filters. :: bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="version=v1" @@ -67,7 +67,7 @@ Retrieves a launch plans within project and domain for a version and generate th :: - flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yam + flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml The generated file would look similar to this @@ -103,7 +103,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") + --filter.sort-by string Specifies which field to sort result by -h, --help help for launchplan --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the launchplan to be fetched. @@ -127,13 +127,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index fcc8e5c9be..f608e680a0 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -109,13 +109,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index ba86d53cd0..2f7e622450 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -58,7 +58,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") + --filter.sort-by string Specifies which field to sort result by -h, --help help for project Options inherited from parent commands @@ -80,13 +80,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index dfd44d3c32..fb180a8a44 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -91,13 +91,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index f49501561d..dab41e7f72 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -99,7 +99,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") + --filter.sort-by string Specifies which field to sort result by -h, --help help for task --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the task to be fetched. @@ -123,13 +123,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 846afb9682..081ae99b7d 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -60,6 +60,18 @@ Retrieves all the workflow within project and domain in json format. flytectl get workflow -p flytesnacks -d development -o json +Visualize the graph for a workflow within project and domain in dot format. + +:: + + flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o dot + +Visualize the graph for a workflow within project and domain in a dot content render. + +:: + + flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o doturl + Usage @@ -75,8 +87,10 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") + --filter.sort-by string Specifies which field to sort results -h, --help help for workflow + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the workflow to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -97,13 +111,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 98d8c02b4a..0417174a1c 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -42,13 +42,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. @@ -71,5 +71,6 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_register_examples` - Registers flytesnack example * :doc:`flytectl_register_files` - Registers file resources diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst new file mode 100644 index 0000000000..e6df378e55 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -0,0 +1,87 @@ +.. _flytectl_register_examples: + +flytectl register examples +-------------------------- + +Registers flytesnack example + +Synopsis +~~~~~~~~ + + + +Registers all latest flytesnacks example +:: + + bin/flytectl register examples -d development -p flytesnacks + + +Usage + + +:: + + flytectl register examples [flags] + +Options +~~~~~~~ + +:: + + -a, --archive pass in archive file either an http link or local path. + -i, --assumableIamRole string Custom assumable iam auth role to register launch plans with. + --continueOnError continue on error when registering files. + -h, --help help for examples + -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + -v, --version string version of the entity to be registered with flyte. (default "v1") + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. + diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 8d79a9df13..ada5a92813 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -39,7 +39,7 @@ the continueOnError flag. Using short format of continueOnError flag :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError Overriding the default version v1 using version string. :: @@ -50,25 +50,25 @@ Change the o/p format has not effect on registration. The O/p is currently avail :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -o yaml + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml Override IamRole during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -i "arn:aws:iam::123456789:role/dummy" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -i "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -k "kubernetes-service-account" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -k "kubernetes-service-account" Override Output location prefix during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -c -v v2 -l "s3://dummy/prefix" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" Usage @@ -84,7 +84,7 @@ Options -a, --archive pass in archive file either an http link or local path. -i, --assumableIamRole string Custom assumable iam auth role to register launch plans with. - -c, --continueOnError continue on error when registering files. + --continueOnError continue on error when registering files. -h, --help help for files -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). @@ -109,13 +109,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst new file mode 100644 index 0000000000..c33cfcc843 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -0,0 +1,82 @@ +.. _flytectl_sandbox: + +flytectl sandbox +---------------- + +Used for testing flyte sandbox. + +Synopsis +~~~~~~~~ + + + +Example Create sandbox cluster. +:: + + bin/flytectl sandbox start + + +Example Remove sandbox cluster. +:: + + bin/flytectl sandbox teardown + + +Options +~~~~~~~ + +:: + + -h, --help help for sandbox + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_sandbox_start` - Start the flyte sandbox +* :doc:`flytectl_sandbox_teardown` - Teardown will cleanup the sandbox environment + diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst new file mode 100644 index 0000000000..56716a9fa0 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -0,0 +1,80 @@ +.. _flytectl_sandbox_start: + +flytectl sandbox start +---------------------- + +Start the flyte sandbox + +Synopsis +~~~~~~~~ + + + +Start will run the flyte sandbox cluster inside a docker container and setup the config that is required +:: + + bin/flytectl start + +Usage + + +:: + + flytectl sandbox start [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for start + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. + diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst new file mode 100644 index 0000000000..f7fccfd899 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -0,0 +1,86 @@ +.. _flytectl_sandbox_teardown: + +flytectl sandbox teardown +------------------------- + +Teardown will cleanup the sandbox environment + +Synopsis +~~~~~~~~ + + + +Teardown will remove docker container and all the flyte config +:: + + bin/flytectl sandbox teardown + +Stop will remove docker container and all the flyte config +:: + + bin/flytectl sandbox stop + + +Usage + + +:: + + flytectl sandbox teardown [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for teardown + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. + diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 17ba39721e..9a513303c7 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -44,13 +44,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index b8000b4d3c..5f50268a61 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -83,13 +83,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 2431eedd01..957aeff750 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -76,13 +76,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index a32e711f12..e6ed419269 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -87,13 +87,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index aeb20a9f16..88b569d16f 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -61,13 +61,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 657efbfb94..bea5a1c6ac 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -89,13 +89,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 742db693b9..74252c4f52 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -86,13 +86,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index d4ae5db9c9..4f75f37eac 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -89,13 +89,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index 26d9237800..a119d0118c 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -61,13 +61,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index b79c81977d..347ecb1790 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -61,13 +61,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 7d125dcfb9..8a73ae4a75 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -46,13 +46,13 @@ Options inherited from parent commands --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. --root.domain string Specified the domain to work on. --root.output string Specified the output type. diff --git a/flytectl/go.mod b/flytectl/go.mod index 9c2e7a55d8..15c5c39675 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,6 +4,7 @@ go 1.13 require ( github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/containerd/containerd v1.5.2 // indirect github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 @@ -11,6 +12,7 @@ require ( github.com/flyteorg/flyteidl v0.19.3 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 + github.com/goccy/go-graphviz v0.0.9 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.1.0 // indirect @@ -23,6 +25,7 @@ require ( github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 diff --git a/flytectl/go.sum b/flytectl/go.sum index 3b2f083536..3369537bf4 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -122,6 +122,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= +github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -269,6 +271,8 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= +github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -340,6 +344,8 @@ github.com/flyteorg/flyteidl v0.19.3/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/e github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -378,6 +384,8 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/goccy/go-graphviz v0.0.9 h1:s/FMMJ1Joj6La3S5ApO3Jk2cwM4LpXECC2muFx3IPQQ= +github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= @@ -395,6 +403,8 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -534,6 +544,7 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -650,6 +661,8 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -919,6 +932,7 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -937,6 +951,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 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/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/flytectl/pkg/printer/outputformat_enumer.go b/flytectl/pkg/printer/outputformat_enumer.go index b10b45143f..ab56b2a009 100644 --- a/flytectl/pkg/printer/outputformat_enumer.go +++ b/flytectl/pkg/printer/outputformat_enumer.go @@ -8,9 +8,9 @@ import ( "fmt" ) -const _OutputFormatName = "TABLEJSONYAML" +const _OutputFormatName = "TABLEJSONYAMLDOTDOTURL" -var _OutputFormatIndex = [...]uint8{0, 5, 9, 13} +var _OutputFormatIndex = [...]uint8{0, 5, 9, 13, 16, 22} func (i OutputFormat) String() string { if i >= OutputFormat(len(_OutputFormatIndex)-1) { @@ -19,12 +19,14 @@ func (i OutputFormat) String() string { return _OutputFormatName[_OutputFormatIndex[i]:_OutputFormatIndex[i+1]] } -var _OutputFormatValues = []OutputFormat{0, 1, 2} +var _OutputFormatValues = []OutputFormat{0, 1, 2, 3, 4} var _OutputFormatNameToValueMap = map[string]OutputFormat{ - _OutputFormatName[0:5]: 0, - _OutputFormatName[5:9]: 1, - _OutputFormatName[9:13]: 2, + _OutputFormatName[0:5]: 0, + _OutputFormatName[5:9]: 1, + _OutputFormatName[9:13]: 2, + _OutputFormatName[13:16]: 3, + _OutputFormatName[16:22]: 4, } // OutputFormatString retrieves an enum value from the enum constants string name. diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index fa86127b9e..98282590fe 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -4,14 +4,19 @@ import ( "bytes" "encoding/json" "fmt" + "net/url" "os" + "github.com/flyteorg/flytectl/pkg/visualize" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/errors" + "github.com/ghodss/yaml" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" "github.com/landoop/tableprinter" + "github.com/pkg/browser" "github.com/yalp/jsonpath" ) @@ -22,8 +27,12 @@ const ( OutputFormatTABLE OutputFormat = iota OutputFormatJSON OutputFormatYAML + OutputFormatDOT + OutputFormatDOTURL ) +const GraphVisualizationServiceURL = "http://graph.flyte.org/#" + func OutputFormats() []string { var v []string for _, o := range OutputFormatValues() { @@ -137,6 +146,29 @@ func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto. } fmt.Println(string(v)) } + case OutputFormatDOT, OutputFormatDOTURL: + var workflows []*admin.Workflow + for _, m := range messages { + if w, ok := m.(*admin.Workflow); ok { + workflows = append(workflows, w) + } else { + return fmt.Errorf("visualization is only supported on workflows") + } + } + if len(workflows) == 0 { + return fmt.Errorf("atleast one workflow required for visualization") + } + workflow := workflows[0] + graphStr, err := visualize.RenderWorkflow(workflow.Closure.CompiledWorkflow) + if err != nil { + return errors.Wrapf("VisualizationError", err, "failed to visualize workflow") + } + if format == OutputFormatDOTURL { + urlToOpen := GraphVisualizationServiceURL + url.PathEscape(graphStr) + fmt.Println("Opening the browser at " + urlToOpen) + return browser.OpenURL(urlToOpen) + } + fmt.Println(graphStr) default: // Print table rows, err := json.Marshal(printableMessages) if err != nil { diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 5db910544c..08ed10c9f2 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -2,6 +2,7 @@ package printer import ( "encoding/json" + "errors" "fmt" "testing" "time" @@ -27,6 +28,14 @@ func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { return messages } +func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + // TODO Convert this to a Testable Example. For some reason the comparison fails func TestJSONToTable(t *testing.T) { d := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) @@ -57,9 +66,9 @@ func TestJSONToTable(t *testing.T) { } func TestOutputFormats(t *testing.T) { - expected := []string{"TABLE", "JSON", "YAML"} + expected := []string{"TABLE", "JSON", "YAML", "DOT", "DOTURL"} outputs := OutputFormats() - assert.Equal(t, 3, len(outputs)) + assert.Equal(t, 5, len(outputs)) assert.Equal(t, expected, outputs) } @@ -77,7 +86,7 @@ func TestOutputFormatStringErr(t *testing.T) { } func TestIsAOutputFormat(t *testing.T) { - o := OutputFormat(4) + o := OutputFormat(5) check := o.IsAOutputFormat() assert.Equal(t, false, check) @@ -123,4 +132,123 @@ func TestPrint(t *testing.T) { assert.Nil(t, err) err = p.Print(OutputFormat(2), lp, LaunchplanToProtoMessages(launchPlans)...) assert.Nil(t, err) + err = p.Print(OutputFormat(3), lp, LaunchplanToProtoMessages(launchPlans)...) + assert.NotNil(t, err) + err = p.Print(OutputFormat(4), lp, LaunchplanToProtoMessages(launchPlans)...) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("visualization is only supported on workflows"), err) + + sortedListLiteralType := core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + } + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, + } + + var compiledTasks []*core.CompiledTask + compiledTasks = append(compiledTasks, &core.CompiledTask{ + Template: &core.TaskTemplate{ + Id: &core.Identifier{ + Project: "dummyProject", + Domain: "dummyDomain", + Name: "dummyName", + Version: "dummyVersion", + }, + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }) + + workflow1 := &admin.Workflow{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Tasks: compiledTasks, + }, + }, + } + + workflows := []*admin.Workflow{workflow1} + + err = p.Print(OutputFormat(3), lp, WorkflowToProtoMessages(workflows)...) + assert.Nil(t, err) + workflows = []*admin.Workflow{} + err = p.Print(OutputFormat(3), lp, WorkflowToProtoMessages(workflows)...) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("atleast one workflow required for visualization"), err) + var badCompiledTasks []*core.CompiledTask + badCompiledTasks = append(badCompiledTasks, &core.CompiledTask{ + Template: &core.TaskTemplate{}, + }) + badWorkflow := &admin.Workflow{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Tasks: badCompiledTasks, + }, + }, + } + workflows = []*admin.Workflow{badWorkflow} + err = p.Print(OutputFormat(3), lp, WorkflowToProtoMessages(workflows)...) + assert.NotNil(t, err) + + assert.Equal(t, fmt.Errorf("no template found in the workflow task template:<> "), errors.Unwrap(err)) + + badWorkflow2 := &admin.Workflow{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: nil, + }, + } + workflows = []*admin.Workflow{badWorkflow2} + err = p.Print(OutputFormat(3), lp, WorkflowToProtoMessages(workflows)...) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("empty workflow closure"), errors.Unwrap(err)) + + var badSubWorkflow []*core.CompiledWorkflow + badSubWorkflow = append(badSubWorkflow, &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{}, + }) + + badWorkflow3 := &admin.Workflow{ + Id: &core.Identifier{ + Name: "task1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 1, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Tasks: compiledTasks, + SubWorkflows: badSubWorkflow, + }, + }, + } + workflows = []*admin.Workflow{badWorkflow3} + err = p.Print(OutputFormat(3), lp, WorkflowToProtoMessages(workflows)...) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("no template found in the sub workflow template:<> "), errors.Unwrap(err)) } diff --git a/flytectl/pkg/visualize/graphviz.go b/flytectl/pkg/visualize/graphviz.go new file mode 100644 index 0000000000..314c325148 --- /dev/null +++ b/flytectl/pkg/visualize/graphviz.go @@ -0,0 +1,381 @@ +package visualize + +import ( + "fmt" + "strings" + + "github.com/flyteorg/flyteidl/clients/go/coreutils" + + graphviz "github.com/awalterschulze/gographviz" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +const ( + // node identifiers + StartNode string = "start-node" + EndNode string = "end-node" + + // subgraph attributes + SubgraphPrefix string = "cluster_" + + // shape attributes + DoubleCircleShape string = "doublecircle" + BoxShape string = "box" + DiamondShape string = "diamond" + ShapeType string = "shape" + + // color attributes + ColorAttr string = "color" + Red string = "red" + Green string = "green" + + // structural attributes + LabelAttr string = "label" + LHeadAttr string = "lhead" + LTailAttr string = "ltail" + + // conditional + ElseFail string = "orElse - Fail" + Else string = "orElse" +) + +func operandToString(op *core.Operand) string { + if op.GetPrimitive() != nil { + l, err := coreutils.ExtractFromLiteral(&core.Literal{Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: op.GetPrimitive(), + }, + }, + }}) + if err != nil { + return err.Error() + } + return fmt.Sprintf("%v", l) + } + return op.GetVar() +} + +func comparisonToString(expr *core.ComparisonExpression) string { + return fmt.Sprintf("%s %s %s", operandToString(expr.LeftValue), expr.Operator.String(), operandToString(expr.RightValue)) +} + +func conjunctionToString(expr *core.ConjunctionExpression) string { + return fmt.Sprintf("(%s) %s (%s)", booleanExprToString(expr.LeftExpression), expr.Operator.String(), booleanExprToString(expr.RightExpression)) +} + +func booleanExprToString(expr *core.BooleanExpression) string { + if expr.GetConjunction() != nil { + return conjunctionToString(expr.GetConjunction()) + } + return comparisonToString(expr.GetComparison()) +} + +func constructStartNode(parentGraph string, n string, graph Graphvizer) (*graphviz.Node, error) { + attrs := map[string]string{ShapeType: DoubleCircleShape, ColorAttr: Green} + attrs[LabelAttr] = "start" + err := graph.AddNode(parentGraph, n, attrs) + return graph.GetNode(n), err +} + +func constructEndNode(parentGraph string, n string, graph Graphvizer) (*graphviz.Node, error) { + attrs := map[string]string{ShapeType: DoubleCircleShape, ColorAttr: Red} + attrs[LabelAttr] = "end" + err := graph.AddNode(parentGraph, n, attrs) + return graph.GetNode(n), err +} + +func constructTaskNode(parentGraph string, name string, graph Graphvizer, n *core.Node, t *core.CompiledTask) (*graphviz.Node, error) { + attrs := map[string]string{ShapeType: BoxShape} + if n.Metadata != nil && n.Metadata.Name != "" { + v := strings.LastIndexAny(n.Metadata.Name, ".") + attrs[LabelAttr] = fmt.Sprintf("\"%s [%s]\"", n.Metadata.Name[v+1:], t.Template.Type) + } + tName := strings.ReplaceAll(name, "-", "_") + err := graph.AddNode(parentGraph, tName, attrs) + return graph.GetNode(tName), err +} + +func constructErrorNode(parentGraph string, name string, graph Graphvizer, m string) (*graphviz.Node, error) { + attrs := map[string]string{ShapeType: BoxShape, ColorAttr: Red, LabelAttr: fmt.Sprintf("\"%s\"", m)} + eName := strings.ReplaceAll(name, "-", "_") + err := graph.AddNode(parentGraph, eName, attrs) + return graph.GetNode(eName), err +} + +func constructBranchConditionNode(parentGraph string, name string, graph Graphvizer, n *core.Node) (*graphviz.Node, error) { + attrs := map[string]string{ShapeType: DiamondShape} + if n.Metadata != nil && n.Metadata.Name != "" { + attrs[LabelAttr] = fmt.Sprintf("\"[%s]\"", n.Metadata.Name) + } + cName := strings.ReplaceAll(name, "-", "_") + err := graph.AddNode(parentGraph, cName, attrs) + return graph.GetNode(cName), err +} + +func getName(prefix, id string) string { + if prefix != "" { + return prefix + "_" + id + } + return id +} + +type graphBuilder struct { + // Mutated as graph is built + graphNodes map[string]*graphviz.Node + // Mutated as graph is built. lookup table for all graphviz compiled edges. + graphEdges map[string]*graphviz.Edge + // lookup table for all graphviz compiled subgraphs + subWf map[string]*core.CompiledWorkflow + // a lookup table for all tasks in the graph + tasks map[string]*core.CompiledTask + // a lookup for all node clusters. This is to remap the edges to the cluster itself (instead of the node) + // this is useful in the case of branchNodes and subworkflow nodes + nodeClusters map[string]string +} + +func (gb *graphBuilder) addBranchSubNodeEdge(graph Graphvizer, parentNode, n *graphviz.Node, label string) error { + edgeName := fmt.Sprintf("%s-%s", parentNode.Name, n.Name) + if _, ok := gb.graphEdges[edgeName]; !ok { + attrs := map[string]string{} + if c, ok := gb.nodeClusters[n.Name]; ok { + attrs[LHeadAttr] = fmt.Sprintf("\"%s\"", c) + } + attrs[LabelAttr] = fmt.Sprintf("\"%s\"", label) + err := graph.AddEdge(parentNode.Name, n.Name, true, attrs) + if err != nil { + return err + } + gb.graphEdges[edgeName] = graph.GetEdge(parentNode.Name, n.Name) + } + return nil +} + +func (gb *graphBuilder) constructBranchNode(parentGraph string, prefix string, graph Graphvizer, n *core.Node) (*graphviz.Node, error) { + parentBranchNode, err := constructBranchConditionNode(parentGraph, getName(prefix, n.Id), graph, n) + if err != nil { + return nil, err + } + gb.graphNodes[n.Id] = parentBranchNode + + if n.GetBranchNode().GetIfElse() == nil { + return parentBranchNode, nil + } + + subNode, err := gb.constructNode(parentGraph, prefix, graph, n.GetBranchNode().GetIfElse().Case.ThenNode) + if err != nil { + return nil, err + } + if err := gb.addBranchSubNodeEdge(graph, parentBranchNode, subNode, booleanExprToString(n.GetBranchNode().GetIfElse().Case.Condition)); err != nil { + return nil, err + } + + if n.GetBranchNode().GetIfElse().GetError() != nil { + name := fmt.Sprintf("%s-error", parentBranchNode.Name) + subNode, err := constructErrorNode(prefix, name, graph, n.GetBranchNode().GetIfElse().GetError().Message) + if err != nil { + return nil, err + } + gb.graphNodes[name] = subNode + if err := gb.addBranchSubNodeEdge(graph, parentBranchNode, subNode, ElseFail); err != nil { + return nil, err + } + } else { + subNode, err := gb.constructNode(parentGraph, prefix, graph, n.GetBranchNode().GetIfElse().GetElseNode()) + if err != nil { + return nil, err + } + if err := gb.addBranchSubNodeEdge(graph, parentBranchNode, subNode, Else); err != nil { + return nil, err + } + } + + if n.GetBranchNode().GetIfElse().GetOther() != nil { + for _, c := range n.GetBranchNode().GetIfElse().GetOther() { + subNode, err := gb.constructNode(parentGraph, prefix, graph, c.ThenNode) + if err != nil { + return nil, err + } + if err := gb.addBranchSubNodeEdge(graph, parentBranchNode, subNode, booleanExprToString(c.Condition)); err != nil { + return nil, err + } + } + } + return parentBranchNode, nil +} + +func (gb *graphBuilder) constructNode(parentGraphName string, prefix string, graph Graphvizer, n *core.Node) (*graphviz.Node, error) { + name := getName(prefix, n.Id) + var err error + var gn *graphviz.Node + + if n.Id == StartNode { + gn, err = constructStartNode(parentGraphName, strings.ReplaceAll(name, "-", "_"), graph) + gb.nodeClusters[name] = parentGraphName + } else if n.Id == EndNode { + gn, err = constructEndNode(parentGraphName, strings.ReplaceAll(name, "-", "_"), graph) + gb.nodeClusters[name] = parentGraphName + } else { + switch n.Target.(type) { + case *core.Node_TaskNode: + tID := n.GetTaskNode().GetReferenceId().String() + t, ok := gb.tasks[tID] + if !ok { + return nil, fmt.Errorf("failed to find task [%s] in closure", tID) + } + gn, err = constructTaskNode(parentGraphName, name, graph, n, t) + if err != nil { + return nil, err + } + gb.nodeClusters[name] = parentGraphName + case *core.Node_BranchNode: + branchSubGraphName := SubgraphPrefix + n.Metadata.Name + err := graph.AddSubGraph(parentGraphName, branchSubGraphName, nil) + if err != nil { + return nil, err + } + gn, err = gb.constructBranchNode(branchSubGraphName, prefix, graph, n) + if err != nil { + return nil, err + } + gb.nodeClusters[name] = branchSubGraphName + case *core.Node_WorkflowNode: + if n.GetWorkflowNode().GetLaunchplanRef() != nil { + attrs := map[string]string{} + err := graph.AddNode(parentGraphName, name, attrs) + if err != nil { + return nil, err + } + } else { + subGraphName := SubgraphPrefix + name + err := graph.AddSubGraph(parentGraphName, subGraphName, nil) + if err != nil { + return nil, err + } + subGB := graphBuilderFromParent(gb) + swf, ok := gb.subWf[n.GetWorkflowNode().GetSubWorkflowRef().String()] + if !ok { + return nil, fmt.Errorf("subworkfow [%s] not found", n.GetWorkflowNode().GetSubWorkflowRef().String()) + } + if err := subGB.constructGraph(subGraphName, name, graph, swf); err != nil { + return nil, err + } + gn = subGB.graphNodes[StartNode] + gb.nodeClusters[gn.Name] = subGraphName + } + } + } + if err != nil { + return nil, err + } + gb.graphNodes[n.Id] = gn + return gn, nil +} + +func (gb *graphBuilder) addEdge(fromNodeName, toNodeName string, graph Graphvizer) error { + toNode, toOk := gb.graphNodes[toNodeName] + fromNode, fromOk := gb.graphNodes[fromNodeName] + if !toOk || !fromOk { + return fmt.Errorf("nodes[%s] -> [%s] referenced before creation", fromNodeName, toNodeName) + } + if !graph.DoesEdgeExist(fromNode.Name, toNode.Name) { + attrs := map[string]string{} + // Now lets check that the toNode or the fromNode is a cluster. If so then following this thread, + // https://stackoverflow.com/questions/2012036/graphviz-how-to-connect-subgraphs, we will connect the cluster + if c, ok := gb.nodeClusters[fromNode.Name]; ok { + attrs[LTailAttr] = fmt.Sprintf("\"%s\"", c) + } + if c, ok := gb.nodeClusters[toNode.Name]; ok { + attrs[LHeadAttr] = fmt.Sprintf("\"%s\"", c) + } + err := graph.AddEdge(fromNode.Name, toNode.Name, true, attrs) + if err != nil { + return err + } + } + return nil +} + +func (gb *graphBuilder) constructGraph(parentGraphName string, prefix string, graph Graphvizer, w *core.CompiledWorkflow) error { + if w == nil || w.Template == nil { + return nil + } + for _, n := range w.Template.Nodes { + if _, err := gb.constructNode(parentGraphName, prefix, graph, n); err != nil { + return err + } + } + + for name := range gb.graphNodes { + upstreamNodes := w.Connections.Upstream[name] + downstreamNodes := w.Connections.Downstream[name] + if downstreamNodes != nil { + for _, n := range downstreamNodes.Ids { + if err := gb.addEdge(name, n, graph); err != nil { + return err + } + } + } + if upstreamNodes != nil { + for _, n := range upstreamNodes.Ids { + if err := gb.addEdge(n, name, graph); err != nil { + return err + } + } + } + } + return nil +} + +func (gb *graphBuilder) CompiledWorkflowClosureToGraph(w *core.CompiledWorkflowClosure) (FlyteGraph, error) { + dotGraph := FlyteGraph{graphviz.NewGraph()} + _ = dotGraph.SetDir(true) + _ = dotGraph.SetStrict(true) + + tLookup := make(map[string]*core.CompiledTask) + for _, t := range w.Tasks { + if t.Template == nil || t.Template.Id == nil { + return FlyteGraph{}, fmt.Errorf("no template found in the workflow task %v", t) + } + tLookup[t.Template.Id.String()] = t + } + gb.tasks = tLookup + wLookup := make(map[string]*core.CompiledWorkflow) + for _, swf := range w.SubWorkflows { + if swf.Template == nil || swf.Template.Id == nil { + return FlyteGraph{}, fmt.Errorf("no template found in the sub workflow %v", swf) + } + wLookup[swf.Template.Id.String()] = swf + } + gb.subWf = wLookup + + return dotGraph, gb.constructGraph("", "", dotGraph, w.Primary) +} + +func newGraphBuilder() *graphBuilder { + return &graphBuilder{ + graphNodes: make(map[string]*graphviz.Node), + graphEdges: make(map[string]*graphviz.Edge), + nodeClusters: make(map[string]string), + } +} + +func graphBuilderFromParent(gb *graphBuilder) *graphBuilder { + newGB := newGraphBuilder() + newGB.subWf = gb.subWf + newGB.tasks = gb.tasks + return newGB +} + +// RenderWorkflow Renders the workflow graph on the console +func RenderWorkflow(w *core.CompiledWorkflowClosure) (string, error) { + if w == nil { + return "", fmt.Errorf("empty workflow closure") + } + gb := newGraphBuilder() + graph, err := gb.CompiledWorkflowClosureToGraph(w) + if err != nil { + return "", err + } + return graph.String(), nil +} diff --git a/flytectl/pkg/visualize/graphviz_test.go b/flytectl/pkg/visualize/graphviz_test.go new file mode 100644 index 0000000000..56b8621e2f --- /dev/null +++ b/flytectl/pkg/visualize/graphviz_test.go @@ -0,0 +1,470 @@ +package visualize + +import ( + "bytes" + "fmt" + "io/ioutil" + "testing" + + "github.com/flyteorg/flytectl/pkg/visualize/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + graphviz "github.com/awalterschulze/gographviz" + "github.com/golang/protobuf/jsonpb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestRenderWorkflowBranch(t *testing.T) { + // Sadly we cannot compare the output of svg, as it slightly changes. + file := []string{"compiled_closure_branch_nested", "compiled_subworkflows"} + + for _, s := range file { + t.Run(s, func(t *testing.T) { + r, err := ioutil.ReadFile(fmt.Sprintf("testdata/%s.json", s)) + assert.NoError(t, err) + + i := bytes.NewReader(r) + + c := &core.CompiledWorkflowClosure{} + err = jsonpb.Unmarshal(i, c) + assert.NoError(t, err) + b, err := RenderWorkflow(c) + fmt.Println(b) + assert.NoError(t, err) + assert.NotNil(t, b) + }) + } +} + +func TestAddBranchSubNodeEdge(t *testing.T) { + attrs := map[string]string{} + attrs[LHeadAttr] = fmt.Sprintf("\"%s\"", "innerGraph") + attrs[LabelAttr] = fmt.Sprintf("\"%s\"", "label") + t.Run("Successful", func(t *testing.T) { + gb := newGraphBuilder() + gb.nodeClusters["n"] = "innerGraph" + parentNode := &graphviz.Node{Name: "parentNode", Attrs: nil} + n := &graphviz.Node{Name: "n"} + + mockGraph := &mocks.Graphvizer{} + // Verify the attributes + mockGraph.OnAddEdgeMatch(mock.Anything, mock.Anything, mock.Anything, attrs).Return(nil) + mockGraph.OnGetEdgeMatch(mock.Anything, mock.Anything).Return(&graphviz.Edge{}) + err := gb.addBranchSubNodeEdge(mockGraph, parentNode, n, "label") + assert.NoError(t, err) + }) + + t.Run("Error", func(t *testing.T) { + gb := newGraphBuilder() + gb.nodeClusters["n"] = "innerGraph" + parentNode := &graphviz.Node{Name: "parentNode", Attrs: nil} + n := &graphviz.Node{Name: "n"} + + mockGraph := &mocks.Graphvizer{} + // Verify the attributes + mockGraph.OnAddEdgeMatch(mock.Anything, mock.Anything, mock.Anything, attrs).Return(fmt.Errorf("error adding edge")) + err := gb.addBranchSubNodeEdge(mockGraph, parentNode, n, "label") + assert.NotNil(t, err) + }) +} + +func TestConstructBranchNode(t *testing.T) { + attrs := map[string]string{} + attrs[LabelAttr] = fmt.Sprintf("\"[%s]\"", "nodeMetadata") + attrs[ShapeType] = DiamondShape + t.Run("Successful", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + expectedGraphvizNode := &graphviz.Node{ + Name: "brancheName_id", + Attrs: map[graphviz.Attr]string{"label": fmt.Sprintf("\"[%s]\"", "nodeMetadata"), + "shape": "diamond"}, + } + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(nil) + mockGraph.OnGetNodeMatch(mock.Anything).Return(expectedGraphvizNode) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{}, + }, + } + resultBranchNode, err := gb.constructBranchNode("parentGraph", "branchName", mockGraph, flyteNode) + assert.NoError(t, err) + assert.NotNil(t, resultBranchNode) + assert.Equal(t, expectedGraphvizNode, resultBranchNode) + }) + + t.Run("Add Node Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(fmt.Errorf("unable to add node")) + mockGraph.OnGetNodeMatch(mock.Anything).Return(nil) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{}, + }, + } + resultBranchNode, err := gb.constructBranchNode("parentGraph", "branchName", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Nil(t, resultBranchNode) + }) + + t.Run("Add ThenNode Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + attrs := map[string]string{} + attrs[LabelAttr] = fmt.Sprintf("\"[%s]\"", "nodeMetadata") + attrs[ShapeType] = DiamondShape + + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, "branchName_id", attrs).Return(nil) + mockGraph.OnAddNodeMatch(mock.Anything, "branchName_start_node", mock.Anything).Return(fmt.Errorf("unable to add node")) + mockGraph.OnGetNodeMatch(mock.Anything).Return(nil) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{ + IfElse: &core.IfElseBlock{ + Case: &core.IfBlock{ + Condition: &core.BooleanExpression{}, + ThenNode: &core.Node{ + Id: "start-node", + }, + }, + }, + }, + }, + } + resultBranchNode, err := gb.constructBranchNode("parentGraph", "branchName", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to add node"), err) + assert.Nil(t, resultBranchNode) + }) + + t.Run("Add Condition Node Edge Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + attrs := map[string]string{} + attrs[LabelAttr] = fmt.Sprintf("\"[%s]\"", "nodeMetadata") + attrs[ShapeType] = DiamondShape + + parentNode := &graphviz.Node{Name: "parentNode", Attrs: nil} + thenBranchStartNode := &graphviz.Node{Name: "branchName_start_node", Attrs: nil} + + mockGraph.OnAddNodeMatch(mock.Anything, "branchName_id", attrs).Return(nil) + mockGraph.OnAddNodeMatch(mock.Anything, "branchName_start_node", mock.Anything).Return(nil) + mockGraph.OnGetNodeMatch("branchName_id").Return(parentNode) + mockGraph.OnGetNodeMatch("branchName_start_node").Return(thenBranchStartNode) + mockGraph.OnAddEdgeMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("unable to add edge")) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{ + IfElse: &core.IfElseBlock{ + Case: &core.IfBlock{ + Condition: &core.BooleanExpression{ + Expr: &core.BooleanExpression_Comparison{ + Comparison: &core.ComparisonExpression{ + Operator: core.ComparisonExpression_EQ, + LeftValue: &core.Operand{ + Val: &core.Operand_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 40, + }, + }, + }, + }, + RightValue: &core.Operand{ + Val: &core.Operand_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 50, + }, + }, + }, + }, + }, + }, + }, + ThenNode: &core.Node{ + Id: "start-node", + }, + }, + }, + }, + }, + } + resultBranchNode, err := gb.constructBranchNode("parentGraph", "branchName", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to add edge"), err) + assert.Nil(t, resultBranchNode) + }) +} + +func TestConstructNode(t *testing.T) { + + t.Run("Start-Node", func(t *testing.T) { + attrs := map[string]string{} + attrs[LabelAttr] = "start" + attrs[ShapeType] = DoubleCircleShape + attrs[ColorAttr] = Green + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + expectedGraphvizNode := &graphviz.Node{ + Name: "start-node", + Attrs: map[graphviz.Attr]string{"label": "start", "shape": "doublecircle", "color": "green"}, + } + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(nil) + mockGraph.OnGetNodeMatch(mock.Anything).Return(expectedGraphvizNode) + flyteNode := &core.Node{ + Id: "start-node", + } + resultNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NoError(t, err) + assert.NotNil(t, resultNode) + assert.Equal(t, expectedGraphvizNode, resultNode) + }) + + t.Run("End-Node", func(t *testing.T) { + attrs := map[string]string{} + attrs[LabelAttr] = "end" + attrs[ShapeType] = DoubleCircleShape + attrs[ColorAttr] = Red + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + expectedGraphvizNode := &graphviz.Node{ + Name: "end-node", + Attrs: map[graphviz.Attr]string{"label": "end", "shape": "doublecircle", "color": "red"}, + } + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(nil) + mockGraph.OnGetNodeMatch(mock.Anything).Return(expectedGraphvizNode) + flyteNode := &core.Node{ + Id: "end-node", + } + resultNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NoError(t, err) + assert.NotNil(t, resultNode) + assert.Equal(t, expectedGraphvizNode, resultNode) + }) + + t.Run("Task-Node-Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_TaskNode{ + TaskNode: &core.TaskNode{ + Reference: &core.TaskNode_ReferenceId{ + ReferenceId: &core.Identifier{ + Project: "dummyProject", + Domain: "dummyDomain", + Name: "dummyName", + Version: "dummyVersion", + }, + }, + }, + }, + } + resultNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to find task [%s] in closure", + flyteNode.GetTaskNode().GetReferenceId().String()), err) + assert.Nil(t, resultNode) + }) + + t.Run("Branch-Node-SubGraph-Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + // Verify the attributes + mockGraph.OnAddSubGraphMatch("", SubgraphPrefix+"nodeMetadata", + mock.Anything).Return(fmt.Errorf("unable to create subgraph")) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{}, + }, + } + resultBranchNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to create subgraph"), err) + assert.Nil(t, resultBranchNode) + }) + + t.Run("Branch-Node-Add-Error", func(t *testing.T) { + attrs := map[string]string{} + attrs[LabelAttr] = fmt.Sprintf("\"[%s]\"", "nodeMetadata") + attrs[ShapeType] = DiamondShape + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + + // Verify the attributes + mockGraph.OnAddSubGraphMatch(mock.Anything, SubgraphPrefix+"nodeMetadata", mock.Anything).Return(nil) + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(fmt.Errorf("unable to add node")) + mockGraph.OnGetNodeMatch(mock.Anything).Return(nil) + + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_BranchNode{ + BranchNode: &core.BranchNode{}, + }, + } + resultBranchNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to add node"), err) + assert.Nil(t, resultBranchNode) + }) + + t.Run("Workflow-Node-Add-Error", func(t *testing.T) { + attrs := map[string]string{} + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + + // Verify the attributes + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, attrs).Return(fmt.Errorf("unable to add node")) + mockGraph.OnGetNodeMatch(mock.Anything).Return(nil) + + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_WorkflowNode{ + WorkflowNode: &core.WorkflowNode{ + Reference: &core.WorkflowNode_LaunchplanRef{ + LaunchplanRef: &core.Identifier{ + Project: "dummyProject", + Domain: "dummyDomain", + Name: "dummyName", + Version: "dummyVersion", + }, + }, + }, + }, + } + resultWorkflowNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to add node"), err) + assert.Nil(t, resultWorkflowNode) + }) + + t.Run("Workflow-Node-SubGraph-Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + // Verify the attributes + mockGraph.OnAddSubGraphMatch("", SubgraphPrefix+"id", + mock.Anything).Return(fmt.Errorf("unable to create subgraph")) + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_WorkflowNode{ + WorkflowNode: &core.WorkflowNode{}, + }, + } + resultWorkflowNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to create subgraph"), err) + assert.Nil(t, resultWorkflowNode) + }) + t.Run("Workflow-Node-Subworkflow-NotFound-Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + + // Verify the attributes + mockGraph.OnAddSubGraphMatch(mock.Anything, SubgraphPrefix+"id", mock.Anything).Return(nil) + + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_WorkflowNode{ + WorkflowNode: &core.WorkflowNode{ + Reference: &core.WorkflowNode_SubWorkflowRef{ + SubWorkflowRef: &core.Identifier{ + Project: "dummyProject", + Domain: "dummyDomain", + Name: "dummyName", + Version: "dummyVersion", + }, + }, + }, + }, + } + resultWorkflowNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("subworkfow [project:\"dummyProject\" domain:\"dummyDomain\" name:\"dummyName\" version:\"dummyVersion\" ] not found"), err) + assert.Nil(t, resultWorkflowNode) + }) + + t.Run("Workflow-Node-Subworkflow-Graph-Create-Error", func(t *testing.T) { + gb := newGraphBuilder() + mockGraph := &mocks.Graphvizer{} + + // Verify the attributes + mockGraph.OnAddSubGraphMatch(mock.Anything, SubgraphPrefix+"id", mock.Anything).Return(nil) + mockGraph.OnAddNodeMatch(mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("unable to add node")) + mockGraph.OnGetNodeMatch(mock.Anything).Return(nil) + + gb.subWf = make(map[string]*core.CompiledWorkflow) + subwfNode := &core.Node{ + Id: "start-node", + } + sbwfNodes := []*core.Node{subwfNode} + + gb.subWf["project:\"dummyProject\" domain:\"dummyDomain\" name:\"dummyName\" version:\"dummyVersion\" "] = + &core.CompiledWorkflow{Template: &core.WorkflowTemplate{Nodes: sbwfNodes}} + flyteNode := &core.Node{ + Id: "id", + Metadata: &core.NodeMetadata{ + Name: "nodeMetadata", + }, + Target: &core.Node_WorkflowNode{ + WorkflowNode: &core.WorkflowNode{ + Reference: &core.WorkflowNode_SubWorkflowRef{ + SubWorkflowRef: &core.Identifier{ + Project: "dummyProject", + Domain: "dummyDomain", + Name: "dummyName", + Version: "dummyVersion", + }, + }, + }, + }, + } + resultWorkflowNode, err := gb.constructNode("", "", mockGraph, flyteNode) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to add node"), err) + assert.Nil(t, resultWorkflowNode) + }) + +} diff --git a/flytectl/pkg/visualize/graphvizer.go b/flytectl/pkg/visualize/graphvizer.go new file mode 100644 index 0000000000..7fcb24ee08 --- /dev/null +++ b/flytectl/pkg/visualize/graphvizer.go @@ -0,0 +1,35 @@ +package visualize + +import graphviz "github.com/awalterschulze/gographviz" + +//go:generate mockery -all -case=underscore + +type Graphvizer interface { + AddEdge(src, dst string, directed bool, attrs map[string]string) error + AddNode(parentGraph string, name string, attrs map[string]string) error + AddSubGraph(parentGraph string, name string, attrs map[string]string) error + AddAttr(parentGraph string, field string, value string) error + SetName(name string) error + GetEdge(src, dest string) *graphviz.Edge + GetNode(key string) *graphviz.Node + DoesEdgeExist(src, dest string) bool +} + +type FlyteGraph struct { + *graphviz.Graph +} + +// GetNode given the key to the node +func (g FlyteGraph) GetNode(key string) *graphviz.Node { + return g.Nodes.Lookup[key] +} + +// GetEdge gets the edge in the graph from src to dest +func (g FlyteGraph) GetEdge(src, dest string) *graphviz.Edge { + return g.Edges.SrcToDsts[src][dest][0] +} + +// DoesEdgeExist checks if an edge exists in the graph from src to dest +func (g FlyteGraph) DoesEdgeExist(src, dest string) bool { + return g.Edges.SrcToDsts[src][dest] != nil +} diff --git a/flytectl/pkg/visualize/mocks/graphvizer.go b/flytectl/pkg/visualize/mocks/graphvizer.go new file mode 100644 index 0000000000..e36204ed77 --- /dev/null +++ b/flytectl/pkg/visualize/mocks/graphvizer.go @@ -0,0 +1,273 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + gographviz "github.com/awalterschulze/gographviz" + mock "github.com/stretchr/testify/mock" +) + +// Graphvizer is an autogenerated mock type for the Graphvizer type +type Graphvizer struct { + mock.Mock +} + +type Graphvizer_AddAttr struct { + *mock.Call +} + +func (_m Graphvizer_AddAttr) Return(_a0 error) *Graphvizer_AddAttr { + return &Graphvizer_AddAttr{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnAddAttr(parentGraph string, field string, value string) *Graphvizer_AddAttr { + c := _m.On("AddAttr", parentGraph, field, value) + return &Graphvizer_AddAttr{Call: c} +} + +func (_m *Graphvizer) OnAddAttrMatch(matchers ...interface{}) *Graphvizer_AddAttr { + c := _m.On("AddAttr", matchers...) + return &Graphvizer_AddAttr{Call: c} +} + +// AddAttr provides a mock function with given fields: parentGraph, field, value +func (_m *Graphvizer) AddAttr(parentGraph string, field string, value string) error { + ret := _m.Called(parentGraph, field, value) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, string) error); ok { + r0 = rf(parentGraph, field, value) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Graphvizer_AddEdge struct { + *mock.Call +} + +func (_m Graphvizer_AddEdge) Return(_a0 error) *Graphvizer_AddEdge { + return &Graphvizer_AddEdge{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnAddEdge(src string, dst string, directed bool, attrs map[string]string) *Graphvizer_AddEdge { + c := _m.On("AddEdge", src, dst, directed, attrs) + return &Graphvizer_AddEdge{Call: c} +} + +func (_m *Graphvizer) OnAddEdgeMatch(matchers ...interface{}) *Graphvizer_AddEdge { + c := _m.On("AddEdge", matchers...) + return &Graphvizer_AddEdge{Call: c} +} + +// AddEdge provides a mock function with given fields: src, dst, directed, attrs +func (_m *Graphvizer) AddEdge(src string, dst string, directed bool, attrs map[string]string) error { + ret := _m.Called(src, dst, directed, attrs) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, bool, map[string]string) error); ok { + r0 = rf(src, dst, directed, attrs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Graphvizer_AddNode struct { + *mock.Call +} + +func (_m Graphvizer_AddNode) Return(_a0 error) *Graphvizer_AddNode { + return &Graphvizer_AddNode{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnAddNode(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddNode { + c := _m.On("AddNode", parentGraph, name, attrs) + return &Graphvizer_AddNode{Call: c} +} + +func (_m *Graphvizer) OnAddNodeMatch(matchers ...interface{}) *Graphvizer_AddNode { + c := _m.On("AddNode", matchers...) + return &Graphvizer_AddNode{Call: c} +} + +// AddNode provides a mock function with given fields: parentGraph, name, attrs +func (_m *Graphvizer) AddNode(parentGraph string, name string, attrs map[string]string) error { + ret := _m.Called(parentGraph, name, attrs) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, map[string]string) error); ok { + r0 = rf(parentGraph, name, attrs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Graphvizer_AddSubGraph struct { + *mock.Call +} + +func (_m Graphvizer_AddSubGraph) Return(_a0 error) *Graphvizer_AddSubGraph { + return &Graphvizer_AddSubGraph{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnAddSubGraph(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddSubGraph { + c := _m.On("AddSubGraph", parentGraph, name, attrs) + return &Graphvizer_AddSubGraph{Call: c} +} + +func (_m *Graphvizer) OnAddSubGraphMatch(matchers ...interface{}) *Graphvizer_AddSubGraph { + c := _m.On("AddSubGraph", matchers...) + return &Graphvizer_AddSubGraph{Call: c} +} + +// AddSubGraph provides a mock function with given fields: parentGraph, name, attrs +func (_m *Graphvizer) AddSubGraph(parentGraph string, name string, attrs map[string]string) error { + ret := _m.Called(parentGraph, name, attrs) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, map[string]string) error); ok { + r0 = rf(parentGraph, name, attrs) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Graphvizer_DoesEdgeExist struct { + *mock.Call +} + +func (_m Graphvizer_DoesEdgeExist) Return(_a0 bool) *Graphvizer_DoesEdgeExist { + return &Graphvizer_DoesEdgeExist{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnDoesEdgeExist(src string, dest string) *Graphvizer_DoesEdgeExist { + c := _m.On("DoesEdgeExist", src, dest) + return &Graphvizer_DoesEdgeExist{Call: c} +} + +func (_m *Graphvizer) OnDoesEdgeExistMatch(matchers ...interface{}) *Graphvizer_DoesEdgeExist { + c := _m.On("DoesEdgeExist", matchers...) + return &Graphvizer_DoesEdgeExist{Call: c} +} + +// DoesEdgeExist provides a mock function with given fields: src, dest +func (_m *Graphvizer) DoesEdgeExist(src string, dest string) bool { + ret := _m.Called(src, dest) + + var r0 bool + if rf, ok := ret.Get(0).(func(string, string) bool); ok { + r0 = rf(src, dest) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +type Graphvizer_GetEdge struct { + *mock.Call +} + +func (_m Graphvizer_GetEdge) Return(_a0 *gographviz.Edge) *Graphvizer_GetEdge { + return &Graphvizer_GetEdge{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnGetEdge(src string, dest string) *Graphvizer_GetEdge { + c := _m.On("GetEdge", src, dest) + return &Graphvizer_GetEdge{Call: c} +} + +func (_m *Graphvizer) OnGetEdgeMatch(matchers ...interface{}) *Graphvizer_GetEdge { + c := _m.On("GetEdge", matchers...) + return &Graphvizer_GetEdge{Call: c} +} + +// GetEdge provides a mock function with given fields: src, dest +func (_m *Graphvizer) GetEdge(src string, dest string) *gographviz.Edge { + ret := _m.Called(src, dest) + + var r0 *gographviz.Edge + if rf, ok := ret.Get(0).(func(string, string) *gographviz.Edge); ok { + r0 = rf(src, dest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*gographviz.Edge) + } + } + + return r0 +} + +type Graphvizer_GetNode struct { + *mock.Call +} + +func (_m Graphvizer_GetNode) Return(_a0 *gographviz.Node) *Graphvizer_GetNode { + return &Graphvizer_GetNode{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnGetNode(key string) *Graphvizer_GetNode { + c := _m.On("GetNode", key) + return &Graphvizer_GetNode{Call: c} +} + +func (_m *Graphvizer) OnGetNodeMatch(matchers ...interface{}) *Graphvizer_GetNode { + c := _m.On("GetNode", matchers...) + return &Graphvizer_GetNode{Call: c} +} + +// GetNode provides a mock function with given fields: key +func (_m *Graphvizer) GetNode(key string) *gographviz.Node { + ret := _m.Called(key) + + var r0 *gographviz.Node + if rf, ok := ret.Get(0).(func(string) *gographviz.Node); ok { + r0 = rf(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*gographviz.Node) + } + } + + return r0 +} + +type Graphvizer_SetName struct { + *mock.Call +} + +func (_m Graphvizer_SetName) Return(_a0 error) *Graphvizer_SetName { + return &Graphvizer_SetName{Call: _m.Call.Return(_a0)} +} + +func (_m *Graphvizer) OnSetName(name string) *Graphvizer_SetName { + c := _m.On("SetName", name) + return &Graphvizer_SetName{Call: c} +} + +func (_m *Graphvizer) OnSetNameMatch(matchers ...interface{}) *Graphvizer_SetName { + c := _m.On("SetName", matchers...) + return &Graphvizer_SetName{Call: c} +} + +// SetName provides a mock function with given fields: name +func (_m *Graphvizer) SetName(name string) error { + ret := _m.Called(name) + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(name) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json new file mode 100644 index 0000000000..baae3d9926 --- /dev/null +++ b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json @@ -0,0 +1,553 @@ +{ + "primary": { + "template": { + "id": { + "resourceType": "WORKFLOW", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.so_nested", + "version": "v1" + }, + "metadata": {}, + "interface": { + "inputs": { + "variables": { + "my_input": { + "type": { + "simple": "FLOAT" + }, + "description": "my_input" + } + } + }, + "outputs": { + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } + } + } + }, + "nodes": [ + { + "id": "start-node" + }, + { + "id": "end-node", + "inputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "n0", + "var": "o0" + } + } + } + ] + }, + { + "id": "n0", + "metadata": { + "name": "fractions", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": ".my_input", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "branchNode": { + "ifElse": { + "case": { + "condition": { + "conjunction": { + "leftExpression": { + "comparison": { + "operator": "GT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 0.1 + } + } + } + }, + "rightExpression": { + "comparison": { + "operator": "LT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 1 + } + } + } + } + } + }, + "thenNode": { + "id": "n0-n0", + "metadata": { + "name": "inner_fractions", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": ".my_input", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "branchNode": { + "ifElse": { + "case": { + "condition": { + "comparison": { + "operator": "LT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 0.5 + } + } + } + }, + "thenNode": { + "id": "n0-n0-n0-n0", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.run_conditions.double", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "n", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.double", + "version": "v1" + } + } + } + }, + "other": [ + { + "condition": { + "conjunction": { + "leftExpression": { + "comparison": { + "operator": "GT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 0.5 + } + } + } + }, + "rightExpression": { + "comparison": { + "operator": "LT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 0.7 + } + } + } + } + } + }, + "thenNode": { + "id": "n0-n0-n0-n1", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.run_conditions.square", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "n", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.square", + "version": "v1" + } + } + } + } + ], + "error": { + "failedNodeId": "inner_fractions", + "message": "Only \u003c0.7 allowed" + } + } + } + } + }, + "other": [ + { + "condition": { + "conjunction": { + "leftExpression": { + "comparison": { + "operator": "GT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 1 + } + } + } + }, + "rightExpression": { + "comparison": { + "operator": "LT", + "leftValue": { + "var": ".my_input" + }, + "rightValue": { + "primitive": { + "floatValue": 10 + } + } + } + } + } + }, + "thenNode": { + "id": "n0-n1", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.run_conditions.square", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "n", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.square", + "version": "v1" + } + } + } + } + ], + "elseNode": { + "id": "n0-n2", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.run_conditions.double", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "n", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "my_input" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.double", + "version": "v1" + } + } + } + } + } + } + ], + "outputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "n0", + "var": "o0" + } + } + } + ], + "metadataDefaults": {} + }, + "connections": { + "downstream": { + "n0": { + "ids": [ + "end-node" + ] + }, + "start-node": { + "ids": [ + "n0" + ] + } + }, + "upstream": { + "end-node": { + "ids": [ + "n0" + ] + }, + "n0": { + "ids": [ + "start-node" + ] + }, + "n0-n0": { + "ids": [ + "start-node" + ] + }, + "n0-n1": { + "ids": [ + "start-node" + ] + }, + "n0-n2": { + "ids": [ + "start-node" + ] + }, + "n0-n0-n0-n0": { + "ids": [ + "start-node" + ] + }, + "n0-n0-n0-n1": { + "ids": [ + "start-node" + ] + }, + "n1": { + "ids": [ + "start-node" + ] + }, + "n2": { + "ids": [ + "start-node" + ] + } + } + } + }, + "tasks": [ + { + "template": { + "id": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.double", + "version": "v1" + }, + "type": "python-task", + "metadata": { + "runtime": { + "type": "FLYTE_SDK", + "version": "0.0.0+develop", + "flavor": "python" + }, + "retries": {}, + "interruptible": false + }, + "interface": { + "inputs": { + "variables": { + "n": { + "type": { + "simple": "FLOAT" + }, + "description": "n" + } + } + }, + "outputs": { + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } + } + } + }, + "container": { + "image": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59", + "args": [ + "pyflyte-execute", + "--inputs", + "{{.input}}", + "--output-prefix", + "{{.outputPrefix}}", + "--raw-output-data-prefix", + "{{.rawOutputDataPrefix}}", + "--resolver", + "flytekit.core.python_auto_container.default_task_resolver", + "--", + "task-module", + "core.control_flow.run_conditions", + "task-name", + "double" + ], + "resources": {}, + "env": [ + { + "key": "FLYTE_INTERNAL_CONFIGURATION_PATH", + "value": "/root/sandbox.config" + }, + { + "key": "FLYTE_INTERNAL_IMAGE", + "value": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + ] + } + } + }, + { + "template": { + "id": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.run_conditions.square", + "version": "v1" + }, + "type": "python-task", + "metadata": { + "runtime": { + "type": "FLYTE_SDK", + "version": "0.0.0+develop", + "flavor": "python" + }, + "retries": {}, + "interruptible": false + }, + "interface": { + "inputs": { + "variables": { + "n": { + "type": { + "simple": "FLOAT" + }, + "description": "n" + } + } + }, + "outputs": { + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } + } + } + }, + "container": { + "image": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59", + "args": [ + "pyflyte-execute", + "--inputs", + "{{.input}}", + "--output-prefix", + "{{.outputPrefix}}", + "--raw-output-data-prefix", + "{{.rawOutputDataPrefix}}", + "--resolver", + "flytekit.core.python_auto_container.default_task_resolver", + "--", + "task-module", + "core.control_flow.run_conditions", + "task-name", + "square" + ], + "resources": {}, + "env": [ + { + "key": "FLYTE_INTERNAL_CONFIGURATION_PATH", + "value": "/root/sandbox.config" + }, + { + "key": "FLYTE_INTERNAL_IMAGE", + "value": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/flytectl/pkg/visualize/testdata/compiled_subworkflows.json b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json new file mode 100644 index 0000000000..8bbf441367 --- /dev/null +++ b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json @@ -0,0 +1,482 @@ +{ + "primary": { + "template": { + "id": { + "resourceType": "WORKFLOW", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.parent_wf", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + }, + "metadata": {}, + "interface": { + "inputs": { + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } + } + }, + "outputs": { + "variables": { + "o0": { + "type": { + "simple": "INTEGER" + }, + "description": "o0" + }, + "o1": { + "type": { + "simple": "STRING" + }, + "description": "o1" + }, + "o2": { + "type": { + "simple": "STRING" + }, + "description": "o2" + } + } + } + }, + "nodes": [ + { + "id": "start-node" + }, + { + "id": "end-node", + "inputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "node-t1-parent", + "var": "t1_int_output" + } + } + }, + { + "var": "o1", + "binding": { + "promise": { + "nodeId": "n1", + "var": "o0" + } + } + }, + { + "var": "o2", + "binding": { + "promise": { + "nodeId": "n1", + "var": "o1" + } + } + } + ] + }, + { + "id": "node-t1-parent", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.subworkflows.t1", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "a", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "a" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.t1", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + } + }, + { + "id": "n1", + "metadata": { + "name": "flytekit.core.workflow.core.control_flow.subworkflows.my_subwf", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "a", + "binding": { + "promise": { + "nodeId": "node-t1-parent", + "var": "t1_int_output" + } + } + } + ], + "upstreamNodeIds": [ + "node-t1-parent" + ], + "workflowNode": { + "subWorkflowRef": { + "resourceType": "WORKFLOW", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.my_subwf", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + } + } + ], + "outputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "node-t1-parent", + "var": "t1_int_output" + } + } + }, + { + "var": "o1", + "binding": { + "promise": { + "nodeId": "n1", + "var": "o0" + } + } + }, + { + "var": "o2", + "binding": { + "promise": { + "nodeId": "n1", + "var": "o1" + } + } + } + ], + "metadataDefaults": {} + }, + "connections": { + "downstream": { + "n1": { + "ids": [ + "end-node" + ] + }, + "node-t1-parent": { + "ids": [ + "end-node", + "n1" + ] + }, + "start-node": { + "ids": [ + "node-t1-parent" + ] + } + }, + "upstream": { + "end-node": { + "ids": [ + "n1", + "node-t1-parent" + ] + }, + "n1": { + "ids": [ + "node-t1-parent" + ] + }, + "node-t1-parent": { + "ids": [ + "start-node" + ] + } + } + } + }, + "subWorkflows": [ + { + "template": { + "id": { + "resourceType": "WORKFLOW", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.my_subwf", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + }, + "metadata": {}, + "interface": { + "inputs": { + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } + } + }, + "outputs": { + "variables": { + "o0": { + "type": { + "simple": "STRING" + }, + "description": "o0" + }, + "o1": { + "type": { + "simple": "STRING" + }, + "description": "o1" + } + } + } + }, + "nodes": [ + { + "id": "start-node" + }, + { + "id": "end-node", + "inputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "n0", + "var": "c" + } + } + }, + { + "var": "o1", + "binding": { + "promise": { + "nodeId": "n1", + "var": "c" + } + } + } + ] + }, + { + "id": "n0", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.subworkflows.t1", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "a", + "binding": { + "promise": { + "nodeId": "start-node", + "var": "a" + } + } + } + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.t1", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + } + }, + { + "id": "n1", + "metadata": { + "name": "flytekit.core.python_function_task.core.control_flow.subworkflows.t1", + "retries": {}, + "interruptible": false + }, + "inputs": [ + { + "var": "a", + "binding": { + "promise": { + "nodeId": "n0", + "var": "t1_int_output" + } + } + } + ], + "upstreamNodeIds": [ + "n0" + ], + "taskNode": { + "referenceId": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.t1", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + } + } + ], + "outputs": [ + { + "var": "o0", + "binding": { + "promise": { + "nodeId": "n0", + "var": "c" + } + } + }, + { + "var": "o1", + "binding": { + "promise": { + "nodeId": "n1", + "var": "c" + } + } + } + ], + "metadataDefaults": {} + }, + "connections": { + "downstream": { + "n0": { + "ids": [ + "end-node", + "n1" + ] + }, + "n1": { + "ids": [ + "end-node" + ] + }, + "start-node": { + "ids": [ + "n0" + ] + } + }, + "upstream": { + "end-node": { + "ids": [ + "n0", + "n1" + ] + }, + "n0": { + "ids": [ + "start-node" + ] + }, + "n1": { + "ids": [ + "n0" + ] + } + } + } + } + ], + "tasks": [ + { + "template": { + "id": { + "resourceType": "TASK", + "project": "flytesnacks", + "domain": "development", + "name": "core.control_flow.subworkflows.t1", + "version": "d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + }, + "type": "python-task", + "metadata": { + "runtime": { + "type": "FLYTE_SDK", + "version": "0.0.0+develop", + "flavor": "python" + }, + "retries": {}, + "interruptible": false + }, + "interface": { + "inputs": { + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } + } + }, + "outputs": { + "variables": { + "c": { + "type": { + "simple": "STRING" + }, + "description": "c" + }, + "t1_int_output": { + "type": { + "simple": "INTEGER" + }, + "description": "t1_int_output" + } + } + } + }, + "container": { + "image": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59", + "args": [ + "pyflyte-execute", + "--inputs", + "{{.input}}", + "--output-prefix", + "{{.outputPrefix}}", + "--raw-output-data-prefix", + "{{.rawOutputDataPrefix}}", + "--resolver", + "flytekit.core.python_auto_container.default_task_resolver", + "--", + "task-module", + "core.control_flow.subworkflows", + "task-name", + "t1" + ], + "resources": {}, + "env": [ + { + "key": "FLYTE_INTERNAL_CONFIGURATION_PATH", + "value": "/root/sandbox.config" + }, + { + "key": "FLYTE_INTERNAL_IMAGE", + "value": "flytecookbook:core-d5fa3ecfaca02f9b83957c68fd5fe3c9082ccc59" + } + ] + } + } + } + ] +} + From 179da66ab537de12529c995ef3d7dde99e9f3185 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 18 Jun 2021 23:08:45 +0530 Subject: [PATCH 077/356] Added source flags in sandbox (#99) * added flags in sandbox Signed-off-by: Yuvraj * Set false debug defualt value Signed-off-by: Yuvraj * Remove debug flag Signed-off-by: Yuvraj * changes sandbox config name Signed-off-by: Yuvraj * Added test Signed-off-by: Yuvraj * Update sandbox logic to not overright user config Signed-off-by: Yuvraj * Added more unit test for sandbox Signed-off-by: Yuvraj * more unit test added Signed-off-by: Yuvraj * fixed unit test Signed-off-by: Yuvraj * more unit test Signed-off-by: Yuvraj * more unit test fix Signed-off-by: Yuvraj * more unit test fix Signed-off-by: Yuvraj * added more unit test Signed-off-by: Yuvraj * more changes Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 9 +- .../config/subcommand/sandbox/config_flags.go | 55 +++++++++ .../subcommand/sandbox/config_flags_test.go | 116 ++++++++++++++++++ .../subcommand/sandbox/sandbox_config.go | 11 ++ flytectl/cmd/sandbox/sandbox.go | 3 +- flytectl/cmd/sandbox/sandbox_util.go | 81 ++++++------ flytectl/cmd/sandbox/sandbox_util_test.go | 52 ++++++-- flytectl/cmd/sandbox/start.go | 64 ++++++---- flytectl/cmd/sandbox/teardown.go | 20 +-- 9 files changed, 321 insertions(+), 90 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/sandbox/config_flags.go create mode 100755 flytectl/cmd/config/subcommand/sandbox/config_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/sandbox/sandbox_config.go diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 43e996590c..2b70c73f27 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -12,17 +12,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: actions/cache@v2 with: - fetch-depth: "0" + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: version: latest - args: --snapshot --skip-publish --rm-dist + args: --snapshot --skip-publish --rm-dist - name: Unit Tests uses: cedrickring/golang-action@1.5.2 env: GO111MODULE: "on" + CI_ENV: "true" with: args: make install && make test_unit_codecov - name: Push CodeCov diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go new file mode 100755 index 0000000000..3c1cd8d74e --- /dev/null +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package sandbox + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultConfig.SnacksRepo, fmt.Sprintf("%v%v", prefix, "flytesnacks"), DefaultConfig.SnacksRepo, " Path of your flytesnacks repository") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go new file mode 100755 index 0000000000..c6bf24684c --- /dev/null +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package sandbox + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_flytesnacks", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("flytesnacks", testValue) + if vString, err := cmdFlags.GetString("flytesnacks"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.SnacksRepo) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go new file mode 100644 index 0000000000..e9f8098828 --- /dev/null +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -0,0 +1,11 @@ +package sandbox + +//go:generate pflags Config --default-var DefaultConfig +var ( + DefaultConfig = &Config{} +) + +// Config +type Config struct { + SnacksRepo string `json:"flytesnacks" pflag:", Path of your flytesnacks repository"` +} diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 995c6c6890..cf666b9a48 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -1,6 +1,7 @@ package sandbox import ( + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -33,7 +34,7 @@ func CreateSandboxCommand() *cobra.Command { sandboxResourcesFuncs := map[string]cmdcore.CommandEntry{ "start": {CmdFunc: startSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, - Long: startLong}, + Long: startLong, PFlagProvider: sandboxConfig.DefaultConfig}, "teardown": {CmdFunc: teardownSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, Long: teardownLong}, diff --git a/flytectl/cmd/sandbox/sandbox_util.go b/flytectl/cmd/sandbox/sandbox_util.go index d739e671a7..e6c0d43944 100644 --- a/flytectl/cmd/sandbox/sandbox_util.go +++ b/flytectl/cmd/sandbox/sandbox_util.go @@ -10,26 +10,32 @@ import ( "os" "strings" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" - "github.com/enescakir/emoji" f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) var ( - Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") - FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config.yaml") - SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" - ImageName = "ghcr.io/flyteorg/flyte-sandbox:dind" - SandboxClusterName = "flyte-sandbox" - Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} + Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") + FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config-sandbox.yaml") + SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" + ImageName = "ghcr.io/flyteorg/flyte-sandbox:dind" + flyteSandboxClusterName = "flyte-sandbox" + Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} + flyteSnackDir = "/usr/src" + K3sDir = "/etc/rancher/" ) func setupFlytectlConfig() error { + + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + response, err := http.Get("https://raw.githubusercontent.com/flyteorg/flytectl/master/config.yaml") if err != nil { return err @@ -41,11 +47,7 @@ func setupFlytectlConfig() error { return err } - err = ioutil.WriteFile(FlytectlConfig, data, 0600) - if err != nil { - fmt.Printf("Please create ~/.flyte dir %v \n", emoji.ManTechnologist) - return err - } + _ = ioutil.WriteFile(FlytectlConfig, data, 0600) return nil } @@ -62,21 +64,31 @@ func configCleanup() error { } func getSandbox(cli *client.Client) *types.Container { - containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{ + containers, _ := cli.ContainerList(context.Background(), types.ContainerListOptions{ All: true, }) - if err != nil { - return nil - } for _, v := range containers { - if strings.Contains(v.Names[0], SandboxClusterName) { + if strings.Contains(v.Names[0], flyteSandboxClusterName) { return &v } } return nil } -func startContainer(cli *client.Client) (string, error) { +func removeSandboxIfExist(cli *client.Client, reader io.Reader) error { + if c := getSandbox(cli); c != nil { + if cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { + err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ + Force: true, + }) + return err + } + os.Exit(0) + } + return nil +} + +func startContainer(cli *client.Client, volumes []mount.Mount) (string, error) { ExposedPorts, PortBindings, _ := nat.ParsePortSpecs([]string{ "127.0.0.1:30086:30086", "127.0.0.1:30081:30081", @@ -87,38 +99,23 @@ func startContainer(cli *client.Client) (string, error) { if err != nil { return "", err } - - if _, err := io.Copy(os.Stdout, r); err != nil { - return "", err - } - + _, _ = io.Copy(os.Stdout, r) resp, err := cli.ContainerCreate(context.Background(), &container.Config{ Env: Environment, Image: ImageName, Tty: false, ExposedPorts: ExposedPorts, }, &container.HostConfig{ - Mounts: []mount.Mount{ - { - Type: mount.TypeBind, - Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), - Target: "/etc/rancher/", - }, - // TODO (Yuvraj) Add flytectl config in sandbox and mount with host file system - //{ - // Type: mount.TypeBind, - // Source: f.FilePathJoin(f.UserHomeDir(), ".flyte", "config.yaml"), - // Target: "/.flyte/", - //}, - }, + Mounts: volumes, PortBindings: PortBindings, Privileged: true, }, nil, - nil, SandboxClusterName) + nil, flyteSandboxClusterName) + if err != nil { return "", err } - + go watchError(cli, resp.ID) if err := cli.ContainerStart(context.Background(), resp.ID, types.ContainerStartOptions{}); err != nil { return "", err } @@ -127,6 +124,7 @@ func startContainer(cli *client.Client) (string, error) { func watchError(cli *client.Client, id string) { statusCh, errCh := cli.ContainerWait(context.Background(), id, container.WaitConditionNotRunning) + select { case err := <-errCh: if err != nil { @@ -136,7 +134,7 @@ func watchError(cli *client.Client, id string) { } } -func readLogs(cli *client.Client, id string) error { +func readLogs(cli *client.Client, id, message string) error { reader, err := cli.ContainerLogs(context.Background(), id, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, @@ -147,9 +145,10 @@ func readLogs(cli *client.Client, id string) error { return err } scanner := bufio.NewScanner(reader) + for scanner.Scan() { - if strings.Contains(scanner.Text(), SuccessMessage) { - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, SuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + if strings.Contains(scanner.Text(), message) { + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, message, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") break diff --git a/flytectl/cmd/sandbox/sandbox_util_test.go b/flytectl/cmd/sandbox/sandbox_util_test.go index 269152a9ba..ab7e981b98 100644 --- a/flytectl/cmd/sandbox/sandbox_util_test.go +++ b/flytectl/cmd/sandbox/sandbox_util_test.go @@ -8,7 +8,9 @@ import ( "testing" "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" @@ -29,8 +31,10 @@ func cleanup(client *client.Client) error { return err } for _, v := range containers { - if strings.Contains(v.Names[0], SandboxClusterName) { - if err := client.ContainerRemove(context.Background(), v.ID, types.ContainerRemoveOptions{}); err != nil { + if strings.Contains(v.Names[0], flyteSandboxClusterName) { + if err := client.ContainerRemove(context.Background(), v.ID, types.ContainerRemoveOptions{ + Force: true, + }); err != nil { return err } } @@ -41,10 +45,6 @@ func cleanup(client *client.Client) error { func setupSandbox() { mockAdminClient := u.MockClient cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) - _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) - if os.IsNotExist(err) { - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - } _ = setupFlytectlConfig() } @@ -81,6 +81,7 @@ func TestSetupFlytectlConfig(t *testing.T) { check := os.IsNotExist(err) assert.Equal(t, check, false) _ = configCleanup() + } func TestTearDownSandbox(t *testing.T) { @@ -89,12 +90,47 @@ func TestTearDownSandbox(t *testing.T) { err := teardownSandboxCluster(context.Background(), []string{}, cmdCtx) assert.Nil(t, err) assert.Nil(t, cleanup(cli)) + + volumes = []mount.Mount{} + _ = startSandboxCluster(context.Background(), []string{}, cmdCtx) + err = teardownSandboxCluster(context.Background(), []string{}, cmdCtx) + assert.Nil(t, err) + } -func TestStartContainer(t *testing.T) { - setupSandbox() +func TestStartSandbox(t *testing.T) { cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + assert.Nil(t, cleanup(cli)) + setupSandbox() + volumes = []mount.Mount{} + sandboxConfig.DefaultConfig.SnacksRepo = "/tmp" err := startSandboxCluster(context.Background(), []string{}, cmdCtx) assert.Nil(t, err) + + assert.Nil(t, cleanup(cli)) + setupSandbox() + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + err = startSandboxCluster(context.Background(), []string{}, cmdCtx) + assert.NotNil(t, err) + + assert.Nil(t, cleanup(cli)) + _, err = startContainer(cli, []mount.Mount{}) + assert.Nil(t, err) + + assert.Nil(t, cleanup(cli)) + ImageName = "" + _, err = startContainer(cli, []mount.Mount{}) + assert.NotNil(t, err) +} + +func TestGetSandbox(t *testing.T) { + cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + assert.Nil(t, cleanup(cli)) + setupSandbox() + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + _ = startSandboxCluster(context.Background(), []string{}, cmdCtx) + + container := removeSandboxIfExist(cli, strings.NewReader("y")) + assert.Nil(t, container) } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 6a620603dd..082c12a54c 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -5,10 +5,12 @@ import ( "fmt" "os" + "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" "github.com/enescakir/emoji" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" - cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) const ( @@ -17,12 +19,24 @@ const ( Start will run the flyte sandbox cluster inside a docker container and setup the config that is required :: - bin/flytectl start + bin/flytectl sandbox start + +Mount your flytesnacks repository code inside sandbox +:: + bin/flytectl sandbox start --flytesnacks=$HOME/flyteorg/flytesnacks Usage ` ) +var volumes = []mount.Mount{ + { + Type: mount.TypeBind, + Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), + Target: K3sDir, + }, +} + type ExecResult struct { StdOut string StdErr string @@ -41,34 +55,36 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm return err } - if container := getSandbox(cli); container != nil { - if cmdUtil.AskForConfirmation("delete existing sandbox cluster", os.Stdin) { - if err := teardownSandboxCluster(ctx, []string{}, cmdCtx); err != nil { - return err - } - } + if err := removeSandboxIfExist(cli, os.Stdin); err != nil { + return err } - ID, err := startContainer(cli) - if err == nil { - os.Setenv("KUBECONFIG", Kubeconfig) + if len(sandboxConfig.DefaultConfig.SnacksRepo) > 0 { + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: flyteSnackDir, + }) + } - defer func() { - if r := recover(); r != nil { - fmt.Println("Something goes wrong with container status", r) - } - }() + os.Setenv("KUBECONFIG", Kubeconfig) + os.Setenv("FLYTECTL_CONFIG", FlytectlConfig) - go watchError(cli, ID) - if err := readLogs(cli, ID); err != nil { - return err + defer func() { + if r := recover(); r != nil { + fmt.Println("Something goes wrong with container status", r) } + }() - fmt.Printf("Add (KUBECONFIG) to your environment variabl \n") - fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) - return nil + ID, err := startContainer(cli, volumes) + if err != nil { + fmt.Println("Something goes wrong. We are not able to start sandbox container, Please check your docker client and try again ") + return fmt.Errorf("error: %v", err) } - fmt.Println("Something goes wrong. We are not able to start sandbox container, Please check your docker client and try again \n", emoji.Rocket) - fmt.Printf("error: %v", err) + + _ = readLogs(cli, ID, SuccessMessage) + fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") + fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) + fmt.Printf("export FLYTECTL_CONFIG=%v \n", FlytectlConfig) return nil } diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 9e0c9c5d50..8afced1178 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + "github.com/docker/docker/api/types" "github.com/enescakir/emoji" - "github.com/docker/docker/api/types" "github.com/docker/docker/client" cmdCore "github.com/flyteorg/flytectl/cmd/core" ) @@ -18,12 +18,7 @@ Teardown will remove docker container and all the flyte config :: bin/flytectl sandbox teardown - -Stop will remove docker container and all the flyte config -:: - - bin/flytectl sandbox stop - + Usage ` @@ -36,15 +31,12 @@ func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.C return err } - container := getSandbox(cli) - if container != nil { - if err := cli.ContainerRemove(ctx, container.ID, types.ContainerRemoveOptions{ + c := getSandbox(cli) + if c != nil { + _ = cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, - }); err != nil { - return err - } + }) } - if err := configCleanup(); err != nil { fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) } From e569acbb665be4d6470ecaf1a6364e13958b01bd Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Fri, 18 Jun 2021 14:34:07 -0700 Subject: [PATCH 078/356] Fixes in Flytectl (#109) - Show the latest entity based on created at - Optional truncation of large strings in table printing Signed-off-by: Ketan Umare --- flytectl/cmd/get/execution.go | 10 ++++++---- flytectl/cmd/get/execution_test.go | 17 +++++++++++++++-- flytectl/cmd/sandbox/start.go | 8 ++++---- flytectl/cmd/sandbox/teardown.go | 2 +- flytectl/go.mod | 1 - flytectl/go.sum | 14 -------------- flytectl/pkg/filters/type.go | 5 +++-- flytectl/pkg/printer/printer.go | 11 ++++++++++- flytectl/pkg/printer/printer_test.go | 7 ++++--- 9 files changed, 43 insertions(+), 32 deletions(-) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index e7164ca90e..e7cd122c9c 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -54,6 +54,8 @@ Usage ` ) +var hundredChars = 100 + var executionColumns = []printer.Column{ {Header: "Name", JSONPath: "$.id.name"}, {Header: "Launch Plan Name", JSONPath: "$.spec.launchPlan.name"}, @@ -61,8 +63,8 @@ var executionColumns = []printer.Column{ {Header: "Phase", JSONPath: "$.closure.phase"}, {Header: "Started", JSONPath: "$.closure.startedAt"}, {Header: "Elapsed Time", JSONPath: "$.closure.duration"}, - {Header: "Abort data", JSONPath: "$.closure.abortMetadata[\"cause\"]"}, - {Header: "Error data", JSONPath: "$.closure.error[\"message\"]"}, + {Header: "Abort data (Trunc)", JSONPath: "$.closure.abortMetadata[\"cause\"]", TruncateTo: &hundredChars}, + {Header: "Error data (Trunc)", JSONPath: "$.closure.error[\"message\"]", TruncateTo: &hundredChars}, } func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { @@ -78,11 +80,11 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command var executions []*admin.Execution if len(args) > 0 { name := args[0] - execution, err := cmdCtx.AdminFetcherExt().FetchExecution(ctx, name, config.GetConfig().Project, config.GetConfig().Domain) + exec, err := cmdCtx.AdminFetcherExt().FetchExecution(ctx, name, config.GetConfig().Project, config.GetConfig().Domain) if err != nil { return err } - executions = append(executions, execution) + executions = append(executions, exec) logger.Infof(ctx, "Retrieved %v executions", len(executions)) return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 5940c3d17a..87e970231b 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -6,6 +6,8 @@ import ( "io" "testing" + "github.com/stretchr/testify/mock" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" @@ -25,6 +27,10 @@ func TestListExecutionFunc(t *testing.T) { cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) execListRequest := &admin.ResourceListRequest{ Limit: 100, + SortBy: &admin.Sort{ + Key: "created_at", + Direction: admin.Sort_DESCENDING, + }, Id: &admin.NamedEntityIdentifier{ Project: projectValue, Domain: domainValue, @@ -58,7 +64,9 @@ func TestListExecutionFunc(t *testing.T) { executionList := &admin.ExecutionList{ Executions: executions, } - mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(executionList, nil) + mockClient.OnListExecutionsMatch(mock.Anything, mock.MatchedBy(func(o *admin.ResourceListRequest) bool { + return execListRequest.SortBy.Key == o.SortBy.Key && execListRequest.SortBy.Direction == o.SortBy.Direction && execListRequest.Filters == o.Filters && execListRequest.Limit == o.Limit + })).Return(executionList, nil) err := getExecutionFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) @@ -75,6 +83,9 @@ func TestListExecutionFuncWithError(t *testing.T) { cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) execListRequest := &admin.ResourceListRequest{ Limit: 100, + SortBy: &admin.Sort{ + Key: "created_at", + }, Id: &admin.NamedEntityIdentifier{ Project: projectValue, Domain: domainValue, @@ -104,7 +115,9 @@ func TestListExecutionFuncWithError(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - mockClient.OnListExecutionsMatch(ctx, execListRequest).Return(nil, errors.New("executions NotFound")) + mockClient.OnListExecutionsMatch(mock.Anything, mock.MatchedBy(func(o *admin.ResourceListRequest) bool { + return execListRequest.SortBy.Key == o.SortBy.Key && execListRequest.SortBy.Direction == o.SortBy.Direction && execListRequest.Filters == o.Filters && execListRequest.Limit == o.Limit + })).Return(nil, errors.New("executions NotFound")) err := getExecutionFunc(ctx, args, cmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("executions NotFound")) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 082c12a54c..913e752d62 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -44,10 +44,10 @@ type ExecResult struct { } func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - fmt.Printf("%v It will take some time, We will start a fresh flyte cluster for you %v %v\n", emoji.ManTechnologist, emoji.Rocket, emoji.Rocket) + fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) if err != nil { - fmt.Printf("Please Check your docker client %v \n", emoji.ManTechnologist) + fmt.Printf("%v Please Check your docker client %v \n", emoji.GrimacingFace, emoji.Whale) return err } @@ -72,13 +72,13 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm defer func() { if r := recover(); r != nil { - fmt.Println("Something goes wrong with container status", r) + fmt.Printf("%v Something went horribly wrong! %s\n", emoji.GrimacingFace, r) } }() ID, err := startContainer(cli, volumes) if err != nil { - fmt.Println("Something goes wrong. We are not able to start sandbox container, Please check your docker client and try again ") + fmt.Printf("%v Something went horribly wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return fmt.Errorf("error: %v", err) } diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 8afced1178..9f2a217f25 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -40,6 +40,6 @@ func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.C if err := configCleanup(); err != nil { fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) } - fmt.Printf("Sandbox cluster is removed successfully %v \n", emoji.Rocket) + fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) return nil } diff --git a/flytectl/go.mod b/flytectl/go.mod index 15c5c39675..e324ae6220 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -12,7 +12,6 @@ require ( github.com/flyteorg/flyteidl v0.19.3 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 - github.com/goccy/go-graphviz v0.0.9 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.1.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 3369537bf4..2638b091b6 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -271,8 +271,6 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= -github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -344,8 +342,6 @@ github.com/flyteorg/flyteidl v0.19.3/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/e github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= -github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -384,8 +380,6 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/goccy/go-graphviz v0.0.9 h1:s/FMMJ1Joj6La3S5ApO3Jk2cwM4LpXECC2muFx3IPQQ= -github.com/goccy/go-graphviz v0.0.9/go.mod h1:wXVsXxmyMQU6TN3zGRttjNn3h+iCAS7xQFC6TlNvLhk= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= @@ -403,8 +397,6 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -544,7 +536,6 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -661,8 +652,6 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= -github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -932,7 +921,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -951,8 +939,6 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 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/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/flytectl/pkg/filters/type.go b/flytectl/pkg/filters/type.go index 83b7d18a74..5dbad76923 100644 --- a/flytectl/pkg/filters/type.go +++ b/flytectl/pkg/filters/type.go @@ -3,8 +3,9 @@ package filters var ( DefaultLimit int32 = 100 DefaultFilter = Filters{ - Limit: DefaultLimit, - Asc: false, + Limit: DefaultLimit, + SortBy: "created_at", + Asc: false, } ) diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 98282590fe..208b063195 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -44,6 +44,8 @@ func OutputFormats() []string { type Column struct { Header string JSONPath string + // Optional Truncation directive to limit content. This will simply truncate the string output. + TruncateTo *int } type Printer struct{} @@ -65,7 +67,14 @@ func extractRow(data interface{}, columns []Column) []string { if err != nil || out == nil { out = "" } - tableData = append(tableData, fmt.Sprintf("%s", out)) + s := fmt.Sprintf("%s", out) + if c.TruncateTo != nil { + t := *c.TruncateTo + if len(s) > t { + s = s[:t] + } + } + tableData = append(tableData, s) } return tableData } diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 08ed10c9f2..faa11a1978 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -38,6 +38,7 @@ func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { // TODO Convert this to a Testable Example. For some reason the comparison fails func TestJSONToTable(t *testing.T) { + trunc := 5 d := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) j := []struct { A string `json:"a"` @@ -45,7 +46,7 @@ func TestJSONToTable(t *testing.T) { S *Inner `json:"s"` }{ {"hello", 0, &Inner{"x-hello", nil}}, - {"hello", 0, &Inner{"x-hello", &d}}, + {"hello world", 0, &Inner{"x-hello", &d}}, {"hello", 0, nil}, } @@ -53,8 +54,8 @@ func TestJSONToTable(t *testing.T) { assert.NoError(t, err) p := Printer{} assert.NoError(t, p.JSONToTable(b, []Column{ - {"A", "$.a"}, - {"S", "$.s.y"}, + {"A", "$.a", &trunc}, + {"S", "$.s.y", nil}, })) // Output: // | A | S | From 1230679497082e0d9445b7ea74dcad260842a291 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 19 Jun 2021 13:44:44 +0530 Subject: [PATCH 079/356] Removed parent flags which are not required as of now (#107) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/root.go | 2 - flytectl/docs/source/gen/flytectl.rst | 44 ++-------------- flytectl/docs/source/gen/flytectl_config.rst | 42 ++------------- .../source/gen/flytectl_config_discover.rst | 46 +++-------------- .../source/gen/flytectl_config_validate.rst | 46 +++-------------- flytectl/docs/source/gen/flytectl_create.rst | 42 ++------------- .../source/gen/flytectl_create_execution.rst | 42 ++------------- .../source/gen/flytectl_create_project.rst | 42 ++------------- flytectl/docs/source/gen/flytectl_delete.rst | 42 ++------------- ...ectl_delete_cluster-resource-attribute.rst | 42 ++------------- ...lytectl_delete_execution-cluster-label.rst | 42 ++------------- ...tectl_delete_execution-queue-attribute.rst | 42 ++------------- .../source/gen/flytectl_delete_execution.rst | 42 ++------------- .../gen/flytectl_delete_plugin-override.rst | 42 ++------------- ...lytectl_delete_task-resource-attribute.rst | 42 ++------------- flytectl/docs/source/gen/flytectl_get.rst | 42 ++------------- ...lytectl_get_cluster-resource-attribute.rst | 42 ++------------- .../flytectl_get_execution-cluster-label.rst | 42 ++------------- ...flytectl_get_execution-queue-attribute.rst | 42 ++------------- .../source/gen/flytectl_get_execution.rst | 42 ++------------- .../source/gen/flytectl_get_launchplan.rst | 42 ++------------- .../gen/flytectl_get_plugin-override.rst | 42 ++------------- .../docs/source/gen/flytectl_get_project.rst | 42 ++------------- .../flytectl_get_task-resource-attribute.rst | 42 ++------------- .../docs/source/gen/flytectl_get_task.rst | 42 ++------------- .../docs/source/gen/flytectl_get_workflow.rst | 44 ++-------------- .../docs/source/gen/flytectl_register.rst | 42 ++------------- .../source/gen/flytectl_register_examples.rst | 42 ++------------- .../source/gen/flytectl_register_files.rst | 42 ++------------- flytectl/docs/source/gen/flytectl_sandbox.rst | 42 ++------------- .../source/gen/flytectl_sandbox_start.rst | 51 ++++--------------- .../source/gen/flytectl_sandbox_teardown.rst | 49 ++---------------- flytectl/docs/source/gen/flytectl_update.rst | 42 ++------------- ...ectl_update_cluster-resource-attribute.rst | 42 ++------------- ...lytectl_update_execution-cluster-label.rst | 42 ++------------- ...tectl_update_execution-queue-attribute.rst | 42 ++------------- .../source/gen/flytectl_update_launchplan.rst | 42 ++------------- .../gen/flytectl_update_plugin-override.rst | 42 ++------------- .../source/gen/flytectl_update_project.rst | 42 ++------------- ...lytectl_update_task-resource-attribute.rst | 42 ++------------- .../docs/source/gen/flytectl_update_task.rst | 42 ++------------- .../source/gen/flytectl_update_workflow.rst | 42 ++------------- flytectl/docs/source/gen/flytectl_version.rst | 42 ++------------- 43 files changed, 182 insertions(+), 1612 deletions(-) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 40bc92ed69..52bc75722c 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -47,8 +47,6 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.flyte/config.yaml)") - configAccessor.InitializePflags(rootCmd.PersistentFlags()) - // Due to https://github.com/flyteorg/flyte/issues/341, project flag will have to be specified as // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 446c0f39a8..f740989c59 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -16,45 +16,11 @@ Options :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -h, --help help for flytectl - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -h, --help help for flytectl + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 918923db8b..818b172c65 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -25,44 +25,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index c8c73a0302..690a450336 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -27,46 +27,12 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index e0fe692b8a..447d666d25 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -29,46 +29,12 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index dea24a3367..4e09d5b6e4 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -28,44 +28,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index d2f3f7e880..142fc4f60d 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -146,44 +146,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index e7f6580eae..cd5f345d39 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -52,44 +52,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 42881783d7..17edc03f9b 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -28,44 +28,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 29aac116f0..226d2e4246 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -64,44 +64,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index daa247a473..a48e9ef376 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -62,44 +62,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 5e6e03520f..64182f6389 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -66,44 +66,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 2a12a2b381..365bd014d1 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -71,44 +71,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index e69560d99e..bb20597c78 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -67,44 +67,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 17cb700393..20ee8d9f6f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -67,44 +67,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 8442a4e4a0..f969fbd5e9 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -28,44 +28,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 7cf9ff55b1..b79674a7c8 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -73,44 +73,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 58abf2ab26..57b27f7293 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -71,44 +71,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 4b92076d7f..e03a50f183 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -75,44 +75,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 4040492e0f..77249157ce 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -68,44 +68,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 37f816171a..f50798c59c 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -113,44 +113,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index f608e680a0..4943aa9e5d 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -95,44 +95,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 2f7e622450..7aafa4e606 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -66,44 +66,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index fb180a8a44..8689c6d030 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -77,44 +77,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index dab41e7f72..c94f945b18 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -109,44 +109,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 081ae99b7d..63a55c3a4e 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -87,7 +87,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results + --filter.sort-by string Specifies which field to sort results (default "created_at") -h, --help help for workflow --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the workflow to be fetched. @@ -97,44 +97,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 0417174a1c..27120f811e 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -28,44 +28,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index e6df378e55..24454a32e6 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -41,44 +41,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index ada5a92813..8f58aa349f 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -95,44 +95,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index c33cfcc843..523c26c84a 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -34,44 +34,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 56716a9fa0..402b8b5ad9 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -13,8 +13,12 @@ Synopsis Start will run the flyte sandbox cluster inside a docker container and setup the config that is required :: - bin/flytectl start + bin/flytectl sandbox start + +Mount your flytesnacks repository code inside sandbox +:: + bin/flytectl sandbox start --flytesnacks=$HOME/flyteorg/flytesnacks Usage @@ -27,51 +31,18 @@ Options :: - -h, --help help for start + --flytesnacks string Path of your flytesnacks repository + -h, --help help for start Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index f7fccfd899..2b7f63cb25 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -14,12 +14,7 @@ Teardown will remove docker container and all the flyte config :: bin/flytectl sandbox teardown - -Stop will remove docker container and all the flyte config -:: - - bin/flytectl sandbox stop - + Usage @@ -40,44 +35,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 9a513303c7..0493254ff5 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -30,44 +30,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 5f50268a61..9f72793199 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -69,44 +69,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 957aeff750..046ff1ea20 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -62,44 +62,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index e6ed419269..a915e427c7 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -73,44 +73,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 88b569d16f..9c98daa2ef 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -47,44 +47,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index bea5a1c6ac..fa2114ae8e 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -75,44 +75,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 74252c4f52..e7b4665448 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -72,44 +72,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 4f75f37eac..bfe1b96d5c 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -75,44 +75,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index a119d0118c..954071ee2a 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -47,44 +47,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 347ecb1790..14f28a4082 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -47,44 +47,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 8a73ae4a75..0e7165621b 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -32,44 +32,10 @@ Options inherited from parent commands :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --root.domain string Specified the domain to work on. - --root.output string Specified the output type. - --root.project string Specifies the project to work on. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. SEE ALSO ~~~~~~~~ From 7a43a97c0b2d5ffd1de62cdb5bc2df67ef79bc5d Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 21 Jun 2021 10:08:57 +0530 Subject: [PATCH 080/356] Added latest version check added (#111) * WIP: added latest version check added in version command Signed-off-by: Yuvraj --- flytectl/cmd/version/version.go | 70 ++++++++++++++--- flytectl/cmd/version/version_test.go | 108 ++++++++++++++++++++++++--- flytectl/go.mod | 1 + flytectl/go.sum | 2 + flytectl/pkg/util/util.go | 43 +++++++++++ flytectl/pkg/util/util_test.go | 51 +++++++++++++ 6 files changed, 253 insertions(+), 22 deletions(-) create mode 100644 flytectl/pkg/util/util.go create mode 100644 flytectl/pkg/util/util_test.go diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 57c7ddac08..4510c88aad 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -6,8 +6,11 @@ import ( "fmt" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" stdlibversion "github.com/flyteorg/flytestdlib/version" + hversion "github.com/hashicorp/go-version" "github.com/spf13/cobra" ) @@ -20,6 +23,11 @@ Example version. bin/flytectl version ` + latestVersionMessage = "Installed flytectl version is the latest" + upgradeVersionMessage = "A newer version of flytectl is available [%v] Please upgrade using - https://docs.flyte.org/projects/flytectl/en/latest/index.html" + flytectlAppName = "flytectl" + controlPlanAppName = "controlPlane" + flytectlReleasePath = "/repos/flyteorg/flytectl/releases/latest" ) type versionOutput struct { @@ -44,39 +52,79 @@ func GetVersionCommand(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { } func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - - v, err := cmdCtx.AdminClient().GetVersion(ctx, &admin.GetVersionRequest{}) + latest, err := getLatestVersion(flytectlReleasePath) if err != nil { - return fmt.Errorf("err %v: ", err) + return err } + message, err := compareVersion(latest, stdlibversion.Version) + if err != nil { + return err + } + fmt.Println(message) // Print Flytectl if err := printVersion(versionOutput{ Build: stdlibversion.Build, BuildTime: stdlibversion.BuildTime, Version: stdlibversion.Version, - App: "flytectl", + App: flytectlAppName, }); err != nil { return err } + // Print Flyteadmin version if available + if err := getControlPlaneVersion(ctx, cmdCtx); err != nil { + logger.Debug(ctx, err) + } + return nil +} + +func printVersion(response versionOutput) error { + b, err := json.MarshalIndent(response, "", " ") + if err != nil { + return err + } + fmt.Print(string(b)) + return nil +} + +func compareVersion(latest, current string) (string, error) { + semanticVersion, err := hversion.NewVersion(latest) + if err != nil { + return "", err + } + currentVersion, err := hversion.NewVersion(current) + if err != nil { + return "", err + } + if currentVersion.LessThan(semanticVersion) { + return fmt.Sprintf(upgradeVersionMessage, latest), nil + } + + return latestVersionMessage, nil +} +func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) error { + v, err := cmdCtx.AdminClient().GetVersion(ctx, &admin.GetVersionRequest{}) + if err != nil || v == nil { + logger.Debugf(ctx, "Failed to get version of control plane %v: \n", err) + return err + } // Print Flyteadmin if err := printVersion(versionOutput{ Build: v.ControlPlaneVersion.Build, BuildTime: v.ControlPlaneVersion.BuildTime, Version: v.ControlPlaneVersion.Version, - App: "controlPlane", + App: controlPlanAppName, }); err != nil { - return err + return fmt.Errorf("not able to get control plane version..Please try again: %v", err) } return nil } -func printVersion(response versionOutput) error { - b, err := json.MarshalIndent(response, "", " ") +func getLatestVersion(path string) (string, error) { + response, err := util.GetRequest("https://api.github.com", path) if err != nil { - return fmt.Errorf("err %v: ", err) + return "", err } - fmt.Print(string(b)) - return nil + return util.ParseGithubTag(response) } diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index acaf34a829..2366a3a856 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -2,33 +2,119 @@ package version import ( "context" + "errors" "fmt" "io" + "sort" "testing" + "github.com/spf13/cobra" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/stretchr/testify/assert" ) -func TestListExecutionFunc(t *testing.T) { - ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - versionRequest := &admin.GetVersionRequest{} - versionResponse := &admin.GetVersionResponse{ +var ( + versionRequest = &admin.GetVersionRequest{} + testVersion = "v0.1.20" + versionResponse = &admin.GetVersionResponse{ ControlPlaneVersion: &admin.Version{ Build: "", BuildTime: "", - Version: "", + Version: testVersion, }, } +) + +func TestVersionCommand(t *testing.T) { + rootCmd := &cobra.Command{ + Long: "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use: "flytectl", + DisableAutoGenTag: true, + } + versionCommand := GetVersionCommand(rootCmd) + cmdCore.AddCommands(rootCmd, versionCommand) + fmt.Println(rootCmd.Commands()) + assert.Equal(t, len(rootCmd.Commands()), 1) + cmdNouns := rootCmd.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + + assert.Equal(t, cmdNouns[0].Use, "version") + assert.Equal(t, cmdNouns[0].Short, versionCmdShort) + assert.Equal(t, cmdNouns[0].Long, versionCmdLong) +} + +func TestVersionCommandFunc(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = testVersion mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) err := getVersion(ctx, args, cmdCtx) - fmt.Println(err) - assert.Nil(t, nil) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) +} + +func TestVersionCommandFuncErr(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = testVersion + mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, errors.New("error")) + err := getVersion(ctx, args, cmdCtx) + assert.Nil(t, err) mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) } + +func TestVersionUtilFunc(t *testing.T) { + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = testVersion + t.Run("Get latest release with wrong url", func(t *testing.T) { + tag, err := getLatestVersion("h://api.github.com/repos/flyteorg/flytectreleases/latest") + assert.NotNil(t, err) + assert.Equal(t, len(tag), 0) + }) + t.Run("Compare flytectl version when upgrade available", func(t *testing.T) { + message, err := compareVersion("v1.1.21", testVersion) + assert.Nil(t, err) + assert.Equal(t, fmt.Sprintf(upgradeVersionMessage, "v1.1.21"), message) + }) + t.Run("Compare flytectl version", func(t *testing.T) { + message, err := compareVersion(testVersion, testVersion) + assert.Nil(t, err) + assert.Equal(t, latestVersionMessage, message) + }) + t.Run("Error in compare flytectl version", func(t *testing.T) { + _, err := compareVersion("vvvvvvvv", testVersion) + assert.NotNil(t, err) + }) + t.Run("Error in compare flytectl version", func(t *testing.T) { + _, err := compareVersion(testVersion, "vvvvvvvv") + assert.NotNil(t, err) + }) + t.Run("Error in getting control plan version", func(t *testing.T) { + ctx := context.Background() + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + mockClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) + err := getControlPlaneVersion(ctx, cmdCtx) + assert.NotNil(t, err) + }) +} diff --git a/flytectl/go.mod b/flytectl/go.mod index e324ae6220..728371c428 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -16,6 +16,7 @@ require ( github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 + github.com/hashicorp/go-version v1.3.0 // indirect github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 diff --git a/flytectl/go.sum b/flytectl/go.sum index 2638b091b6..d07374e6d8 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -514,6 +514,8 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= +github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go new file mode 100644 index 0000000000..6496f0fdd3 --- /dev/null +++ b/flytectl/pkg/util/util.go @@ -0,0 +1,43 @@ +package util + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" +) + +type githubversion struct { + TagName string `json:"tag_name"` +} + +func GetRequest(baseURL, url string) ([]byte, error) { + response, err := http.Get(fmt.Sprintf("%v%v", baseURL, url)) + if err != nil { + return []byte(""), err + } + defer response.Body.Close() + + data, err := ioutil.ReadAll(response.Body) + if err != nil { + return []byte(""), err + } + return data, nil +} + +func ParseGithubTag(data []byte) (string, error) { + var result = githubversion{} + err := json.Unmarshal(data, &result) + if err != nil { + return "", err + } + return result.TagName, nil +} + +func WriteIntoFile(data []byte, file string) error { + err := ioutil.WriteFile(file, data, 0600) + if err != nil { + return err + } + return nil +} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go new file mode 100644 index 0000000000..f4e0792428 --- /dev/null +++ b/flytectl/pkg/util/util_test.go @@ -0,0 +1,51 @@ +package util + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +const flytectlReleaseURL = "/repos/flyteorg/flytectl/releases/latest" +const baseURL = "https://api.github.com" +const wrongBaseURL = "htts://api.github.com" + +func TestGetRequest(t *testing.T) { + t.Run("Get request with 200", func(t *testing.T) { + _, err := GetRequest(baseURL, flytectlReleaseURL) + assert.Nil(t, err) + }) + t.Run("Get request with 200", func(t *testing.T) { + _, err := GetRequest(wrongBaseURL, flytectlReleaseURL) + assert.NotNil(t, err) + }) +} + +func TestParseGithubTag(t *testing.T) { + t.Run("Parse Github tag with success", func(t *testing.T) { + data, err := GetRequest(baseURL, flytectlReleaseURL) + assert.Nil(t, err) + tag, err := ParseGithubTag(data) + assert.Nil(t, err) + assert.Contains(t, tag, "v") + }) + t.Run("Get request with 200", func(t *testing.T) { + _, err := ParseGithubTag([]byte("string")) + assert.NotNil(t, err) + }) +} + +func TestWriteIntoFile(t *testing.T) { + t.Run("Successfully write into a file", func(t *testing.T) { + data, err := GetRequest(baseURL, flytectlReleaseURL) + assert.Nil(t, err) + err = WriteIntoFile(data, "version.yaml") + assert.Nil(t, err) + }) + t.Run("Error in writing file", func(t *testing.T) { + data, err := GetRequest(baseURL, flytectlReleaseURL) + assert.Nil(t, err) + err = WriteIntoFile(data, "/githubtest/version.yaml") + assert.NotNil(t, err) + }) +} From b11a9e8e68036306ff34f4926f3cf976e3cd9cc3 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 21 Jun 2021 10:20:45 +0530 Subject: [PATCH 081/356] Added unit test for docker (#110) Added unit test for docker Signed-off-by: Yuvraj --- flytectl/.github/workflows/generate-docs.yaml | 2 +- flytectl/.github/workflows/sandbox.yaml | 28 ++ flytectl/cmd/sandbox/sandbox_util.go | 159 -------- flytectl/cmd/sandbox/sandbox_util_test.go | 136 ------- flytectl/cmd/sandbox/start.go | 79 ++-- flytectl/cmd/sandbox/start_test.go | 355 ++++++++++++++++++ flytectl/cmd/sandbox/teardown.go | 20 +- flytectl/cmd/sandbox/teardown_test.go | 59 +++ flytectl/go.mod | 1 + flytectl/pkg/docker/docker.go | 28 ++ flytectl/pkg/docker/mocks/docker.go | 293 +++++++++++++++ flytectl/pkg/docker/sandbox_util.go | 194 ++++++++++ flytectl/pkg/docker/sandbox_util_test.go | 315 ++++++++++++++++ 13 files changed, 1333 insertions(+), 336 deletions(-) create mode 100644 flytectl/.github/workflows/sandbox.yaml delete mode 100644 flytectl/cmd/sandbox/sandbox_util.go delete mode 100644 flytectl/cmd/sandbox/sandbox_util_test.go create mode 100644 flytectl/cmd/sandbox/start_test.go create mode 100644 flytectl/cmd/sandbox/teardown_test.go create mode 100644 flytectl/pkg/docker/docker.go create mode 100644 flytectl/pkg/docker/mocks/docker.go create mode 100644 flytectl/pkg/docker/sandbox_util.go create mode 100644 flytectl/pkg/docker/sandbox_util_test.go diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml index 21c0aad628..1c442ea4f8 100644 --- a/flytectl/.github/workflows/generate-docs.yaml +++ b/flytectl/.github/workflows/generate-docs.yaml @@ -6,7 +6,7 @@ on: - master jobs: - build: + generate-docs: name: Generate documentation runs-on: ubuntu-latest steps: diff --git a/flytectl/.github/workflows/sandbox.yaml b/flytectl/.github/workflows/sandbox.yaml new file mode 100644 index 0000000000..35c10cee19 --- /dev/null +++ b/flytectl/.github/workflows/sandbox.yaml @@ -0,0 +1,28 @@ +name: Test Getting started + +on: + pull_request: + branches: + - master + +jobs: + sandbox: + name: Test Getting started + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - name: Build Flytectl binary + run: make compile + - name: Create a sandbox cluster + run: bin/flytectl sandbox start + - name: Register cookbook + run: bin/flytectl register examples -d development -p flytesnacks || true + - name: Teardown Sandbox cluster + run: bin/flytectl sandbox teardown diff --git a/flytectl/cmd/sandbox/sandbox_util.go b/flytectl/cmd/sandbox/sandbox_util.go deleted file mode 100644 index e6c0d43944..0000000000 --- a/flytectl/cmd/sandbox/sandbox_util.go +++ /dev/null @@ -1,159 +0,0 @@ -package sandbox - -import ( - "bufio" - "context" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - "strings" - - cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "github.com/enescakir/emoji" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" -) - -var ( - Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") - FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config-sandbox.yaml") - SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" - ImageName = "ghcr.io/flyteorg/flyte-sandbox:dind" - flyteSandboxClusterName = "flyte-sandbox" - Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} - flyteSnackDir = "/usr/src" - K3sDir = "/etc/rancher/" -) - -func setupFlytectlConfig() error { - - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - - response, err := http.Get("https://raw.githubusercontent.com/flyteorg/flytectl/master/config.yaml") - if err != nil { - return err - } - defer response.Body.Close() - - data, err := ioutil.ReadAll(response.Body) - if err != nil { - return err - } - - _ = ioutil.WriteFile(FlytectlConfig, data, 0600) - return nil -} - -func configCleanup() error { - err := os.Remove(FlytectlConfig) - if err != nil { - return err - } - err = os.RemoveAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s")) - if err != nil { - return err - } - return nil -} - -func getSandbox(cli *client.Client) *types.Container { - containers, _ := cli.ContainerList(context.Background(), types.ContainerListOptions{ - All: true, - }) - for _, v := range containers { - if strings.Contains(v.Names[0], flyteSandboxClusterName) { - return &v - } - } - return nil -} - -func removeSandboxIfExist(cli *client.Client, reader io.Reader) error { - if c := getSandbox(cli); c != nil { - if cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { - err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ - Force: true, - }) - return err - } - os.Exit(0) - } - return nil -} - -func startContainer(cli *client.Client, volumes []mount.Mount) (string, error) { - ExposedPorts, PortBindings, _ := nat.ParsePortSpecs([]string{ - "127.0.0.1:30086:30086", - "127.0.0.1:30081:30081", - "127.0.0.1:30082:30082", - "127.0.0.1:30084:30084", - }) - r, err := cli.ImagePull(context.Background(), ImageName, types.ImagePullOptions{}) - if err != nil { - return "", err - } - _, _ = io.Copy(os.Stdout, r) - resp, err := cli.ContainerCreate(context.Background(), &container.Config{ - Env: Environment, - Image: ImageName, - Tty: false, - ExposedPorts: ExposedPorts, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: PortBindings, - Privileged: true, - }, nil, - nil, flyteSandboxClusterName) - - if err != nil { - return "", err - } - go watchError(cli, resp.ID) - if err := cli.ContainerStart(context.Background(), resp.ID, types.ContainerStartOptions{}); err != nil { - return "", err - } - return resp.ID, nil -} - -func watchError(cli *client.Client, id string) { - statusCh, errCh := cli.ContainerWait(context.Background(), id, container.WaitConditionNotRunning) - - select { - case err := <-errCh: - if err != nil { - panic(err) - } - case <-statusCh: - } -} - -func readLogs(cli *client.Client, id, message string) error { - reader, err := cli.ContainerLogs(context.Background(), id, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }) - if err != nil { - return err - } - scanner := bufio.NewScanner(reader) - - for scanner.Scan() { - if strings.Contains(scanner.Text(), message) { - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, message, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) - fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) - fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") - break - } - fmt.Println(scanner.Text()) - } - return nil -} diff --git a/flytectl/cmd/sandbox/sandbox_util_test.go b/flytectl/cmd/sandbox/sandbox_util_test.go deleted file mode 100644 index ab7e981b98..0000000000 --- a/flytectl/cmd/sandbox/sandbox_util_test.go +++ /dev/null @@ -1,136 +0,0 @@ -package sandbox - -import ( - "context" - "io/ioutil" - "os" - "strings" - "testing" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/client" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" - - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - - "github.com/stretchr/testify/assert" -) - -var ( - cmdCtx cmdCore.CommandContext -) - -func cleanup(client *client.Client) error { - containers, err := client.ContainerList(context.Background(), types.ContainerListOptions{ - All: true, - }) - if err != nil { - return err - } - for _, v := range containers { - if strings.Contains(v.Names[0], flyteSandboxClusterName) { - if err := client.ContainerRemove(context.Background(), v.ID, types.ContainerRemoveOptions{ - Force: true, - }); err != nil { - return err - } - } - } - return nil -} - -func setupSandbox() { - mockAdminClient := u.MockClient - cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) - _ = setupFlytectlConfig() -} - -func TestConfigCleanup(t *testing.T) { - _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) - if os.IsNotExist(err) { - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - } - _ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600) - _ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600) - - err = configCleanup() - assert.Nil(t, err) - - _, err = os.Stat(FlytectlConfig) - check := os.IsNotExist(err) - assert.Equal(t, check, true) - - _, err = os.Stat(Kubeconfig) - check = os.IsNotExist(err) - assert.Equal(t, check, true) - _ = configCleanup() -} - -func TestSetupFlytectlConfig(t *testing.T) { - _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) - if os.IsNotExist(err) { - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - } - err = setupFlytectlConfig() - assert.Nil(t, err) - _, err = os.Stat(FlytectlConfig) - assert.Nil(t, err) - check := os.IsNotExist(err) - assert.Equal(t, check, false) - _ = configCleanup() - -} - -func TestTearDownSandbox(t *testing.T) { - setupSandbox() - cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - err := teardownSandboxCluster(context.Background(), []string{}, cmdCtx) - assert.Nil(t, err) - assert.Nil(t, cleanup(cli)) - - volumes = []mount.Mount{} - _ = startSandboxCluster(context.Background(), []string{}, cmdCtx) - err = teardownSandboxCluster(context.Background(), []string{}, cmdCtx) - assert.Nil(t, err) - -} - -func TestStartSandbox(t *testing.T) { - cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - - assert.Nil(t, cleanup(cli)) - setupSandbox() - volumes = []mount.Mount{} - sandboxConfig.DefaultConfig.SnacksRepo = "/tmp" - err := startSandboxCluster(context.Background(), []string{}, cmdCtx) - assert.Nil(t, err) - - assert.Nil(t, cleanup(cli)) - setupSandbox() - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() - err = startSandboxCluster(context.Background(), []string{}, cmdCtx) - assert.NotNil(t, err) - - assert.Nil(t, cleanup(cli)) - _, err = startContainer(cli, []mount.Mount{}) - assert.Nil(t, err) - - assert.Nil(t, cleanup(cli)) - ImageName = "" - _, err = startContainer(cli, []mount.Mount{}) - assert.NotNil(t, err) -} - -func TestGetSandbox(t *testing.T) { - cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - assert.Nil(t, cleanup(cli)) - setupSandbox() - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() - _ = startSandboxCluster(context.Background(), []string{}, cmdCtx) - - container := removeSandboxIfExist(cli, strings.NewReader("y")) - assert.Nil(t, container) -} diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 913e752d62..33c91ea354 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -1,16 +1,18 @@ package sandbox import ( + "bufio" "context" "fmt" + "io" "os" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/client" "github.com/enescakir/emoji" sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) const ( @@ -29,14 +31,6 @@ Usage ` ) -var volumes = []mount.Mount{ - { - Type: mount.TypeBind, - Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), - Target: K3sDir, - }, -} - type ExecResult struct { StdOut string StdErr string @@ -44,47 +38,66 @@ type ExecResult struct { } func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) - cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + cli, err := docker.GetDockerClient() if err != nil { - fmt.Printf("%v Please Check your docker client %v \n", emoji.GrimacingFace, emoji.Whale) return err } - if err := setupFlytectlConfig(); err != nil { + reader, err := startSandbox(ctx, cli, os.Stdin) + if err != nil { return err } + docker.WaitForSandbox(reader, docker.SuccessMessage) + return nil +} - if err := removeSandboxIfExist(cli, os.Stdin); err != nil { - return err +func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { + fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + if err := docker.SetupFlyteDir(); err != nil { + return nil, err + } + + if err := docker.GetFlyteSandboxConfig(); err != nil { + return nil, err + } + + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + return nil, err } if len(sandboxConfig.DefaultConfig.SnacksRepo) > 0 { - volumes = append(volumes, mount.Mount{ + docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.SnacksRepo, - Target: flyteSnackDir, + Target: docker.FlyteSnackDir, }) } - os.Setenv("KUBECONFIG", Kubeconfig) - os.Setenv("FLYTECTL_CONFIG", FlytectlConfig) + os.Setenv("KUBECONFIG", docker.Kubeconfig) + os.Setenv("FLYTECTL_CONFIG", docker.FlytectlConfig) + if err := docker.PullDockerImage(ctx, cli, docker.ImageName); err != nil { + return nil, err + } - defer func() { - if r := recover(); r != nil { - fmt.Printf("%v Something went horribly wrong! %s\n", emoji.GrimacingFace, r) - } - }() + exposedPorts, portBindings, _ := docker.GetSandboxPorts() + ID, err := docker.StartContainer(ctx, cli, docker.Volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) + if err != nil { + fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) + return nil, err + } - ID, err := startContainer(cli, volumes) + _, errCh := docker.WatchError(ctx, cli, ID) + logReader, err := docker.ReadLogs(ctx, cli, ID) if err != nil { - fmt.Printf("%v Something went horribly wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) - return fmt.Errorf("error: %v", err) + return nil, err } + go func() { + err := <-errCh + if err != nil { + fmt.Printf("err: %v", err) + os.Exit(1) + } + }() - _ = readLogs(cli, ID, SuccessMessage) - fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") - fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) - fmt.Printf("export FLYTECTL_CONFIG=%v \n", FlytectlConfig) - return nil + return logReader, nil } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go new file mode 100644 index 0000000000..1f29fe5464 --- /dev/null +++ b/flytectl/cmd/sandbox/start_test.go @@ -0,0 +1,355 @@ +package sandbox + +import ( + "context" + "fmt" + "io" + "io/ioutil" + "os" + "strings" + "testing" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestStartSandboxFunc(t *testing.T) { + p1, p2, _ := docker.GetSandboxPorts() + + t.Run("Successfully run sandbox cluster", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully run sandbox cluster with flytesnacks", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Error in pulling image", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in removing existing cluster", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: "FlyteSandboxClusterName", + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("error")) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, strings.NewReader("y")) + assert.NotNil(t, err) + }) + t.Run("Error in start container", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, fmt.Errorf("error")) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in reading logs", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, fmt.Errorf("error")) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in list container", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.SnacksRepo, + Target: docker.FlyteSnackDir, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully run sandbox cluster command", func(t *testing.T) { + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockDocker := &mocks.Docker{} + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + stringReader := strings.NewReader(docker.SuccessMessage) + reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(reader, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + docker.Client = mockDocker + sandboxConfig.DefaultConfig.SnacksRepo = "" + err := startSandboxCluster(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Error in running sandbox cluster command", func(t *testing.T) { + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockDocker := &mocks.Docker{} + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + stringReader := strings.NewReader(docker.SuccessMessage) + reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(reader, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + docker.Client = mockDocker + sandboxConfig.DefaultConfig.SnacksRepo = "" + err := startSandboxCluster(ctx, []string{}, cmdCtx) + assert.NotNil(t, err) + }) +} diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 9f2a217f25..9d05a2581b 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -4,10 +4,11 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/docker/docker/api/types" "github.com/enescakir/emoji" - "github.com/docker/docker/client" cmdCore "github.com/flyteorg/flytectl/cmd/core" ) @@ -25,19 +26,24 @@ Usage ) func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - - cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + cli, err := docker.GetDockerClient() if err != nil { return err } - c := getSandbox(cli) + return tearDownSandbox(ctx, cli) +} + +func tearDownSandbox(ctx context.Context, cli docker.Docker) error { + c := docker.GetSandbox(ctx, cli) if c != nil { - _ = cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ + if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, - }) + }); err != nil { + return err + } } - if err := configCleanup(); err != nil { + if err := docker.ConfigCleanup(); err != nil { fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) } fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) diff --git a/flytectl/cmd/sandbox/teardown_test.go b/flytectl/cmd/sandbox/teardown_test.go new file mode 100644 index 0000000000..01511d926e --- /dev/null +++ b/flytectl/cmd/sandbox/teardown_test.go @@ -0,0 +1,59 @@ +package sandbox + +import ( + "context" + "fmt" + "io" + "testing" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var containers []types.Container + +func TestTearDownFunc(t *testing.T) { + container1 := types.Container{ + ID: "FlyteSandboxClusterName", + Names: []string{ + docker.FlyteSandboxClusterName, + }, + } + containers = append(containers, container1) + + t.Run("Success", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + + err := tearDownSandbox(ctx, mockDocker) + assert.Nil(t, err) + }) + t.Run("Error", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) + err := tearDownSandbox(ctx, mockDocker) + assert.NotNil(t, err) + }) + +} + +func TestTearDownClusterFunc(t *testing.T) { + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + docker.Client = mockDocker + err := teardownSandboxCluster(ctx, []string{}, cmdCtx) + assert.Nil(t, err) +} diff --git a/flytectl/go.mod b/flytectl/go.mod index 728371c428..ad4c8f90cc 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -25,6 +25,7 @@ require ( github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go new file mode 100644 index 0000000000..f33b3b5219 --- /dev/null +++ b/flytectl/pkg/docker/docker.go @@ -0,0 +1,28 @@ +package docker + +import ( + "context" + "io" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/network" + "github.com/docker/docker/client" + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +//go:generate mockery -all -case=underscore + +type Docker interface { + ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error) + ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error + ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error) + ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) + ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) + ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error + ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) +} + +type FlyteDocker struct { + *client.Client +} diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go new file mode 100644 index 0000000000..917546fbee --- /dev/null +++ b/flytectl/pkg/docker/mocks/docker.go @@ -0,0 +1,293 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + container "github.com/docker/docker/api/types/container" + + io "io" + + mock "github.com/stretchr/testify/mock" + + network "github.com/docker/docker/api/types/network" + + types "github.com/docker/docker/api/types" + + v1 "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Docker is an autogenerated mock type for the Docker type +type Docker struct { + mock.Mock +} + +type Docker_ContainerCreate struct { + *mock.Call +} + +func (_m Docker_ContainerCreate) Return(_a0 container.ContainerCreateCreatedBody, _a1 error) *Docker_ContainerCreate { + return &Docker_ContainerCreate{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) *Docker_ContainerCreate { + c := _m.On("ContainerCreate", ctx, config, hostConfig, networkingConfig, platform, containerName) + return &Docker_ContainerCreate{Call: c} +} + +func (_m *Docker) OnContainerCreateMatch(matchers ...interface{}) *Docker_ContainerCreate { + c := _m.On("ContainerCreate", matchers...) + return &Docker_ContainerCreate{Call: c} +} + +// ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName +func (_m *Docker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.ContainerCreateCreatedBody, error) { + ret := _m.Called(ctx, config, hostConfig, networkingConfig, platform, containerName) + + var r0 container.ContainerCreateCreatedBody + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) container.ContainerCreateCreatedBody); ok { + r0 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) + } else { + r0 = ret.Get(0).(container.ContainerCreateCreatedBody) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) error); ok { + r1 = rf(ctx, config, hostConfig, networkingConfig, platform, containerName) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_ContainerList struct { + *mock.Call +} + +func (_m Docker_ContainerList) Return(_a0 []types.Container, _a1 error) *Docker_ContainerList { + return &Docker_ContainerList{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerList(ctx context.Context, options types.ContainerListOptions) *Docker_ContainerList { + c := _m.On("ContainerList", ctx, options) + return &Docker_ContainerList{Call: c} +} + +func (_m *Docker) OnContainerListMatch(matchers ...interface{}) *Docker_ContainerList { + c := _m.On("ContainerList", matchers...) + return &Docker_ContainerList{Call: c} +} + +// ContainerList provides a mock function with given fields: ctx, options +func (_m *Docker) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) { + ret := _m.Called(ctx, options) + + var r0 []types.Container + if rf, ok := ret.Get(0).(func(context.Context, types.ContainerListOptions) []types.Container); ok { + r0 = rf(ctx, options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.Container) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, types.ContainerListOptions) error); ok { + r1 = rf(ctx, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_ContainerLogs struct { + *mock.Call +} + +func (_m Docker_ContainerLogs) Return(_a0 io.ReadCloser, _a1 error) *Docker_ContainerLogs { + return &Docker_ContainerLogs{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) *Docker_ContainerLogs { + c := _m.On("ContainerLogs", ctx, _a1, options) + return &Docker_ContainerLogs{Call: c} +} + +func (_m *Docker) OnContainerLogsMatch(matchers ...interface{}) *Docker_ContainerLogs { + c := _m.On("ContainerLogs", matchers...) + return &Docker_ContainerLogs{Call: c} +} + +// ContainerLogs provides a mock function with given fields: ctx, _a1, options +func (_m *Docker) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error) { + ret := _m.Called(ctx, _a1, options) + + var r0 io.ReadCloser + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { + r0 = rf(ctx, _a1, options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.ReadCloser) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { + r1 = rf(ctx, _a1, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_ContainerRemove struct { + *mock.Call +} + +func (_m Docker_ContainerRemove) Return(_a0 error) *Docker_ContainerRemove { + return &Docker_ContainerRemove{Call: _m.Call.Return(_a0)} +} + +func (_m *Docker) OnContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) *Docker_ContainerRemove { + c := _m.On("ContainerRemove", ctx, containerID, options) + return &Docker_ContainerRemove{Call: c} +} + +func (_m *Docker) OnContainerRemoveMatch(matchers ...interface{}) *Docker_ContainerRemove { + c := _m.On("ContainerRemove", matchers...) + return &Docker_ContainerRemove{Call: c} +} + +// ContainerRemove provides a mock function with given fields: ctx, containerID, options +func (_m *Docker) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { + ret := _m.Called(ctx, containerID, options) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerRemoveOptions) error); ok { + r0 = rf(ctx, containerID, options) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Docker_ContainerStart struct { + *mock.Call +} + +func (_m Docker_ContainerStart) Return(_a0 error) *Docker_ContainerStart { + return &Docker_ContainerStart{Call: _m.Call.Return(_a0)} +} + +func (_m *Docker) OnContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) *Docker_ContainerStart { + c := _m.On("ContainerStart", ctx, containerID, options) + return &Docker_ContainerStart{Call: c} +} + +func (_m *Docker) OnContainerStartMatch(matchers ...interface{}) *Docker_ContainerStart { + c := _m.On("ContainerStart", matchers...) + return &Docker_ContainerStart{Call: c} +} + +// ContainerStart provides a mock function with given fields: ctx, containerID, options +func (_m *Docker) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { + ret := _m.Called(ctx, containerID, options) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerStartOptions) error); ok { + r0 = rf(ctx, containerID, options) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Docker_ContainerWait struct { + *mock.Call +} + +func (_m Docker_ContainerWait) Return(_a0 <-chan container.ContainerWaitOKBody, _a1 <-chan error) *Docker_ContainerWait { + return &Docker_ContainerWait{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) *Docker_ContainerWait { + c := _m.On("ContainerWait", ctx, containerID, condition) + return &Docker_ContainerWait{Call: c} +} + +func (_m *Docker) OnContainerWaitMatch(matchers ...interface{}) *Docker_ContainerWait { + c := _m.On("ContainerWait", matchers...) + return &Docker_ContainerWait{Call: c} +} + +// ContainerWait provides a mock function with given fields: ctx, containerID, condition +func (_m *Docker) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) { + ret := _m.Called(ctx, containerID, condition) + + var r0 <-chan container.ContainerWaitOKBody + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.ContainerWaitOKBody); ok { + r0 = rf(ctx, containerID, condition) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan container.ContainerWaitOKBody) + } + } + + var r1 <-chan error + if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { + r1 = rf(ctx, containerID, condition) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(<-chan error) + } + } + + return r0, r1 +} + +type Docker_ImagePull struct { + *mock.Call +} + +func (_m Docker_ImagePull) Return(_a0 io.ReadCloser, _a1 error) *Docker_ImagePull { + return &Docker_ImagePull{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) *Docker_ImagePull { + c := _m.On("ImagePull", ctx, refStr, options) + return &Docker_ImagePull{Call: c} +} + +func (_m *Docker) OnImagePullMatch(matchers ...interface{}) *Docker_ImagePull { + c := _m.On("ImagePull", matchers...) + return &Docker_ImagePull{Call: c} +} + +// ImagePull provides a mock function with given fields: ctx, refStr, options +func (_m *Docker) ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error) { + ret := _m.Called(ctx, refStr, options) + + var r0 io.ReadCloser + if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) io.ReadCloser); ok { + r0 = rf(ctx, refStr, options) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.ReadCloser) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, types.ImagePullOptions) error); ok { + r1 = rf(ctx, refStr, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flytectl/pkg/docker/sandbox_util.go b/flytectl/pkg/docker/sandbox_util.go new file mode 100644 index 0000000000..4ce230581b --- /dev/null +++ b/flytectl/pkg/docker/sandbox_util.go @@ -0,0 +1,194 @@ +package docker + +import ( + "bufio" + "context" + "fmt" + "io" + "os" + "strings" + + "github.com/flyteorg/flytectl/pkg/util" + + "github.com/docker/docker/client" + + "github.com/enescakir/emoji" + + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + "github.com/docker/go-connections/nat" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" +) + +var ( + Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") + FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config-sandbox.yaml") + SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" + ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" + FlyteSandboxClusterName = "flyte-sandbox" + Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} + FlyteSnackDir = "/usr/src" + K3sDir = "/etc/rancher/" + Client Docker + Volumes = []mount.Mount{ + { + Type: mount.TypeBind, + Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), + Target: K3sDir, + }, + } +) + +// SetupFlyteDir will create .flyte dir if not exist +func SetupFlyteDir() error { + if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755); err != nil { + return err + } + return nil +} + +// GetFlyteSandboxConfig download the flyte sandbox config +func GetFlyteSandboxConfig() error { + response, err := util.GetRequest("https://raw.githubusercontent.com", "/flyteorg/flytectl/master/config.yaml") + if err != nil { + return err + } + + return util.WriteIntoFile(response, FlytectlConfig) +} + +// ConfigCleanup will remove the sandbox config from flyte dir +func ConfigCleanup() error { + err := os.Remove(FlytectlConfig) + if err != nil { + return err + } + err = os.RemoveAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s")) + if err != nil { + return err + } + return nil +} + +// GetSandbox will return sandbox container if it exist +func GetSandbox(ctx context.Context, cli Docker) *types.Container { + containers, _ := cli.ContainerList(ctx, types.ContainerListOptions{ + All: true, + }) + for _, v := range containers { + if strings.Contains(v.Names[0], FlyteSandboxClusterName) { + return &v + } + } + return nil +} + +// RemoveSandbox will remove sandbox container if exist +func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { + if c := GetSandbox(ctx, cli); c != nil { + if cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { + err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ + Force: true, + }) + return err + } + return nil + } + return nil +} + +// GetSandboxPorts will return sandbox ports +func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { + return nat.ParsePortSpecs([]string{ + "127.0.0.1:30086:30086", + "127.0.0.1:30081:30081", + "127.0.0.1:30082:30082", + "127.0.0.1:30084:30084", + }) +} + +// PullDockerImage will Pull docker image +func PullDockerImage(ctx context.Context, cli Docker, image string) error { + r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{}) + if err != nil { + return err + } + _, err = io.Copy(os.Stdout, r) + return err +} + +//StartContainer will create and start docker container +func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, name, image string) (string, error) { + resp, err := cli.ContainerCreate(ctx, &container.Config{ + Env: Environment, + Image: image, + Tty: false, + ExposedPorts: exposedPorts, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: portBindings, + Privileged: true, + }, nil, + nil, name) + + if err != nil { + return "", err + } + + if err := cli.ContainerStart(context.Background(), resp.ID, types.ContainerStartOptions{}); err != nil { + return "", err + } + return resp.ID, nil +} + +// WatchError will return channel for watching errors of a container +func WatchError(ctx context.Context, cli Docker, id string) (<-chan container.ContainerWaitOKBody, <-chan error) { + return cli.ContainerWait(context.Background(), id, container.WaitConditionNotRunning) +} + +// ReadLogs will return io scanner for reading the logs of a container +func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error) { + reader, err := cli.ContainerLogs(context.Background(), id, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }) + if err != nil { + return nil, err + } + return bufio.NewScanner(reader), nil +} + +// WaitForSandbox will wait until it doesn't get success message +func WaitForSandbox(reader *bufio.Scanner, message string) bool { + for reader.Scan() { + if strings.Contains(reader.Text(), message) { + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, message, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) + fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") + fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") + fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) + fmt.Printf("export FLYTECTL_CONFIG=%v \n", FlytectlConfig) + return true + } + fmt.Println(reader.Text()) + } + return false +} + +// GetDockerClient will returns the docker client +func GetDockerClient() (Docker, error) { + if Client == nil { + cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + if err != nil { + fmt.Printf("%v Please Check your docker client %v \n", emoji.GrimacingFace, emoji.Whale) + return nil, err + } + return cli, nil + } + return Client, nil +} diff --git a/flytectl/pkg/docker/sandbox_util_test.go b/flytectl/pkg/docker/sandbox_util_test.go new file mode 100644 index 0000000000..b39e03f4f6 --- /dev/null +++ b/flytectl/pkg/docker/sandbox_util_test.go @@ -0,0 +1,315 @@ +package docker + +import ( + "bufio" + "context" + "fmt" + + "github.com/docker/docker/api/types/container" + + //"github.com/docker/go-connections/nat" + "io/ioutil" + "os" + "strings" + "testing" + + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/mock" + + "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" + + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + + "github.com/stretchr/testify/assert" +) + +var ( + cmdCtx cmdCore.CommandContext + containers []types.Container +) + +func setupSandbox() { + mockAdminClient := u.MockClient + cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) + _ = SetupFlyteDir() + container1 := types.Container{ + ID: "FlyteSandboxClusterName", + Names: []string{ + FlyteSandboxClusterName, + }, + } + containers = append(containers, container1) +} + +func TestConfigCleanup(t *testing.T) { + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + _ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600) + _ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600) + + err = ConfigCleanup() + assert.Nil(t, err) + + _, err = os.Stat(FlytectlConfig) + check := os.IsNotExist(err) + assert.Equal(t, check, true) + + _, err = os.Stat(Kubeconfig) + check = os.IsNotExist(err) + assert.Equal(t, check, true) + _ = ConfigCleanup() +} + +func TestSetupFlytectlConfig(t *testing.T) { + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + err = SetupFlyteDir() + assert.Nil(t, err) + err = GetFlyteSandboxConfig() + assert.Nil(t, err) + _, err = os.Stat(FlytectlConfig) + assert.Nil(t, err) + check := os.IsNotExist(err) + assert.Equal(t, check, false) + _ = ConfigCleanup() +} + +func TestGetSandbox(t *testing.T) { + setupSandbox() + t.Run("Successfully get sandbox container", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + + mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) + c := GetSandbox(context, mockDocker) + assert.Equal(t, c.Names[0], FlyteSandboxClusterName) + }) + + t.Run("Successfully get sandbox container with zero result", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + + mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + c := GetSandbox(context, mockDocker) + assert.Nil(t, c) + }) + + t.Run("Error in get sandbox container", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + + mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(context, mockDocker, strings.NewReader("y")) + assert.Nil(t, err) + }) + +} + +func TestRemoveSandboxWithNoReply(t *testing.T) { + setupSandbox() + t.Run("Successfully remove sandbox container", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + + // Verify the attributes + mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(context, mockDocker, strings.NewReader("n")) + assert.Nil(t, err) + }) + + t.Run("Successfully remove sandbox container with zero sandbox containers are running", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + + // Verify the attributes + mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(context, mockDocker, strings.NewReader("n")) + assert.Nil(t, err) + }) + +} + +func TestPullDockerImage(t *testing.T) { + t.Run("Successfully pull image", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + // Verify the attributes + mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + err := PullDockerImage(context, mockDocker, "nginx") + assert.Nil(t, err) + }) + + t.Run("Error in pull image", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + // Verify the attributes + mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) + err := PullDockerImage(context, mockDocker, "nginx") + assert.NotNil(t, err) + }) + +} + +func TestStartContainer(t *testing.T) { + p1, p2, _ := GetSandboxPorts() + + t.Run("Successfully create a container", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + + // Verify the attributes + mockDocker.OnContainerCreate(context, &container.Config{ + Env: Environment, + Image: ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + assert.Nil(t, err) + assert.Greater(t, len(id), 0) + assert.Equal(t, id, "Hello") + }) + + t.Run("Error in creating container", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + + // Verify the attributes + mockDocker.OnContainerCreate(context, &container.Config{ + Env: Environment, + Image: ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "", + }, fmt.Errorf("error")) + mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + assert.NotNil(t, err) + assert.Equal(t, len(id), 0) + assert.Equal(t, id, "") + }) + + t.Run("Error in start of a container", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + + // Verify the attributes + mockDocker.OnContainerCreate(context, &container.Config{ + Env: Environment, + Image: ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + assert.NotNil(t, err) + assert.Equal(t, len(id), 0) + assert.Equal(t, id, "") + }) +} + +func TestWatchError(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerWaitMatch(context, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := WatchError(context, mockDocker, "test") + assert.NotNil(t, err) +} + +func TestReadLogs(t *testing.T) { + setupSandbox() + + t.Run("Successfully read logs", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + mockDocker.OnContainerLogsMatch(context, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + _, err := ReadLogs(context, mockDocker, "test") + assert.Nil(t, err) + }) + + t.Run("Error in reading logs", func(t *testing.T) { + mockDocker := &mocks.Docker{} + context := context.Background() + mockDocker.OnContainerLogsMatch(context, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, fmt.Errorf("error")) + _, err := ReadLogs(context, mockDocker, "test") + assert.NotNil(t, err) + }) +} + +func TestWaitForSandbox(t *testing.T) { + setupSandbox() + t.Run("Successfully read logs ", func(t *testing.T) { + reader := bufio.NewScanner(strings.NewReader("hello \n Flyte")) + + check := WaitForSandbox(reader, "Flyte") + assert.Equal(t, true, check) + }) + + t.Run("Error in reading logs ", func(t *testing.T) { + reader := bufio.NewScanner(strings.NewReader("")) + check := WaitForSandbox(reader, "Flyte") + assert.Equal(t, false, check) + }) +} + +func TestDockerClient(t *testing.T) { + t.Run("Successfully get docker mock client", func(t *testing.T) { + mockDocker := &mocks.Docker{} + Client = mockDocker + cli, err := GetDockerClient() + assert.Nil(t, err) + assert.NotNil(t, cli) + }) + t.Run("Successfully get docker client", func(t *testing.T) { + Client = nil + cli, err := GetDockerClient() + assert.Nil(t, err) + assert.NotNil(t, cli) + }) + +} From 0229fb90abc0dce99ebf09f362608dddd98a4269 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 24 Jun 2021 06:12:47 -0700 Subject: [PATCH 082/356] Update Boilerplate (#98) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot From 59860c47ddd3889da53bfe31d39b5567610abead Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Thu, 24 Jun 2021 14:50:57 -0700 Subject: [PATCH 083/356] Rename flytesnacks flag to sourcesPath (#116) Signed-off-by: Haytham Abuelfutuh --- flytectl/Makefile | 2 -- .../config/subcommand/sandbox/config_flags.go | 2 +- .../subcommand/sandbox/config_flags_test.go | 2 +- .../subcommand/sandbox/sandbox_config.go | 4 +-- flytectl/cmd/sandbox/start.go | 6 ++-- flytectl/cmd/sandbox/start_test.go | 28 +++++++++---------- .../source/gen/flytectl_sandbox_start.rst | 4 +-- 7 files changed, 23 insertions(+), 25 deletions(-) diff --git a/flytectl/Makefile b/flytectl/Makefile index 8d1c049c43..43c7aab1ca 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -9,8 +9,6 @@ PACKAGE ?=github.com/flyteorg/flytestdlib LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)" - - define PIP_COMPILE pip-compile $(1) --upgrade --verbose endef diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 3c1cd8d74e..644a091b91 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -50,6 +50,6 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultConfig.SnacksRepo, fmt.Sprintf("%v%v", prefix, "flytesnacks"), DefaultConfig.SnacksRepo, " Path of your flytesnacks repository") + cmdFlags.StringVar(&DefaultConfig.SourcesPath, fmt.Sprintf("%v%v", prefix, "flytesnacks"), DefaultConfig.SourcesPath, " Path of your flytesnacks repository") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index c6bf24684c..a9dea063aa 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -106,7 +106,7 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags.Set("flytesnacks", testValue) if vString, err := cmdFlags.GetString("flytesnacks"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.SnacksRepo) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.SourcesPath) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index e9f8098828..87b1ea9cb0 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -5,7 +5,7 @@ var ( DefaultConfig = &Config{} ) -// Config +// Config represents the config parameters exposed for the `sandbox` command. type Config struct { - SnacksRepo string `json:"flytesnacks" pflag:", Path of your flytesnacks repository"` + SourcesPath string `json:"sourcesPath" pflag:",Path to your source code path where flyte workflows and tasks are."` } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 33c91ea354..559c623a08 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -26,7 +26,7 @@ Start will run the flyte sandbox cluster inside a docker container and setup the Mount your flytesnacks repository code inside sandbox :: - bin/flytectl sandbox start --flytesnacks=$HOME/flyteorg/flytesnacks + bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks Usage ` ) @@ -65,10 +65,10 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return nil, err } - if len(sandboxConfig.DefaultConfig.SnacksRepo) > 0 { + if len(sandboxConfig.DefaultConfig.SourcesPath) > 0 { docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 1f29fe5464..7bb7ce0a0d 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -61,10 +61,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -97,10 +97,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -133,10 +133,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -177,10 +177,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -213,10 +213,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -249,10 +249,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SnacksRepo = f.UserHomeDir() + sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SnacksRepo, + Source: sandboxConfig.DefaultConfig.SourcesPath, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -312,7 +312,7 @@ func TestStartSandboxFunc(t *testing.T) { }).Return(reader, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker - sandboxConfig.DefaultConfig.SnacksRepo = "" + sandboxConfig.DefaultConfig.SourcesPath = "" err := startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) @@ -348,7 +348,7 @@ func TestStartSandboxFunc(t *testing.T) { }).Return(reader, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker - sandboxConfig.DefaultConfig.SnacksRepo = "" + sandboxConfig.DefaultConfig.SourcesPath = "" err := startSandboxCluster(ctx, []string{}, cmdCtx) assert.NotNil(t, err) }) diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 402b8b5ad9..201a3d4e59 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -18,7 +18,7 @@ Start will run the flyte sandbox cluster inside a docker container and setup the Mount your flytesnacks repository code inside sandbox :: - bin/flytectl sandbox start --flytesnacks=$HOME/flyteorg/flytesnacks + bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks Usage @@ -31,7 +31,7 @@ Options :: - --flytesnacks string Path of your flytesnacks repository + --sourcesPath string Path to your source code path where flyte workflows and tasks are. -h, --help help for start Options inherited from parent commands From efffd5772112b1966001c41e50dc6c09124bd977 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 24 Jun 2021 15:15:24 -0700 Subject: [PATCH 084/356] Sandbox status & Bash completion (#115) * Sandbox status command Signed-off-by: Ketan Umare * bash completion Signed-off-by: Ketan Umare * goimported Signed-off-by: Ketan Umare * fixed lint Signed-off-by: Ketan Umare * added unit test for status Signed-off-by: Yuvraj Co-authored-by: Yuvraj --- flytectl/cmd/completion.go | 83 ++++++++++++++++++++++++++++ flytectl/cmd/root.go | 1 + flytectl/cmd/sandbox/sandbox.go | 3 + flytectl/cmd/sandbox/sandbox_test.go | 12 ++-- flytectl/cmd/sandbox/start_test.go | 2 +- flytectl/cmd/sandbox/status.go | 43 ++++++++++++++ flytectl/cmd/sandbox/status_test.go | 43 ++++++++++++++ flytectl/go.mod | 4 +- 8 files changed, 184 insertions(+), 7 deletions(-) create mode 100644 flytectl/cmd/completion.go create mode 100644 flytectl/cmd/sandbox/status.go create mode 100644 flytectl/cmd/sandbox/status_test.go diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go new file mode 100644 index 0000000000..7c705c2e00 --- /dev/null +++ b/flytectl/cmd/completion.go @@ -0,0 +1,83 @@ +/* +Copyright © 2021 NAME HERE + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "os" + + "github.com/spf13/cobra" +) + +// completionCmd represents the completion command +var completionCmd = &cobra.Command{ + Use: "completion [bash|zsh|fish|powershell]", + Short: "Generate completion script", + Long: `To load completions: + +Bash: + + $ source <(flytectl completion bash) + + # To load completions for each session, execute once: + # Linux: + $ flytectl completion bash > /etc/bash_completion.d/flytectl + # macOS: + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + +Zsh: + + # If shell completion is not already enabled in your environment, + # you will need to enable it. You can execute the following once: + + $ echo "autoload -U compinit; compinit" >> ~/.zshrc + + # To load completions for each session, execute once: + $ flytectl completion zsh > "${fpath[1]}/_flytectl" + + # You will need to start a new shell for this setup to take effect. + +fish: + + $ flytectl completion fish | source + + # To load completions for each session, execute once: + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +PowerShell: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + # To load completions for every new session, run: + PS> flytectl completion powershell > flytectl.ps1 + # and source this file from your PowerShell profile. +`, + DisableFlagsInUseLine: true, + ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, + Args: cobra.ExactValidArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + switch args[0] { + case "bash": + return cmd.Root().GenBashCompletion(os.Stdout) + case "zsh": + return cmd.Root().GenZshCompletion(os.Stdout) + case "fish": + return cmd.Root().GenFishCompletion(os.Stdout, true) + case "powershell": + return cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout) + } + return nil + }, +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 52bc75722c..70691d1751 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -59,6 +59,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) rootCmd.AddCommand(sandbox.CreateSandboxCommand()) + rootCmd.AddCommand(completionCmd) // Added version command versioncmd := version.GetVersionCommand(rootCmd) cmdCore.AddCommands(rootCmd, versioncmd) diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index cf666b9a48..7ee1f37cb6 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -38,6 +38,9 @@ func CreateSandboxCommand() *cobra.Command { "teardown": {CmdFunc: teardownSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, Long: teardownLong}, + "status": {CmdFunc: sandboxClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: statusShort, + Long: statusLong}, } cmdcore.AddCommands(sandbox, sandboxResourcesFuncs) diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go index fe3f964572..8537f434e9 100644 --- a/flytectl/cmd/sandbox/sandbox_test.go +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -13,7 +13,7 @@ func TestCreateSandboxCommand(t *testing.T) { assert.Equal(t, sandboxCommand.Use, "sandbox") assert.Equal(t, sandboxCommand.Short, "Used for testing flyte sandbox.") fmt.Println(sandboxCommand.Commands()) - assert.Equal(t, len(sandboxCommand.Commands()), 2) + assert.Equal(t, len(sandboxCommand.Commands()), 3) cmdNouns := sandboxCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { @@ -24,8 +24,12 @@ func TestCreateSandboxCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Short, startShort) assert.Equal(t, cmdNouns[0].Long, startLong) - assert.Equal(t, cmdNouns[1].Use, "teardown") - assert.Equal(t, cmdNouns[1].Short, teardownShort) - assert.Equal(t, cmdNouns[1].Long, teardownLong) + assert.Equal(t, cmdNouns[1].Use, "status") + assert.Equal(t, cmdNouns[1].Short, statusShort) + assert.Equal(t, cmdNouns[1].Long, statusLong) + + assert.Equal(t, cmdNouns[2].Use, "teardown") + assert.Equal(t, cmdNouns[2].Short, teardownShort) + assert.Equal(t, cmdNouns[2].Long, teardownLong) } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 7bb7ce0a0d..36e0399b51 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -154,7 +154,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { - ID: "FlyteSandboxClusterName", + ID: docker.FlyteSandboxClusterName, Names: []string{ docker.FlyteSandboxClusterName, }, diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go new file mode 100644 index 0000000000..c9493b4509 --- /dev/null +++ b/flytectl/cmd/sandbox/status.go @@ -0,0 +1,43 @@ +package sandbox + +import ( + "context" + "fmt" + + "github.com/enescakir/emoji" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" +) + +const ( + statusShort = "Get the status of the sandbox environment." + statusLong = ` +Status will retrieve the status of the Sandbox environment. Currently FlyteSandbox runs as a local docker container. +This will return the docker status for this container + +Usage +:: + + bin/flytectl sandbox status + +` +) + +func sandboxClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + return printStatus(ctx, cli) +} + +func printStatus(ctx context.Context, cli docker.Docker) error { + c := docker.GetSandbox(ctx, cli) + if c == nil { + fmt.Printf("%v no Sandbox found \n", emoji.StopSign) + return nil + } + fmt.Printf("Flyte local sandbox cluster container image [%s] with status [%s] is in state [%s]", c.Image, c.Status, c.State) + return nil +} diff --git a/flytectl/cmd/sandbox/status_test.go b/flytectl/cmd/sandbox/status_test.go new file mode 100644 index 0000000000..fa5fbf424a --- /dev/null +++ b/flytectl/cmd/sandbox/status_test.go @@ -0,0 +1,43 @@ +package sandbox + +import ( + "context" + "io" + "testing" + + "github.com/docker/docker/api/types" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/assert" +) + +func TestSandboxStatus(t *testing.T) { + t.Run("Sandbox status with zero result", func(t *testing.T) { + ctx := context.Background() + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + docker.Client = mockDocker + err := sandboxClusterStatus(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Sandbox status with running sandbox", func(t *testing.T) { + ctx := context.Background() + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.Client = mockDocker + err := sandboxClusterStatus(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) +} diff --git a/flytectl/go.mod b/flytectl/go.mod index ad4c8f90cc..93af1fc05b 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -16,7 +16,7 @@ require ( github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 - github.com/hashicorp/go-version v1.3.0 // indirect + github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 @@ -25,7 +25,7 @@ require ( github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/opencontainers/image-spec v1.0.1 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 From 9460d715539ae40d2ddf8d5d03bb209435a2978c Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 24 Jun 2021 20:52:06 -0700 Subject: [PATCH 085/356] Update documentation (#117) Signed-off-by: Flyte-Bot Co-authored-by: kumare3 --- flytectl/docs/source/gen/flytectl.rst | 1 + .../docs/source/gen/flytectl_completion.rst | 77 +++++++++++++++++++ flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + .../source/gen/flytectl_sandbox_start.rst | 4 +- .../source/gen/flytectl_sandbox_status.rst | 48 ++++++++++++ 5 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_completion.rst create mode 100644 flytectl/docs/source/gen/flytectl_sandbox_status.rst diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index f740989c59..a2317e1182 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -25,6 +25,7 @@ Options SEE ALSO ~~~~~~~~ +* :doc:`flytectl_completion` - Generate completion script * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. * :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst new file mode 100644 index 0000000000..bedc92ff41 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -0,0 +1,77 @@ +.. _flytectl_completion: + +flytectl completion +------------------- + +Generate completion script + +Synopsis +~~~~~~~~ + + +To load completions: + +Bash: + + $ source <(flytectl completion bash) + + # To load completions for each session, execute once: + # Linux: + $ flytectl completion bash > /etc/bash_completion.d/flytectl + # macOS: + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + +Zsh: + + # If shell completion is not already enabled in your environment, + # you will need to enable it. You can execute the following once: + + $ echo "autoload -U compinit; compinit" >> ~/.zshrc + + # To load completions for each session, execute once: + $ flytectl completion zsh > "${fpath[1]}/_flytectl" + + # You will need to start a new shell for this setup to take effect. + +fish: + + $ flytectl completion fish | source + + # To load completions for each session, execute once: + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +PowerShell: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + # To load completions for every new session, run: + PS> flytectl completion powershell > flytectl.ps1 + # and source this file from your PowerShell profile. + + +:: + + flytectl completion [bash|zsh|fish|powershell] + +Options +~~~~~~~ + +:: + + -h, --help help for completion + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool + diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 523c26c84a..bb687e27d5 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -44,5 +44,6 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_sandbox_start` - Start the flyte sandbox +* :doc:`flytectl_sandbox_status` - Get the status of the sandbox environment. * :doc:`flytectl_sandbox_teardown` - Teardown will cleanup the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 201a3d4e59..a4d171c7b8 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -18,7 +18,7 @@ Start will run the flyte sandbox cluster inside a docker container and setup the Mount your flytesnacks repository code inside sandbox :: - bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks + bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks Usage @@ -31,7 +31,7 @@ Options :: - --sourcesPath string Path to your source code path where flyte workflows and tasks are. + --flytesnacks string Path of your flytesnacks repository -h, --help help for start Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst new file mode 100644 index 0000000000..0f85f86437 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -0,0 +1,48 @@ +.. _flytectl_sandbox_status: + +flytectl sandbox status +----------------------- + +Get the status of the sandbox environment. + +Synopsis +~~~~~~~~ + + + +Status will retrieve the status of the Sandbox environment. Currently FlyteSandbox runs as a local docker container. +This will return the docker status for this container + +Usage +:: + + bin/flytectl sandbox status + + + +:: + + flytectl sandbox status [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for status + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. + From bc3df4dcf4f2f0171041e1bde7540423783f1877 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 25 Jun 2021 20:27:25 +0530 Subject: [PATCH 086/356] Rename flag in sandbox (#119) * Rename flag name in sandbox Signed-off-by: Yuvraj Date: Mon, 28 Jun 2021 11:22:38 -0700 Subject: [PATCH 087/356] Update CONTRIBUTING.md (#118) Fixing broken link on line 3 Signed-off-by: wild-endeavor --- flytectl/docs/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md index 7aecdba71e..1f93087df8 100644 --- a/flytectl/docs/CONTRIBUTING.md +++ b/flytectl/docs/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Developing FlyteCtl -A local cluster can be setup via --> https://lyft.github.io/flyte/administrator/install/getting_started.html#getting-started +A local cluster can be setup via --> https://docs.flyte.org/en/latest/getting_started.html Then, if having trouble connecting to local cluster see the following: From 8b1c8446fbe4131df9c2ecb4c46a98940c99f323 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 1 Jul 2021 00:41:57 +0530 Subject: [PATCH 088/356] Added exec command in sandbox (#122) * Added exec command Signed-off-by: Yuvraj --- flytectl/cmd/sandbox/exec.go | 45 +++++++ flytectl/cmd/sandbox/exec_test.go | 72 +++++++++++ flytectl/cmd/sandbox/sandbox.go | 3 + flytectl/cmd/sandbox/sandbox_test.go | 24 ++-- flytectl/go.mod | 2 + flytectl/go.sum | 6 +- flytectl/pkg/docker/docker.go | 3 + .../{sandbox_util.go => docker_util.go} | 31 +++++ ...ndbox_util_test.go => docker_util_test.go} | 57 +++++++++ flytectl/pkg/docker/mocks/docker.go | 117 ++++++++++++++++++ 10 files changed, 348 insertions(+), 12 deletions(-) create mode 100644 flytectl/cmd/sandbox/exec.go create mode 100644 flytectl/cmd/sandbox/exec_test.go rename flytectl/pkg/docker/{sandbox_util.go => docker_util.go} (87%) rename flytectl/pkg/docker/{sandbox_util_test.go => docker_util_test.go} (83%) diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go new file mode 100644 index 0000000000..804d54b6c6 --- /dev/null +++ b/flytectl/cmd/sandbox/exec.go @@ -0,0 +1,45 @@ +package sandbox + +import ( + "context" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" +) + +const ( + execShort = "Execute any command in sandbox" + execLong = ` +Execute command will Will run non-interactive commands and return immediately with the output. + +:: + bin/flytectl sandbox exec -- ls -al + +Usage` +) + +func sandboxClusterExec(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + if len(args) > 0 { + return Execute(ctx, cli, args) + } + return fmt.Errorf("missing argument. Please check usage examples by running flytectl sandbox exec --help") +} + +func Execute(ctx context.Context, cli docker.Docker, args []string) error { + c := docker.GetSandbox(ctx, cli) + if c != nil { + exec, err := docker.ExecCommend(ctx, cli, c.ID, args) + if err != nil { + return err + } + if err := docker.InspectExecResp(ctx, cli, exec.ID); err != nil { + return err + } + } + return nil +} diff --git a/flytectl/cmd/sandbox/exec_test.go b/flytectl/cmd/sandbox/exec_test.go new file mode 100644 index 0000000000..4aa0e2148a --- /dev/null +++ b/flytectl/cmd/sandbox/exec_test.go @@ -0,0 +1,72 @@ +package sandbox + +import ( + "bufio" + "context" + "fmt" + "io" + "strings" + "testing" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/stretchr/testify/assert" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/mock" +) + +func TestSandboxClusterExec(t *testing.T) { + mockDocker := &mocks.Docker{} + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + reader := bufio.NewReader(strings.NewReader("test")) + + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.ExecConfig.Cmd = []string{"ls -al"} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, docker.ExecConfig).Return(types.IDResponse{}, nil) + mockDocker.OnContainerExecInspectMatch(ctx, mock.Anything).Return(types.ContainerExecInspect{}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, fmt.Errorf("Test")) + docker.Client = mockDocker + err := sandboxClusterExec(ctx, []string{"ls -al"}, cmdCtx) + + assert.NotNil(t, err) +} + +func TestSandboxClusterExecWithoutCmd(t *testing.T) { + mockDocker := &mocks.Docker{} + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + reader := bufio.NewReader(strings.NewReader("test")) + + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.ExecConfig.Cmd = []string{} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, docker.ExecConfig).Return(types.IDResponse{}, nil) + mockDocker.OnContainerExecInspectMatch(ctx, mock.Anything).Return(types.ContainerExecInspect{}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, fmt.Errorf("Test")) + docker.Client = mockDocker + err := sandboxClusterExec(ctx, []string{}, cmdCtx) + + assert.NotNil(t, err) +} diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 7ee1f37cb6..233f4f0eba 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -41,6 +41,9 @@ func CreateSandboxCommand() *cobra.Command { "status": {CmdFunc: sandboxClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, Short: statusShort, Long: statusLong}, + "exec": {CmdFunc: sandboxClusterExec, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: execShort, + Long: execLong, PFlagProvider: sandboxConfig.DefaultConfig}, } cmdcore.AddCommands(sandbox, sandboxResourcesFuncs) diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go index 8537f434e9..640390c137 100644 --- a/flytectl/cmd/sandbox/sandbox_test.go +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -13,23 +13,27 @@ func TestCreateSandboxCommand(t *testing.T) { assert.Equal(t, sandboxCommand.Use, "sandbox") assert.Equal(t, sandboxCommand.Short, "Used for testing flyte sandbox.") fmt.Println(sandboxCommand.Commands()) - assert.Equal(t, len(sandboxCommand.Commands()), 3) + assert.Equal(t, len(sandboxCommand.Commands()), 4) cmdNouns := sandboxCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "start") - assert.Equal(t, cmdNouns[0].Short, startShort) - assert.Equal(t, cmdNouns[0].Long, startLong) + assert.Equal(t, cmdNouns[0].Use, "exec") + assert.Equal(t, cmdNouns[0].Short, execShort) + assert.Equal(t, cmdNouns[0].Long, execLong) - assert.Equal(t, cmdNouns[1].Use, "status") - assert.Equal(t, cmdNouns[1].Short, statusShort) - assert.Equal(t, cmdNouns[1].Long, statusLong) + assert.Equal(t, cmdNouns[1].Use, "start") + assert.Equal(t, cmdNouns[1].Short, startShort) + assert.Equal(t, cmdNouns[1].Long, startLong) - assert.Equal(t, cmdNouns[2].Use, "teardown") - assert.Equal(t, cmdNouns[2].Short, teardownShort) - assert.Equal(t, cmdNouns[2].Long, teardownLong) + assert.Equal(t, cmdNouns[2].Use, "status") + assert.Equal(t, cmdNouns[2].Short, statusShort) + assert.Equal(t, cmdNouns[2].Long, statusLong) + + assert.Equal(t, cmdNouns[3].Use, "teardown") + assert.Equal(t, cmdNouns[3].Short, teardownShort) + assert.Equal(t, cmdNouns[3].Long, teardownLong) } diff --git a/flytectl/go.mod b/flytectl/go.mod index 93af1fc05b..f944444102 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -13,9 +13,11 @@ require ( github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 + github.com/google/go-cmp v0.5.6 // indirect github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 + github.com/gorilla/mux v1.8.0 // indirect github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index d07374e6d8..6658e96614 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -438,8 +438,9 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -479,8 +480,9 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index f33b3b5219..1cc53b6285 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -21,6 +21,9 @@ type Docker interface { ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) + ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) + ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) + ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) } type FlyteDocker struct { diff --git a/flytectl/pkg/docker/sandbox_util.go b/flytectl/pkg/docker/docker_util.go similarity index 87% rename from flytectl/pkg/docker/sandbox_util.go rename to flytectl/pkg/docker/docker_util.go index 4ce230581b..03e220879f 100644 --- a/flytectl/pkg/docker/sandbox_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -40,6 +40,15 @@ var ( Target: K3sDir, }, } + ExecConfig = types.ExecConfig{ + AttachStderr: true, + Tty: true, + WorkingDir: FlyteSnackDir, + AttachStdout: true, + Cmd: []string{}, + } + StdWriterPrefixLen = 8 + StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 ) // SetupFlyteDir will create .flyte dir if not exist @@ -192,3 +201,25 @@ func GetDockerClient() (Docker, error) { } return Client, nil } + +// ExecCommend will execute a command in container and returns an execution id +func ExecCommend(ctx context.Context, cli Docker, containerID string, command []string) (types.IDResponse, error) { + ExecConfig.Cmd = command + r, err := cli.ContainerExecCreate(ctx, containerID, ExecConfig) + if err != nil { + return types.IDResponse{}, err + } + return r, err +} + +func InspectExecResp(ctx context.Context, cli Docker, containerID string) error { + resp, err := cli.ContainerExecAttach(ctx, containerID, types.ExecStartCheck{}) + if err != nil { + return err + } + s := bufio.NewScanner(resp.Reader) + for s.Scan() { + fmt.Println(s.Text()) + } + return nil +} diff --git a/flytectl/pkg/docker/sandbox_util_test.go b/flytectl/pkg/docker/docker_util_test.go similarity index 83% rename from flytectl/pkg/docker/sandbox_util_test.go rename to flytectl/pkg/docker/docker_util_test.go index b39e03f4f6..65004a2b0b 100644 --- a/flytectl/pkg/docker/sandbox_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -311,5 +311,62 @@ func TestDockerClient(t *testing.T) { assert.Nil(t, err) assert.NotNil(t, cli) }) +} + +func TestDockerExec(t *testing.T) { + t.Run("Successfully exec command in container", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + Client = mockDocker + c := ExecConfig + c.Cmd = []string{"ls"} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, c).Return(types.IDResponse{}, nil) + _, err := ExecCommend(ctx, mockDocker, "test", []string{"ls"}) + assert.Nil(t, err) + }) + t.Run("Failed exec command in container", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + Client = mockDocker + c := ExecConfig + c.Cmd = []string{"ls"} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, c).Return(types.IDResponse{}, fmt.Errorf("test")) + _, err := ExecCommend(ctx, mockDocker, "test", []string{"ls"}) + assert.NotNil(t, err) + }) +} + +func TestInspectExecResp(t *testing.T) { + t.Run("Failed exec command in container", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + Client = mockDocker + c := ExecConfig + c.Cmd = []string{"ls"} + reader := bufio.NewReader(strings.NewReader("test")) + + mockDocker.OnContainerExecInspectMatch(ctx, mock.Anything).Return(types.ContainerExecInspect{}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, fmt.Errorf("err")) + + err := InspectExecResp(ctx, mockDocker, "test") + assert.NotNil(t, err) + }) + t.Run("Successfully exec command in container", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + Client = mockDocker + c := ExecConfig + c.Cmd = []string{"ls"} + reader := bufio.NewReader(strings.NewReader("test")) + + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, nil) + + err := InspectExecResp(ctx, mockDocker, "test") + assert.Nil(t, err) + }) } diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index 917546fbee..9655d46a9c 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -62,6 +62,123 @@ func (_m *Docker) ContainerCreate(ctx context.Context, config *container.Config, return r0, r1 } +type Docker_ContainerExecAttach struct { + *mock.Call +} + +func (_m Docker_ContainerExecAttach) Return(_a0 types.HijackedResponse, _a1 error) *Docker_ContainerExecAttach { + return &Docker_ContainerExecAttach{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) *Docker_ContainerExecAttach { + c := _m.On("ContainerExecAttach", ctx, execID, config) + return &Docker_ContainerExecAttach{Call: c} +} + +func (_m *Docker) OnContainerExecAttachMatch(matchers ...interface{}) *Docker_ContainerExecAttach { + c := _m.On("ContainerExecAttach", matchers...) + return &Docker_ContainerExecAttach{Call: c} +} + +// ContainerExecAttach provides a mock function with given fields: ctx, execID, config +func (_m *Docker) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) { + ret := _m.Called(ctx, execID, config) + + var r0 types.HijackedResponse + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) types.HijackedResponse); ok { + r0 = rf(ctx, execID, config) + } else { + r0 = ret.Get(0).(types.HijackedResponse) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecStartCheck) error); ok { + r1 = rf(ctx, execID, config) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_ContainerExecCreate struct { + *mock.Call +} + +func (_m Docker_ContainerExecCreate) Return(_a0 types.IDResponse, _a1 error) *Docker_ContainerExecCreate { + return &Docker_ContainerExecCreate{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) *Docker_ContainerExecCreate { + c := _m.On("ContainerExecCreate", ctx, _a1, config) + return &Docker_ContainerExecCreate{Call: c} +} + +func (_m *Docker) OnContainerExecCreateMatch(matchers ...interface{}) *Docker_ContainerExecCreate { + c := _m.On("ContainerExecCreate", matchers...) + return &Docker_ContainerExecCreate{Call: c} +} + +// ContainerExecCreate provides a mock function with given fields: ctx, _a1, config +func (_m *Docker) ContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) (types.IDResponse, error) { + ret := _m.Called(ctx, _a1, config) + + var r0 types.IDResponse + if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) types.IDResponse); ok { + r0 = rf(ctx, _a1, config) + } else { + r0 = ret.Get(0).(types.IDResponse) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecConfig) error); ok { + r1 = rf(ctx, _a1, config) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_ContainerExecInspect struct { + *mock.Call +} + +func (_m Docker_ContainerExecInspect) Return(_a0 types.ContainerExecInspect, _a1 error) *Docker_ContainerExecInspect { + return &Docker_ContainerExecInspect{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerExecInspect(ctx context.Context, execID string) *Docker_ContainerExecInspect { + c := _m.On("ContainerExecInspect", ctx, execID) + return &Docker_ContainerExecInspect{Call: c} +} + +func (_m *Docker) OnContainerExecInspectMatch(matchers ...interface{}) *Docker_ContainerExecInspect { + c := _m.On("ContainerExecInspect", matchers...) + return &Docker_ContainerExecInspect{Call: c} +} + +// ContainerExecInspect provides a mock function with given fields: ctx, execID +func (_m *Docker) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) { + ret := _m.Called(ctx, execID) + + var r0 types.ContainerExecInspect + if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerExecInspect); ok { + r0 = rf(ctx, execID) + } else { + r0 = ret.Get(0).(types.ContainerExecInspect) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, execID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type Docker_ContainerList struct { *mock.Call } From 19ba5fd4f0b2c5cd1f1ec9524db8760543db1cf2 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 1 Jul 2021 19:22:33 +0530 Subject: [PATCH 089/356] Added fast register functionality (#112) --- flytectl/.github/workflows/build.yaml | 2 + .../subcommand/register/files_config.go | 1 + .../subcommand/register/filesconfig_flags.go | 1 + .../register/filesconfig_flags_test.go | 14 ++ .../config/subcommand/sandbox/config_flags.go | 39 +---- .../subcommand/sandbox/config_flags_test.go | 8 +- .../subcommand/sandbox/sandbox_config.go | 4 +- flytectl/cmd/register/examples.go | 8 +- flytectl/cmd/register/examples_test.go | 26 +++ flytectl/cmd/register/files.go | 60 +++++-- flytectl/cmd/register/files_test.go | 110 ++++++++++++- flytectl/cmd/register/register_util.go | 153 ++++++++++++++++-- flytectl/cmd/register/register_util_test.go | 144 +++++++++++++---- .../cmd/register/testdata/flyte-package.tgz | Bin 0 -> 162434 bytes .../register/testdata/flytesnacks-core.tgz | Bin 0 -> 51076 bytes .../cmd/register/testdata/invalid-fast.tgz | Bin 0 -> 56964 bytes .../register/testdata/valid-fast-register.tgz | Bin 0 -> 57086 bytes flytectl/cmd/sandbox/start.go | 4 +- flytectl/cmd/sandbox/start_test.go | 28 ++-- flytectl/config.yaml | 13 +- flytectl/go.mod | 4 +- flytectl/go.sum | 114 ++++++++++++- 22 files changed, 611 insertions(+), 122 deletions(-) create mode 100644 flytectl/cmd/register/examples_test.go create mode 100644 flytectl/cmd/register/testdata/flyte-package.tgz create mode 100644 flytectl/cmd/register/testdata/flytesnacks-core.tgz create mode 100644 flytectl/cmd/register/testdata/invalid-fast.tgz create mode 100644 flytectl/cmd/register/testdata/valid-fast-register.tgz diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 2b70c73f27..efdceac3d7 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: "0" - uses: actions/cache@v2 with: path: | diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index a384ec83d5..b43232e6c1 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -17,4 +17,5 @@ type FilesConfig struct { AssumableIamRole string `json:"assumableIamRole" pflag:", custom assumable iam auth role to register launch plans with."` K8ServiceAccount string `json:"k8ServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` + SourceUploadPath string `json:"sourceUploadPath" pflag:", Location for source code in storage."` } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index ffcb0d7ec4..a28aead6e5 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -19,5 +19,6 @@ func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVarP(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), "i", DefaultFilesConfig.AssumableIamRole, " Custom assumable iam auth role to register launch plans with.") cmdFlags.StringVarP(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), "k", DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") cmdFlags.StringVarP(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), "l", DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") + cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 56a85f9234..9b2340ca5d 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -183,4 +183,18 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_sourceUploadPath", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("sourceUploadPath", testValue) + if vString, err := cmdFlags.GetString("sourceUploadPath"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.SourceUploadPath) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 8e84ee97fe..ebecc0a5b9 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -4,52 +4,15 @@ package sandbox import ( - "encoding/json" - "reflect" - "fmt" "github.com/spf13/pflag" ) -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (Config) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (Config) mustJsonMarshal(v interface{}) string { - raw, err := json.Marshal(v) - if err != nil { - panic(err) - } - - return string(raw) -} - -func (Config) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultConfig.SourcesPath, fmt.Sprintf("%v%v", prefix, "sourcesPath"), DefaultConfig.SourcesPath, "Path to your source code path where flyte workflows and tasks are.") + cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, " Path of your source code") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 9f4775e8e5..09d41aa631 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -99,14 +99,14 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) - t.Run("Test_sourcesPath", func(t *testing.T) { + t.Run("Test_source", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("sourcesPath", testValue) - if vString, err := cmdFlags.GetString("sourcesPath"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.SourcesPath) + cmdFlags.Set("source", testValue) + if vString, err := cmdFlags.GetString("source"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Source) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 87b1ea9cb0..afe85beddf 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -5,7 +5,7 @@ var ( DefaultConfig = &Config{} ) -// Config represents the config parameters exposed for the `sandbox` command. +//Config type Config struct { - SourcesPath string `json:"sourcesPath" pflag:",Path to your source code path where flyte workflows and tasks are."` + Source string `json:"source" pflag:", Path of your source code"` } diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 9de4cfcf86..0952571c12 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -19,19 +19,21 @@ Registers all latest flytesnacks example Usage ` +) + +var ( githubOrg = "flyteorg" githubRepository = "flytesnacks" - archive = true snackReleaseURL = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flytesnacks-%s.tgz" flyteManifest = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flyte_tests_manifest.json" ) func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - flytesnacks, tag, err := getFlyteTestManifest() + flytesnacks, tag, err := getFlyteTestManifest(githubOrg, githubRepository) if err != nil { return err } - rconfig.DefaultFilesConfig.Archive = archive + rconfig.DefaultFilesConfig.Archive = true for _, v := range flytesnacks { args := []string{ fmt.Sprintf(snackReleaseURL, tag, v.Name), diff --git a/flytectl/cmd/register/examples_test.go b/flytectl/cmd/register/examples_test.go new file mode 100644 index 0000000000..1c004a74a9 --- /dev/null +++ b/flytectl/cmd/register/examples_test.go @@ -0,0 +1,26 @@ +package register + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRegisterExamplesFunc(t *testing.T) { + setup() + registerFilesSetup() + args = []string{""} + err := registerExamplesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) +} +func TestRegisterExamplesFuncErr(t *testing.T) { + setup() + registerFilesSetup() + githubRepository = "testingsnacks" + args = []string{""} + + err := registerExamplesFunc(ctx, args, cmdCtx) + // TODO (Yuvraj) make test to success after fixing flytesnacks bug + assert.NotNil(t, err) + githubRepository = "flytesnacks" +} diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index a33d7eea78..d758adce98 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -3,7 +3,9 @@ package register import ( "context" "encoding/json" + "fmt" "os" + "path/filepath" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -19,7 +21,18 @@ If there are already registered entities with v1 version then the command will f :: bin/flytectl register file _pb_output/* -d development -p flytesnacks + +There is no difference between registration and fast registration, In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If Flytectl finds any source code in users's input then it will consider registration as fast registration. Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also archive create source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration +:: + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 --SourceUploadPath="s3://dummy/fast" + Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. Use --archive flag. @@ -33,8 +46,7 @@ Using local tgz file. bin/flytectl register files _pb_output.tgz -d development -p flytesnacks --archive -If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in -the continueOnError flag. +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in the continueOnError flag. :: @@ -73,9 +85,10 @@ Override Output location prefix during registration. :: bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" - + Usage ` + sourceCodeExtension = ".tar.gz" ) func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { @@ -83,17 +96,42 @@ func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Co } func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - dataRefs, tmpDir, _err := getSortedFileList(ctx, args) - if _err != nil { - logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", _err) - return _err + var _err error + var dataRefs []string + + // getSerializeOutputFiles will return you all proto and source code compress file in sorted order + dataRefs, tmpDir, err := getSerializeOutputFiles(ctx, args) + if err != nil { + logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", err) + return err + } + logger.Infof(ctx, "Parsing file... Total(%v)", len(dataRefs)) + + // It will segregate serialize output files in valid proto,Invalid files if have any and source code(In case of fast serialize input files) + sourceCode, validProto, InvalidFiles := segregateSourceAndProtos(dataRefs) + + // If any invalid files provide in input then through an error + if len(InvalidFiles) > 0 { + return fmt.Errorf("input package have some invalid files. try to run pyflyte package again %v", InvalidFiles) + } + + // In case of fast serialize input upload source code to destination bucket + var sourceCodeName string + if len(sourceCode) > 0 { + logger.Infof(ctx, "Fast Registration detected") + _, sourceCodeName = filepath.Split(sourceCode) + if err = uploadFastRegisterArtifact(ctx, sourceCode, sourceCodeName, rconfig.DefaultFilesConfig.Version); err != nil { + return fmt.Errorf("please check your Storage Config. It failed while uploading the source code. %v", err) + } + logger.Infof(ctx, "Source code successfully uploaded %v/%v ", rconfig.DefaultFilesConfig.SourceUploadPath, sourceCodeName) } - logger.Infof(ctx, "Parsing files... Total(%v)", len(dataRefs)) - fastFail := !rconfig.DefaultFilesConfig.ContinueOnError + var registerResults []Result - for i := 0; i < len(dataRefs) && !(fastFail && _err != nil); i++ { - registerResults, _err = registerFile(ctx, dataRefs[i], registerResults, cmdCtx) + fastFail := rconfig.DefaultFilesConfig.ContinueOnError + for i := 0; i < len(validProto) && !(fastFail && _err != nil); i++ { + registerResults, _err = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx) } + payload, _ := json.Marshal(registerResults) registerPrinter := printer.Printer{} _ = registerPrinter.JSONToTable(payload, projectColumns) diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index b1ead898a7..c79c1259d2 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -3,12 +3,21 @@ package register import ( "testing" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/storage" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" + "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) +const ( + s3Output = "s3://dummy/prefix" +) + func TestRegisterFromFiles(t *testing.T) { t.Run("Valid registration", func(t *testing.T) { setup() @@ -21,12 +30,107 @@ func TestRegisterFromFiles(t *testing.T) { err := registerFromFilesFunc(ctx, args, cmdCtx) assert.Nil(t, err) }) - t.Run("Invalid registration file", func(t *testing.T) { + t.Run("Valid fast registration", func(t *testing.T) { setup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/invalid.tar"} - err := registerFromFilesFunc(ctx, args, cmdCtx) + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + mockStorage, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = mockStorage + + args = []string{"testdata/flytesnacks-core.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + + err = registerFromFilesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Failed fast registration while uploading the codebase", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = true + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = s + args = []string{"testdata/flytesnacks-core.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err = Register(ctx, args, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Failed registeration because of invalid files", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = true + rconfig.DefaultFilesConfig.SourceUploadPath = "" + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + Client = s + assert.Nil(t, err) + args = []string{"testdata/invalid-fast.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err = registerFromFilesFunc(ctx, args, cmdCtx) assert.NotNil(t, err) }) + + t.Run("Valid registration of fast serialize", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = true + + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + Client = s + assert.Nil(t, err) + args = []string{"testdata/flytesnacks-core.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err = registerFromFilesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + }) + + t.Run("Registration with proto files ", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = false + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.SourceUploadPath = "" + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + Client = s + assert.Nil(t, err) + args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err = registerFromFilesFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + }) } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 8f3883a573..14dfa4be62 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -11,9 +11,14 @@ import ( "io/ioutil" "net/http" "os" + "path/filepath" "sort" "strings" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" + "github.com/google/go-github/github" "github.com/flyteorg/flytectl/cmd/config" @@ -31,10 +36,14 @@ import ( "google.golang.org/grpc/status" ) +// Variable define in serialized proto that needs to be replace in registration time const registrationProjectPattern = "{{ registration.project }}" const registrationDomainPattern = "{{ registration.domain }}" const registrationVersionPattern = "{{ registration.version }}" +// Additional variable define in fast serialized proto that needs to be replace in registration time +const registrationRemotePackagePattern = "{{ .remote_package_path }}" + type Result struct { Name string Status string @@ -47,6 +56,7 @@ type HTTPClient interface { } var FlyteSnacksRelease []FlyteSnack +var Client *storage.DataStore // FlyteSnack Defines flyte test manifest structure type FlyteSnack struct { @@ -200,6 +210,21 @@ func hydrateIdentifier(identifier *core.Identifier) { } } +func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { + if task.Template.GetContainer() != nil { + for k := range task.Template.GetContainer().Args { + if task.Template.GetContainer().Args[k] == "" || task.Template.GetContainer().Args[k] == registrationRemotePackagePattern { + remotePath, err := getRemoteStoragePath(context.Background(), Client, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCode, rconfig.DefaultFilesConfig.Version) + if err != nil { + return err + } + task.Template.GetContainer().Args[k] = string(remotePath) + } + } + } + return nil +} + func hydrateLaunchPlanSpec(lpSpec *admin.LaunchPlanSpec) { assumableIamRole := len(rconfig.DefaultFilesConfig.AssumableIamRole) > 0 k8ServiceAcct := len(rconfig.DefaultFilesConfig.K8ServiceAccount) > 0 @@ -217,7 +242,7 @@ func hydrateLaunchPlanSpec(lpSpec *admin.LaunchPlanSpec) { } } -func hydrateSpec(message proto.Message) error { +func hydrateSpec(message proto.Message, sourceCode string) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) @@ -242,8 +267,13 @@ func hydrateSpec(message proto.Message) error { case *admin.TaskSpec: taskSpec := message.(*admin.TaskSpec) hydrateIdentifier(taskSpec.Template.Id) + // In case of fast serialize input proto also have on additional variable to substitute i.e destination bucket for source code + if err := hydrateTaskSpec(taskSpec, sourceCode); err != nil { + return err + } + default: - return fmt.Errorf("Unknown type %T", v) + return fmt.Errorf("unknown type %T", v) } return nil } @@ -261,29 +291,30 @@ func DownloadFileFromHTTP(ctx context.Context, ref storage.DataReference) (io.Re } /* -Get file list from the args list. -If the archive flag is on then download the archives to temp directory and extract it. +Get serialize output file list from the args list. +If the archive flag is on then download the archives to temp directory and extract it. In case of fast register it will also return the compressed source code The o/p of this function would be sorted list of the file locations. */ -func getSortedFileList(ctx context.Context, args []string) ([]string, string, error) { +func getSerializeOutputFiles(ctx context.Context, args []string) ([]string, string, error) { if !rconfig.DefaultFilesConfig.Archive { /* * Sorting is required for non-archived case since its possible for the user to pass in a list of unordered * serialized protobuf files , but flyte expects them to be registered in topologically sorted order that it had * generated otherwise the registration can fail if the dependent files are not registered earlier. */ + sort.Strings(args) return args, "", nil } + tempDir, err := ioutil.TempDir("/tmp", "register") if err != nil { return nil, tempDir, err } - dataRefs := args var unarchivedFiles []string - for i := 0; i < len(dataRefs); i++ { - dataRefReaderCloser, err := getArchiveReaderCloser(ctx, dataRefs[i]) + for _, v := range args { + dataRefReaderCloser, err := getArchiveReaderCloser(ctx, v) if err != nil { return unarchivedFiles, tempDir, err } @@ -295,6 +326,7 @@ func getSortedFileList(ctx context.Context, args []string) ([]string, string, er return unarchivedFiles, tempDir, err } } + /* * Similarly in case of archived files, it possible to have an archive created in totally different order than the * listing order of the serialized files which is required by flyte. Hence we explicitly sort here after unarchiving it. @@ -338,10 +370,11 @@ func readAndCopyArchive(src io.Reader, tempDir string, unarchivedFiles []string) } } -func registerFile(ctx context.Context, fileName string, registerResults []Result, cmdCtx cmdCore.CommandContext) ([]Result, error) { +func registerFile(ctx context.Context, fileName, sourceCode string, registerResults []Result, cmdCtx cmdCore.CommandContext) ([]Result, error) { var registerResult Result var fileContents []byte var err error + if fileContents, err = ioutil.ReadFile(fileName); err != nil { registerResults = append(registerResults, Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)}) return registerResults, err @@ -352,12 +385,15 @@ func registerFile(ctx context.Context, fileName string, registerResults []Result registerResults = append(registerResults, registerResult) return registerResults, err } - if err := hydrateSpec(spec); err != nil { + + if err := hydrateSpec(spec, sourceCode); err != nil { registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} registerResults = append(registerResults, registerResult) return registerResults, err } + logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) + if err := register(ctx, spec, cmdCtx); err != nil { // If error is AlreadyExists then dont consider this to be an error but just a warning state if grpcError := status.Code(err); grpcError == codes.AlreadyExists { @@ -369,6 +405,7 @@ func registerFile(ctx context.Context, fileName string, registerResults []Result registerResults = append(registerResults, registerResult) return registerResults, err } + registerResult = Result{Name: fileName, Status: "Success", Info: "Successfully registered file"} logger.Debugf(ctx, "Successfully registered %v", fileName) registerResults = append(registerResults, registerResult) @@ -383,10 +420,12 @@ func getArchiveReaderCloser(ctx context.Context, ref string) (io.ReadCloser, err if err != nil { return nil, err } + var dataRefReaderCloser io.ReadCloser + if ext != "tar" && ext != "tgz" { return nil, errors.New("only .tar and .tgz extension archives are supported") } - var dataRefReaderCloser io.ReadCloser + if scheme == "http" || scheme == "https" { dataRefReaderCloser, err = DownloadFileFromHTTP(ctx, dataRef) } else { @@ -414,13 +453,16 @@ func getJSONSpec(message proto.Message) string { return jsonSpec } -func getFlyteTestManifest() ([]FlyteSnack, string, error) { +func getFlyteTestManifest(org, repository string) ([]FlyteSnack, string, error) { c := github.NewClient(nil) opt := &github.ListOptions{Page: 1, PerPage: 1} - releases, _, err := c.Repositories.ListReleases(context.Background(), githubOrg, githubRepository, opt) + releases, _, err := c.Repositories.ListReleases(context.Background(), org, repository, opt) if err != nil { return nil, "", err } + if len(releases) == 0 { + return nil, "", fmt.Errorf("Repository doesn't have any release") + } response, err := http.Get(fmt.Sprintf(flyteManifest, *releases[0].TagName)) if err != nil { return nil, "", err @@ -437,4 +479,89 @@ func getFlyteTestManifest() ([]FlyteSnack, string, error) { return nil, "", err } return FlyteSnacksRelease, *releases[0].TagName, nil + +} + +func getRemoteStoragePath(ctx context.Context, s *storage.DataStore, remoteLocation, file, identifier string) (storage.DataReference, error) { + remotePath, err := s.ConstructReference(ctx, storage.DataReference(remoteLocation), fmt.Sprintf("%v-%v", identifier, file)) + if err != nil { + return storage.DataReference(""), err + } + return remotePath, nil +} + +func uploadFastRegisterArtifact(ctx context.Context, file, sourceCodeName, version string) error { + dataStore, err := getStorageClient(ctx) + if err != nil { + return err + } + var dataRefReaderCloser io.ReadCloser + remotePath := storage.DataReference(rconfig.DefaultFilesConfig.SourceUploadPath) + if len(rconfig.DefaultFilesConfig.SourceUploadPath) == 0 { + remotePath, err = dataStore.ConstructReference(ctx, dataStore.GetBaseContainerFQN(ctx), "fast") + if err != nil { + return err + } + } + rconfig.DefaultFilesConfig.SourceUploadPath = string(remotePath) + fullRemotePath, err := getRemoteStoragePath(ctx, dataStore, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCodeName, version) + if err != nil { + return err + } + raw, err := json.Marshal(file) + if err != nil { + return err + } + dataRefReaderCloser, err = os.Open(file) + if err != nil { + return err + } + dataRefReaderCloser, err = gzip.NewReader(dataRefReaderCloser) + if err != nil { + return err + } + if err := dataStore.ComposedProtobufStore.WriteRaw(ctx, fullRemotePath, int64(len(raw)), storage.Options{}, dataRefReaderCloser); err != nil { + return err + } + return nil +} + +func getStorageClient(ctx context.Context) (*storage.DataStore, error) { + if Client != nil { + return Client, nil + } + testScope := promutils.NewTestScope() + // Set Keys + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + s, err := storage.NewDataStore(storage.GetConfig(), testScope.NewSubScope("flytectl")) + if err != nil { + logger.Errorf(ctx, "error while creating storage client %v", err) + return Client, err + } + Client = s + return Client, nil +} + +func isFastRegister(file string) bool { + _, f := filepath.Split(file) + // Pyflyte always archive source code with a name that start with fast and have an extension .tar.gz + if strings.HasPrefix(f, "fast") && strings.HasSuffix(f, sourceCodeExtension) { + return true + } + return false +} + +func segregateSourceAndProtos(dataRefs []string) (string, []string, []string) { + var validProto, InvalidFiles []string + var sourceCode string + for _, v := range dataRefs { + if isFastRegister(v) { + sourceCode = v + } else if strings.HasSuffix(v, ".pb") { + validProto = append(validProto, v) + } else { + InvalidFiles = append(InvalidFiles, v) + } + } + return sourceCode, validProto, InvalidFiles } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index b7d66ada8c..b4b11563a4 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -9,6 +9,13 @@ import ( "strings" "testing" + "github.com/flyteorg/flytestdlib/contextutils" + "github.com/flyteorg/flytestdlib/promutils" + "github.com/flyteorg/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/storage" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" @@ -50,24 +57,12 @@ func registerFilesSetup() { rconfig.DefaultFilesConfig.OutputLocationPrefix = "" } -func TestGetSortedFileList(t *testing.T) { - setup() - registerFilesSetup() - rconfig.DefaultFilesConfig.Archive = false - args = []string{"file2", "file1"} - fileList, tmpDir, err := getSortedFileList(ctx, args) - assert.Equal(t, "file1", fileList[0]) - assert.Equal(t, "file2", fileList[1]) - assert.Equal(t, tmpDir, "") - assert.Nil(t, err) -} - func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-parent-folder-register.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -84,7 +79,7 @@ func TestGetSortedArchivedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -101,7 +96,7 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-unordered-register.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -118,7 +113,7 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -131,7 +126,7 @@ func TestGetSortedArchivedTgzList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tgz"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -147,7 +142,7 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { setup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tgz"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -160,7 +155,7 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid-extension-register.zip"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -173,7 +168,7 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { setup() rconfig.DefaultFilesConfig.Archive = true args = []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -186,7 +181,7 @@ func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -204,7 +199,7 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} ctx = nil - fileList, tmpDir, err := getSortedFileList(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -220,7 +215,7 @@ func TestRegisterFile(t *testing.T) { mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) assert.Equal(t, 1, len(results)) assert.Nil(t, err) }) @@ -229,7 +224,7 @@ func TestRegisterFile(t *testing.T) { registerFilesSetup() args = []string{"testdata/non-existent.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error reading file due to open testdata/non-existent.pb: no such file or directory", results[0].Info) @@ -240,7 +235,7 @@ func TestRegisterFile(t *testing.T) { registerFilesSetup() args = []string{"testdata/valid-register.tar"} var registerResults []Result - results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error unmarshalling file due to failed unmarshalling file testdata/valid-register.tar", results[0].Info) @@ -253,7 +248,7 @@ func TestRegisterFile(t *testing.T) { status.Error(codes.AlreadyExists, "AlreadyExists")) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) assert.Equal(t, 1, len(results)) assert.Equal(t, "Success", results[0].Status) assert.Equal(t, "AlreadyExists", results[0].Info) @@ -266,7 +261,7 @@ func TestRegisterFile(t *testing.T) { status.Error(codes.InvalidArgument, "Invalid")) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error registering file due to rpc error: code = InvalidArgument desc = Invalid", results[0].Info) @@ -312,9 +307,100 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { } func TestFlyteManifest(t *testing.T) { - flytesnacks, tag, err := getFlyteTestManifest() + _, tag, err := getFlyteTestManifest(githubOrg, githubRepository) assert.Nil(t, err) assert.Contains(t, tag, "v") assert.NotEmpty(t, tag) - assert.Greater(t, len(flytesnacks), 1) +} + +func TestUploadFastRegisterArtifact(t *testing.T) { + t.Run("Successful upload", func(t *testing.T) { + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = s + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "flytesnacks-core.tgz", "") + assert.Nil(t, err) + }) + t.Run("Failed upload", func(t *testing.T) { + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = s + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "", "") + assert.Nil(t, err) + }) + t.Run("Failed upload", func(t *testing.T) { + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = s + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacksre.tgz", "", "") + assert.NotNil(t, err) + }) +} + +func TestGetStorageClient(t *testing.T) { + t.Run("Failed to create storage client", func(t *testing.T) { + Client = nil + s, err := getStorageClient(ctx) + assert.NotNil(t, err) + assert.Nil(t, s) + }) +} + +func TestGetFlyteTestManifest(t *testing.T) { + t.Run("Failed to get manifest with wrong name", func(t *testing.T) { + _, tag, err := getFlyteTestManifest("no////ne", "no////ne") + assert.NotNil(t, err) + assert.Equal(t, len(tag), 0) + }) + t.Run("Failed to get release", func(t *testing.T) { + _, tag, err := getFlyteTestManifest("flyteorg", "homebrew-tap") + assert.NotNil(t, err) + assert.Equal(t, len(tag), 0) + }) + t.Run("Failed to get manifest", func(t *testing.T) { + flyteManifest = "" + _, tag, err := getFlyteTestManifest("flyteorg", "flytesnacks") + assert.NotNil(t, err) + assert.Equal(t, len(tag), 0) + }) +} + +func TestRegister(t *testing.T) { + t.Run("Failed to register", func(t *testing.T) { + setup() + registerFilesSetup() + node := &admin.NodeExecution{} + err := register(ctx, node, cmdCtx) + assert.NotNil(t, err) + }) +} + +func TestHydrateNode(t *testing.T) { + t.Run("Failed hydrate node", func(t *testing.T) { + setup() + registerFilesSetup() + node := &core.Node{} + err := hydrateNode(node) + assert.NotNil(t, err) + }) + + t.Run("hydrateSpec with wrong type", func(t *testing.T) { + setup() + registerFilesSetup() + task := &admin.Task{} + err := hydrateSpec(task, "") + assert.NotNil(t, err) + }) } diff --git a/flytectl/cmd/register/testdata/flyte-package.tgz b/flytectl/cmd/register/testdata/flyte-package.tgz new file mode 100644 index 0000000000000000000000000000000000000000..8ae02691bee9aed1e65bfb1cce060e6b15db8037 GIT binary patch literal 162434 zcmV(+K;6F|iwFq1VcB2;|7L7?bY(4YVPk7yXJsyQXLT<8SouJvlhIdHzfJcReR34=)#p(hc+vAZI6t zk>lg=|6eci|0l#HKxqT9v@sRs8zV>4f1B@-&CKloJpE_;-@^WL z|7-it`Ir6whuDAqf6M-JadYtgW&Zy&5Qm|SyOF&;o2#9pm6^4js}q~4n~{yZwJDpE zk-MRVskOD8At#&t`~OkZ;N#)>_v}9>7a!Mut^ZtHoScvLpW`2?|NlwtKU(<{G&dAD zTw+g8N=H+3ODBk<5yaBYmd)PL?t`f@gworanCM@&nb_GFS=v4}QB(bg(!=zxzU*S^ z==At}?2e0W?+&rBvt@-CIav`?;1WGf1e1g9@yBdp>SAhbXHSguHx4F{IEeZg8VDB~ z?I{|(9S1H78axUD?qiAT5CM(t&n$#ExJ`|XjX90YI5{|tOx~La81wLR^O(Fh65!)C z;Wjfdeb3LuVPwQl{LJ3n%-S7d%4%lh1YtFGGc|UGm=Y7QvKpC~SpJ@)ku|Hy?+IJJ zcmDlK{Cf>-j;1zt5K}{YBV#Kg^WRU1#qZrgV`Vilef*4xr6V!cZ@%AehL3N*8{t`5 ziLw4Z+TRC4VP&CI#5j+Qf2&dbQ}M_{ z$ja(y?^Ox4-ea;hOn7?{Lk_KJp9~` zX!BqAe-2(Aj=%i>KY}PCP*A=b&AfvL{(B_>w6BjUpuPZ;RSTpw{U9LEMdq35JtVfJ z8b?(X876JcBg~~@Ns043g+|IO74zlmY-ux@LTTKQtkJBK)`Y{UDc7S1=#uyCc=M%C zM%|!be$CX(<&pPP$=(5@bS<07^Dk?8OdR-ACq#^MBfCK=O!V@$|@k;w0Ay{GJW?k z{F?|NBxtxsn#s=#lO2G5lFzObX%cB|z)zGzV>C@C3Eq`($Q67iLKa(o&~vVNfBO*Y z%G;txw$_{`K!n8I1+H2%{`a|Dbbb-&*dbfjn|<T^&o&y#0 z-ZB^1Q*y33fVIfB0mXp)H$V(_;)e1#pr8dJQoKU$=njTRkc98C08`2UZ+Les z5yulG6gOKWfJU7`q2&pg_w3 z>{Hw#;H|xNUWEu@np?dn;USBP9D8C2IDTVA;pEiF%}uCso}-upgvCEL62v)j5_7+~ zu`;;4@>Ti#y!;0TBU?s~9UF^hctiwpz|Mhkz8j|qa8kj(uvQ(W43x7s(6m; zfm~fVzH4~M?RdW$CR;RcoFhmH=)%%kFaIgGaBQNk zVbtOk7&4czVgx?9;}3e}bqV#QdJV+f0!w>f-zUc)l&l9}Ob#H^Vlf|XWk=sH--51C zkv<&+Bp)dHfVW40*cq7o=J|8qold}zOaGa^=m8LX4Y=ON1hm=#?by-2x2=T&d9-I`01e!`D52XMpCCE6&upbpqVfR)12SNd-;*MIuGTikTvS7BV~ zX(=~%d4yNB>5{3|*20xD)6<63nK+VS9xftZdXHub3bM|E>Q>Fy*JbVO1gw72g+6e} z3#TagUbs5nctj0v^pZ}&JTh2Z503iND;Os(2f}mOBc|JXI`o`t5UlF^6kRKfS`vjh zIiq%doL;Eia#i&$%#E$|tMe^YM;OfW-@jjN3awmw*gEal$^%;Nwbho=P~Sj;hbp$E zp4NF$n)6K#=5<($v<|M_>U%pAka&rzOlod5-hRgvZ2mA&xLJS2R1N8tz=B=$>Ay^x zapM820I7srfWCV$bH*ccV*cIT=`%i7L$0_)a>nvue)dH7e9DB02_q@h`6L%U_jK75)yR&iqVFjHZ-zW9 zE~d^*1Z7*%Iw|E?;dnZ3z^y@Ql<-XpOQ(scuko?{15X}(dqQe zbgyl0;$MsrUG?v;9DOH*l{a3k{IL})NsxADd%Z7N~ zMX#|YXbV`%c9liI$>AYsD^qIsYQyn~U32t?Cx^zbcV zJSYHK2!{4-Tsf-%buIn7L!HA8&6XUP$>P2qoXx8%s&w;*Caao;c#ru4v&9c*$W2~c2|8tx6d z8cDYM>eL4)`JrZ)b@e#!Vqk^2+bfou3)4Z?uAe^)#hz)pW`Omdga*q&0s{kHLWJbs ztxDkHfh@6cd>Jv25)^VI5s8(uabaHiM!2zocV%VY%MQs|DDpg(TnvmvEXkt}4Md>d z(cFCHjl~gtpK>ugTUTCtM~6W9=xjp0*qKh9w@>ta>&qMTwFSnDavH)FgvRbw>(B*6$*-oNdL;)$W$)hoQK%d+sN}zq=kR;V zxr4!kgRIK%v-R{zPurF2ouWA#8TX7t&slzXcz}gca_15K4A{Cbl;DzFSE39EfNt^U-&&1AD|X@(4t#_5+r@r zns0mu?9Fb2MPR_{H5MGwuM>)D0C@voJOENGQsPmyuun`8A$LhT13euD_)_ZbJpBU*uBIxz5=-E^v$l*UVbDEfVj1~q3G1&f5sH?G zEpO?DYKu~NrzR(bWCT$QJS=+}xLgaIU2$zSQp{|&n*>pxl6#g>_?BX6^;Frn93rdO z2#AH`PY=T?KXdioAeyg+>(33k$}AM$=TVa9ff>TRKQB!IA3VFe54zLuD3JKKTi5ie zHAPHX3BT|*s@>qYIW5Nx8gGfQOg;S6h5I2mNVbS75cCEXq5`JvZ~3f?Q&T|{rTZwT zw*db&_+ucA5f!ckxehuw=2s$_HYNTZ1d_kzMu0WAPoe5oApMWDZhssjAaVJfZJKIx3U=EUW#wPo2A z#_1W7PDi3o`D*(0=tqvlAC^9CgJ*%ev2(!n3;@AL`*z?;kdo`eyoq+Aku?FzFw71#0UQq~f%r_5!##F#$a$NMYi}{^u0?z`Oga zH7F%cMd0IlaDlqs>d^zfwz+!-EWGp%Qz69&KT+^61IJ zjQPE5mdWC_G&5J(rej;a_mz!GZFsj=v~ZWZlRX)GA;+8MJtkdg8iy~&^1?JcW-}?H zm%E^OZ^}!)40U5d>v#vps;q|v2KOfZkkX$Bd4~e+mg_V6T z!F!UWd}9PYM?1zOxS`mtXGFteZ@6n^`{_f!iU;Rn&+YmD3VKf(Hm?&NSd2N;mgZfQ zwl&-}Cxi59uF*Ur)YcUZN4dzFf|25oBeV5A7SR4pu92&H62m>zIja0(!b{f`v^1?K z5bJuGxBzqh8ChenAV_^7*CD>Iy{D@hFt7e$&w1`D{XOyxmPU!GD2jKhRdN@>`R$h< z@|PQx%O1*O$^J8|HC^v9IkWAQE!-E{o(KyNL%?&%(^EPw_YIN(B{R#r1y=@lAuZFu-4TbdX80p9&OEX0T+;K;0#dwpi%N~$Ho4FF z5X$>V7CUV!OjE!F6njggT-~o|t2!ocJhmK*{mxGh6XSRyFq+8~lUkZ&GzrpL>WQj2 z62{VHb11xKzr?8jnwy=kxOef=3o@LzQ{%sz?yy&XUW3_2qNQl#wQh?IL+ zIv<0svabQZE;9clKk`q&fsf%fEHn5qE`y^cf7hl2FWtE&FYOCIDnS>E_?Aw?{U_dI zXrkonQv%Sm1%jgiiAU8S2I$#~%`MG1ooNi7BM|-gzx@*wfvWsg=?lydkHEr=*K0N)tzV9w-U-KhcGUnEK zP&V8{lf;?Ghm)P+s3g8;qQy!diNAj#?X6z+Ec<)%R&aTJ&taffPx~AVjD09kUyI)JydyG`)goeNLsVMn>{01fP@gau{&maJtZjKs(dfH_{rhQ z3HCVub8kF>txrphiS;~iYfi5w`NrcoQ+zyvdjsb6$Y%zBDsr6+AkWlrVL5)lOWKHL z`G&kW=OS{dK@N_CIMwyd2g#NDw)b(F;|o90A>o9e+lczxl&17ieK;OV^+uJ7h&jR7 z@7n8}(F}^YJ6V|XY0P$^mz$0wxUr7q%HRi!2|Y9woo)y1UJ;c?o%ZTHX>^RMK^uB@ zt!Rk$(SUOBE~kp=K*Q`C`6p;o*R{bY5m>|GfR8Vu{`}SN5EW3|1*YyPJ_aK96u?x3 zAMybv7}n<=K;pO6V*r3>FnV7B2tw9Q4K*;u+?I94K*aET zerQVX&h|i8w5jK)q@J?JtgU0pnrzQEN{A_uDv`jZ?95tb1Jt1RdOX6ggVO`Ee~W`< ze73rF1W}dm?YQ#QxM z4Vn|}!Jv8|<67P18~3jirn22i@=l#ZB~$1LkmfzbT=J!1?xml8gY8sc0IxH4TOj zm>(7j`cE$RGV5TkTKJZ}vn7mcGHty{*Zh2FK@kiISLnO^a=5<9r+v<3IdX@e=9Dg{ zQWcrgD2gN&-g5bif|X3TlYYc$0tzxrO}*OeOp}f>cj8+)_%VVl`v;lj0kj}moC-vd zXr;i{2m%M^6aacD0ROm88_-Vx6c^|~#1(?^lidKr2aPwm4-_yg7?$`HG(`y5(g?u$ zC3Gj=6R+>d{YzKNZTet8*7x8UPMVc9C)FuJd0yDf^P>YX8~u$>PMJ&Jh0D>33fnBU z$b7OHKS4gdqc$r|W84YX4C5!)b|{&5;-tIzy0jamSXF|RTre46a1fVKr5@tK7-)G> zn|`zj^|&*sX=Z@w{o36P@yTYNL~xOvB3{=l2)){J>mjM$>nl^&{(5TJ!lBrx@RrrM zxesAu8PCe@QzrQe`lXe7Xz9dZY%z0B`;o`h59PDCHw*!60kWLG^HBik0cZm7LZ47k zqf%L@0r_b#ytYRKoW1rppjCC9=^OAGc-)0dg{}ZZ+!Te}j||wc@_E=2T=K{}CZtgc zW|Gn%WR3#p-94BzRPG9zObzf4ZUQOHUrMqxwBqGfzDMxqNnb21B96G%y5_$~)+S?6 zQhKGLByZa#&EG5>`-1FSqrA7?`|@S+N?i2`zQ91iDB+X}{r5Ji1DlE5W_wXNi6M+L zo&iN8Uu39|2Ukn@Nvp$!lO2DJo`-%Ze97D9A>wFuVoxr%UdmN|-m=~^W#zm${2m>m zq8;(uPqo&<)_M?m0Q1`&fc+EjQu@(Xtw4Ez-!AGT^AzkWl>|*myvM?2#AEguwZI^L zlC$gpLRq2uC_zW#gAF1A$%hb1cg0*lDbKr4z@#`A(6>84C1Aat+F{3#k5ftn?>f za=P4m@Z*_);>1besN=V3g)o2MF!Cfv)^jHN({nQ_QHLSnVdq>|z_3E-VGe*R@U^Ff_bYSiNn5;?~;ULbZ7!NtMsMj*zKiCxrL~93|3yE|7w~Z{7JbB&j%vDNSbj zmqu3;me5 ztwGQ8J>N{=kg$M4S;GnMtpPiTs880?m0VmQD-giOaB(O z!4%ca{r2hb#1@I(oJgui)r|D!{me2}3~Nv(SnOT$TF+RDH9CbVd&C0M-Tg`96#1Mw zP2V;36taM8(xBq`;&H{pEWOOWyU#;z$T_5A>spc5{YR0;a6=R|-?ebs0kfi?0wl5P z;#qYwZ$l#WU{MT&S-5M|r1`sb+>*QwO#Ypw2vlXjelvKFeaV*5X;Voa%VmTI$!b)n zgZXOzMZ^BWXx|G121_DcLkmmiSarzs>vU4_0w0&<&fB4esUM9?U7c3q%EdY1kbrxG zdZ@?gddesJu!;Bw#m&OVe!i&LQO~EN!V3_BmjgD&tGr&+gQ6Oxx-HWe;c@~#uN>o5 zKS*g+5a4yVTToKTF|Ky50mlhLLZutSAX(E zc+Q`^j+Sn}(VCotrmA6MAfby3xaTO0ZrqR?W~#oF<& z$c@?Ya3Q^L2zhh~i{eX2W0NhT5%~8F+_IQaWxDLu+PgN&R57l%6?#3+)g+Ud&*0|_ ze+7Kg*V}4J|NcenGC}KNIS@0jgssNLoEwJXIhj^K+z~N%J#$T+sk8Pf)A77!(ETBh zAv32Xa>tR`^c7yKwH@AK3WtwFCZ;{*{%BfhbU!9OOBjvadXS2JP1*ux3 zgZ-_qr-zN^aq{kco{k!s%NGnD&wti@mP0gew<@oc;N)1}oi;V!LYT2*Q(rJ_=3Dly zEL?P+(MQTiJDQtJVxuCkzbWg1(F)RoRWLn#k`6Op`&^RSn09>;HYqzen(ef@mfzai zDK&BUe0d^5=5#-OqoOl7KS=H5m?RM2I864Y7sbVq+oAFfyJW;zgM_Wt!a?eY?oMwZ z!H-jld+_RmoRghDR?6p*xv~bGPVPE}brlPkEqci!XR`x!6m+W2JqO@JxtoLWwdm<;C_NR zPE1CcF#nFEh{bMNW3d85{+Eh&fyT-53j+&*!K*JsaxM{@By~Yi{6iPD8tgdBjpG31 zE@IBr(?v@&mFH#EVVnvfYbJDjO0SvXfqZkD4EDxZoN8M2DcM`uZ@K!P{XJF>51=vJw9VVpd@V`(H;gx9L z?$C-Tg&cFBz*8#a#r1%z9{`m}0EC0!Ukl`aeSlgR#xG*1S{!_pn4x#V*iEZ7MNe-@ zifG8UmAY~x{t_FERmBhD@+NH-3*D_&N~Eq`k);mu?}XQG^K{=qS3(J5oUwNiS!by53Flw?g9U zLsgunyXF4bN7~7jKb1}}Yh1_Ec8E{hX#r3a0pKja?)?KhHBN**FKY0w3yS*G+&JWdIa90=xN zaZdv9SIjL_oB|*5c7d-yfrL~;$esqC+decy$jdP6(tHDcAJ;9FeKTC*00{^Rjw+jeDv~r+yI4eQH?Qa?5u9xZUA` zJlB0~pu~aGomZfj(x$hh(TIYSscM?<2`f(mHt~n=C8H!pTKE+Un={I?gm+BZOEWfW zLwUNhgm!kEy-wWM9^G>H_KKJpEiG$&zUO%oeN8;`?f!p%Sy!h5=(cnyK4pR zw>23}#pU2xPu4groiB@J{UQ!l;*}*eZUIBfYsTxkyCpr!3oII|6Zc|+aScS)akz9- zX77h(&Rm}sQt%L0$ai!fiD;XfxHZ(X_GDG67JKC@iKT9RI5?M*O5gqQbVweV>+j`ZBk{=KRMg zf=_`%AIS_iy}uibXA7?9n`=-S5^OloXn*8cEKl_4blEHpXusKE{aV>9D7{5LilZ%N zpyKJ|_&o9wZMW$S=W5ss=67OjE%#K0)5i~mQ3P}5>;_`fE(aG+7qd>oyGMajsoTDdfJs0$q;cD-WjBl;fkp#kG0Rc+^cM&9^anOCB+-7BeNF3Oz! zW)x)03Qq~VXrE6~;^2~Ptj~H_o1CxLgxKKkGrN=w*MGe4t8^<@^vmVjdV%qpt>504 z8S9gp*PD8Q>|7zdMxXT_iHl<&>amAWxu-+x+r&wL3y{e(F z$eBy(M1pLpne};oqO-7vfUnPh)oWkDL>GmvI;I%pbUhBG3C&N1or7^7zYnKiH~Nk@ z5sAb{*F=8Wu@PC>xpJ&|^7UYbRKCrfa_Rb2ME6&uA+ANy19H@n^0G7(mbedK>&QAo zUmP1E>zO5hXOi}ov0ikwK59tm^)T91(9`pdv=1*w(Nn5GR|*W9o8 zKa}np%$;df;7ZCTTd zWR|#~H^@L)%tTKaH@6yDj>PXBhRR!~MfyGp8a8D@tMqEoo>G+kdaJdl!0a*A8 zS@-J~r$xd}Z(kZ7I+yx1G)P)~%0bRGAV}9wvpS@AjwU|%G@rH>>!HHplzrqZ_F&%J zEGd(*r~g9oPK^>rVyu|&l1g)S)pLv8w&juqorI5=iS3=s!aJjkQt!#e1kb`9%miL; z$X$@&6odD=juzxzu&>|Z4$B63_;g9}wCjf(H4a@4I!L+kl46H|7(jjv#QeTz1cw19 zCfFOl#orAr;AI;g11+dKYs4s7Iar)JwkvN16%h>w>lY*F0XYUhK)lA&#)3onP!w9NaqIX9xIjMNb!@|<-+m4h=SLI1xohoY;iEb)U#r7WU8_O=EdPIsJT+fJT=GWtj&Pq zTG|Wktv5Y6d}yqDf3}u5i@{I_ewK4;cfzM`^GdjhyXMmOW*|mX__>Feq#)O4$&%He zFzRrM-IqB}9n8_t#@%fR#l{9-()Ei)94C3xk)3cX$1&IyZYZ`wY&SajMrvz4KW2hMJ-9_m)XkQlzZpT$^U9?T038RVbPVtg3?&{l& zn_hP|c{NojQ)}LpITOvZxY{W@1bt`?b-#x-tx`AQol+s&#ay=v=<4hYzle7=$J5>% zoAaa1zDFQbv@sIy@0*k4<`%}&XQgO$6I!)?N4ifA&WSh2S1xNV6E4HA59yXtT~a%L zwfy<5&ymjRC}QL=ulAg(VwcJ74iO!eqm#P{KOTGUPi_j6sXmdO!dH5U!j*009GVK+ z5~bhhVtzOi*vW_OHa4T?oLL_!D{@o`sU|0as3#tr$$j@1W z{yrUw4JfI!_+ynEET1z}+82=%#N{Xbg0d?{x_zYA1ef2SZG#VEZn3g%!7pyH05$+Q1_4!z ziwGI-^+jgz?eOob!+*M|$)5xsx&Z9JGJucuhQbJrDMgujC6os(TB$9TkQNuwpOzQ{ zM}j&`nbI#0+8+S;0SL!XJs>Icww3V|dW(6nrv%s3JTw9SWZ|n>P<&^gM!`Dqcz^pQ zrKlAzF*PuE^5+j;&}0BE?qnM_Jf;eyv_=B~uYr(%GLJ@}1;FZ2{(rvv1;<2=%*E&i z9|q59f&JW!D@=)wNX1CCM~ON>+!tB`AW$uP0>~ZGJ#AE33RR1LS&{hkjiK9c!fAw;t2j}9zCCi3T!Uv&@_FxC~X2qd` z-C#@L6DT4m9k?=F29(o?*11-P;MBk5ZRzdR59PO(a5VOjUrO|$MzN>?uOEQ&G3ZBW z_zDzl6>PpDVC)rO8EDuI;QW0jLIA2{rQkpJL&NXhSgHx7`{i?>V3W(eh$k`;!QVSV1%}|}hT7Y)3Bkc7GN`o^O zdsJF?d%?$ib{1UvX~P2X_g?`4tWjWT5}@m#e2i-{VI8f?FnZs=T`2y}ZpBmb0LDV6 z;8>*)6gTP=R0POJWnX)aHrf$!>L5w~LO0?t@wTyTC~%u8fO7FWul052Hd9Ku@PPK~ zsd22$LGYL0BdzB?F?QE14rtYU@3--1JrL(~xD%wtm-Bh=aD(wF)`+H~rXs4!(I~Fg z8tWchqz;s$zrA2TouM`rvGehQ+`6l8jG#{(aT}04>|lc0b3@qvnE6M0&JiX~y;gyu zD}_z24`(*J0}g-{UxP`X{+CO7>UjC>>)*HIT;xCEjgqB*a?4{&=c`h}r%1qCNaMEs zp(`C*YrvSui_=`=!N;;JZ8CCrIQoDa$1)3Y`AaYzo!pq^Yqr zFa6U$ST@U)&xPzy!w_NEP9}q%hPp>W`evxIm0{9~EKIwoUOOfWb`O^}XnXgK9o@3Q z&pYozDh<}jp+DXO8$!#C-X|^Xb{ZEM9%q;#iis8I|I(M{Pe$ zC@G{oh_>O<^g~}}`-yYEB=_T{QA@Tr5{q6)^@E<-hAhJm$U%u?}7=x zkPAW^a_<@ltX2ZmGkWe&T3G;dm>L>cXGjz*QZ?#_g(ttoxP#s@v;8x zoiBZ1qRkq*#?FuyReuc!#Pg%(XT|=wQbxYM*=fga^N z>a6qiNZg@n?$75|cCsO zBzbM*(rPo`7er`;^F=63_&e2y&66g(@>7ls^7ohy^rA_zL+KB6kq)|UEjPTTcbNR5 z@}%M?&sVU}d{T{aFt2#WqIjd5-SToS_x)s~^hJhd*=xMzmZNJ%i0{}h9WsQMdqt~) zFx}wVN2MI^@DEACCKQslYD=6YMoh(y8?I|sd-UW!Ypt!+jVut?tzR5n?QHY#w z%|Wr-soYg?za{fCRuIK!t173cY%kS0J!u#uYEhqniCtm%^}LM`P&6JcyXp!r&?#M3 zdrcgxXVNfiY4IGwGi-R$aWckFV9LiS^V~Rfj@`Oy_nFd^ck6c+pSMs4NlO>06q%aR zi`&SBRo7ws2ALCbk*NjVB#98~vbbnIo;>|owaOxD+9g|~METd9*k85OFa1}2ItSsS z!eh%fI+|Z4U5933bWM;bIO{pGbr;GZ8V+HO#GKQnp&V-F$#_gnX;C1#2|kOdXpPcV zcivii-s3SD>OC^=`9y_?7anK-f;%C><+Fu*qc@M7sNPP!SA8hAU1i&zg^kU;g0|-E z4hD?mD{~i^%YU8ZF6E8i`Rc$z6?n0VM2lYHUb@m8dp?)uvT_!J5CIx)eQZ zy#0HmbCGTof; zH25ihy=^*(TQ!bK4lu0~TE#twR6pD58*YgmOrQD2a?;fv&l#gTcj;ZklxY8n;@!1z z83s~w%bMp^w85!=)`@RYjPNdUd6%K$C+LrtYlaEl8%VCk$y*G_GB@+1Uy;dNk|#aa z6B=3FgA$>$jlXED)K}YMOv2+kpOA;A^gU%WpXlbg@Jm(aCo5tbZsFptZOLuDS_nI* zX^|v~W!-hm7D?cLFe_zgK^^8#tP<76H0i-ORs2|YI@7u~u$V;unryl+R-;B`v$L~e z*+%zB&qdUS=jhPCvD^cBA))h%O}$W1gxPW^^0vYGG^*K{J$+L)wRP!Ja}Vo%?o7Cx zm^tK`ot;43!;gIC!I~JNnZmSAg{D-|ENw3SfLCw&)@KJcoks4{rFM~RkXc6+)?716 zxVf72=J8Ebck;Ab^kv$Cg6OB{Gz8;aHkt04wp}k1RBWW~N)=|!`pZHuK1F*tSTwO5 zT8fFGPT9IHK-x!@=!uS=P{GQ=m7UhQ69?bU-lMs3-#ysARK#;CPvDY~dip>&&t%4J zB9vG?bf{and9FcCC)$1P&s}_0D|QhYGc`7t`|aC+;*d*#Ox^DGyc1;KWoWki`C!sC zFS}7^&Y?p{z|r_X6PPZq)Kud;X5&$b5g2Ob5D=feB$fa5IMD@P8^;`wmZ=vuQ*)WO= zfB{e`1u~bR*ou@mz1V@bfMqvu_$>8|{Rgmp3;Z1bpekcao&jI!0hRk)6c8=89Q{Yo z=uZ!TmN;GZ$q59_4}+$>jU$6I76oNYqJ(DQNF}JN^$>VswBB%61`w$D!c_yVOwlR^ zdlo%mYiUVll*`f_XTk%iKdlkxfp|lGjcA+R?CsT7seIxgK;g5+@LT429ZjII& z+gkD+f7oDrmKOpO{46bKUx|LH*J)C-~cU1P7KNG|9T~<*u1F_&+ z?UrLGK@!WY;=gG9TRZp=g|YXgvHjl>_;VmO(&KQ3iN=Sf{xm?m!`_#}j-oWfMaHI8 zqPE0E#>w*zz(CYqq9l}hz{WPlrSZLUel1$Hvgu}XkTf=U zx}NxX5R&~j8ts&Hv)U}m(6#Sz80gG`mmbzG{c;owuKncB1L+cRtpp|VxWz34yqehz zeVfkWOG-mGy~&ehS>b~UJM7-F6y!RV&arKU%oO8fBElSQAtZTK6JSdf$(>Fu#msizSQ}Bi8zHrz$P&O%9*FJ5i}urO-69^-#g&ttP=$%Yoh^0i{8> zVZEDQIym#7usODdm{`A?B*_V}B-C@Fyg3HUzk<=_{xYRH&L7@0FgQqOckb@KMh!DF zz$rTTK!;#1sps{0goB9jmWBQv^Lz~?`axEM`h!L6-afW zVCfmm;i?A1Qy-uALxmU(!F3S|{TH%d0ufzBF&bM^oi#0Gs@0C1GiFhoomRar`-^Wg z`h-gjYnSVt`@hwswheuJa&u*l!9A$BZZNYCu7e22lpmNz2UT}7B2CUg_R8Jxr)>l? zXuLQ*r+%Qrp|jLMrxc@l~;bx@Ei;hL%$qWaMpG<4YHjVU1Ju@cK;Ly^)NYUK1Gg4Ib|hx4K}) z&pP~OT=pk+((Hp|yy~iPUh-&)3ZtXb-?pbGV)1atr-bc9Mqjn4lFvF^XicxCedc*f_SWlSRg$O$(e@+Pnu*sGi+1w*?vxi9=$Ltk>!jfmqsy7 zqSDSQ8!^rW>hol{bav9BuQ$+N9N0b+&ppyU60= zbdEhtQ_~~!$|?eLPh0HlCF^I7#-*OJey3JkLnZbl>?W^Xc^!|uCb6X^t<7|QH4V)W zOz(!f!R*wKj5o#aBV9l1$MM)XtomM_7S&0mXB3k+d)S9eRSB3Y#v z%5%VuwuKeCL^`_8X!!cQQcH?ImSg*7>{zjlw=*$KQg6%t$~R%5tNoPAHF(5UQA>03 z9ePH$uLo62eO3F^?;J;fnMzEy?k6_SXU>&bNuCkM33@eIN8Hd{i5;DVJX74ZGY_Y@ zvAFBfLrEJnM%SGDz%=PcrzXzrCwhIdvg%>0P~!LN?f&U$DxRj~CfOH6hC#H2xvi7c zP$s^^F9pjrU$x2#zG(&QMEk!S}>uxJ_%%H&c& z+f2^v-&m}%AKv!*7V4Z4%sRuMUN?U~*(*?Za?m8RJVI=qulGf?Lq%DDzZMdCK)=h{ z#rlI5U-}}H@IY(cLu4SV&Z23b#r6v!@29HC*Yh+Prd@XGUNTBHpDpqz`oSI1YZZ>p zDX;e5$U2^SvW@1<17NvTAYyeC^v%gc* z5J99i$4RF6IgKy!&Am3t?F(O*bdgks9v;puWG4N%1ammbcHujNbf+T<6FOa{yVvlk zfVbyWCssM z$`qQ5yaHygNqX5FT5K7HPQ&&FoHiVbsgW}wc>`rthMtqLv(1|g24~y&>J)ygG3`T~ zA!}-Lj*=5;-$ILiO!R*y*kEzDJJ5gM^!oBm^}<6;Uc`s+;?YnS)K^HwZO4~bA!1QS zO;;~z)`s#g6lnu86RxXT6F8%llHTBskC)ZVYgDY{?AydLKL{IYeE5KMXYo=*@O(w9 zXd`z^Y8N61~lF!motAyT-&Yk%r;oLBs2Ijm|fBV^rI-^a%Q_T|Tdm-aGr< zeMn#-%WcCrY@6^iKo>Hbio87{ndE5BA}Mh_B{Yncne0xn!dDcH)6OENFPRH-PQqew z0FRVN4({;!RM}h#+bqmIe`8fF8zfMUItXGjLbNS4Xw^9?n0xp0D+xTLp@1i1rrRy4 z*?pim6BJ`MKNJcDTW#z{>_IAA0;6S+WR5mK?joDDKv`}}&y8y$gISLwGr7OqFBm%6+LTZ7MFkQ?bLt^76 z^1{`{7cW`ud&;|Y!1u;habI7NJPy-#=xpgmFSES(Dlv2Ru0mP2?3IUj748gglA!a> zzv0zeEbHrfhkTy*`X0H3n=5!XWmZ`|YHKW!%B|n7lVxbaNf}bhcqh4cc&zJ)!gl=S zF~y~=INAd46u&F=rsKl+OB^|N`!5uJU{y;$E`7Ug^S7SUAK-sXrt&Im01(XQ-N2t5@Ripdp@)OgU<5D^3ul{mzOP;y#wi zeBHbCrFM*Jo19Ogt(KnM;azdHWt)AxRc4*lTYsg~b|_kQh>OU>T;T8XLFHqX*74;t z7KSI4W~lSbbj>{N$H;6+WWHrMleO3?xOlQRS zH}tM&e6qXXnX=6DOiV{$W$t)aklpTqnCe0!e^`7P+l^RcuAuxyq+3=Vhq1hYyfzlq*ql+e`7*l{j?(c0R*uB{z1@pW$YeRzChI%%B z36Z_aR}T34@9&`uBz{VAGA|xHg}?kO};Im6i2qgd%Ch27k0Lpq}rZYQ8aiF zI~aMGtFCrn4Oe;TuC!+|$F>mWU*MRio8|>Tk~P(B+~m$=W`5^kgMuDpUWskP6w!rOph9&W1%`nFpf^u~k3ViotY9zcOdz0aIlpbe?%+A>TwnvEOgwD1^V`}PDwf;~qjkGQ0#>_ho27EV zPj$(q8uIHK!DHvRW8d?tCM`cY;Jv^GeC{IZ8O0#y!i_vz~ z(Kv&TOP>(d$Oh_R>en4h^Rj*&HOlh8y*g)+TXf=+J69vULqEhVQtd0p0T*KLCY-!M zIMft$cHrh>c40*`O97qGr^UsYtJgK1IP$^gxvW~t{mZp46AP#x?5*)FZ>_})K2+~B zZQ<$vr24^>)?Bu=6%(t+?|PIahokLLkam3-lo{~in!XFC-YK@x$P)9#`B6STa_it0wwDUT+C>JmOwY zPGxb6u}EF#CdpLyJJDlh=_l9qL5@+2j@}OU|43ZAHMoD_9AlwneaE_1hQB*w9(7V< z>>yrhZ1J{;yn9bR_$Mz@KeBw+p%sr+g({Z}D0$uI@jOV&$57LnYy||iY+w#ONnS7z zRuEPtJ7ZTH&vubwlZC7khATB69J-fss;yH)KT`IXul0@U`%z{w4_e70mQgm+z1$xx zcexMAnx6P5JGepk|JZxWpgOv)TeNW}xCD21cXuafaCdiiC%Ain;4Z;ExCeI&5Zv9) zexCQMI;YOBTXn1Mk6SN)cJI}_=9qKLu~*O4J*$9Tj>{;Au@mMlPk`n$wfMUB*T||m z!>C!uCznBHYVh3+!lQ=cul4PMV&63&Xa~ z-TJ1CBP&9|8fBz<@kA1L83PgCvtg6aV;oP^Fp67Cw^oxhi3G0a547&(lSTD*_|xKV zp7=BiLYqw-t{)YaC%ZaV&=?yfLI%}mb>F8P9s8!GPt#A3)Rf9^MivgTQGh0v{h{57 zGYQJ_NzWo-Ekiuvz05M^JDAItiw^kO#Q86e10+&H1q1ZeHK@H-m(MFVH^uL})ykPj zpLoK?AgjLqxFZI4rOQ+7(YUJ9-%S6A)(il=?yM(5r2`~U_-nn|Fd3}TU~-W#?y0`5 zzEMVw!g7l^qr`=OWA26vzHd)lR_c_J4x4f8J3@>jZF>@SeV`;xUQure!|(T#pWU^P z7H#}#{2+Prqmpi@0ew3#ud=1`-L*E1_o22G4nsi#$zA3Ig(^wsUhcyB_OWYmqe}&@ zv;R@>i~HGMI381Vw5RMz&#OyZG@IUMyf#|e%XO^|#TV9_w+9}_Q`84xjnKRl7vT$4 zf|nST-s;vK44^@3dlPQ&V(RQ~{;QNa&aAV5eu1SZuGS+($7SUa>HGVIY#nb$`k_|> zqGS1T=R95(Ro$INkczed!HK4XAommDry7J8q&~kz_ftYLNQ{vl56RAC&Ao$CzTFRE zhVZT0wbyEwoM(HOHZLQ`qLi5ROZA-wt$A0|$eC;JY?Xhv@(w}zpKE$Bx9*dKbmtDiNZ`e zPe?qi{YInN5?%g{IAz^?^B#cYV7$Ow>6nqL$&JF;G}TBR^u(%V9#&41%|dh-Vn)5n z&bHh~pk}{1FWxm~h&9BcDOuUPM6zE*7mdDwz`i|tYc<p+H+20kBnc%c*nV5k z9;e|R6qTz(3C7T+Y`mg@s1;D>Y}s{6AJ$Mh-4furp+>SFWr$?kk7A#^eO-Gs99t*C z;S#XgJzgaXCgNxW3-K!BE|1%7AjPpC85wA>vqP}4)^n`emdXl7&XN(Vp{2DGzK|o3 zz-^^^m=tszYuK_)Swqj4n+&{ei(-nC-%R8!REF~RAquAg^2etdj z+6ksJt#?>Lj{oLBF;r5RV8l$^A6Y@=4WXF5Qc!GG^3!5+4alz?U zIJ{rznLWe}qBsK_Z(4MyH&)X`QlkvIr@O2ZSnWx;q67``fAVdzB;@29FjuGQ-TT?5 zwTvgD@iu*$>ExMzVUtPz*ds2Vx1k4Rg3 zzQqr0rdRFa)~1Xm(|K`nvYd%Kp(d9OsAq0WUh` z%W0ALwIz*^{$v3c`j(!*OdmiQ>$DhRtac~3$2D3idu1-jY*J?(j9b5*A3UbOW`^xh zd!>A7)^#_VPALQvlX#)L;>q8w+Q$~p_iX3@452WoBX0su)n&=}Ew9ydpl06_jA03=8QfCLu+c+~+wW;*~>kAaQ}LFdyzbK3wQkQo5d zqCobP0U-V>07U-+*&_!4bm@S3;@Jf0HCk&pLaO%#h`1TK(;3U05cCXHx2-zKsX^q0Pqb70EEo}Am|(b>T&=; z3gmyzEdUTC0f2lf093#MfNvlG5LjZtC6Lj1G0JOmXpo##BX9i?{761yhKsK8J zAXpv*c>;><0)!a>05P9H{(@{&5P;5sVu=y}fch3tjN1Sp28ttO5j6h|vni;PV*(lpFzo24pV<#8GbIe_jJ*z=L81@te^A043}Iz>)v}4IqAGRRMqr zG@gJ5`o0MO+4Ug)yg~S&BxD!>fV2l_+y!Kx73A+f=RtheM*~1*D#)%Wh;L9l*aLS>4W?O`ICGA0AD~(M4^CiK%B631Ar)q*Tz@?aJK}2h+I%S zptxnKLA-%{C+r1)GEb1*5fHy1EH?%KXrcxHohlG6$VSOe0MPsn0Lthf8z3Il<3X_+ zgLng77Xiv~QoD3kH zrGvPM>;!-skiUdfAdEf$5J?8vumN)FJ~B(D-qB&g&>@10Qe5_U+f(K^gw=9f$$+gIrYv20L3K$U(7OcN| z?0UVzk2F|!)03K^S&u3no`PTbcMA$x?yKGxRyobchX22R|Nr0q|Nr*?|L^`Ec4jUv zMphOM?*IP#xBvG4{6Fdc`RD5YSN%UMY^*Hotp9ia4;RaS`+xpF`BN4Vll!0kpFbIl zo;iMreKeACWp;2Q^^vx( z(hc+@m`P>gYND8JYHD%1!|f+Qb6=pVY{uci^9ra*B<7*=QVsrmw>GGOIE&C;ySw%6 zoYrDnT=La$EzK96Cs$d7LM6E*78cnSJSxYPdTv{dJ?DT?3TRIMus)p#4-bmiVzC=W z5dIrVe3jEH%~k(4$kQA2&_^#nz+7)6Zr)^Q!G+^w`&_q4capvCa}n-TnrLCDDb*Go z^Mtu)PgdGJGdkI{CyXU`KN^>=lPe(^q&RGw^vod0UeYyRPq4ajzj^A+rI#U*yvOzh1?f>yzF%BG>`to*y+rVpf4L(%)tGJxLE+$TK zT&^fK8Y$xC+Y+~OMXl9HC)eiOSj+%|iE$L%CiQ{o;EJEg;u#r#xQ(wgf$vJc=rSi! zQX>+?846sK7&r0rJ55C?%jx!ZQSl*F&ZfAnwu>KZD!n!BJApzZKC~T^YJi9DH$Eh< zog*^p-zZ1;uw!k0O6M*dN+mOl8t1 zR`s%5zfLnDrZ^MP&bi+Un^e!hb+` z;@_^zXY$PXmZXrJC5#e&@fuw|MnN;q-HRw~&4q~~u7)AvddE3(`Ms!aAdsj>(EdIH z|9ASicYAxsrnioxESNlNB=aKc8S$sN*y5~06>Tc#Bty*6tei0%i*}NQ(7703eg-kK zB1IX|C~E{3w}JHJGpl2`Y3j^vfz2_BOfja!posXC1Pv@RF4=Zif`zrmVckoExSv|h#ux9htjob>jp7R)$%b)r>G)dIWFst5;sb*4W4Y{Qo}4?j*xzUd~I zMb9m?j-QEs<&t4fmmWG}6bWNvzh>+zu+q;J9$ax)zcXIk+i_ewt(E=44eb=0kg~@S zpIpXz=Fy)&H6K3NuCmL++uUqC;1v?EZjw7jH-Fw(Ntw0V|KrcD_ef^U!@ocLC8k5N zKDz{o!~INRJn4~*4+Bk09|CID{QMO96!omZbN#WruqT3!Dm&5BFF$P8XyQI*-PZcl z*4imD>~mXjPSz$N7Mk$b@n4hXO}lIJ0JC%5lQv@>ZGj)(v;_$H_MH=Ur%nVq2?t^r z{~VA+@1*8GyeG_^my7ag>Mips(`p$R?=%y@K`KW_401~GMik&%>TPp z&sc-M^T$0ldVLZDgWtt-3TqPR)vo6gJP+$W#j+^iqtq$k?N#L_49XD2XfnU8mdV`cQIU>l zuPI~`kl~dQI)hmkhOM`Y@_vvaA(@d@!mFFgTrlmSkmQb;=&1y0YO-KE<|b5yhNo-F z9PD4(yvH)VYQ72>>nG_!=J=!{!MQnOLvbv^M{Aw9v8fZS*J=Isw3!(UbdUYw@ttK^vMCdglI|DqsIC7n6THxSUDM%5C@H z!tguojC!g1tBv_Gn?>%X^~=cuseyg<-ewOjH%TB8)5ckml#a}bjL5no?_vzm?O6zG zWNqrC)%SP@#aK406xE)FJ)cp=FdGEB0`cK4c;bFhp>0MCx*ggk+KEffo&!STgA#F% z^f@x7a3zkPb8@t$p9NeS-~1`b0@74#HnXGvrIas57m=g1G3@PHiXB#1B}0s!u4G~& zaYl0ut;Lka?c=S}gsr>=Q|Z^1Wp&#%V0HGQcb4~fYg+F{Jz1L(GD0ZsjZ~f2Rszda z(Z=lZ@OEG5ontwXl0Ti1B-)SmqB3@aUmo}6Z-k^zl-S%%M+IqL!)B(VWtl?yzcN2V z_FCZl(kDd4Nv7Yc+b2bs?!{fEP*Lo6Q9Nqf@(TiE(niA(ym-F?&-d!N9czi2m-wsx z$L@15ySQ2czjxKhh{SAHe6yx@mK!FG3zM{*))n^S>hU)u%lzLCa~H;(+dOAIx8tuL zm5&hV%t`nuLY_If$uhN-k|<#hukiPae)gZ4FH^9?yjo+SZBKK9%vonLMwfd86&of= zWzUXN)OgjOr}#<53&oHvgLbv!rk4>LV1e%=LImSrzr=#VXsA&zB6m0o{VCZ5#Sqh3 zq4Warf0qH^1Ex@g@S&Dz-wQ5rH;IYu$8~oSCobm~GE;W3pL7h0+@BLSpWEym-iXXR zD%Xf`&;6;&2Zq5UScHjt00`hprNcXK_CsG8d0#F4&yoQ}dHYdP_j&U7@(yDRqJ62mEms}Y zbd@MVZ7EH7`f$80_jF2cPWUw~-nmI|d|#b?9OrWh>DXhF{^cfC&1u!>mXyrskvQ>) zGpcNn34fUNY_Q9`y7j8(56tNwCRM@KzEd0K978!f*Ce&)Z^QOg#didZa?V@4!M5j0 z9$Xe({?<(d^T+xGp#=hU+je~ySBCZYeyf#JyRw$Lxe8J0_Didzwe{vmxs5Ujy1V$l zCER0T0(4&(|G4sUol?MMk#~zvpoH-`Y)M{xUBfujD&k?JD?lJrqYq`gR7k+PC(~dz zbXRX%3|!CCaOG%%rj4ro>gHmKK7kax$&94)EsLF*)VqjiLZ(ik;!2S48G4)CD{l&` zm{9)S+x&cnkR9?@6kHBuk6PT?z!OLG;$NRue}2E7Cdxbg-jL>a!GPYjvz*+jJ6Cu8 zMBHUA@0io2FHB)`RWpjrLq9b4C%fnJ_N=)+Iki%mtPd)F?vTAe{nH!Tb~*(MHLCNb zNJnn#Y0K>&CL?lTax<$D6=PszcV~>G`1fnn_&^Kp73^<4a!1Ih2Bh}%JB+I&9HO`+ zTh4*6vrV`U2-u1i7A`CfMerk2Ou?_14WyLsJ8EvJ0Yxb|v(ZCJw~hwB2~!n12Bg8T zCk;|h*o@J&w|6%^`=O8M?k&Q<@&x~p_~=xTBoKPRFR@kq;nCP;loHjCJOtgz#8uD% zmhH!~T^euUJV_!;aH5V$4xtekqli*!dFI z-!Oe$_ew|8PyZ2DxvSJ$qa|ayBYV(`jX`WGXrFi|@U#Uclk2Jt-t8~LK|c%;gc%rO z;x%^F#O42jXej)%Q9xZqO+m$zjSW$$;+B_jsd(ATiV9bWoF}^mLm5KhhjLhGh{qb* z$%~n{L$upiVA=Xoq8TzD!b6MPrXBnR<{5_On$7T11|pjuB17}{pDCC~_vt53D81`y z>HTbWz6~bA#06#-Rry(|B^|n&nIOH<#RzvB{dfZ8u{`9J|F8o;GJz@g(Mp3yJ?tnU}QD-RwV;>47 zw9w@zXq<~cKJMbF4Jl=5?-a%oukOqiIwoH&H6};S?A;FAHS?#3y z6b+cPW_{x3m3X+@%<-BFTX?HcTfW1-QAyc+oG}v>SkIIN$H~{m6bgk$m}ni z8ubuhn;?;s4ep_p?J0a34)B4!;ll3{vQ8HMN8CKgMH)b;i~r!bdgFTfct^9YF*i&C zAcH#$k;hFqK=Iw+qMpia+u7m`N{_&m2|YA0Sz^SDCs(9m!Z~kx8D14!YK~%{KN!_2 z&%`tiD~ct1yDqSym{zu?ICz@vvxY9E3#-&DD@I1n3n_iJdJ-ZosZKhyQbDgvJUquR z-=m9gU3S2qmAV2(JpU!X@OC1o^8m1~1r&KDkg|{t7*Z;~u+L^2dOrx1znql37=*&vWGd?$M>_`8`oZR2x;T6tPamqYJJ=cN@=Y)RMVy} z@=(5v%>Dhj^GSl9$UYKa--UK~(7?@gvx&o`dU(zLD3f-;Q)p$C!CKV`=qgl~RZiGz z%ffFgB|95Xf0|K)HN-(qIR|1 zSa?Y2bjBiD-INb>oDY}7|8_V2L`=Y09dPc@sjh;{(MffCTRrBa~ zAN~to+re~$by(p|eYIYdJS<)X^b>*(nezUpWYo{gU-=0(N%45ISbsPf5Ro3z935~g zz)w4l>n2lyw|>=x`SfBIE2TqIK7Tcht}g+Xm48-LCg6u_9K-os`pNG{HD?6HG#yRs zpxzD9o7UonRXkZLvM17@D>|e-`2+t32(FX3UDzP%=5e; zQ$_=V%dR`lcL2$)UnlrS=~9k|FLu-K@A(@^b)RC?#CR%>cB#PpDMeCHw)i-F-?lVl zqFQ?a+C#nuaPttbhQeC~Q*aYfdQ|yjwHdXHNL_-K)>DzB0=!)P(+V7#3@EG+4 zB6=^J&EjdTo_}vDpvsPMBr1!udWk3oB_1+=nJLAzzS5bnFbJv)zC#9+S~dV?5)een z!3i%VvG)S+TVUF`ZtM_5JxvXqH86_V=&h}I)37z&ciAq15VxnEbOTzM;q^`BW?o;L zYgF0>Pfz!A%>~paH#~k6bIx!s%Z@=GjjxQ{X+GvX*k-#B)4cJnEDv}k->Yc3`W$>4 zU0KfT#*MAD%@{GUoHns!yj3yA>|FhOpjDL=PAwGmlm+3J2TA3n|5;-jHfrq|X8$T2 zp^G6*V!Af=M84Y4ql#Ie8u4P?{0-yJik2)kg*8*8qp)f|>XF9UZutC0BG>WGrE*Ky z6D2R4*XZ#8Guj+V7T+S)g^z$Y|Lv;Qf%;`edG0{k950F zlF!sj>pB8IgER})q+eGor(XM%8s1BT4cdzzuM6?saJ|5V?JMG2$RCcW@T1qeILll{ z7Y4)f_nDMTjW+#$Vkz~VU*y+{Z}%)hNpqXe_SaCkmVd(5R_v`TTJFwg{>B`B!;dw} zF_;WZ4Piw(f{yOq)Vlzis;T%`zHuGq^=fr8yr-P4ir}~#keh(5*E*6fF$<4ywVr8p zgtAacF>j*jf!6_Xp_a=CwrAoaJ? zd8Nx%{|`T(Gf@h`nrrH+tbRKLGLOqV2#Tsd**rw?!G%|)`)*jjo>!?|ZyD`J8!Y9P z^4xM%eZIf_>78CXZCw}QYwo=3sZO!Eid-Yy_Lw*Z4_HJO_R=+P-D^ddl+E#13-u+R zi~n%PI(N{KmB>y56)dUAJafB}fcVW5X7ZOU)^=fMFTF)SKomP-#5FcF)Z7(fcge@j zp*3h@2cezUQveBPz%FivQbI>i&g&OdSc+NsFWE>?)uaH$Y33=poeb$Z8h8Y$U5?@$ ztMy&lS*_TLcHdT&ITHP6VTLq!s^d^;5^R!Jdke(GYNA?Z(oclfT#Z)To*!_z6_not z(#XrR9JJ-$11G{!y^v+-gAF33U|$Q0vnXE!;6sV%xDPBuR#HvW`)hlO{+67HPTv|@ zX4l~7g1-?V69=X`v_;d?RnWUg{y3>ww$_s*koSEMjD9wuTYX8qUL(Y1Re5ai+@SyR z*FOEhLMewYkOrxJp51(FqV(~1tk16C7lY06pw9vZ`<)nf{C}9l^yIqKg(}?nPKRDX zZnb>suF$}^=QsOT#)a>7wY1)=Hbed%%-EE{$S85r(iE~T{aEwDB*$Lr8gwr7DLp4( zP)Ciaqzde^9WCxxdl0I$Ox4NOs?n4ubJlsWtxUopRZ#IU?fw+&Cmv0$`7J;Ql1&LI zS6maJw?S@~-26bm`P4Qy7rgsNp*)lS^6BwgQeqTaqs8o_MHNdL7k(YO=j6A;PLV2( zL70SlB^Lab+3j^F`WBB_-I;dI4&H3Zj!finYaEP#8*TlNoGWoq>=2Akr|W+ok?F-1on72afF9VQDO#$D(q zTq4UgOp&!Em7yOVBcrFkx3Mm#69~DI6U~=zOt`IoX zncQFvyCb8hfyc#?1* zF#7~@3Y`zw(TWiseyrA9{t_Y<^5UP?Oqe#CUyF5zij^Vfs1~UC=|8|Fw;V6)yp4{a zL`n~SBMQ+xFSQ&j9Bp*!CFGgNl%E;i%U#2?^qqO=NE4TO+l|;)dJUBX_%FzbKLN9lAz)VC$Kr zUajba+(>B{Wu$SUO>>x>Znh<^elSnNQxrXRl&-GxPlEeaMUKppF{gTl^!H-8|45n1r8zKq<_nl(S}M%6!8aNi3`k!D07sifoY@A3@H|A z%~h}sBx!lHf}q-#yso?cov-SDNE-`x|F}{?3ag>SQHiSj=~PP)-IP{Fkq+l}Y9tBP zBF=ME`!$iUA;SeGok)(w6QQmD$22YiG8!C{I7Toglm}Ubnnc93!K>n#kNUa3I>v6Z zr|&{fA?r#i&+W^G=|;X;_QGU*p~DB@2w@iVf^uGmn(tdy zwYioc>^GEOX*+Z>pREE;KwHi(uD9w!TXl(@yRUP;ZCgkZ7Rl}xnnhK56f4fdiV5~r zHBCC3;j1g`zjl0m8SHH|5l1>KN09tB@jQ76vS;nyq`EcnIaHH}8*{d9S+}fQRF*`S z{C%LQS~F>;o#pYXb&&`l!nYT7sET5eesCgg;ZhVDdWuY&32P&Ky3&a#XCA?-plA~v zg(PxAUG|}i#Y4;u1Pjl{N3*#qY~o_6X>r`BtUuvyiIUK5u&k9c;CXKovtdcp$;pKs z^1#!PTTZxgN5Z|lR?`1-RlX8ARTVyqi=Jvw>E-%`7 z^6gzGSQ9#->iSyFh+B&Bc;i9C$OUc2(z2NAC-Th6ZT;7>TB%b$}rk(KZSiirgg2Q3Jfhmc|t9cMzLb= zL%GsQ!(73p!JteKjTIYvLDQT|OBL`$$*30=*6LF>mo_xUkVQ)>l7SQpvp@-#m&_;< z%U5Hlv)n47fU?J&L+i}#*_Yyhd}1(Vvbw{*%#cDEQx@HRswc))lSsT5un9`MkLiPP zFk5Kg?eY6%m5=y74)M4{U$e*ft?y>Zk}YJ}(8M-S3Q=d{e0?P#9|FJC{cAyaMM-5v z5s$fTQb&1576nCSU3Wp6t~!SKZr1eQ(HxipO^KPGvYM;XiQ96qE~6e39G@HGD_`sCy9 zrfkHaIk7#Z=I12h#ddEzB(CIGc5J}H3eFaM3!CfHT6eO$!MB934S(WCf{$ub2tVWmBUnO1mn7iqZRT=i z(1_VJ<)d`=+`*r3`i!0^EFh~P$f^&aw0VQOrl=~S;ReG%7xpVcH@eI<>qMzZe2ER} zJfI~_)xGlklPJQy7b&5F6!7d~b3fHJNw+r4d1cL1D;ALAFxP+c!f!vm!0QYP;4}z` zfHOwTR^2EmBd2bvk-LXPdo`)*I3!zhfnv8|^nf9o%cB}1cu?5%i)p{%;55r4 z&O>rW@B?i!V=@ZWK>n2_K@Gom4PuM?A$;j!Tn{GWL;sUoipG>Mf038BPiLLwoE3rRf(7+W_LRLf3gLQ-`rr{2TA;umNvRINtioi z2E`be)O2&*^#m&tjMNx&dg`eRNA9j%l(r4=Pthl06v=`7_x0>97l)gn`+B9$mGP4q zqFKAIUiwpJ2DOVtpTtuv>!{Lm*`)Li|Dh{I!fVdF+mcA!Jrxz?)`XnmFJ=_TnJ%SS zIjz9ed{0|A60OEPXuFQwddeuWQdCDDR!u`q_1|>36M^!A&lpJ0#XMeYnbr-XWn!-G zS@=V`QMs#Dmz0M5-Up|r<;-<%{0q))%gPFaXdGl%$cuE(Nj5~6BCM;Dmn#;l+xzZ| zKG6<0vUXlmetuAA%~34gL_2U0g}h76QI|q(-b_%m1mGcu?&|@eLlfYisFr2Ee#Pm| z*4-(nE`Emyd-(A|7=Qff(n~`=k>Q_JYt%Vg7!bek9aP&-N})B!L6J+%y$;k0Lm@UY zwWl8-g-g&1-8tF&rTI|Z@toTp5r@+2LYjO{FN#8vHjc6*!T5~_cF#4}xl{TVh6p&S zTMXZCL}Dealt!;Kger33BvyGwN5?lA8S!1nv=DLwGRmS|C+an1+r96VSvZe&s9f7m z*JcLUEL~H$UKOiCfjhY5GT`H6mw3@As#ZEn3(N_~e-{j6;XLhEW9zF7Pe=3Awb}*fx;rt)*jfVW za(Rq$a7&`9q4IACjqR@$Dez9u0NktdZ{XUEYXg39UxcpyZVqdDOMji4|3)S^B&N7U zG03|1C+jBID|F0HkT3T)7C5?<26rPa)VWoY&bmuO-TUM=rDT;9OBa{BsbRJ*gQaU% zBl?k7!0PcK6hR7#b-Ek(NDTeTX*Cih^ME zdN((x&*zYNr7te&E5j!mNH5Bm2$g5yrH{g*WJ*mbZK|Cj9Yrk$j-E$BKiyPD#sLK@ znqjP>%2Pg}~{oS0&M1yh-`V$gN&rmtez0ip>6u&$So7U8Gcx zzep;=lBQ~BDuW5jY`GN=`f+xE>D8X#(PEtCLq6}irm{1{sW|zsa50N~i#`ETSWuB+ z`3(HAGsApt)o_QiQv*Hp_9VBdYb%3V-cof?@~Sl~LJ0mH`G&c^C$&RzVGUu6t3Lj% z-`A85KjjjiO+V`CXLjZSTJbh{@~Jl1X%aWc&`y%%p@?!zrKQ~?^P~07j<)`*V|!XI z?EC@@>8=}fOLp)3T(AqT#uXMO^YOD?3*(9I!ALY_pPl?q3LY|*=B?9v-DQ_sKYI=v zufDRx&dM8fka>QN?+FZ(%qpUr+09e4QhLGf+^;=_@O!ync!TKRyJ`N9uH;+_h5vn? z*``B#ZBDlWkAp)DN2*e!|1%s{KbW~cHnPXxV~@k{q~?5XsY>pPAvNu93cX~BVj7y? z#ZYN*iBr4W(8ZM4DEbPm#&EIfb4H}GkQ$_;YD~y5 zQ7k0Zg1COQH;541yUYic9vc~ajyp*#Zftl%!dew&Rq!*CHl+PrNWFdU%ZMw-2gn^< zLGp9hrT_N!9hK9#G`+9A9H1}tGB_}NHuwqgh9b@ko-c@4J;~|b?E(gC_}9)>C#|cg zs<{jK8hB1Nv+X$=l+o7PpCY1<@$7bh+O%)z=9}N>A1RB9uh6&mRR9vL6|$O9HSS5m zTVsQ79Mw{>F7DA@ZKIv`%*i&IG`pFVVxDT4kPT8Bia)dK3*Z_t1~&f5<0i=zSfPVc zDpshXy*Xc=Ci7%{+hL|jLWn|L-?!fIYN#)^9=R~TG-CdWAw>zGi@mUGoG|n(+9hbE zK)3jz#jO6&dYCOSSjjrYWlS&QojQrrtwjEjKA~ljxUnXV)muzxO{bd#7GAN{-Nm;) zZ8CCwKETr@dB^8Gdv@af!W^&XTCYYGaVDVJvN?*GdMW!Iu%D>COzZmc&G<;mCJt{n zUu3JAT`*ME0cna-5ISAG+Z!oPmI6)ts%F(s>2AOjV$cGN-$HQ*{*$@l<1-tJksO>c zO@_ebbi~ifhIWEyum16@*YBN7=6h{ep=Nx3uZ$FPrms-^>UYaG~{pjx!zW%k@uFvHf~5U ziS6u)`i%l@Vm}hX&w;SzJH^FeNj^98bcFvxZbD;AQEdoo)D348$i2 ze@k`G7DPRYBOb%_Z2zU!K6AaC1v;$cbv}|Ps4&x3nX6?JOoYNOp_}WIk3RN790MLd zTlQw~>0Rny{`5v|@%}!dz77>S)SS-A+Tc+xZw!L*-?~0YbgUk4)~L9z(Kun%3l&Mz zF$$4%@x8?u0aGUf|2#q*ksy!slZR#sn=VgjvAToAENFtS)K>gwWv@J|L4g+g&lA&> zU;113HRsOT)P$LQ^v~ZIGzkKJ?hZuOt}$1gbXq+el*IsjbkNptVKR?7d$lmuRZfglVfNZNBrAA)3Pq~pz`?nw!`KKTSE;@~c3XHI+ zLFM~Kwvg7CyhOsMaLwaJ#*_l^E7F+7H}66$&{?~cKzu8&83j84Q) zMHu^o-#Q{nxoyfkMx;WoZo2P1ZYZpb4n=#1GMfub$&H z9UnI3^c^a&m;((Lb25H~{UQ{r2|`QTjl_)*MkUQq$YR`B>@&G*p8vxWWPWH(3VS79 zB|nO8iS#!*(IcR0azH<;zCtc|dRJ+ek!Ae9h>w?Q zJ6v+R-84Oj+9k5h0?o^(U|BO25jjLM_HmA3GvVjTWm!#y!$i!BRmIk-(0XSIYEb&? zGBe<27jlHFzKd(BRh+bCQlXfIijvPNo}OUIms`d}2bUc*fjbN{J*&8l9_5+WO1$9- zLsW$JTHt!B$V((9wbLVzG+?!cWw;`Cs=EM1K)SzWbCkZoF#YN_sZ|=_V%fZu>+2gA zS|(f43G7AcEj?tcTHyWswnRZ3^lnV`(`+TqEX@6{OF(g$qN&o=dtjPo^_};)ELEO` z_O*X=5|Lo6{kpEIm+l=ezXJuz4hj)MU#c42LUtzKdoUzN&EC9)6se@<@hIC|*wxu_ zQV{1%T6C;mkHg?+sNr(@Ad_kKbi`&i{+7}md-r=}=h*1Q4DB7>CDG!lY@Z9s4etn4 zJSl}f+B_=#V(#%Y?@Egh^t-rSET3uoVXH^4L*Ji;YuAC{A>=63*$I4v`G^JyET#dAtSm%?p%J$K?PwREU3e%q;7-5^=d%D@_3 z+^mQbvo#Z%iqN}e40>QK4!XTtv1ECDXR+ESRx=fz8AqMZwd4h({c65__~|U2{0-`y zbfGfwAH5{XcvLV0VGpm-rviRxh+MzQ=C6q(*}#8&}}cbK-JZL+2(~~Oeqv8R>WoGon8um#ql2;3SYk@6||aLtN!u% z%Zjx7q!v>gJn^E@7UGwrGfo#37Sgq=YbSNSGATWRvsUz<(yUZY5N^#W5vt~^{`LwN zQ@TEuHh46|O=pDmI!f@~4n*`t=RN~5Zkqaq3z`ACu+H%jDL6-U$U@vY?k8XFc|w+n ztUH25H38a$?<+5aOmy*tg0wtO#>)cy(ZhZ0d-y$g;j+3sejY71-%7HhcJ%r;6}e!* zN-MUg4LQ+g1)LI`-u|Sks~1I8gw?lPN8062OSJ0@hO=$G*zL>@*IS`^_j=Pg9t-5W zO6p@=I^ThRd2&CHoSGg=aUCiDBmCP1;#mc`2$DeHN+_6bksyoi-$lh4RC0h86_-*p z7#x&}r0UD0^v}Ymx6p{Ng`HG^20bg29DaW*&X3RK;{DRV$amPIw2|Rt(!`)eLT9;L z@a4U*SW&2Srx0`%o1O9($hKL=VPQ)UBL+Ff4EyVUdoviu^3aSLMSHQBn@AQIvtlWH z%JDoM=Y{rn`DSye@ir2lRr~;DQEPSs!wfz^8f3(c+9`}GN^3_L?~LC_h_i2*1lhTu zkl*~UzxOo`N=Cm2qG!J5%#FHsd!Gnnqwc3|>AYiMFAttl^X< z&yR!Squ@EZkutroMJvn=tr9}e$n{`3iYVGWrR@9q@;EXkg5d~mL8Q3B9-6DGY)<& zABtu3j?-S4r-Wv@wr9pjYsA}))P@cyQ~Q;cyY6K@c{1Hx`g~_>q7FHaS{AMIkuI5& zEG2P%I@c~6fY%<}1NWyaJLuF$;wRg?CB6+LWqH5cv61xqVQ)*ElU=A@4AzCu8>?n}uX&`6Kko z4?sJ>_xF$T!jP>b8X53%ChQ>|yP$#AHLC5l3Z2!IJ)5b=a-}@NAO~x&WDk0no{zpP zK7Bxx3X*RcZe~p|>*E26IPiO8WLSb3SyS`R@%3Cge!d3ZJy#7bt{->Mp{h$a2@Ltz zOF531KAPP9D{dpsFpJ>ad26GpHIf>eE>Lk{xdgFBe%6L9eBLvn7U~#6*rnR`k}v)Q zxcAz(IfWb58W%OFL=a%~?dQ>N)XEz2ypgaPeV%luwD-;sc#SqqOoNjYF;x1EC3dGw z5wSEUw9QS^YXXWj^}y}>**bfbyuB|!hW6hrZLhrcK_o@aO6BoO0qv=hb19a{WcN)c z(vCmwiMjo*9VAndVC1b=n zfl4}NMDYinFead3?vdXn<;emv*Y75wck8`ax{S$Dw(9Q zDxGNcp}XY2QqZ~aso0|j0cYP(QGG*35xEn>OYVaLNC+Hw(S8YE`F-+!l;KLq7#6h9 zgpibU2uhsiDytyeTRVN2Uc27~(4Ph$p4C37@C>?Uas>doB7`omE;#huQF|F>K06VOw@L0^@L2gpWm)x5Kg~nBzS~6|b{uO?0no9z zXf&bJHlp~0UJ4wRc8fK}(JQzYHDw%2N3O|{7MEZt&pgj2VulasQV8VkYzZhEG zF!dMis^FQ-^WTRd8XVK^u)}NYfF2dWl6tt))#l6`YF{!;C4ah^CF%Tg6$*xJys=p2 zRg9j!VamjXlxuRLEj26oIzyxGpp#+d@B(nS+}_*lmFsX~CU9B5;na*3m8EO*GVLX^J9wcpu$@1< znf`_Ifd(T0CBt)fi`=7lono{&xx2>lnW_JXi`goGYohi%FBqmZiCpH7=}#O%h+B5o zrn9sU{;%(cvj&+_m$v^Am5fKBFoqkio!|K;jEGPLRP3>FHJ| z#qJte^V{;eusc8dED9LGMv;jmk%#Z$2$?2~$f1%YMN%XnkV?Z&{{olVcnw!0xYSN8 z*~>sSM5(8rW)`JR9C<*!k!RVHBl!ktP)O5r@w*)?ZHq&DAEH$86~6Oe>#FN`z&Lt@ zv@!r9l6YX2o{p5cG=HnSj&Z!|L>l6@itQQb)Nm8CAH2;o)mw#$Iqd&rG0I@o2szOs zso^#U&F2S$Tw=dhbW#@J1FvjoyRST?rNO*8{-RzehCmZ%3wM;dhHPsRha(kkW!xBl z`^h|i|7+_z;^!+cBE08dn(gzY&W&EV5ql@!kU5HtcB7|}=kp&pvESk!wbe$XbO~QO z7giOVS+Q+aQn77272CFx zyLavLpL5T>Z|iN1w#Mw3eT=qjymj;##;1A2!B%sE$xzV@j_$RFo7z(D;P=AD*yS4! z@|}%6V)o4y-M1-kngz^hAE#uS(gaY7Hgpc$K?jEx6DU5Yr;($S&t6+hNHZZ87z`7x ztkQM(`M_!sBMT{K=V`Bdpr5+zr55PFJR4tTiUfFtZ%H!I{-sYII}j#V(RV&D9u4^i zGBOg#c?c^f5a|g$hE4%Wm)-Rd_IQ|LZ^7)9qtSm=a5C*TwKP9Y;wb zFby9e7d(T>Gsq*I0ktR84s=7SK%u~S&YyE?qMll(3dQpozSVa^K zHlcjFT(W?6C)b}9?}qU@3Ol%b%n?q1;`*`cN{UU9ohox1K#e$77@`U~Tu2@TY&Crx ziPxko4F9xVR9V zxz7ewov|JwvazlUZ=!j%)B#n=7|`zCp7(9)e39lFTq@A^?atq)WOEnM)ocf7dR^1l zl`lpQVAgDs>i*H+>1S60aiSJk5s0I=v0n|t5SCEBAKa|2*GtD2c;!A_cr zc8yMPC|NU&`!K0bXRKFqY;_)$_8U)dTKnYZ`DQaYrd1r!%gj3!gSP?Z&9(63q{+ zaa|b`_(}fl`2fM%a z6vfDagc~cIh-}Z=TLn#xnSgAGjBe%%q)@Fz$J>A{q#~jO?&re0 z?{KY6e9ztO-X1m{B~G2TJ$&)fx^tRt!SM(^ix3cj7WG?PbwsjpCkxos|5L7_6gjwnc&vgl>&T5O{Q_ttL%wNU_B){Xj%jb-!CLW zeKMt^qs6W1CZs#xd(d=%8qwvjT!_>a&31N0q6x0eNFzq^4))$89-;l!8F{# z;a}HV7>kY_)V=)%X3vr|c|yGAd0hw@s3|=injHlpi-i29=`fvY2(Ps`tammm89DTV z=tI>_8Z0;`2bnNx-iyf+E{uiNGg9=IO2^-puXGoEo|(cvyTY){?!i`;O6^_Eac_BD7dK$3h5x; z@r|Of*WSGNR8BOytT$2^J*hXb7E(4KxkdukXmqENZn`2ii&hVZiAd!)7IcEx0XAbj z7GYu$HRhCIo2F9d^YPk4j&~ON@=wU%X4K@$`)g*Q;p{5Wof zu8F*kwU%+chvCDaBA-Q!Y$$Q7|6j(deIh9JH+pu-Kl%S;yz0EA3H3Ov#3Qnxea8n0 zx`)4+m4k=~D_4t8=WXHWov4(fVJ5kNyvbwW15-dS5Q>D2EeE=0sx!H@~d!fwH3sMOqMbm8oJ2)w&n?-Rc-XVjI7HKv)CpDdiOk+Gy1tXw_jVU@Y zf&~=`^(99O8i@~GfBnhqcC>dj^W8Sre?0Wuu^&3`bnwl&Z;n}mUw)Njhkr92#dQ5s z@2IIUVBKxvGNZrH>-kzR)C`%v4#7xVA%#)k^T4t)@fvOe39!ZP0JMIDWS`P$OHa;GCv9cS&!CV|cZ$5qX*>g)B%Dt>|RuYX=2 zdVZeXa##q|7Z=le5*#^Pe*1rV%0?pmC-eVeS}}e={lc)+e@yFk_LpgIeAgHp*72+) z)+;MZM4?y7@Ohs@rNW8O#t^~qOm33zW{ILaotE0PsK)uEp}>4$g@gco?&%qwh|;7H zq@i#<>$Vk7lQnTH>l03gtN2&eo66jJ6!--1ow5?qA-_b9f&bu%0vhJ6Y~;SPvnunH zdfXPO^9+t4#uFrt|Mx8Ie}uqkgEW@xKOs0vg&h; z>b1=>4gJTrZtqPrj(+ei+j0dfZ> zWCez@VN~%&kk>Zj<0WFrDTs-LjcLuZ?uFWq4D{bEyyM0SKlS_<^@g=dkC_f%ZS))> zPU5rq03hjI(<(J@$9BstF+c80&9WX$x|iR?i!zY^DK4H#9+U}I?43)jy+$z3BwJKC z0)Nf{gyOe_1Y?HU=vH3A4zSC&Z`bw*m#UsrP;x}PqR-x}Q*0_yzR(lx57<@Cr9*O& zcbAe3Cwf$EQhKF;rWZq`pjuTn(ff@*xnDj{nUJ8>gr%j%i-oGyP{3;J{YN!Iy<%7Q zUa-&P&Ng}*Bfq8HXYwe%NV5f^P5d2m`G|o*+8`tW6RTJ2*>5wicfU;dYBA@} zm-OTt3^taJce`D;>?aVgZ?(#E{#WSszmc4I#PZ*Qre(T0>9`>xNA6YzO{=$>6q&t? zxs*81VbegQ9=NQKggn#qNi2tYa1IGslvZc?J$JEsdQMoflH5NwEDTuG+L#!kPv?-= zOi_E*VnZiQ1G}r5)ZVs0Ef*i>ibgk8`p{FhCbz^18mZ5V24M$i(A*j;_k`L7H93!Cxz;pPxTce{^XDZGe(TyP*rEkt*(?Y~|C4f!XL zX}#n{HUS=q&LUwhTbSmZX+lM@;nlp$DdN3gB8faFId*pbo*-HAo(eUo$znE{7xUdk zT2r5rS5^$a~u{Fdulb?HuuWETam0eD{1{AIw?B7 z=b+CIj0Ac3QmX$gx&FV2XP^BKvhYURZ7`=}K@htd>VL?dv#~edN>8E|5ga$oqynF# z3ipW0FI){OgzvYLnOeS*iHiyoWoCv|6`zvD42dXBpujYSQh(z2eQRL%m+6|azI%R? ztP<#P`=D#%Pi5`-*+!4?6G=oc0rCp~yW`d|*|nbM-mbzShuUgvel{ z%i~bk*A{}zRRni1kSpp`ib!Fd-BLmbFSOGkunf*|VOt6L>^cZt<~gz*mFC!Y>N$Dt z1kOfTld{s+D+Eq8WS3Uq{&i3POSI0Yq|wi?FQdQ&r_Fv3#!*NHGl%K#kjt(}5YTat zMsmsYV*u8^LN7%lAS9j@N@{JLaT1`l1#8v6V&Af~b(Te^(`>q>0?jHNIcyq5Rw@lj zL7jr7f+EGFDkY&@SrHk9RtiaXWi=Hjge8hyik*x~iKM2ATv(zSk{O81RS;Q?L#a0B z-xES8R9IjnLO~VUF6#=ppgJh4p+@V+&P<||B-%?dlZ9W+cpZ%$te3Ql&HMRU%J3*T z?k!CaeZ&z!Eec6pUl|OcgdrBls;1^3@4bVzL4b0j%E4zl@h+o&<0FeN04Fe5&yEuX z%li?0=p_W&yoG)N!oZAhJN-EiMi}t3k2uvzyV0(YaP#hf*U^k(asruTierXJ8z^qfqumo zMV7YvjU}%`d57~B{>YRd3^|cQ0;t;DD?xwt15`nODSgBn19Q!%vx^Pp8uufLP$18o0lm z6wQOnccrCrX69!QU-TQttnDVF%S0Wa$2@sv>A~Y6aeJH;Vuan6%8l|;BHQtZ4pqB| zLf$v9z{YrKXB0B;C(Kju5VlP)T?Bd`w(oGkx4%XJu$@M>NyrUq0p3LdnC2qjL}ltps32j+}97Y0Y)q7aa?tWM44XeGwnyKkMVbg|?_#Yd}Z zykDr<*vTIBLb9K%`RKW?N{m?DEuyGgzj-FGcrKYfKL(w~?bQh+vSf!`lr6G9@&v+p zhD6m;t;~aEaP>;IwsUHDlnI5V~t$jbY`5tD6dL+hXi#@1t-W85Vn$NI%` zxasKmHRJzs_p5IrsoDGGCSybCd9YV_nSP1A%Z2VmAb#T z^a+_?|7djRE?1QyNM@l2#W1J)5qxEV5PR zv! zcE#Al_V{&F%V++Zzx-#b^dV|teE^{XB4BX7XnIUwYe?T>Q-^?-pV3ED_wOw#n&)5h zAm}aM2gb_6$S7kR6PlC50dP~?`x36ZdHSVM=Y369%Yh^p1ma1E3e(IOK+#A>VSXH? zn9wUb7PMxZRB}!T1}978 z|Ji@YG{XJwRhZ3-6`YE583GfqsDHfH@zGXQGp2g{X-(j(cQ2z|kyOs$86<_6PWcbC zl*g2-{}Q-wi|SK}w883BH{<|wk%x&bCZ?cedS9)7_wmw3qBML($fOz=s@5bZ|1mX{ z1y?tsb!wSRWECg({$Xa7*stl7cExfVvMEjw4iaY`Q$lP<_JFdh@NQV^xofk>**Jdy z2{Y{kBk@R}w|1#jB_=~!YWxpybD3&32!#Po4V9jrom5uquN&JJvM`FyM$CnmO}ljTvk7Nt!&Bt5oGpwhgqI!^#2)PzbH`w?uM2 z2}m(}B3B<8ohrR<@vM?hXGfWb#A)GUbOnw^S7UHt1Qa5Zm8gDmn`Fw|sH92!RL1tX zk0){jU2p=*g05NnFQa>iVPl)2^725mulHa2V)7_6ZdFIn~#+=pRD0(kU4a6)eCzh zx8~iDz-G0@^gBZm)0iB48+pvRRk_z+hbulZi3&q+!jeYv+5- zBce~WJ{CwzUC-u8$JfVU;Na%um~h zJi#c+HubnDzTXbhQOl9H2QO6Xm=^@2}6TWflD#QqCpIR3h4-{#Z!83W`KQJ0Z&`W4(C8)O)_DmIOBdPu0D@*od5Nfj1xW18c$a!$Q5wI{kTQ%){_3(f^={lG2k`4+N zEecbO1t`5>3Qh(FwO>B!Lew&&g}L$p$`{kG!3B<`a)CYjt5z3Gfv2y+OjPCge{#H@e={6Zdl;SIfsU8>e^h<}n5JHaDuMq`pQ)!N zr6L(9>85A@?R7dzi;BtPeX!R|2gYxFfxE>7*O6s)fQ$w*ZU>h~wyTPq{W>FT*SiMd zmiz!J0*D(EWBz5PFW{ZB{-Q3aU^J#=D1kRY8XfiZI;nb*jh&SujCh-5yQpTv1dgNc zflhM0Uyl&3MgDSjpsed6KB|AU9e^pk&4KR^K`Q^9A~BXu3`oU0gcR)E6;t|f!Wq{q z7PHU{m!q#E*_9lC=lAhx!Cv6kL{5P0C)b28{P|~aUnN=x%PSYs_*4Ya!Nt$QhC+K^ z>GypZHu}8z5mJ`nW8Sj*t>+3+qwTVWL@7H6m)eRpV4uNh4 z4TIVq+Fc)d3*TVUDEvl+r%k=uZ!0FLYVxF#+zD)a2nlknKdnWvg}F0J%>qnUu+h7N zYg&D+1oLJe;phl;VLmJj7U{)iAsH4o0jVS_>_^AeqAXdOiGhE@xk7tdwM5EN3@|yo zarA6%5WH6<33`AjLnGo~@guj$^Iy-#wc?roK#1l^Nna)~Dds z=UfP=b$fs7!_QLu-V7VEY$&>HMq8n#^~b*YMqb$t5yL7|LEe+zlJ*)qNHWXYNp7XQ zwi%yua}Gm44QBV|(-wek(z=W5Ix#fR#g3@~kQ?4L~W8|T3!E^QJDD$Bwre7HLC-jJT2i=*4AtO=F2~WzG8~egD zhVlKR^TS#S>vh2OCzp&^I7dhsZUx8$qkWf4V9qSZ!>846`Ro819%OXpXA@8IBx}$}fHN+#x0Zlsqh% z+kr=LaFBP$J@+xhI*=zAM}b!Ajjy0`Xbxtpr{FE6u%{&(yRGt`@{f9;l{-kzbcW72 zQjGT|S@An4#^@|a{HmhO&jp|QVz>d>f#iG0g?oNXspU-MJI9ymf*!Ys`9& z^?7{jFgVEGiD?r2q3YD=$>A>exwuuZ)cxu)vE@7%g^f#azNhC-UQ+L!aDuKHOA!yH z!hmA(mC)JTk_Vv_!~E0Kxl7^z{b>IHY23+hBFz(zlKto z=8E9Em-q={>GZQwr$m{MwzmfK?aYq*UdHefbwJ9X)&fhZ$2tEyGE&jNL+)KT`P-pP z&d|onRvTcYHhr(G=-XCt3@T|5akEML=eMWO+&DfW+|>Sd;0p%e-jaL=EX>*?+xnPi zrX?_EGgwBeZ(%4!hJl5QP01h{X4G|}f>uh6Ql4&Hc5|U>G9q?twfd(yIMVY<}N!OtMYdbG(VV zOM^{!yG`J^X*Z7>xV#Jxn&&159kih2i{d_7b~=rZq{Qy~q3H@2e(;Dz9cb8Q9;Q2p zl?`mmdFULl>}6LVvLaYvS#Uu4a~8`bPDYWU-AuAjX=aBz*)vc&iUCelc&usp|Z*MEJeIe zaGt)-YV6q{DIBs_=7W=6y5)CcKTWeC-kHQlqsL_0W5&{@Z7N~V)NAk{E064RGw+dR zqAaFJ87(5pMFpa^MoI~x7S2BsL`B8L`G2GhdN|2+7`P~USj8Cl1O)gf)EKw~Gz!Ft zsD5*Tl#eVi$P)E34GySFfr)CJVjLc)ortKO1vQ-l!_6v;PpYhC546T30S>K5ZMufQ zJhC^nb)46S(fpok|2UPZSb>-3uv+09NB%wts}ZphZL=d!3MZ>0Yyqzur6-K~eB?{( z3M@8te^Zw$Ws|yCZ8*Nmxy}wn%zM>&sNbNv)laK*J{w|D_!7}7lcVU)?V%ssHsz4^ zMl|U0`&Jm25}kcpZ6RTeyyt_@H?GOUL3z^`&ubP5GW>(_4jB zF>7i#iKJw;zP@&vtOQvgDN1gZ2=NwdcL)J)6$Ecs1__)X73w;_Q9k5@p&Jmf(Qj>g z37MW?9qg38k*OmCMCh{0iL2i2K%U{SyQ1dOP=bk^3&HbvLPWHj0SYrn%D2*60&60$ ztnfj!1rRSRiII@TQ#SHsqQeiS7DOlq@E0$q9o(*+VuYA2_(O-Q=E`|x*l>P z<=j!_llm6M&6?3cC|Z4w8+@-cQloL5R9KRcNeFT)FlijGJOX&m`VtS=5^6KbbFWrT z?6|-Qnp$fqCs5X7W5s$EqH0TIaC?5z3AfeWTJZU0gD{yjd=>)v_J?X?KMES5|Y=ZuA+Xt^32$tBvL)9zhsyJ2&WGBWIC_w9*P`%2n zLFZBuQZ2n?+TwtY(F&%@C1)^DzZ{~?wK_6$?D|;;8?6cgWeFGH7^weeG;Gh(-ce8D zz~rLy5zJi3&Lssl)D2r#8oj=UCYMeOspF1sr>7W&u+YxI5hNM8*o=%unaJHC_=g_+ zuA;L|BD38ANsl>pJh>R=r3p|ZR^Pro0e*aH&QlMN}c=9IdjJ=L9V&Wyau zON7CQNjU5W?co?)#LFLiTWYubNpT@wAT!mFgM6261!>_jKO7=I?2TqtLwouaNsopH z6T&wy`md-)=oVj`p9JYCnm=`QeXDbA&Ffhwl(d9WP%{ESg&|L5Y2!SA;zc;g7(4ah z3^Ne@0KRffE2C`O3tgl$Je*8^K2X&ocE25&Ay#3-)0)(7q(FXqGm-(nO0hkE64+t3 z(`f>6Et}xx5$Xlq`)%}U*AavM*p`HRc!4{aELoo8$kjaX)sep^K}XTzU%i#(qOdW7 z_+)aPtr4C56u6lNqgD9~fC8r*L8L^cJZU9rN9D_7yT_k(MQlz&h|<(ojCiwDSsA_0 zhb#x*N&Ch?9QqT8hvL|aVm1Q}W!^tF3wlvhS9S3YzAm>AxG**zp{L(epMZTaHDewQ zLX#N3(T>EyGpc`Fyp){N1oi-h7dv0@bQtNsOJ4xTo^ywWw1a>tW%}57;UUC{=-%4B z7W5{2S33Sm_jD4acz$H8RrGDbZ~&-aEG<$2?=nL>P~V#Yb?SEPkp!c0vbN6lmI5Cz zNj4Y#8qDjvS7vp(7U$bh!f84r2B5=?Q^-4nM9l!?LDm~~&pq&C6Rqae5`pmTx!o3eh73^fSwW_?D zTFUFR+{MRVVuk`BTzA+}c)h|76J+Aq`^`xLaEFkXv0waAXzm(qkC4AW6VWQrh=Yq~ zf20^Qtds`kMx1;1{^BT@)*qGOKZQ(a7V}l&yW;4r!H$c_Pf^+agSWRmCPcOrzAwM$ zOBI8QeoJWUE zFbFM>!-9_26(WD`cDFuuKa7eHda_Ox4~Ae9tlzjKo&yalBOeh@x&5`_7IH6!emp%D#Fg6hgK}ejU zPoy3T(=naT@-I{y!Xl-4Bc2q6)6c}@8o?OD1r8xOEEm~kdGt)t6mRwLYiGthP_5jR z1)$_v*M2P8jCEBYg+m;jY;7&@Uukk}KK2g7(vM1|h=Bp{@i}0?wvWgNo)O)r4*U>s zEXXiq1yEhvju>Gtu0M_@w?*+=Q{qJUPl%N7qhQS{<7ViDs|QTk2`0j-sXtnV{3w2o z%1SG4>YT_h7Z{%NIEea@pOrauDydag4YSWKOAUe=?tU?}-eWF|_8LV1nR8~zvepFU zMtTO|{oMZvcfZ&*q=i!QE69=t?mPp43)ju8k&oyfr)!2gW@TD~lIk7SS2nkmK|_L` zw27AS7Q-$kot2q6G=Neg$)6KlA$sRYu&#k z46oQC&*T5*sL3ePDmF)Fqz$UDMzbUE{2YgErQF(5^j*cY8)vj_S==(hB3jyjJnXHI zz7<0(6*@xhL27`(j}JmKk!cLgjRXGPVF}@8ek>n{-GlNd5~^O4o_LlX=?d?Gc|j30 zA|!-2V%nceAv(ZKce3CRw)F5X7=9qrH5o-eHcyz_S(I6Y$Uc4lnVh-MVjy~2c5n`5xb$;4jviqYzHwr9%lt##!Q$EwBP;Gjx3a+ z%%>;)ug0QfCi`(bJGw74JBb*(H?6`IpWVu#lGn4sbAy$eMpfdQ`gT#t*qWUsKnBh)?t)3qG z-m|K-iKUK?!?W5I0lnHQnA?TN&2<8yi6MlE=ZW_`s*o+ZYmF6aKVQRLvkm&IUL%4n zhO5EL@Q(GYM>Y+eZaSMAbD)Q7BNe$8co&udysldQ@7t7|PQ>@0)ET=oWBZ~u&eV?$-#2mOgyyOTSg$P^90 z=PCGnuvxDL92}33#7Sd=l1%GZ5CHowL8z=b7W_%Aa)Nlv4I@d(F8jlWeTyNTa!0mj z4u{yKcmw?y>2{0QhHD20GR|&f<`|;rxY%b$k-W8fuJLysWW2Q*P0Ion|1bDj(Bd=@ z-P#*Fz7F585Mbj84Jb)NkJ4xiCw)sn%j~wmEzV!fJ{ECmyvsj2+4${T#xhL?(-V5; za@@_ss$K_o_Evdr^U?4-m~iWKOe(wV?pAjxD91~$$>gCDP-4nG=v-N}e~H&ujL;|G zPzPCTf%fSDV7E5#JAXSNa$<%{&i;gO)ECDsoj4O(AhWtO*bacb5r<^p@VLze+MXIJ z9Lx+*ha8ROVNfoZPTbpvuXtzG`^f;4*JTGo+qi)>prV-RB2T|=bp+j6qaH#5a4jyl zkRA#@@q|5_yB2gTTZ1>ClLBF4w?=WnFkg6~LcLAZfaDqVd94JS4u0Kxr@=#HWyciA z4uZR4x>AxG)-y_bHLk_BKOK45oxGR$W1GOTlw&@2oMZTb5J9pUgD|+Bha+K~hJYhzp%C}z(=f%f+d*d$t5!W!LT-YJsSIUYl^0t*AUO))|RDrYI z04zY$zmDK)8w>Y_beb!G#}_7pa7Bd$7=XgiX#XZCD(}g8K49;Gb_7loi&@>SBf|Wt z05iO5DOS3+dKS)Vc5t^Ji&7%kdTNZ^DWrGdmVZl!exqafRuu(`Dj~hVLr4c-*Vh>IL-`reF`4AmUnA-|r`}ut1Pt@8QJH z8IahO9D5NcY!gwjC=%rrdv;d3q@)BrNK>v5hwlxVvg^Q(+T|4nAv5heGT2Y5tKDrb z5vEni%Lh1$PS#NZkEp=!pAS5U_RQDyj0Te zEBP5V|62k--3#-E43xecFkV$7O5vm zmIV+zgoUK5KHA&6&1<#i8|zES1o;G;!3R}$HH|K>S`VS3jQWtC&=e*)b=67IineqB z20;10=}cNx>?#{+c4lgZ(NR(C3^5xDm9AJjCka;-Ty` zd+StX? zEgMjW_2B;zRaOM*#A3J%vDDwr)4^z3ymNUcnV-tE_o}r=$V?_E{Zo`FdqV9xj?iEf z_1%w0wc#B^O{6;{+P(g)C|cwy+LgxQ%cZ0&OnqH5Twtkm@(L_^*||>Y9%VF=>R0m0 zOk&br1Jj4^LS<-`gb`+i%u?=~9k*uRPrtkupqx^|6LOEKQ&jmpwTc*Z4^&8uBke~g zMRl-7VRV66x+q!dN`v?jmjGs*EJqTeA?aslbWl3i2Vh?c{BZEzqjQafM)7LFX zgFcn`z(;6RCMs1?Rdd*k)CD7{xu$rr_cO8B(+P(oK@8$@Xa5~{RZ>B-DXAef=V1qP z)+h>z?7pj=u6LsgNHM*0=dQ@LEGiY;JTh-`*1jo8_|=MztJl-hhIKtFMpwyiC%Y1R zwtuz6ZAi)Av)@Y{og#Az`RW6VP0G7MO>_28TFpvb?Fd$+m>z1j*fxR5wG!^JZbOz5 zKYFh!rkm{L;CpYhh}CnBAW@@Qyl*`b_klx} z&u{_M75L{hcN)oz^<5GmOA1H#(SChXp9Z{LCC3?uza)87vX`Jbaf~b_ZYIM>Nc#Qr zJnDiQvN7_x`GyoG)%j4y1)3b4Y-h zse`)D|CmL&z(Cie=zD-MRbO6kdN8&3I||th)7K2Rte&zJ3$dE27q8A`N)-xoNxsg8 zo+O1bVhXvFD6#<0u0EPBL0sl{WnjIKH&csXC!hP5t_pr?=GGe=Y)^Bs#*u6KggvK33z3#1ImhgxI zF)d@olXUr=9Hj7@-RvS3?BbY2VImtkO9Q>lm^uC;q35Z0q+~>d;8fqx)T~5eEtxJ2XVO|zayc~E4`lQ0-v1}a|hC*jMArI#R?SA(T?$w zp=d}?`I37uQ_=CcE}$5aDti4#|8f$5243}ACH*k z#-0iz_W68#Ud87`ULDHXs+O@Olr+=R`bjTX2K>wt8V22^V^^mHwHc@i${BLet593Z zCpwwY3T$5ipI^~zf!z+|2YK?S`g@dO+l_yqx^r@t0)!Y{gwgs_K4_H=()IGahztCe zyP*{>Ss3VlJfwV*Rb@9UID=O43(wq2o$v3A<}tEiNIGZy(UeD5k>ud#sHov2Bf@u? zwf3%8rgAng>MI1PVj#8YVxxl~#%|i)tGly$_9Ah9j|#t96F)}vxB&0%o%ro9Sl#ut z`M%q+EJF~HHv!-O*ag&nt21oJ*^3)ia50{f)%yEj&iQq%rSW=)?wS*RNU>D3@@ogH zKLEu80HlS437dDqnA;ySsuly~vhc1ii4DdIKYSa`a) zgkmGcDH(*=gIgk2CZ|s&hN70iI{t1>2{VdQeG-Tm?wJY*0lawzc_MT8)wCKT=6v`R zo}C`7gNK0M&QRZX@BrGapY8a0OR8=5PmXk+0Ld#%jIMbcWiB?WygPZD29c$VpFk5L znXKev3HvjYgRy5bgAr;N^?+_RTD-Z{i%wx_!Tx#JTzm0IyTOQ~Uv_FqD^wTb)QeL z(*Xsuq%*nAB69{n``agNchT#UGQ|i-keBgjp~uqfyZdK#^4l zN(CC(eM4hSMmQ$E=Gs3Bg2JN0$_(nNoGs(4O5=p3l&mVrF(_mQ)j5)A*cixIVxwV7 z|I7#wvi<=nK<#f~6D^;Rk&;t^bc2JwcX5k#cX4|{c!b&A6Gf?$lRA`_p`D@%JX!aN zza=PwUYxPxPayhri~rR}1pU+u&GkAK$%XYgM5aCr4vrp{bg794TL29b^wFi8(^om~ zL@lGNLWArKOlE|-o(`Kk- zrqvUxg`32Hc~G$H;G?r~@?omX(QlT?s_KiuD8q5Do#{>ug#0 z8U~~uqv%O5C#FMw>~IRi18tV<4pk*`g9HK@aw8n&$dvZ+fw4t7usAG z%-yx-1jgRgsm%e{?#<0fLFb_r7QuNH&FD2G@<(=hWlJ`!YhucAfbwg`Py%91G4O5c z_%iB?lR6UHE%i(iLG(Ybi^R|$3BBcN*X4~&t}0}ocCZ)%nFb4{IyRYE`F&hixF$cm z=R+&6_2wGtm1XIWutxb*Qov7fsaQN$H^7Q$%zv7H2V0{R(ZVU$U5?3w*rE&?7BC~p zgcA|9A8Z`*X8<4+(r}qbP(utK38m>BH_5Y=j&JFc&vjg*B4m?1vihSb3Qar9b`@R@ z{m2e-ddxP0XDWE@cT?KL;n32dGQN36aYP^91!KA#gI7ibND138WUv#`C_^fScM5|A z#4g3-De;8ghXGu$PaQgLxKcf9^)S?CvJ$`2oWp@Q^H}tB_+{Arc!kj!lA3J>r2({N z{e8Ajs>)3LegQdw=^zCP9kxC0J4&BtP^q3y5tvO`Op2Zv-SY>f3;CYSj8OZB^-SHb zs+7TGm0P6k^avF<*6+*TYcE9PSlnTIAT=%WysCv;=*LN&B-@nLc=agq2}NC+rBz>JsPtP1?UCB4wb z?D0g^F#qo@Z`-;xzE96X(A=ODjwjuO+!8xWLql`pLPhQPM9sv?wCvPr#@(T29qWe$ zV!!tCYhR^%Q~8M5MiW7`qta4FwIM9nBfqVr*Yy32Ep5CtbQUds*P}^+YQRq-+N1)A z|Gkg|DJ>^ECb#teu=geKP<8#|GnUd+Qj~Vnh_cMij1jWSz7rMCEO!{j%$ONliY$fF zBBeyMpeU8JsHjj%+1htWQd+2#QsjT{9on9HpXXhk=l#FG=6*iLz2~0uJ==Fb=YEfl zHjW;t;X31H(Fcv4Vw=}`H%7Fd`ZV&z3A%#o#_Zfp8JYXMGqb8+ih6FXT&p&7`N1)L z>zfPn-#&0U!<)NJ8`|;)b4L$o$J?^0>Stfz?(I1iHoZQYNQ*hLY3soWh&C;(!!cB3 zwg}$p<}J8bXY1K?%~Qd--nOC9(Nk~%|DdRPL|K{4%GVc3?ry8bj~hR3-1ff|Ewab~S|h(^IUNLbWYTJ5&6Cq3vqM}K1y>PNmNxD$+p}Xz9lNn=*tLSmyB%$H zFwE2#%LVhYE?Xy!8u)m*VK{vx^{$|y_L$nv;Y*(SW@qS6csuEGo{rMw%7zEX(O#nD z8+tNpKgc;W8^o1ja80LMb&WxLIBAD^))p{7tfKX6KBV4QoQ+d_@46R_==S{?e)t=7AhC$nW{YdK)b)) zZghK-T~(zx&eCi4fo*fi7L-i~O{(7C*-+6sr`W5y%S-FtJ2a{I_NtKWdwXq`Sa740 z?{{=XzL9+rnAS**%(jQ;;IRy1aHgDqM74GsZoDEnBg_ru$XCF*3lZoASow_@Ndo`(ge)*+#!I zLXLAw)glAdA#tUK&VJvQTl1gMj?6`KBTP;pqg!NK880qu>&7Weg!e!HOZAuSO%Y4dLb9lE0v z%FIub<4gxW1#TXre$sPuZCF;n=>p~Pw+Ad^2+3r^{_b^!mV3?4D&$XZ*_OOrfwg{5 z97nFVJ0rpLIo7el;b5+>`<%en^o3>Jg`%ka-TI5^6D@lJw0Esz)!>@Ll_OPekyB3(*@_Q#)BvGmb0cl*FSkeV)o5srA1@jfDR-l!R4*VQU% z>>h<`n>af%H66V|AyZpp!r~cYk$8)#n-AD@kKMjt&rIiWmmM&PyXRM}y4~S@;lh6F z4bS!749r;LcyIcMCx<7DnYcdI2X!#N)^KUXz?pbfTDWcHwYT=>-_! zzGk-pr^oeR=dwM^pQYcQX&c>U6rIO7U+5O*F^q8Sk)!9%X>aN#A8-oS$c-7%;-@oh ztKpM-{OG<}rI%yRQWWGjF1bdU+?D9Nd(i|#Uyr$a-Cg6d?q9hoyopduc@rbp61Dnu z=i|AK)F;yuk1EC-3s!Jc4?ev1Q)BGpmkb@5rF+HEJ2W*)RaWlZfb^1kBR^y3Qj3_( z<6;ZulgCZQ{6!Au3O?ky-RZiR@TOvgFSYoJ-<=z0LVI563g#(>_~ z-3nI}-j;lPan`CEzv1bgg*k#ad~0h=?Ql%(~j7ssR?XD4XvWt zgo_HB&6tg$Z8y%fmrThwHIG?>Z`7goceN__JvXw*K64IXl-6B5YgmUuft4ZF>B-`9 zPDtl$*ACfva+(hN5-6IRnNRP`Xc#qdvQnF$&AZ!6kGV}}9H)MoR%2PS>&*ru#ZP1O zo7&o{LpHvmFr3#mPbo84V|Vs!rOrXI5U6Q)0F}RGCpISy3zFHSV1>PQ@j@`+ z{hFB5i_uL>uunhfBupWV)GAhtjJu^%v2TxwqkjC3Cp$Rv{1hguBvQ_X-rN7yI?p&` zH(k+BHrgaNW=ZTPnIOxfi$=xW4VqXj+(th=b2vi63~ZdN4a-KFP_s{3it5yAU()*cUiV(a|UQdt)5GP@Cf!RcZx9?ver zhWU|2EBf;@C!E`fRTXzTC~Vf7hDiH_9z}@EmPLRUviP3?Z;^cP>dG^Bn@oR)n=>57^X>rf)$H_BlaOYIYN=+Q>3In$6-l98MbA48r zk)8hL98_u*t(^95Qs>$YBbQHfc>MtBb?W@bbxhh_os4_Op32?cKH|Ej#dw>OCo!(( z{P>eq>E)FnCE>v7-i0$jyjX$W$ecU0lOd~S;PW_w2(D+-H zx%0P|pSkOyv%GaZMt*^O{_DOS*&9-hj-PL~<4F4WN%;uMCPhUKIWjxCDl#S1{O+0f zaftD=<))S*2PJQPgKo)T{U-9ECh|N|n+(E2NxrarX(V!~=K|qFv{K(=6_4Hss}B0C zTg8{LJu(wlGb!T^ENcyPK9w+CVceWgC98eApL9%DY%`7Z&)=zfOZF_^WN|+VrTebw zQn%%5z2!{_m5-5oIsy%s^d#JN?Z*r^s&*cRxf}iL_7R*a7<-hMx>sySJ|Od9vTiqeqsq$L~p3*c9{nrKa&%FP)Cc zBO%LY?QhyQysF5@9CV+WR8u4_3Z2X+_!Rn$by2^=p%G7?ElyMB0d*eYy;=KjV>wS>&VWn;!%uq}2e&}cYlThlTtVUda(O}0w; zY{iuco)bMX^v1i}d^)nBWC6Fyp;V<)wRrUGSALso{SU8vHOhNh#K-$73-<75$_|&u z@Sne5uM!jR#D1^m>JfSwfn}#wn8=RaeMoLxebC;X4@Q3Mo=Yp|u=}k#rYg#3smTq; z^*^?-;0!yuIlpAvuGAcj+pmS_0)=PnH{)KoJl3xfueCW)&(auQm?1mSV}>E}T&>%u za5v3?G3gthR6N|tvsjuN&$m_xyPjF3PAa(RcerI#k zhY+>co7e?O2ED|H99m!K(u+>Xja2OO;icgZlUt*nYvyqC(^@p2Bzoo8mj_f?z3Rxh zdFNH2$-;tqrs++Cc>F`l8O0q{A>Dw+-WsQh`v)F(-OI%%nCk4i-L*dTNY|rdnb@Ss z^QMl^On&hKGoN4H|C{^SdSSwe;rUy%Fg3ULXGf}34-CI6uykrgCeDk@K2aT;6kE-) zwtiSUJo6Fd6r=A93SnnFJngZJ8uWHx6a2Px@a^4(3+ZWFwlIT(w*_zu0`!ihxw2l% zgik?eC5&dZAVE_4c=1$9tOd5at+uW;tBZWG1c5NzDgXA-u&E$jp1F@ZK-b z#55k8$5>p%Gs`b7j?3Aev%Rv-+8WSgDx)=MQFGOY?^&K>w*EmoIkmm+X-DDsBS)-< zS+7{Exma@{%5>XamyFEa%h;DSuRA&*6sXf$%VZ+6-My|lU#Pp{Y^U4M(rV|}aNgVH z(!54p*V%U1E7*Cu+D@J?1!3Y#AR+f8jC}VeQL%h zR<_Zr>#hjlbZk`@GM@u-Fzt6%;mi(OYfAq59hW`wYn>dPy0o`1EKoB-oHiV3{CJoq zI5(J&ZvO#q+=G#7h#V^oZl27beGT%}=ZCWUUNctorgczJYn&e*U(ynFUbt&g@1uKO zm5BcGF@9aLaXe^njB=x@<|tQa`D-lSm)$RpIc&Rb(leQ^+m7r~$5G2nXB;J!Y+F{j z&tcok;s=NElb)rwhHvitcXt4&0iq1 zLw~JPa_sBI))qML$!Vi*{~LmKcE!tUOLyF}Dn8f|y3g;`D&JjGZ)G45nHlKY|FV3& zht)cDGw(*PaG4Ojr2zB9>|r=m0h=8CHJ~bvVh@r zr^2v5AclU4n;7lIOFK-{levbU#m8aZynCb2_$l1>P7AKPJ5qnvo?iZ zJcvM;M9bfOrZPP;d%^5(+wf{i&4;=}SIy-|k00%P>NoGlO=xe&Y4R|hYB=JYHg7KG zX?h3w*|8_9syZCYjWrECF#I4RIk|X-IpAj(w8i{Du*>FMrNQMpOG{&S`zxr!4n*vQxRc1Y@!Ap>bb=h061g@tV1eo*PLQ&5cxTY*~kP-qob!96J|1OJQ$OJa$Ej zd;a9s<+tm-X;quwub-j$Oylw6e4v1Ty{*AaHEVC}G-9v*{z(YNmH^K-*$fe^G-ifa zXr~LpIc`C&enGZDp?^Ysl%*@P{tawZTJ$Qh*VFg>gknCiKe}y7*@cH|h)6`5sany$ zimgRmyxdLuuA3aOeQ#D>e(jF;fR4}oAbG?Ck@~oYa*22lT`dshgXl`zlS1~$Kgrso zJ4$i$#%+^q*YB%;LnII=dU|L#D>F++D_jT*vAQwgwfvsmA^H{Itin5yM_rsGA_1g9JwvHF;>>ZJlsZn!F^>i%nJGSF>v-XGXCKD&{ zKV8hP8imMuj^DR`QY7-*k9yVDq_esvKj*53MDK8!#@HG8y6EKgxVX%e5%X=?i~V9; zwX5q6-k3teO*a-EDXJj*zq-BfZSxrWZAA-TrM)B&> zmG7(e?rSs{=K1Jh$MdJE&o6A#e7Cr{j~BxCtE}ZjcsJCZilJ%B7oDLJ=Zxp3?rA-7 zEcQlyO5c)D67}NiL-nLgj*pAJ*}gTnllvAQ(;8LrIBRZ+-;!-z0S7KLkvwmIdbD!& zZ5OL=zSw2d@&i6vUW?8#axEvF6!g2jO0f5JJUwIGg3S3Yr+?eO9$V_s>Fm*wu`IBD zr*dmnKoQQ( z@5Y8Z?7$4hyZD>WZ8J}oC0@C>Z$;YS zr=9e%zMV+yw|O1%w(6+A%6oq>_Q+;8r6=25OXUxNd2hy#nfCx$O@g>xtkWR3n=!=g z%zcJYI*|!;z6G`NU;u`htut7Zqc@6-dv^J?Y924 zj^?}WExznF)lGQ?v&$e~ySAyuo3ah#L+*;R&KOUu=i&jUxwbpTd=C%w8eKPwZNZCv! z--~$5f4qt=M)6P(=ANdT%4o}Z>7y5M)7R$(n$Dj!r}WnLtgSEVxL0Ot%w2-i*x$k* z`vGOL%p?i_;NGn*_-BnYQTyHK#$(;RJ!^;GfAzHOMi{MGYl6R#e(GpeQu0W1dAF%& z*JH-mKT^0I;D$6{U9gdzKw4vMWSuZyTP1Y6!`f9dCdg^!Vrgb)uG#txSU=z_5H%4&<>zvzTSk6M;&2{FB&b57iQ6L^K+N)W*^l#@iAkk z+M}Z`Q{!{(R?W2_DMI_LYJF$oS@jnY52Mloohwc zcysm_?_=J$&~dl)&JoWLpRF{v3+q;nyt`}I=$VT;+gg8n%LPVJB9>^TrS86HWUVpz zgGZiUR%}Iq+_7vIxpD)PfhJ5kgO zomq|iXgX^yzd6+7c)5&Cs@%>=%BGZtz|KlIVFbyucC`T(JRIKs+gxMQnas@ISDbJgcCCPw?-O0n(S z*(X~I-_)z(7S7SszP3snV&`p_vlHv_aMIka8LKYuw@_8&XO+Djj~KpbivJJ#v&6O7 znY(si@$QOiUj1b~Q)2zv!fg=GPbp^nygx3&8=f(X15;{}rrsK<`*G&+5A7$%$suri z$9#H-{G<+dDCKj9&Yd0VQ1fu_R=G8^e$=6i4LNHLWvtF=ZX7t<6PfCqb1mRqKV-KZ zr{wEsG+vre^eQ#?-8!p|8{0=F9d*3>0fj)nm~!KpjPsA6o!o!FQmggZg$3=szNSmv z-cY;V`S??`uaRUBdWB=Ue=rRDQ4SinyZd^Qmfls0;C~p{_j2(HJH)H_F~fd73`%oc zG#3B%>4a8kW59EAWW(e9w=Ydi5EcewWBALKX+y(cvV7^#Fm$W15t=Bu_~0qvi>gma zA=QftYW*|YWf5v?<-LC2q+zSE$P8*g*44Hr*rVC8v-jP7=x`K;cpNZ#;O9-+J#SHD z%;MYoucl6${;rv5vg(q5zxFtU!_{#{t#WBIel%7y(_f3XY;riJj^Vtt!`S8N_%6f8 z?r^J^ccVa@-$uJ_uAlR&d-}oI{f6QPFOQ@w@JAvp4xhB}2V>YjvX5QLKi+ZrbfodS zAlp^0c10bwh!=K>vwz;;b!@jH3$Uh-k6%_eWk(L$5T8Cp;TtqZ*H|o_gN*w){nNj!rJq0f&gii7MgCR0O`Gg> z15n3V<+tZ9S>DQ}CGdo>8CQo(lnPYBD zUwU4q3pbU?dv&n+&ZL%+SCXr`!S}>CGQmwY?RVxv{eivx;jgt!8{2BmyxmmD z=nwGKODj8@HF4UbPNdtQ79|1rWe@^_xl={&jTMD)o$3tkw+zm-F7L~X-fcg@fnqcVDSI4uoQ%No18$=y$`s-@rLADamfF&CPJe9H?b^aVRj}vML|01o z7{__8>FeIDb$4_7u<9Okn+%%b;=*izQ`VPU0D~QHcoD3Co<0a>rtpv`MApU zbaB}!6~sZCmgW%;yBc0R$xUn7D!*$Sx^?&=rO51QwNT7=B{|a(R#!_pQieI5bQD(I zJa2MmL)@8!f+x%Un=O|FG(T>9)3In-uNwIYi+x9C6Ic z%BH(QLy{J+*zin=?JShlfZND2rRAN)j#}ZolZo%T)Y@;oHgQ@q;YvhN|YI| zZr2-`CskNH^CiZ<-bzoR49+>58zlyCOg@jz2|xtwxNf<{k*=Elz8Kfpbc1V|=;;b} z!gQKiS|`%;>kj9s`~*dmL&uE^UKR@K&eg(|K(%g7t!N?@ftV(iyU>ZW_;$>k8%~+r zJ@NQPWmwq?oWY#8@~>y6fYl-IDQ$T$EKU!C@p?m4e0FS2Y3^2J4x0IFh7;Q}Xr;Lw$Cd4O+?<`m6UO-2GT44WV;35h%p}is z=C^L2lKz;m!ja8*ErZa0s*(O284#HreW7n-R5jNcxxBS4_3B;A zsz79$qI}wA;~=D`AZjH|H&A)L>Dg!x=fdvu*V?m`5Qm75YFg{k9G3m8OX?%1ZS6u@ z4f4c67*B$Fn&wr>wDu$(j@u$s^fJ7$xu(Q{h?KuHCbttQ{C2GJ>?jwO)t#GCvF93Z ztbA6H!n!@o;HM?KG zd5+4~1+o|*ZcWqh`AgX5!=nx#NHJb^`0@SrE{1=3%$OyMJeO6nZW^gNTJ@)6# z>@p(|GaAb_hsLKFdW#txTWekK&wiy6p2V+I#A67BF&w{?5W67Wr!y%%chSp_@KR`J z3l}0PiYDZAAZ;SE7t|S~hsMjr@&JZeoZlc8N4>JF#vnw|BSId^$Ik_a-W{=bXy^^5 z-Yv?rIi6BH?@~$fA9nC^|#tb3)d*@Dy>hNw2A11qf@q)CmmZpch+1QahCe2vNIQMo<3bAD8*m2Z2wSK{=TiR zeEpfa@~b=Ew_e>*cP6{8=<0ik^g!YIE_*G^mfr~bTTsW3n}%^RJ5V32dV4iK{AOmn zTWMkL5Wk2jiRW#JkFn*&?TCrt*qU)hsBZFGmUPNLZ=<Y3aEo!NSwD zzNwdAAJ0S`mq%$|Lz;c^+t)DTFzUD#N~;hkr1i=}fz;Av4Rklq3+NvdaHL-26F1xP zr(P=8>aD$1Xoa%Mk3t;>($$2?ujj{Q4-321X5bX{2-+tn-$zFxR5Fr6TE@qXh|Jb^ zs<)GIRk2>AU_PY-sW?;K;y8EXssm}7b{4y=l+J{8PO1zf zD%B_Yw{4zH-yW^?K+y8>{io(F&-&lKdy0skDBL)WlW57gvSyFmE`T_A2{I&G<-j^SACyHq}m!dP+<|Q7vJ-${0PjPS5a4Q}jxVz$T<895| zbJdQlT(oe+3pwAj^?{Kc@61<~S;f*H_3VoA?UmP!5!bd2i_?Ty%Y`3 zFGQKTxMXIy`>Ze8wr$UXbzA-R!j80U-Z}mowq~UJ`|Wkf_T7-VIo(IzD=jl?bB~Ma4O;{R{hFD85XE_;*1tW%HosOeGwr`LK%K`ZZT)u zwH2q=)GnDyL$pPXn$(G0F>6pwHLp0|tq^)-%2Kk|!N-R4_hz4FXRMzd7TwzBji@&n zy#dVnosLxNye~)W`!4k*KkDw>{HeTkn>z1-gz@gWQg0XJm4d;>FHb)4fSRW4{c-=E zdF9bn4;zj?pmWzE3Kj1bju zWd~G|D$|N)jm{WBq|26UyfIvh11mY7Z zA>+6F8QOmY(*CTGV_K1A)?ck+Uio?z({*?{D3VmZ6-kXBd?!2fSFLetL_HiZ>33r` z99f!{?xQlf*=E>)tMXKx1J%L9Ok_GYHtp$Ik6ijTVRBB3%yMm5`NAEXksc)+(LL!? zc3<0>Y-kUv4pUZkWOe;X-6S96N&d)D|Bhu4=r^f+1>UsfQdjjkHD9^C>*h`}Rz_sp zK=ef0mUc}o0n|*o~ ztDif&)26}ea74R~U)G-HkMxuomK*J%gB^*ik&h2VhA`eYRcKg-TQ&MDP5DTA;1c$Is7ag6 z#nm+T{=PdJMbAY~Zxzq-yje?^M4DvWvti!v{gQS z!@CVYO>MtHLgm2=(HYs*ijVT=?ztLVojZ(UN1c*25fS&9uM?|pZMo;nzd%~~Y*^CB z$V27#%cHhe%tgqo*znuK;c>r#2q;3N4#dgE$$~P^@xrymn_6}tANc1ybH&EVmt+i- zq_wE3*bHnXUmb9;wF1^o3M(~NYBR0ir?sf0t0A=w)~HnN3V-V<6D?HV7ax+Eox|&z zELri3;0uGBf@dzu|M=hQI9CYUER?pH4;EIcH5( z?v!7)Q5K^6;D9Wb?FD<4)~EUGMOa1^))t;Un_{&Q#p$&|^~x7U)dDDuUeu#rt6Rz! z4||A6=_^I`D$6{qf~-a)x^CFAX}xb=)_UK9br~58)@?BfHM`cnutq)=VcdhMdLpw0 zq_vOdOV))|&C;}}NXgx(8BNr7z_IosUu&LX>M|}plp*yH7dTPaC9(+ZzR}n}!!6oD zZlOMM^mh4wk~-%(W3_7Q?APLPwz}H3j`a5>?{43#h|7*v>_0FP7yU8*3Q5C50U<0` zzx8j@C_{ZpVcvuc^~}pw?%fH!7;5f1;rkJYm3}h>rJ%yH+RZWeE&=;)LVk1Sb^mLPiL)FXtZpw}kTSEcFupWw*0np`(W7=nSvGF$3|&6=>{WLK zLXT3R!w#7Z*z4m)Ou2mh>S_WT_Xcf#=;-R?%7j_oRWJHITTY|1=g-eNl5xB8m2X*Q zwuMC)bMynew%tkO3exrZ6qBB+--=Tw5}G1T4J>gQ`^oUgoPB$z$c>+(x%MdE}f9v^Fh9+Eb@-mOTfSKUW~uYl6YQEqGCml>7w`HM>d&kI-tB- z`5Gtr){d#Y%WRJAzx&3z;KDSlvtV92`NlDm`*IJm)XvV{J%=|R*)Sa!J>f?C0+-$` zM{16D1rhzTObt%QUIz}h%1(*6`()!Cr}P^CExc)cocOVzO;{J67?MCHtE(c$YRGK- zGg#OLVxii|k?hS%kV^l4O=#5|#7Lg3-+@0-Rt{0CG7@?8&+l@PLp)6#`QqQk_|2aE z+>J&LwfEa4FkfW!+}X8je33r_;Ua@E`FEv~?E_8o3u)5|@tHSf-*dl5(71H$p)O)W z8pf^@nK~gdJD9~|&nY*Vy~^~O+%d!B?~gxyR6x)zuRGLQzra5&%YU+BVb`%3 ztNd3ka4_UEsx!|%-jt!TA%kFmFZ(#x!KtwGVTN6e|5N0>?u~DkZ_|`~$|KnVL0)!a{SOAlFcKOpagZumoV^ zJ6&4RvkY7PL*$dz^(7xMFl3E4NIt&H}Y-fHln1wg@sj`1^z4y7hszk)?BK2K+fb!Lcp+8ffHA9gxw#w=VL^qPT^s1pKMlMx*Oxhm|%w_nh-AvgX6dqO0tv>BZEp2ul~P zeAC_Fl`^wTG-H+K@7S|**Q-O6v_g|cWYE5`8?*fmnFU^XgFSvQJr?V=DX92<@muB{ z)XHMSmS<6p`%O@B#jyqHvrvc@n6@4& z?e4F8GUfG)vAxHy+}zHsFd?nW)0iAr=*6SI2}pkVms0GR*8aT3JD3n|^O$Z~qi)^TLhY=dR*^v-{{9eB6KUOD~-@JF-hBPap#r<2RrmME0>zBW66npeGX%ueQ~7U&JAoCcV|Gu12g=3-vajD%BZ51@)@anZ}2>CPnjm%ry3aS zH!=CjoSv)kW42x_qSLSqtLO6~-L~Caw;+SNowL0B=xOUK`)K&u?$TAyZq1(R%-*@j zRxtKtmQzE``FTmxp5Rs31_jGD{xF#8aT8+vm=osnkoWj=!{I$4<@MV7tXd_CdBmLfaVE z$lGTOCn3@=qYxdVz%;gEeG9$g!)Q4ZOR2*sDow8=jl6_hog}6eE!di`9s|OtA zXDrdgyt=XtWh!N5WRda}_lM+el%0K|+_B9Do0q#J%9Xt@+x&WTqCwf_LlYC1>E?$y zEOdw(W`1j7A?y>mm8r2fB`T^{BSoW7Yq9)BjY+*xuQ>TpwHleG*0zk$Bh8jJa~y}s z4%4#2nIvC=zPd$oX2fXusXR+9AUm;ga62>*N7C(A%5ulA3ptBGxaH5ucp#HF^K);F z{!wpVppa#Xk=elN3RIP;QlhhtZDzx7Gcqb?2C6&=3R!}@C}^iVsB65?9Hdk`a{l|e zoCyiWW-1T)TZ&yF~IDJyST0)BIO%F|5(JJobY4|Al?6%}Cwjgn4?Fi`&-%$ozQvQ=6`Bxx{T+zwx>^8pA~J& zs&YAKJ&X3Szp%(+j>i3(Mz5nyO1s}65%nork)UBeYS6Hclf4BQ_PO?Ysaa{fiR;>y za|>ndW|gO64yUE-rafMvvL(8`NDWzJ7e%N^qRl>87q%ymGz6vK2dup!?wQZ^y#`YmS%Y4(wSsqkQZ;H-$^IEijFVeACz%5 z^lGeLA#KC@h~OQ!(`p&14Ty^r<=hTr9EfrkFJ>ue9DGT-vXaVQYQ>A;804LN{9*jY z8UQUo(!YzPh{9o`&m!Wm^A%z|Q}32I=4U8`v!3m%xrC5j{~upCJPvQ_LXVsW&{=@+ zuc?C|xqkK^Br&}&_fR^KsHaatpdBrH)^K{z0jW7too(01GPw*rLCR{y_;3|EE&)B_u-nO!Gv79`QT+ z*C!J|`X~II^dAg}>AbKII;ej9@B*{3+5h+GUmXoiK0Nj42#z?=5G?=zF2F*w!?@fi z?BIilFBF6SP;3I5&Z4o&Y%*Ps4FDuMOP@fa5m*E^nP#BRq!aY$Ono|C9}U673xN>6 z7!cw4LQVjOhqsxBr8C7GK2L-q6X`4_nZlsZ=@b&%fDX_BfI*-zm`o;{MP}<6u*p(*+JYnXH&{!EBiee|V1n@&U0;CoH@u;{DpKPD8PAY*VH6L^FoQw$@m6B& z`9u*z6nIeuoMa`gM)oKfyM?ggcCcXu-S&Bh3~2<%8p^1wGhIl&Np^skEpjnyL8Oy15+fM9jr)R9KF4u~8Bec9Vb?FQx>z=^XGZi6|BCKr=!KpXznK2FP; zj`}YtvtzrH?H{=SK#nCvJw8h>GcB?BUm{}%=&IAafvBoeAOPUN!SrLmPbKezPMvn$ ztXL0|4IrmH69CeF{kZ6V&l(jC7}4CIQ1+|UyJzyJXqA*`;N0fnuOswR!<@%};tF6# z1LhY2d;Q4ufAj6^K%SsoTr$G~?fgEFzS#bxa(R9Wc*$N)Yj0n&Gj*mK8G;IV6<1&K zft*M@*e7#`dJV}1$RX}sqmh6#8_6C+D+se^qC=ktG4aTd?OCUh=}srnPYlGph&Q*D z6-F&At}^4Eo}%1QZ^fozu@}Q(V_{^Q2O0&+#(Qv3dM6_$8LBPbAeu4=_aMfB#dnzY z2WP(6bGm>~U_Vt;P;5C=9R_g$>wr*})ggC{zCAT;GlRu|NQhmnQjA7kCzOd?>d+uD zNv~1F+)i|kXDN$^`svu;>3gA1H{|g$EaIJ#gCKDj%t#~?KwO?6b`Z{+toInk;|>RD z@iyto;OW`~BIy5W5GA-vd_RE$Fi2`XUhGkHd93=hbV?_Ldx(WI87^+5=W6JqrK0O9 z>E-Eo2wKxGB(JDb#X@8=g$m(Bs0+@I=z#R&O_xZEfsRLy;KURZ6$Kd%vZf#+B>Iy_ zq9$u73@@n7(>QuI&KJcz?4FNAl~R0pG)-j(HNSb0f5DOK?zd2aFwir}rUG{4y!H2I z*+m!VVN|X;oUwQv6H&NvWVWa`qgFoN10O01E3SUuXx^P=4`gjb{pVlPmo~SK?I0(y z`|ZQNcg}#FGrAmwS>W9N7aRer4*`a2`vE==L8U=Alr+Psbr_V^NBbeO3H&*UV#oRe zfDli*FvO{5b>#WWbv^EB`16MiQbl}B$k9fzeb9)%(N0)~BeMrlj6arPQQg>R*n$2p zCf%oWIfCsKRHj(=~R0@%dF_?JOj?hIF1+R$YF6udMQbqjTZgKN4t<4cdeginC z2Kb#q8p_>p4sN8u!rBgJwj%#hbLcDM;wz;y8eDoB4N~XTSh>_`?uNleZ=um8qXC#N zOkMRLFz2?g5h((3aFwS`7}|u!S&!bq&4hW3`}$>0OF)i7gbU$$(aMF#k&n#&^LHNm!%PmVeT+P zjHFr|D00@M4~kelOG(bORNEPmgTxUMphdEx-+})+IFL!B+XAFBagXd7Y>OnBK|8P4 zq6n}4oO%BcS&QY2Uk_t)*3NKhibTicA;NA59h|nU?*X4 z4kjuJ%USc~@MOt$S_?Z4kuLgxEZ4t+ioF?(y$W`v#}G={D2WvH#|?MI4YK{{&0YP5 zkXCT41t;fPnc#Cqg=5<~P|r(59=Z;L!6PFemeK9SZKM^WyZttqUeA|B@;dQRvX4Tu z@k*Qob8+)TTnj2a2?+x!YvRsreh>-U$j9uwElC zMBf{N(?NT^=*(P81c#mnym>RDU(C{MJjJq#im~>yw&e{Kfxi(*1oiuskmX0%4AXc8 znfe)0$_yG3= z=Zs{Di#sMD*d<~z(?Y31d%SRi)RYJ3x15)>3~hs3 zpopX zIyW04>hSoqyjJ@kulUvs87lEQvPWhG!)?E_rwOl$)W8whlY7WvDDrKG=0 z#q(kn_?uYkCQ&wHPq#ZB5NKG97DEkZg>XVMk|fzg*O+@v^wv9&j;pibzUcSpK=$A@ zm#>~pmowfZYX^+v({-2N7lv6m7(2S$W)0yUpC0rv^d>^NfvC48mRsnmvwz)ywN&Q5 zoR)l!g+}p6+28qEcYrLoUHfLqZ4$U7ZSgM(Fg$hR2iDtrfc9j-3sbgWrV*+39Wy|S z5~2Y=9)ST_8Z^=H@a$;*ksUBUzXZI`)?ygRJQ7i3-YLc42YX&pQo-UQg-@D%Nxwr> zZ*;M8sDU+pTY!gb41Tj5ztvj~ycfThNS)VPpm-8SY8*ydM02t6DPv*6!b*OON_5j! zdJXA(vGLp&XAwnIy9&wwux}Soeh*0Q7MWFSj3$hoxwWUA0#kRG1b?C5L4T(&x6l3C zw-#qdj_u9UatHmCWE0{~_j-86)9_fRp0vpBiNH-g{hD`({AOv{mnef}$GFH>J-j?3 z>0w_l)6%}?7P4H+S1vzL8OhVTIN~W@L}z~2?_7pz4}AiTnEYwy$kSAZb)1`syR4;b z&9uVA5uB<@MeyrAu7K6Gm%sUG#l(-!&r*iLv$?DlQuqVl@jOVRwkO`Zmw`q%B{`6E zUc~7-86(0IhIs~a;Cpcnf*9mmK!4=>ea>~vk>mfs5^%GlZ3@^hm9gO6%xL#QN9yGp zdRD|84Y5`!jy7Vj(R8@6Lx=9}Oah(S902Itb*rB{nRVJ0&3(#*xXkNxC9aimUIAbUV=X>#I~57CA(2q9 zkh{gIt3}GX%gLmu?=9Q81VDL{>%aNvKft<7yJE&EkL3qWemnsdtVZ2@X+YxHeEWMq z&Z`OlqU>nlswTNcqfo(h2za>@PynQc*M=A1ZCO8fH4@@`cm>i9dw)~T+RgN!0g=(g02?7@5WP$V!(Na z{9V4R&~b{$Rz9xi*KcOX`Fps=qp8b@LA%56KRo>fqJI2 zmwzt@`7C&Bdanej4u9$I86Z#0E?HmQa$o(kuFU4j4aFn;0@GYE2V7bx9~EgAWSq_=-O7- z34xF*2?a^mTmOW6M({S@@j9==;iQ<7BjN@MLWy{9g*bDzkA(E&kzdE$cWoMjkjQZ; zFSX-?S0VZ#9kBG>)&7=$~MJ7fXN4HTc1v~uXVg~7)N7iF3eGl)loPwUyy%6h&T)2#`>FoS6Ge6t; zrE}nnu_bl{E?q>pAONOndXhm2FVcJ(FY{*AE@}&q6;E{FRs_D@JaTTz&xd@eRF%o$ ztBdF#w}^QS+oq}Tsu?y=JhQ!^aoTfGC?}9{6YxD1vjf`40pQaf+RvE(l64CJTyJVK zehqAH9Cq%Z+vWk*?x+fjEuej={=vNmf+?2+%zF6TOIS`%rT=JwXA^N5LRwvj#ZJ11>Xmh0`HH!8Y^E2o;v6cL{YicM322wO~?W z)AqC1(0-SOhUJXNSKrxY%Jw;6V7D9u&GqKUW<5ABFZG~@8d-zjEfug(W`T{Uj{*O9 zUx(OdZ15k+h-t(#ay)A#ky|v*P`z^@wj>v+1=-C@c*`b^66gGu&C#(i7CR%Wg$m?E z2jrr3FdQ-NHy0p659Am)I^qdTe?bProMVP1S@slM6MF)1!j~xFY`@+?++o99_egR1Sfy6>SX097a$JH0j8DKN0w?cadhpcx< zr_$87vG0>v`Qzg|{^5uqK`U+saeb{V!p$@9$FZ3_?SsnN*X=>3-{Y8=DvzuT7uXs4#PqLdhYcMXcsyvE;k!9(q2aoX_%Q44*bnVYcve*1;E(-el2* z)Flzx-@JU9%JoS4@LCH^;yXa&*+;XR7fI^_OV^tO0~BkX&%B|H>CoQMOiNMiXdu;0 zdeid156@X?U*v`lM7C0AI=T}UDh@he4SvM@c*wkiEoAgThKvhutTY?)5n2%@hbg9U zu(3tI?EFqS>;UOqx647YzJR79yenVoPJiiV4_x@|b&K(hPSeXbFJ?yy|6FVF(>%wc z>1%1tDC@}c)%(`wp9P=WEXvj-P=Z#U>A=EW3WqqZl04y#2q$8bA!1i0Va0py=RtP# z#&r?CyI~6Ea)(yIHn&G&Sw5q79X;weu0BL@X6GFo$jOATHH^VGxa#B=m5!cYBTC0m zV^8bw7>!H8I{LpXZBDj-cJt8QdRWa#L3sMvqpc4|1U(QX?v%F)Bk#4HGD}a9Yeh0={KQUT(Qy50itLrfboLW*7=JduF^*VxJ_X)nba+I3CzVEApg+}UrwaBKg1q_%vEO>rmI-tu_e^PV(+Xl z96FAHL|DFBklK$if^_E$AslNl>qZpllCUtu4U92%&V*bngET>o$7Z|N&T$(#c zlvDxP^QwuW*7!o%RJQQ>oyvyfSj@c5l9r<3ehxQ&aR$|G(}fg@@KH?CSaJLZO zfDeYOUMn-pN<%QQ&C#vH71`_UZ%aO{YDd9?>0H7tn&r&(i7|n zL|xJK7}@wfiE79=o9f$LjvCP+wT79qEq^StJ?1sjeb#|bG7Rn&tfZuNgfcMWpN8=~_zR7sUeg2zw)t5d7x#GnOeVU-9M{thftHK+qp!z&x-gTs--oO}H8 zh#tcsBQxj|>N$^JUzFoeB28pctp6uu4iut*%3g9)5bAzz6kGQhqy&lKPryQAF4GXj ze6IfVBbvtU*sYJYoe}klaim>keVUJUd;p^!cEFy)E19VD@oXNgn@PGYtCGZ0^BpVc zO+-qPSe|f-qlC|W{|&|o`F&yKi;1xjP897+?>RceYq2`OYfe|Mgw8TgJ0OS1Ue1pE;cMbG!$sP^m>!dNb^=lucR7muB@ zSWLJBMTvckpGDEyFhndPx$(`!u1$ zbX94De@*65X9dPY*dx9)jj7-02H`-uKX=Rb9BdM+LI1O+&NPa!TPz3mkQi}PabFhI zhOjYH0j=Gn*0I32JZgKLS3T!-q$kp(0b(N?nj4AZCCSA6c$m30<|%e^)sAXL0Gsc@ z*WvwyGiG%fBq-VP&X^;b!M>A@M>(O6Ku?*#-y8j7_mdl@h(+IGG?0 zYhv{ay~nq#&tBO=cS+E(jC^4sHEE7YB0sqH_qWM+bzv@;Y`y}$=9Ok@#zTwbz2T=HA_ZOlURRPZcSx5XFxh8*+$mL5qydMZ z@N`IP?h(;BXBI&(t*|?F?h!0Cf0#jxoa{J5p;LEdrs~WS#)7I<0SIf|xl1g&U;|ip z7@TduA~>N1?pQ=OZ)HT~9^v^PxCDCbUMW1L4{E~%fg)^?Y_2gX~3Xk+j%L5l-D;U;1{{mMZU~e+1Qp5PNyV+ zx<18OJVaC0Q;r9)@I4;yKR4cKd8RWR>MPSovJljHt41 zk}k(*JoAKnMjNP=7(E`fyb$OhDY%tNQ1C@DHCL$_j$G5$DnWGe*zrU8Ks`f!35b+O zB~&qYtD-|07I{UM0hLn~b3b#=LA%n+#+o@zFPU=b-LW#Ddl04dk!(ZLTcmvrGiLso z4#Xe!J;}@PsdbRVhxRUC^J(K}ns)F4w>(h(m5p5_hXy$K1*z-}YX=*t2;|n$Z-J5i zt}ckx`vkRPXma3G2Mvkey&@*ZAZ__nrSuPnY?(z&LkyNsbi;n*6`8t{)Sm-ca>DoX zs5Y27Oec$`Fl{MrnSZ(85K>n+wT{PWG`v@Dcu=SD!E|!c_SH(@7gXHD<%Gc832D#_ zwv&&dqM~C_oC0H>;tHx(kuxC_YsqDLz3KqV@OW}9qZXphzXPcYDF`(d3_x5y=Du&Z z@czG}`9bZ&gA5agr_<5C0zyow3Ll+yw6Nk{KI`s*{;WYFDw2&JxBcj>CckdQJwX0^ z@u2a--wLWfqc5YXyAQY+jauVm_7*Ds!t|T#EhmrrDzyot$4~qEKcw zDkm5yi2_-{Sn|Byj>7utIdHCi^#x1<_dN@_l6vf9oTBdgcualEprc8@QXxDmHZ-#cb4uDnrFGD{fH?c3cdqFu+4VjO6iHSmZw6%Durh zAZ7ZPR?=$OfdQwi-yA7K6%!Kn;7e@Ft?;TrQ5+ovJdg&sqTM%}J&!;HwKBQR;*zvP zHn5-n6EH>2a)a04@WL%ikoP@MsJYHFb}y(f9VY{*5ho9Zso<=5toqmlq#XTJRuLo2 zaj$o9Uj<#d`){AmKTn$)jcwwyYE>HT@Lss#X1#zu$$~4Z61|Sxxe|iK`nTq}jqS zIE*$7d^{YjQs# zctkV8^~EN0B-NP~Wv+H+?_hPE>UgUIkbL(zzKPqQ@($1YnaTNZmhu?tWGgUqmtGM! zvG>HJ&=U+ers*1oi#s}xS$2BjzX$|nvr^uYfVqBn?3I#*(;8tKudv2s@z` zjVZj^hyXQ84&kf3pmEOG`8&V)F2e+}!LbCvVrn+is!>(h6NU?!x1!;bro$> zS&nB%Cb&bpfM9qywiw5q|B>cJ?F{>yC2`@i=%W~gy8_(dW6#2TMO2*($(uyC zUMb)ghz!J>6w#goNB3yIe(a&E`IDkH+D~O7ep@kLsGrhDv zd{h)QXv(>B{m0Aqb-dzcfbY0BMTH-Uf=8p|L@Wb8Kv(Fa~TRI2DtmDkCbpJ084tx78AG~+t^Pr&oK|@;Ux_^IEUuu?A4kePYw}0e33RQZ zgHd|IRBjONwGJBWl2mT=jp;(Gj5Qt?Y^z% z(mP=3Dk<4yrVR0x-AG%$$w_hukbRYspg}r5*~7al?o&mR;#eq((A~7Iz7ptxSu6NR zF}3cc4Siv=%u|HTRR5=e%JHmfR;FnYrV67^$_vb{83u%cpT+yS8UmuM*8_4HWiBp= zF@Qfv4KhZw&UN(6VXxCgT(!2Oi*RI}#+ms@OG-y^AEFNdRvMtZ6y<&1+KB-+;&ofc5~uQD^CAfc1MIW3QY#{}KSs zpVU^rtvKza0q_3r7LamweazbGSVtlacu%|b|87W*bnkVxVfFjSUe>=I-zYcrUrVTr3LKtp@QNT z-YDO2)K>AuIm$1*~EcHMV-!)u63R8mQbTIsk@`fo&(?{Q2># zKn(yq*+h5i00k3KCQ|oT+$N%~en4*m?MqPC_d*yQ?sfXWN|`^{h7S_L0{^g32OAa* z_VGLw%#UKsIZdgb!!ahY)6;CKuy;2UVGhk*WY)xkc(q5AI8a?F`*R68+y^}x4Lh8;gXWY*O>=_o-?|--F}!Y%dbsL23ZwEP6f77+ud;Z= zN@NUMV8+R&a~YKIvexnoO-}@q88hJvaKx7oLIGcb3{>A12et8~Ik?CoR<;-ewQ`Im zUq+H=KXr+a1L-Jo^5(jnAsXY1<*~R6s*TwETC2^IQo?DBKDl6)3mK}c9R!!%s-+~7 z!{lM2t{&+sDwoi zdfH}D9;*850^?iKJ#P0OGD$QAYhatwjy{M2dZ|UnK}$eVl7H0xCYl3ayAc#K-);{8 zO0-&<<(bI+^Cmgy!|nMPfXEd?A6iFZZ0cuus|~GLPm6mnkvp;KgrsA%3@1Kad2j_r z1+K+S#I06HBQ0-J!mkjCPnfBM7h4aE=&sOHn6~YsgoWpipC=(xOdRJV*HM%`4|1h;xZ(l_3 zQT4ndtt*Q5pV6&OO&#wiPZu3W0k<~MQfsu@A3*yc0Gg+j0sj8ZwB;z8q6qKane73Z z2K=u~tfzoCC5OIe0P76^h%E%rE5PeY*)td5(j}8EYuc}L0BD~B==`8RkyN_(myy~* zlux31YACT7R!rX!h0T)$6-R!X&1F$gXrp*o$~u8g2l0l@+^|v7`(pcXLYuxB1NE`w z2&jf+`foYMr-^XfLI!w;D|Wv6GxAWK6H^>v62QMk=$`DE{xUWr^jvwiNEqgV zVB!5bT+)TtpWy0B& zc#4M}UF6gFE~RASC>s=f1g4JNJ1mV9;Z&35Wu0fg-1@}S6^6aT+^S*1BrN5U##Ga{ z$~^ZkRgCl^4*b5fZ;>FKhE;+TKN0`f&V-5C=;h*!DOZj$hjSONXB`5@CbBy^>SdZz z4~UZjDF;6;h7!vCjM@Iu)-b!NrtXLwd)mBIqmMAm;BEM5D5}<%9?J7Vw-3B_y^;iVP)4-jhd5d<=7pM<(5=|A;_hTf zD%p-AXtFUV=}fphZJ;)41)&$4>yRMrX=cOg0c8;!j~I}Q){immCx;gm-=3?Jt%I?^hqoE4i1*tSX@4bn$K==zC~<(k|B9$PJz+;sm0oq;)SU;Wo}Xt48EwD@l7yxLIriV9`hg(Z(|f?T z|LTP~OY>Yq{;@|;^-6Indv(u;$erQLuh_RV)va&pqhZlx%S8TnOz)i{b$Y@iT!|hnD zISGOc@$=v|&1ZHeFu7P!O(e<9na)Ue&nz%-cRN&WH}vsIcmk(qUe$}w<*5fjQGc_< zOA%|i@`|AKfJ9@h!6PADu90{MXm^$zz22+?^|PdFi$#cBrYXTnjA{<6e_6Ecb7QeK zm=hPXpYf55d)v@p{sL)q~-FiH#)WqdiSaorH%=Y54bWIQrKPgV0#a4=Uuy0cNfOgrxt^6GGU5Pajeb*IZKN4a1DgO!CeKt{4Bch+TiW3p$ zK%H&F-0YgGDn*_oo+h21XYfpw_`#0gbjTgkzk5$@<^q}3yhS(vP(w?lzSS~jc*$0b z@|^^7Xzh)gpRe_Pp-iZn_6cA4}p_k06oy(HcW!@ra- z-O}Za`rhQ^1o%WhQH z`rLV4^vvy!D@)O9hQStQ@x^qJJ&yl|J#Zr!@46+ z<|F-hdHMJE3|R_3i+r5Yx%!T3OijL8d(qnO(^jzg^>3Vi#(kGb?p?byzrY1&?Hrjq zg(bE6Ph8|>alR|d>$2Fj#}g-xRnPZp zQudoU9zLTtm-{C(yVR^^KRg0-L8Xhj6T-Ead_lXy8Ez%m4FHE=SBAqnlqBa zoi``NJZ8f+%6JC<9aV;E|5Yy%C>rL?-L9GZHN4o_*;HwZ9;Ta=`UO7NyLrHnJ36|b zSVb39q)iUpUid6?^WIC%Xg zX*UJw+^2c}!KP}!(bVk2KLIIi8qR`$kM14wKDeM|98+}guH~m=+*H;mO*glQPM#Ni zOK4B<`A0Hq^3CqN?nV(Ct&xX+oD+|zFCNA&eOLbZXMQU{B>9nd7|wC*Uda*eTh`x` zyW2R|nxqp$dit`3Gz4S$u7>|uc=O1YYHmZJ9Ode7~9+-Yo7*j+$v4~{xa+$-_;b^Y7vJ2jqPKQDe>el)bVl;8U?R%le@8aknI zVz_#MNw-epQ)g_DZM({-hIepTNPxZMBlqSu)fP>i`^|KRuM9fXmg+Yb`}+FSHpl9j zwyV73R;b?7&5d+!ce7&uoG~O1CY~Jxg`kx`-yZiZNayA~FMB~yWBEdZx`nDbhw6<` z-G!zGCV*#_Q|Lp#O;Al?v)D0Z{Bcj=@3sKnw2f$A7bh{!;qI(jN+!tgW_gdb?&i3i8$ba`U<2TH(E%njW}+_1PRrOC}_1A)svS zfd}>x^!Ap-dLrN5-O`66(hti;mR;>9ZMOp^ay;*KoenTk2Dqj!C*+$RaDjH}|!M%VpVJ4*Tzi?;}+1@J=;U{Y(0`|Ef>A zsQO>MdW!d@nj1eRp}F3-{?^J5EcP>Ei{JZ&;@+jy`qO!;z&{my8?=5E*4iOckyh-T zrbzE*5;7%>{h2+%ROfcU{L`CE=?;k+jv*Ep#xB^GseU}Z?I!o{!>*>kyzchX(C_}Y zZU-Jr2H$eI^1g1EhwqX4>pPa~Y6hiW2q(mK&Q7ghC8_=|dksCVtM!BBZqol0tS(PX zG&t)H1%~_TY3Z&#QJzpVdZyrA zSv`X>C5%n-O8>uytm-={-^QMV=2XNTFeEqaeqH+BDf3mays#j5tZ3D2V$yX-M{z@@ z#k6SaewAKiW!$s<3jQO;PS#)AfrV#vJcZcnT-HTyT86VDxb`cmsJe33_I7G&Yw zxFft88pj;#?=;R<5B_G@?SHwtEB51Jx^P*?*8SJDkN)h`PkNVx+PO58m8pxnhrPj4%l zb~QYhper&Mo`2RB_@U$gH+geV;;m4iMc5tNBDaRhi<-DGs<7F2wT<~7wAee)OX$}} zyJA_(FrJH0m-0P*s(=Yv~u;mm;a1>-Zz$rx)1U8OKl++< zr^#WXxv1`T@J-!dg^@1_zN5P_PHbE69`T=RkmBchYIvwD_~Q3;R^1B!rSX4dO}DuO-+sDqJt*Y*f_m-Gr|TgRxGf*s(WULA2X}9T zPTGc@4fQ>E^T{MW(=Kva{@C@Uw_4Ag2BDA^mmP;I$t(90GW%z7t{f{8`wU7l&HH~7 z8H^d8-d+FP^W0PI)x!;4hu1wJt3v|AdqKt{x94*IAbHRJ2sdsvS(vL8QYnl-tFG`I zR|vMa5V|dzB6SlUu^QvG;Obcm#QRJyIFiBmd~Nn{$ime0asPuF2X?r(Qef zWx&-JT`GZ2H?qDR>=1?>dwOdapF&eR>QDBE`xx&szZ*JMk#ur2^$wso=N);r&%Gbh zapU75D*b#k_@nlkP*lDwO4(g&2y^YR2=g5nr#}LbO&TZSK5jAJkTs z4B|d++WnL)qhIQOmHn%}zQu(t;wIv`QRv&Tm5Jn(mtQ81hl^4NZ(MHJtQcJgJ>9pe zl60;Q@1l65USf+6c|LEI*K02jKiB)_x^j}-NEFp@HT+l1GulDpxmRgz6g56u$4DQi ziXT0Xc9U}q#KM;Q&nT?~+QVcO=Bmr4Gw>{pGmU@gk6S-i8y~L={h8_b#0Z)B^qTiG zg!|4Pj?B*u>Az@-jY?CESr!i^PY#$)AvX-lg3wQaOrVEtLh00_D!<|zwCH{$%>ReQ zKUoLr+o3~yPpfc1cRO?aomYvk!7wsW_d8K2va@YF;KgI-mQ~(wA3L)k4_*Eu4BS4{ za7CS&-z3g8V*6((Ww#3oanoDvYP8YJ$iF46_6w4olr$k0H1``NJ(v4cPF6GPH2cdO zOP{A?lutg6rv=>%aMly^lRuChX#cSJ{=K!Q=T^#-U*m&$O3yWWSsQNr@d(kLwfz=h z*nnn0t$ow!k4>h2&;OZs)!v&cXhiqt z{}_@0JV3+0y48=q9DIBDtKHnX$j58jE3+~Wd@9aX9$w3vrfUlb3Qe1@Z*_~R{IaxJ zo}rzV*CygpDEN58Um?&_{NUwVD|NM-pNMU?`(d9s2|*7Y1YPQtnt|~A75tupMz@{V zEq0xMprmb=%=&KyIoms}|hIo|w}y#4mW zz{j+8;l`!fM@u)t{?15<%a0s5{@-C1d4p_R0U=nBAWjwMC!bSY$Z8K{dH>@hbez?LTJv+zf%}9_=Yj>8$V{x6yOD$b~k}Yfx-QO}xv7Xw` zbw>D|vY&K$<%KtiSTn_>`Er4)L{=GG33>qnoPe#x!hd?>O*N zcIjN4gGy;%Y#B{Y%Sekx9?dqC?icCuNxmy`WthdjMvuT@e?(XZgLxHjp|oN#>&B@5 zh+xRnRks_h3%s|QuBC0~N!%VI*0HcdH%n1oj9y}k%H8BgjK#OdP8;ODFu$2Hp=_5H zv=u8Qf9LJqXC9fOd^S^Tdkn*(-#hV_7x2H^b8ph6ZO@(j{`!jr7gqJySuwATbIw3; z7<{;CoMA5Cmi^`EapwC)YpOh6S;a)9qfPG%v%6Kkn+?qWSa5!R;|E#0kq3(Ym#QuZ zrP`QS`-`Wew!C0bU0W3wSRER;oB3I1zLv9#?bBo9ECcg(A1Bu@IEQfP+rUR9ag3f!2goOOCqzTLC*m7vC_uJTD+8=a1f`T+R zIvlRYc<^A*rBN45X=#Md9PTy9kI`8dM!zbo=_~iX>(#AKn&XgEk>^YlwRn(_i(_1pb zlK1lSXT8svoTQ^(NYqud(s8L8Ah}`^MIJKErM#e#L+wjSSB+8L)DV5xgx2Ei+Y@1} z8X^+XRvMxcw6rGH*Z7VrveCa}4Jo~BG@^aIdhDxy%pJy}OQ8sz#ojOef%-JJ9Nr$X zrPF;e5+*c26S#_L>_lqJf+0Rp?qM1;1LLFe_!>g!(Xsg<^Lzt?HAzNVya&xUzEh`h zem_qW6q70wKPp3$RXfj_e`_jdQMDhqERvTY|r{C8ipeAbOl|; zqSnBfh6W|X1b559*isIf4~ltL8oslC|HRw!+PS*-@ftdY0o&7~W?|_$oL2q1rLwzq zZ_zBr$VNsdRmf{SIKaP-Zt{eE$MM&*2j(R`!o$1TKI}TKDgW$xJ;BVe1WyS0zFAa8 zG=+Uc6nWdK;FIzFR^g+`+2-rx(o$2G%=v};K=uVYCZTm6y=?NfAy^9Y80z5L;V!t^gbeT**#Xx6ixeRgVQ zjs8|{(@zpbbcdAhnsA1#uI#UjSw&}?uz8C}_>Zghmo26Z7?q9070QZsckdgr&!@4) zoYuOk`IP<=`*cIAt>5aH?~{Hk-5X}svESjy+-)$B9r1V~XIF2PR8r%M4>O@VZ}xnb z**f#YDfJq!e?8`-{pe zb|T_zqK~CijGwx=zZf$3VIc7Gfw5B_4$YraU@#-H(fm}6&!-HioR-Bn(#dtTC>_Y<%w@J-nqg7A4J>}Z`TC6TEu-KVkR2WyF5vvT>O=aaSu zo@n%UM*I4z@di|B(#J2QS;n5`vtSQelZr`sm^hyTz=345hb;DbKTqEG! zX9W#A=`A<5ukPHyib_5D20Itn)w{u>f;n(hKln!Xg^e9qKa6|KW2XdSQie|7RbvaY zXJ$s)(zFc}_0i(38tYg(Er)uglt-~o`w=P(suNYpv*PCdf(^QHd1x;$jm-+kTif?f z2Lv%$xCH9z=54lYTVv20>)UdDG*VLH`riDhu>tyR$J!D+WY)O#qmcr(7i~onmsw68 zkrT_>Qar1`?WSE~?R5VOSMs}udIg%wV|QG)Zs?PJ@mS3yN1JzXW4fE59sxU<8D$%J z!7y;pF1)p-6k&mT*Pey`^0~5cqxID7%|=%@3Erto9}_H;J2qH!>3P!)?=R~r#UJrI zKb^i7VUqteSj@@+$+Hh%XrOm}ezn#aLj7=klMdULyBj6O-MqJINU3Pnwv=ZrTKm!{ zYuIwd9}!=VH7W>vbIqPP$fzc^M>lYj>;SK=bG&DdZ_k#AGXk7im(q6od#u{y9b{uC z))C(({75B_@zLgztTdhV7V9l0j>Q~6h#%R=T;29|j%#mojp!N4?H3j-lJ^PUm)|T= z@pN3;Os1S8=YU*K-?7r-r|ha5`sySGZil?Xzj5f*dAntC2%I$rvy;)%kHkIn?4 zk~av6yvh>a5;WZz8n#xA@5rz{8-`wtLG?l^0qa?E{7C<-TlwlA(;N|x=+1o)FFTd2 zcfhjw%b@^uAy3Eb_C6ni&g7=3DIM_vHsAVy3jbXavSVXG$kuAbm+=-++W9SS(qj_s zIAw+DmUjec3EtX&(|%KE_rj<1SC!6v3iAG8&4oX{BpdKNdb@sSV(u>53U`O5CmGXX zM{~YjPn66*{$6JAFZ?JM=sMJplgQXG5%)kI&$2)Ed+5$L z_7)xQk2h^Qtgd6l^1WhTT`xM}l%~zI8ny?4PcYowPIEK6ScJR8Qyi`mnvL|5j^Q>w z%oh@z-{gLNms)qwCOw4&xY4-Ep83CHM5^@FW>4jix7$L`S^be>f%CwhuM?`~qJ_>7-(ua`er_1~m->>Q1R$Ur@Zf081S<#8WKOPWk7q*X~-Rc$> zj~U~`NyU1@wj1jMj2w_pj=D6T%8Na8MJ%y5=lWNvk`_n75^l*?opk5E9caPr%x-kb z3KM;^hOnp0s+@(h%Fe+y=~~qM(XeaZkK5cZwtNR~D>=fgPT$NuRup7PggNeoEdW3_F zm%gfO(KZwH@a?g$q)ckpJ#di_%tDOkjH}fuwGWoLFm`>`Hk*7O^#K3OH-LEq{%+ua?w@f zq&-^hJkOw7{=8#c+XJB^JbRLNmPK^V=1FIi%35WgbG}12i9S-C+SZ=x%=d272hZ(e z-Kp|xXlJ{yqL0>;;!YOan~ui1#9{dzoBN#0%k@tZ8U{4>Gvq*x7G^9z`+zL?DCB5<>;MM6 z-sofd{%mPxUp7oK)2UgS`f0OnQTxNZyqL}+T?Ujy7|7gy9HfB9^f%E3`S84O}m}qBJ>nnCc zC{IuPhN#xISCRrkw=178$sPQ(bm+Y1 zB&l1^S>NULl~&5BCf#&X(QEh=!qk6&Rq|28u~x^T12nc__`>3XIQqg8W91Hyu!JWW zPV~)}_gM%X*b`!QclT-QBc4TT8q7ru?UE2jKU!DC*qxj$hb*hw7fdYq5H$9 z;OOnn7sa9V?o+R_T;+UIc6OO2#9kbosW#L*bklk4i|!FRm4=;n*TfWxiAFL$ovgY~ zfA(dOOKtQCo@Smco0}rb&{h`(69$S$&33yUr&^%&l8~ z{xy`rjY0J8`iY?Uj4g#mg>Q2U_ns-Pdt}l#S6(`LSa)r8{cbjs*BfukYn^Vy%houV zNX&4a3U$`(+Ltx!9nAmb#CA)ZV%6O4m%DcDne$M#-=HR+W{396;X5j6c5IKP<4#S9 z4Vz~_=WISI``Dtc^qxc6cv!6R@+Y3D+qwzgWVH1Lg|=0cOboagCi~miym_&ek;7Kv z+Izh`)uDTX)ed>(Au~2x>jn4nZ+xEX-^laa)9>ZtS64&suOEdX258#yS8e&|=B3xn zzJ1d{$j@I~^0kt9a*GZxo0mH(Dc=1$ z;-++kQ2SR2Z(6Pk4_@|18rV(geXKDrJ~l0Hm2u_%-NX!^>i3E-_BVbW9@%(|BNjJW z!|?vt=^K(|$5e0bPiM96+t4;ZuXT3yF1DhyL9WJ{Z0&&4vk_ftMkuODcf-WK*f8S^lAMBd!zJN|3RYuB55W@grZzQq)ZlQ{4} z?EbKdZHda8T-hg+uX26avk&FeJmm|0HuAxL^ltgG8`F)cNAHZI3NseiT*K|w%3l0x z%ba!lHur)bOGn+r-s?GHBd;SK3KX~(>fQ}z=O1$A^Dngzu!_@jmRw+ZZ}aF=IcHI= zV+;Z3+nw~yq%!U5EL}?rOV+{1#jm6Ev}WC_dp>Tv+Hv;u%biWA$C5(>dGD@=M~TT2 zhSbm|4_pQKRf9LSy+Dn$2(6}UpTtK$>W^OnHYz?NF3hYk1Heyz+zLJdWVk(vmd>~uwyb>H#+R; zZ27QKXVuzI?2zaA?7`PjdC$rXv8OKKcc=wQ2I_pd z=J4$EA*ljokIf6IS8ZO^_WI0}wO@X}2#DeF;5b5T_tyshOY_cQan1(ciaV~KQcqva z=qw*+SOrv-F%qiM!e1l`^#f_CHY&=sD3K&Z2N31Z4*B5*<7)*1SeSIt+wrOPI>C~Y=?IYnKe2G*-%woh|D-DGQDO`p!iW+f(M?we>N{X#7{nx#8~ zGi8oYTzhF=-z}zoUUnpVu_p1|>)yux$n!Ntf+GaCj&Sjur4+{vGcirU%{eKt!Y{&R z1M_Z~z4yBrerAf^T1%~|R(oIa^UjRX*Wtr4>u+Cqcxvr~Fl7nWJN25!j0|&}eV(YV z9p6xra9{n$vG(!xTzBL}hcon4)Wp{Cv6)@_IIeidCQ`20d4^f*)y|;#d?VVOpN-c) ze(^OV;>s7}*d@t>=ouav&QkenrLRvf;q(| za|MHgn#^*3&1>#GUK6;;Q}Y$MH=FjFx^0L31pTUR#UMKI0Q~y1f?o{QJ8W0C+q&xT zyB71p>T{VxS)6)ZTa*kY7J8IE@LC+GW91E^yErb4Wva=z{Z03}=^{di{-wKU_L
jr}1LRpSK_=hs@yyC3CC=0uIkv?n-N~(Xj1*k>@POr^ zXMNB)9Seev{OH~4t(o@kFNbbzroU-99EWA~2 zn=O7$*SsJ$$naX#?fVuj`Tg@>HchasJ3Y(wHhjAR7Q<-x?2x!m!I<^AlJrDNMt{xk zmK&r4KJBya^&eO94!zUKV$XHV%O$FCCy&0G$7&JhU3Viso6iOvO^I3j*!rz1qi}vc zA~@m4^~hZrN;i+*n_gn6*!XgoGgdBQpr7Lyj#t9!r8Riiz_ zu9w=0A~R1o`#*XZuKeL^o!Rwcw=o==myN#B4>uaIEL>M?f9yY?d9X0;{$K}cL(#e) z2||kM>g)x+MdnU#)sGq{D}vIuCH)xsSn{3s?b@=U_=$$xk7aX91r07QeEVkWB&K_722<|2 zN+j)bmCBD-G_ zZisSMR?f5g$S+QLc5Mr9wQTA;pR2m?WI*O!Tk7Q2b~mr78Ji1dUzNSTsP=8~QshhP z+n+k*<6ewjVJ@?IwmH?kRXsx~++z^!HY3_;z9dnp{>gVM8r#}l`SftS1uBZP(!M5quLvegR+NMgnBj4PYz)sY-jfG*cpfxDqWX!^n?dztm(8= zgvtk8s>xHAwZctf=V-rv?YM>0*FAfX6D5E;E_kixK@PTVAwN9xOR=~QpUR*-ZROs* z+3aU}l#6rjbe`|XJTBSV!y#Yssb<}wCkuifl$on0^G8;-Rwe3O;GbyG=+J#4)Bkcw zRU^XShG$;rDQ}sZ+&Ayv%b$Jl{ie_9=vMiby3`>9Zmqn7QHORn87Ku#j0fAsu(#)k zeC3lo%h;8-Z(U}mp14R>VvA{BQf86K!_4yu%7e-elPvi}PR8Hk44Zr0&rP%K91md5 zZ_zh&3Gy=ab>6+neY7E_dwt+c^^9{UN7HP}v_~%2^$)_woqQkB*~b$0%k*^z?$h4E zazSv&dq<$1-f6Y=skN<|uQD>e%&^{EJ}j3RxwEE)wLbkwi&rT4)q@< zgAKGUwK}3EP1X0OjkMc6f4p1Fn?(e1V zoV(3%<2oxtnc*Z_uQ+f=PmCXP{GvsRUf;)#&x?TORv*9xOmw61VP>|{Q~n`91TNg zjP*JRn+BDMak<- zM@jXLG4op)eeHUx8elw)!he*XWuIgM{<}dXq&Iy zuXHNm1a4%<%O_Rbd7@r!D%Ue4e7TOX`^OhgpR;;0BlGsY@3?Za(orj1d966}x*abs z>>Xvk#wJtk!rsGQP)dK|9(z2Fb-UmWHT{C`He5c}>b}X0PKUb$l)Gf+d3W}$B{Kwg{_R;F>sg8pzJCEkpl|0Qzdw8q= zS>?{tFAL>zZ%S;?m#U||*A()SdHmV4oW3Y2Zoe}E2bB9ltqliTYZ?{Z>(06oYA4?2 z%012KKheg2Y`E^MWOsRydg+_muJAkW@DYlKPaM+TVP~#?Nr%so`9g=5w!-V)h|W4W zSHif&lCo}l0Ij|I28K`cW|Ft1&U_mvq&>0~FD z?K}P62uz#{?y(sak=-*@9P{pQbaOA#Dbo|FVOjg2!R_p7b(Hlv*@863xn%M64|mLD zHE_6}#E!{1l`xzed(Nc%s&xIUwMD^KTOORwfVqGTtsk{49;{2OG%_u?C%0x4+fV?$46BAwIkMcB(AhT$EAm8d*()m}) zDe2SZih10fWWC4YKi_Z}lN0P5Q}~r$z&Kas#|v{W7ur6-AA^dEC(h03kJQDmuXFP( zTU@K6y%@qU%uauQX}WdurcY{gN?B~S`fQCm^|`h>VD^_yh}lUGu{x#{YuXg@?@GF{ zS$OpZmM3iNcMaTX=y{Y67-@7j9PL8(n_bap2%ouLbFrpNdHLkx^TK9@fRm-Hta2ra z$vUr3JctVCtrX&6Ih%W&HS1Hf;m}*UOu87Ety8DP1k3~k=VcKr`fbUpWIc+W%`G%q zXfT@XI_|5>x+8KKZ@F4i4u`UXTZn*84L7>asiTOMKcwTsHTbl`2sDnv2O zp0feFS!3wJTG{PPIp+qWfEW8BI^W6f^WaiDL(ohqS&s`?8qwLP!pdc2zE0}RD9@r5 z{i%0>rDm)=hGHg5kzxtRuz+Em(K>85XNnd zXcK!RcbH|S@5|sW-E~9vw0NQ>4&_;o9Mf%VV3PaL8Y1g@0xvH2u+wNMGyYsiE{&*| z-H9J~wJl7K?E6YwJHD*hs{Eq|@qYjYK>5GwPZmO7<^4LpmXkMRWHU=qMTH_qW2!y1 z2iFs?pYmF04&+C@txwnN$7Waeg~QgZx@SPo^P5`SRQN3`xsEmG<1(z1Ls1tMC@sNU z(pG-$?S%*H*;#n$+YM{9yx(JlHx4ZQ0vI}|?n7b@qN7C>!5H{2mXbon2bkSEW0GKWE8UnRO_+4>S1-~i$<~Q&C~%u2gmD4AADM!g+nnd|%m;J@r)FaZ z2jThQM=zf?Cpda>I^%p3Fx`GOU57sNk~cMEa=DQIZY|;&Xp3YzWGbe*7>n#`qp^0) zK z!C5wMnsmzNGWSOjXb60Nw;^8;S-FUjC8k_Ol*|hzwtY;m9qR>0_@zD19;}hJM?U;1 z(IuWmbFc78XuglX8hy(su_7DeW>#WT?Cy2{&uhFe9 zz{s3tzt&#tW>u27@e03!c9i#5y+xlugY;aAd@zaM$rcedI>*^h=9ujokrZ-!(8aN; zHn6wCdfxHEv-#PRsD9(n%JQU==1WqBcaZ)H;i~X!aQD?o&AZh-B~@$U7!1vuqRZWy%pS;QOE(5DtY+V!j_rqH?GjVW6HYE z4I;$`cWa}J>XB$^inJM>G5iptTbD`|K5EBiD6fC@j9!T zZ^)cfFMSjofM7T+_p6gL!}Mw_BI8Ze9L^uQOLl&h{gBUXHRWp}t5d4$ zRKyggz)>-OBvgeZlD1cPz0$dp8N>7booV#g&;e16fjd^gPBX;lS#5obP%~d~?%=1{ zZXf^K>@d%fXAN?vlp<3L{OM8=0!H){w$=(wRrTgNvQF6t!OCOp(bUS{i}oLMp+*~^ zkv^q09*FSH;5ae%;=#~!WSVsD`$}F&N$Doc_!8V6Vn^d8ne=Q$2V&-rw!EP(HjEJP z(V5Ij(4*SZr}YSPJ=y?U{KN>YoEp*Aoz?$&>d|9et1>Aar}~l zE_v%cq~ky~jL06yI{+Z1@C0I{&sh-al*e+JC~sKNNKo|_i0D!|I-7P>m9 z@^T?iQtjmOMRWrHC%n{!-N?A9i80L&tl&GjXP$B$6`^Dis&Zfl`#Ioi(aUzJfWVcA zdLH8I+xU?MQ6I(jpfv<1$nz(jaa>~>6%d-z-NLfh|LCw=JwXFE`m{b@1y96|yY#A; z_3Gs*7CTVo805QI6#5+0_e4GhTkHvMYL=mDQG&%TDqpd~te#P}zlEi;zdZD)@l#cv zg!B#p`>qSMSgN4ERViCD=7?ZgrLg{^&jUE8FA{4{W}4OpXLDFJC`S8}UR6UjySl!A zJeWH)^bmGtyDB?g&}#~D=*PZd*ZC^U!|FU7dt2{*8rNjTNwFpOu4U;%bua&Z-b}Ro zqLtedM@OOe7wwI#llciGV_!4-lQM6d&sW&V$CC~ zgqP=s;ruge^_?&J&Cg}qj^4%NV$%{$ciX2s>p65QrmERLM=w#DwHzpmJV}iAbN2ed zcKL=A({-q!p;SsV;#kslxLoOjJvUP<(C!K{s* z!O4iHFRi@OEfQ`{jZ_^FXj<;v{ZXnWzI$-vHo(M2bCz7W@OrFNMC6K`V$P@%*IM?3 z-fbub^8JhNJYrOopSL{W(AARmZ`Hu(Fjbeg_AmD!bon zTFPiYN_*lhMz!{F}5F zTgceuQqCJd3Tg)gS>HJ-%|bhuHlWgIG+f+3f&$vu=2Dd{AY8|zuLM3O{Wl2+Y^fGeAS}D_^w7cQ&NnXLVa!<IDLGfh#w8Tl!)J>g?sHj<@Q+#qojbhP*sC&WVz3`2r%_;o6#dz}WNC*f-C zWI;!Q$Iq7&sFopAPJ~iRCZfSv7#`FZa^J|Ln1aPqFmgH<6=hUSLBVhgT&hTEeDSCd zj8(=Yp{VB=nk`Zy!Gn&8VN||^!Wb?sQj3DU^6G&f@!K@edKjGj2pRF8P%|MInWWTj zAF0wZ<#c8!e#q(+MoV4FwISRhFucYkBG9J&BBg%!h=cY^X6IA13yd-vYnjpDk58q@ zf^pHN@C|ch7=z28!I>Bi)Z0={L{dj|ht%6Sop4MiV$hqin4xd6NerL5^TGg9`yHV3ylB)pbtq^yJc^$_wn7lS#W2Bv;OgLRecTCgwb|w$F|7t+Vp5Aa&Q5g$3GsV1d&c45q%*ZZPbalg;1o$kR($6sxOVv6&zgvkPrT`9vi z)|Wy@h**;X@2L4=74%{Dg|;;_*9*Z8zj*AxwHSBk^(m*c+V3+EMJ zDJA16=0-)mA|-o9(ITQrC*|L?*G;?d8GD18LN6hLV^OxAVCb3hw5`Zu{khhU*~3%G zo-Pv)N9p*Bb+%`w=lt4Y(TW0HdYl}ID=}LSnR!*a-G`FhUpm62XkSO!uo&k}@LoG8 zmVaOAVSpk(c)F91nWX|bRv6o`lxLnJ@#{fZ13LLP>ji9pPGrgyWJ;F&qiVGv(e`^I#nmb zl`jal*j0%~jg2onzD$@+=IP-b9{aeVFKI7*^wJ7{;m}cMUYlC5Ae;0fC`>Sd&%0mm zEpdt?!y0PV_xklJ8!}K~G*!jQOc0X!6`&C_u=L;f}ji}LH;LCpzUBgQ+! zbKe@fkTXmvGFgEpt$~MO;pXulnC5H{y`>|2Fq1CA+qn$vgn%kxb`Z>V z5PfVWV$ayo*&$%RJS|Ccw+DLlNtYv4{E)M9$fZ@=!-Pv_n2rk^S&0drKDQG+QL?X! z(vA?TXAoQ8sSq{EAj>9OXmHnvjNZW4ex@vPcAdR}c^iL7VnPHNAqc#tWKOs~Eajt2 zFgCB+$Tu73ZIS?J>scNZyiX6lqnsq+I1l!B6G6cf4lwkdTCS6|M{Df7X~=y!z{tTn zk~&ZtP3$+GB-S|WaG;NFbM=19XDH7=r|ChB#6!`ZeKmFaeoP%l>5gJ7T~60mZ=2Se zs`a8y1xZR!I%dJ-2)^dMMaH;u(VSnLNjN^bt33$aZXp^K zB}H|u#$PVJUEwhmwX)^sM?U&rzl!gd(x0p!N31dHa?YA=I&JdA5D9ZpRJZ9#>y?4F zUoqUSOOy*h+tA6LzBo{e$hFPEajPaq@B9%x`QWfvr@}23WxO6$7u^fXbFhr$Vh&tl z;v*%faJ25+EFCkLz&pj3=0itYLdp7RF3LRxkI9+UMmN{;inL`$;x4P^@Br&;wN9S& zhpA9Yq;xKnTHSI;spp_Om*3eVYtFSc#lwr$%^cI>?W^>>OXrkipV zD|=Hf)q{*o{D((vZ z;~ezLtQuNbBde>Yv>7`S2ti}+>z}g9UHv7bNU#D?#IDHSRP*6EkWszqI&-FKpNDtd zd9I2dNmkK)?A1%V{eSs+oqUUG9 zt6+GJTeHrLY}7VqYd5@Cz06A~#<*r#<*G-xIe=yfDKjF|~^+N2bU>Y9>T20I76(yLkErAd2U} z^^3sC4*R~d@s=g}8jvc00AB^Ghv==2~^if1YT!u=c6>kF$LT z8``v2M^69w=h(gS`12IDarU#bl7`TUzHESf1NOm zl+xa*A?k^*lKgt3=B=vOuoR3Dw!Cj^X(t6zH) zFHN=mIcoP2>nkf~ZY9f3i9{kLr?ZULDQa|QGl|g2Uk2XIB;I4dZ+ogLu1K)X=xX-T zkM}2Oyr;c%XOFV(=tcjUd2q1?!r-+q9BstCi%Dzf&n+G8wgmNf{bHHt6uIf*hztkw zB9!wAe3EaqFqwxoO@mB z(^N{amW~0&w`rIBZe?0<)u}$B)~s9AJ=LfmrqSgM$|cT)%+|(-X0O}PwDuXPWij4L zpP-r+I(sHSq$#1YyIt~W$Jp#PGce*Fz~UVua%T)OtuDQ+ufFL$DVLZ^%z#;LowYee z_1@aqQc5elXy$56sjs+seIqZbOJnuY&8z7I-O z0&L?g(Ti|#wb6KIrO*BT=}p}~)3NQ578m>@X-2E_&3IS*^?Hz=swmAmo*V)UBm=i}=o9H@H5oXEE9}cnK$-Ac?Ovz;u{%KoQ^Et~!Xi)L zKGoOBnU!v(;A-GXv%BT9)Gi5yd7Eyf?ZY0*Y~ndDZIeCgl|p}TP{}p8mtX%0-|yK)}Q&nL2@l4)g|8oLhEFy@vV4d;2)`4Uc03T#r*4Y7%`QXHQC1r-<< zy6;|}NVO(6%iSD59VtQqK4o16LVW zqc<(}S3#$Rp5nz+4X^0b>JXNIS=U)`;Fm$LTVK#D9cOT6W4yC#d@mHksWU@#;TWwuG!weBUUQ>G&fH3$Q>2#*w4jjoE zOI%EYl3Z^O(eSuGX;Y2PcxH6Degdz|U8IlDn&<4<)-sIgyz`jN3#Onhc+AA+(63o? zj#xVtKVzKv$t(9!uTbtB#vr*YwC@MiFMxUY+vPYkrm8pWW&A$wFDphB&v#2SMpj-b zQ@7qxPt!*@@YB$lJ>OXT^_jPuzFLOQ`gE_uC$*)AX*T+r>O)B3p(T!(p{Py zu?I(b4qs@mRpTsXH12QWFqx#H;8aum0efv9c$EBGh<07OqKlsiXDb}q^@ZDpj!35| z1bEVFp4{(qxEa4*qr|~KH!$4#YHT;ud!aIf+56LvRej_>C4HNAcb*6p`?cooBag2M zyUXu!rOgq1TCV&%l%A^QtJCZG$61(p;!aGzACH7 z%R|PNQBI+xb*$ED-I%uOcrk2m?N3mKF*X7CrG7g=75S^Rgd*C$t*R!B4skNx4rjJO znq!e`;+0+}TnD04yRQkHkRjPXb4WXSGYm!6Ce(Q-Pc5D71}|OZg$0D&Inx!bTm4$! zjClEP1M?VrPis26`vR{%OBnfIiWP*?=F>*onsiJ)zcgc7E?nEXpysKee%N1(wWl1e zXSs$L@#J)d*(e(&B!=rK3-7J4LD`bOVxnTV&HtmfGW za#VU$^d7QZ;;Z=fPQD10wuEf_0UT2w#)H?(G>Kc)pMIO1!q0&?9fX`eGC zkz~g2omNH&$Iq#P6oYrqChF*Im{F^)cB%gyyHMEFQr(<%362pv&ev}k`{IU6wt_w| zrkT*SR^7X;P1n0vP7^5DM&S=iM$zpN=6YU_gY_4gpNpp43G{#(s^v}-0f}e6_;Di5 zys&I76XJpfR}iQ3Nu&pX^I!AS8(3Xi9&X|2S+oXdShdSO4sUu76|Hh`-+wob_*Xe9 z?<6wC1T4s+w8ZTaZ%=*arLoYKn&oU*pOb-t{PS8@-PYmQN*37J{l@4yWfg&oyBe@D9ryxsa*I4h*GG(y}d zjn40##|k3*4amu5=K8@5wa)H*ltz=#2oGSJ7JC6jk=?OCk#?I5ljelMp55M-4()T_SYd>-WN~W=&{8S7xYg$|ama)rR?J=Z%5d>MOH1UJ zC=$?XwQcIob-41@dG*~+p$$-~3{VLu^eQxM;;w!s0mt9NERmteEX6>4HvukZm zxz@msV60}fLE?`oFGCu}%y*+=9KfgsrD3M*UasQ9<_lSQquAXUU0&P&R3&rIRyPIs z1(s0Ou9Aq2nVukBe13-7;Mq%j6sUs~8oxW8@#>+g?&OHaN45e6B1%IDUr`RqutPA4 z`TN9Pm4%rlqZ9BECT2}$dV-aDcMy!i?rSz%)~wR9&Arpv8A!$olhdDNo^v2-Jk^)R z^D&jm?Zky3pkUm}Yy6%;ZW)cG5=P_r+alLyksx(Srs-rI@hf;*bC{)lF@NSDF*k~N zP4+9And6xIs``6LjVojXGM&*P2LEx(OY+uyix+Jm>;A-Wn(lZ%;s+cXboc9Aq$gBO z#0;*pu1MlP4Og1ttH~wJ2)ke!iT6y-wr)%0oAq%s?6R4KvkezfX>N3jHtLIF#PkOC z_wspJvu!Es;y*m;>~7?304-8dpw%Zv!1J)tr`Y@RHb8sLuM(0axx(fr#(G<>XHe96%Ru#B+ zkoP+Z#2X1r!%ep0jPkmDb-meewJ8P8BMk&tSQhn7 zBJ~Zc&edC~lhER`iAdE2B`qku@g(v6wk2Nas4lqH>y5ISB6De3u-$gYklnCOY?e7t zrCP*GXrA0tJe8KTWO(95>-*x6EuRycP^Bz2?i#|e&6u7INl_M!e-UWEw>N7KUgBV} zi@JDF9%Qvm#=OTof;={1vKZDK2QJh&yYSdQZpBtqu(G*2McHhj4;|%|!;?>>cipgk?g!YNk4i*H) z8of^w>g-7K%Tljuq_l-{Y_7UENo}v*5d@o3^_#=h(rEG}Pe-T5>fp`N@y4BRJEmI-eyWHIqSCVwzKQgi$M5eQ;kHDel8yHT`{ zv1w6zo6?WlD4F9$Yxm_4@Rs(Qh21E4m-tw&x^iU6QGuZ(c@%UXPVCiej-k)J+MEMm z3mE%*v^TpzSsQn)j`k3zg8HRlj-pIj%o@CU!*PbB%qvuB+a!^GD2sNjx6ByCa5%I7 z_5EBJy7ZGsr-d%3BJ%GgOx%}cUTf>A)_Fp~a}GztNwbNwZ7)iCR)g|RsqPk+EvJ4k zOgiD#ZDv{6cWD76AwdHQQ32s(paF-TfWLVl04bh%%msgZ4v9p7;13~yR1!1*3bO6C{@Q{Q*fb0}NybLU0SObt>2h4Nl1dile=L@z{001lqtQ_!w zLP1U6d+{g58*j3;L-^o2z~57O9wzC{S)9r15oMz6JSpWIPM6F6#)cDqPT4T z0W=Q)@*@F}<`5?S=m6*zLH4Xagc|r@o*fDd$q z=>L6yh$JyVV*Q0XX8BtM#02yUJt_+sb8!RqAF%+*xPJm5Oc=n273~iF^*~MfgN?v} zSqlIF*)^a)5deTA^fOWY69C1U8vyyy3kBGCCj99Zddnv@!2|>}Lt1Quo8+M#-wB)v z`K(ER3Yt=n*HVSsEAVa@63PkomTZ6urZR-9E5v&I1k7Fpe}TRy`2Ya=f^wn-0SXF2(@LT4Kp%>0@Bn7{_#Gs~K0;a!2!KT)1R#eRk$zl! zLLM;x1rL}!C&VGdUpW$Lzz+5R)y4QT>3D)0en$t`hj3KU1Zf1Fl-1%7hhafe<=Q6Y@x2Ovs8Y}7-XK!ilBf=;sG0QTPk z9R$6kAblf)ed^{R0F&m30tWy<94r8wkZ!3wU^Gjx^Bv~!0SRDmF1ROz=~@IJ1RT;~ z7IR_6$MOe0sBI!V5SR#rf({e>WiZD~ra_u#3nk391iZmN=wIUjo&^0=1Mi81xSnUh z03&1o1IPM5I9y~| zN8JeVWleN4b#owjPH3%LgnJ@Mmoh!HDonSvvU2Pkx}gwq*3Yl989f+ygf5pNJuP@p zg8T7lV=oWnjGEW$>UzG(UNzFzd026vo59GXP}d9*ChH(YN8do_r5;Q1veS;?I}1>R zwvhX+=g;|zfDpNE)PN(7_=6+uld?oJqx#D}zJ&8MFTo(tuVYVYw`*cC5PD?tsnaIq zp4fBijC8A#X<=ASwStcK7}8-bueQm@!oAT<5l!YUfSp#GL_>sC%xRPLG)*|Jx5%b1 zU*GA}=Xp6@l17x!qjxrxH_Gp6Z?|I{Hav>5j=WUcr#F&$m9)!AdgWNI(b4Dm@!%G; z)o<+v$FK5U)t=o;PcG-EQ%lK?O?7y(h1}*OR-OWSK&qX=xMd)RJx z0);3uuiAz{AUqm+27H@5YYKBLE#CS!@lzN|MCyLT`CNzS$HjL=d zYmCe3y{FucFuq)3{)Zp**Zrfz-P?Ptv@N!XHl5d+^pW@q3s}~%epoGxW=nlWDl)xL zoy~+B<(3#a-+^i12f@@tEQYl}X$^+n7Wj0`Qf1t3c{yzxIKveAkEwJxKm08j433tC ze#1>8D70nY=BBFq`a8?XPVk;65UN@eYvNzH+WOrwFBh^ErZ=`UkAtuHv{Gzr91~Yc zsUj#!A2ZXXZ`%xNZr`7R&zh|L_!q!Mv)(9F+f^4y_R~ux`ZTAvYoV&_3P{&{u!PJ{G<0 zEk_-mnw0NBxEs{0_{K4$Je^Um(}g?%HUj>Q+QzA&t!*3LeKh2HyF?yw4*y*Zsf?Db z-=n$OS4p$!p+12xvQm*o{w}bHq3?f2ycY>E2%xeu1Rz$cUtg#nsL#~{&fg8)^%Oy| z)I1AI3<5T57Ki+1JF6edtD98J*Us9Ga;xM-=$ZHHK>egs*)HoxK$G)M61y?JZ6Lv3 zGx*>4mmCzgGC44AC`cpBU)*@nyW&%UZi?xgw5SKmYiN^0N5yu662C zdktFE=Lfql<}97T>EABZIgQ}H$1&A_MNs_1Pfyd{LUXz2G{-X=vuHS+$+)0@pQ?Ao zf}(P3v?KLishq*Kw;!W?$c&80UcShn!Fwal(ALQ3E461Rya-qPBaM{%MaxtNH>xM( zu#<=*7R-G$sT14hiV3k6byOxO@dqi$+`*a{VKr@04}S5)L>UQcgH>6RI*d03@yD?l z=M`XR=v=eR}>dQr*EM;X`b=%o{Fy>1g!RCZAdb-A0reCtKHAjsELc@L#I$k85(u#&FsG}&GQXF+b2pi?mzu$OQdjc zwkH`oNOTH{?@lMKuie1V@}`*z`GyzVo3&IDXT5Hx(<|`aOAo?3YheA75KbnV*Xd6- zwf-+1Mv^~od$!c{r0whe;62Yxv{%JPRm?kcme_6S^V9@LMWFBVt{DP7hZG_5(x_%a za_n?u^mr%noe}K9jpko#6Whz;l~)hQ5e@b#)Ro*YzC6WIMjWs%5a0p5$DyBMfvq@f zC*CIcW`xXaE~xNPFtTIZ6Bl!-16gdIvr}_P9=Hz9-WSyb$fAlhds8u>B$+`RBcZ67 z>H0=15>HKoOe8wD*2IX|QQR4>W+Zv^=BQ>Vq^27}`C={A)OCx^!1bljJ@wVYTI)`n zPcsXNS(x%RMkQxW4P;7nVf6ap-cA2J$CxW2Q6MLQbTjUykl8I*AOH2lKBQPad42nz z1h}RCkXdPwX@>AeAG3hSi`M?vB8BLPROw#T7KK>)?TBuvg5tHiBCplf0}P1qqWBO} zw?`ky-0Niro^?cK+FRAn*sU{TSGyKSpZm&q_^^$-PgAK|Dh_!JOj2|9D%#7@C6I%3 z>T3_)8Dlhii`Sg5?Wm3*B@XdoTI!8TIG3wqg1IFnk zR^B;yTGO0aJk1*n4ToIHbS_qT*<&TI>`iI}W+a|2*sbNLGz|&IAn=Yv80^TPZ#Zbs zqFj-Y*qsyRn`#4W1aV2T;0XlipY~@Tv{WJVz97|d4~E{6BO>Bv%+(#4g8mGHS=p^2 z&jmJeI}e2;Z|fRwH+-6xdM(^x?z>_VGHifUBP7Bb@ONLjWQfQ9MMNLVQ=jg8F7c0; z=cl65tLMY(1H3V8VJLo^!2^<>nJyMAv@L9v72NaFK|=^nwefu_?Oazy6>=cYFeIV1 zrnujLit;q^;qa6>ojTr%OA4j1EtRatheJ2rtBbU~+#4I+ZikeEkA99X?wK>x#kz6Q z&k4EOjOEICYV!1X0w*w>rP3w=%0KgajkM*= ze&|JY#2qZ!X;!;?p!G}|Uk6?HXH^#LaqI)E035`1%gq-yBZe8Ov+J#oY}?of#6=(TxBbB>N2%X5!97YoKLp5SBc?)~<(0KfV-H=GuJE(F_2m;5kN2RCssnElr?tJ=k0SAOsGq0i@7I@0KFRaF z8-MCC5U|_Yl)YWaqwfAKx@}5-m%dcO@Xyd$l_hdoM1b{`qU-G8rMiQkt3@fJ8iCsH zHoiyjdkJULjT;<>t@5!{Qo`=aa_WYFoW#k{iKPk&&Dg-i-8{PZ?bUkuO%Uc5?b@Et zNn*SlqWI;BC%TFhx3Ha5dp5AHNwyu~?|LLUIz27C*gc8zzk#}RxZ>nH9xJ(L7>ZSEX=p9OK}w{(Mj4`9CuZ|5orq=;Sv3=OK^ z2MgaRtQg6l@b+PRac%_JC9161;v>mHSphe>io+NICAgsZqj)vOE zBp1IUA>xF|$|OjN*r2p_}VoQTS36KUSkFxdD|D#T(Y7!--xF2(x-Kg9|=&78Scf*{T! zAQpLi&7(?}e7&HMr|h}1y7;zn>xCm990oVTP<_{|Aj9j-JVCk0vd>{Euw8%iJzL-F znLB$-Wo`07Ecs=Q#h;VugfbD&PHcicTN73&X+e>Siye#mk0Wh6pK&8@=EXU=ZhW#eGwv4CUSubw0;e$aCHfcn3R|TK8W}YNY^mrK zV})YH67|-;)izl(j`%Xcz~(`wjZHhp5{^f9Pfi7&ovo~VQ@C?k*H4S~d4)m=7@q`0 zp_d_!m%z5SWFhA0)x0VGK!r?h+zws zNB!=%dmVXwct|wWGI9I^Aq?h$O&F8q6a?<<7v@gdZfzXGNyqi4K=H9MY8nkkQ>Ygk z4RYCgVdgUXGyafIxAKe+%Fx+V`LuC3WGWWN)$XGeQh~tyYgZ{DFgLH*LgNG`5Lo(BEM?pzF z>6EuWwQRtqdcqIcR-fo@)-{G%>Uw=y^M>`?xypK}hsrZ!Y5b3CeeAVq8)r?=<*(&Y zeKq`?ik0s+th8kfr^-?(!-GO^^z`?4$D>qG?l?cP!Ct7F$9(^cYg5Efv6sip4`q^D zzp{mC%7E4i)H$_EnyTEo_0*s}Eg27vf`6uBFx#+*99?~ZftFn~&6FwWQAYwEz1>q+ zxSy5M4&~wy%2N{EVWC^gwuXn~xyvZA)=n~lOEyB<(61ZEkLbUC&7+pS-!u6p?MV-g zBQNn$&6r#TT(LJ&Q`N_FcY+@ny{!S4U{{R;S>G1D6kb|A@F$cY_>702GLz-GDgAdS zb}67olZHPh7GeVaA}*c-O}{)(>=n6kV4L4c$orEKI!%d)GQU4tOfAEov=o0e74rT6 ztZ|3lbv`EUB-qTsMp*G=uk&}|7LGX{`lopt`DOH{1Hjk*n`RQ%v2dj7qy8EDKBF06n&45 zqrJB}1`lQ5^aSm|ggO1#O{gpm8Z=eQGwTkRsL`i*lekcd{g1(I>F(|wN6IzNXnEL! zI@YbC|BFgYNul+P(`T=h)#Ldo4P=L2FjJgOlSs&d>^f%Vy*{xUKsS(o$;-=E-7 zEAPbA&wqP3d_Ce;2zT8}+^d}2(^Lse!{t&5NT%$7qU5FWZqkC)5-q74l)9>%Pz+MT z#iG;+ad;lNFS>bGka~~#3{LFDkUeu~S(EE;Pn|y*>qtr+)#MdH2|?4Ln3(%ie4 zQP23d61GO2F!Ou@nHhw41*KtB~LL=aOKy=}>V%C~OT zg}BrWtffWpAls|5==i|(!O_*6y&jFJX_>)fYRG19FzHrh8ok!}_Rd#LL6xIJeNF~H zNQ0C*Df!hj#$mU*!7}@$#w~~<`e)S1{vz7DIbRg1nU4)L+WCSznu|=OWe;UjE-tFK z;=fE7-L!lA5+_~*&XzdItfP=IWUrkA0W6!i(&&4{tD$iL9KSbJ;B~#qc&fXU=~avT z-(Q|$aY{D#`MyWb#c?iO@`-cHGFRLn0>P{>tHt{2v}Jmq$=JIx!El>V1a&aLU5B3j z&>NaV?Qw$Giu2^`v!)Q4>+72n>z?~5Eg9$Q_EL+jh_s|vY>jz}Gn?U!^;2m}pL zjF&|=`yFes^yC?!I?OX!UevF{7`OX;Ldv)tC>m|W1g~>fV!+!BirGUN-Kv|RIYW<_ zfFLT5(J&i3>+&|5k^98hYyq2vF=Ro`nlb>&yr14KOi5TmVfG3`RU=aKonb>#VWk)_ zVtGo{kpp|djqL$ep&NUMTlK8Fsadlg>9(hq!iD^8ZWzYuUU{ToiENXo?hP|MY*nab zwkRL6rW2#KolD@*ftI`nx;Q@7gxh?w3raDl*b{Gh9t=lZVxSKb*+i)ix-SxO-i|;k zs-`5n{AukS`IDL*A-9LEWwy3|7SxACgaTR0-7L1Wq&nXv`NLVE*}9rU8vp8x812Vi zpzSNwtw%C!s_JQTzn%a4u*UyAAWZciLp(%S1xy?U;8A0v3?A%6}8;xh-+ z{mVan`02QFIh1<)UG6_UVY?Qe%i8(=_A`!8_0iBf*OunpDt3_{{OR@NfpJR5#YNOc z`frWLLDDh3OKcbVCn`P)0|kkgiel*NMm)M(b#KJV=6@>_tCb7M6wa%j4K@D;iBuJU zOgBHMR}}cNHSctSe-mY)sMK{(3fhG1(zd?@``?$@IWW3EB?@?xejhG?+Db;K+C?MR zMPg_&*cg6zooB~wLvjh!u|nw~-el-sX&X1L6d&kunmZY8v+%n%6G!2aU00CKI2mm} z_`~X=q*7+0NyQ1*^Pzw3@`+r9*k4_ntEMe0p3G#kCO)2ZsHBASe2%nPzLTo1BB>#Q zdB_Juzj&tc`P3*S8f`VX0q?w zAFFA3c>IiCe3`2zjQ;Xk+Bu|1k~37Mds8AET6gWCW8clj==abB;47I(-Q60#XZ~tD zBq%y{ORykhSq>jWz_A(&I1d%G`;@ejt@L6mUrseG)+EcK1TB~9qP$4uDpOnrdiWUE z6ng4>G&bzpizh7%nQU>1;kIkE* zf&|?@x^xBL{M?BCc$R>_9bsXY=)Cpzm}Gp+##Z)q*O=t26H1b}hJWl?4=#E-#LdX@ z3Yo+t@X>Zn4DrZe2u5|!DRhXZ*#0H7kfjt5;FFYGigl}qvyd>HP>_T}5eE^aKm$m?Vj)@o0qgkZ zTfIa3dm052(q6g|E}S|&;rmsu>ii%Rqdy$xt^P}A&(e=_{Vy_w z=&T&Q{QW|ppR5g+;i@|(HeXa4!H)!bftR5LmloI7<+)4G72nJc3MMLgZ7#3&Ac`Bv z+;N-rAFjxd(!{oarhFL|)stqFi!*JrOUQT+5g~`R<9K(uosZ(xYjtBkA7E*XHge~v z`}}XmHEr8xY)HOa$N5?3?reMj39{}{2~!@#tkiqG;$wt?YU_ZO@RXE%_(GJ-Kh`@9 z(ykuXHuIQl4p+sp?mt|@p^1Er^)xt379ODGx!4N_eakP8s7~my#V8O3@v=ONpYmYAl+j)k($>DhLzWVL>b@so z%C8F*8N{7rHSq-aGdC+zs8!-wXO&O3gnFVOaPl0<*b$V1n%^;2dJtx8+$2tMM)G7x z&CpEI;pTy=!;H9(j$ZCjyQZ=`VR@n}Y3jL~sjv(2Ud@+56Q6=1$o;>D=ubf+K3sq0 z1#WqMS>hf#AuX?YexNe%wAETVQVFj)lJzZlT$uA}K;#6qXX$I(E`_ySBXYXxoO^Ax zC6Uo5ZZR^&RJ~AXW``o7UR2p+xw8(cXs-L*e0;I4ZCQ~dxM?Ngzu1Aio=}bEH@n51 zY(OrRr2lZ7TkSO4s&!OSMbo}~^DDGiEK74vfK{#ue+dWMFkH(cjS~GFi0uxPP_ext z|7Ag0llXKlMo^mL4^-w`px}j)I*I7M6hw`POv8b}%#BGjbx_+J8dX?2ZkJaJ9N0x9 z&fC^kr?BjM+M_fXN-a-JgyKE)FC}QpwL3`+_H?T){yMAnB6F#t@kd4FS}9z^r05Vh z9SQU}5*iu@w;f&Vw88Pxfb~0p zLP3(Z@j8J$Tdro!_duuM>$!csf&0+*Mm(!7DhtR(xWFAsMSES%%i7{Zz)tzfy8*X~ zvekw92)2Vns-xDPt-U>L;qV9l=a?~;V9%E3Ny8B0j#nYaAl<7ZtiSZxA%`vY|EW1T zAy+}@&Hh6!tLLtK$HPZ*(MNG1M}$6IJATSf-$UUZ@y1AX-X4M6h0 zQkgxCopm%`Oolo!5EZ6L5GpNgni6?R-MGAIo4O#NaV%TpYWij)?J&^Ch|#pMbEtPZ zUKmRmeaEkoVpJ_jvKylwO1eAlBG{2p+hYF)_-UFF_r?zoY!}gQ8hfj`Gn+`HGufCQ zW>09}>7V;F6G8IFL>#$Xl@RUFY7ci4&l^ibt5+EJh!?4{PmMvs57riEK_B<@MZHW}yQ`y4P!A9Vb1J$x6fB+>DfO_k0s9Rd%U^HHK1v z+%sJQYw8Afv@EBjP!8C&7POE_E^KsrhgE67TpIX z>uO2My|HVcEu;?4|426pi_8U{&91Dy!MZDNpuaj|)IV_uE;O1TSh*ld zV7ziT-%`jp1k#98?*Uq&BuUf&tf%7v)Cq9m`OH>rhmwk<%&sz_>pxL%wu(zmQf=oz zqc+2*0HUm^B5Yz0h4rT>%f5qs)+v%%5hw9`P+MkWX6O~cpA<47xIT9{qo_|Jp9@1B z1o9)1-z4qG(PYLT;o=huf^@-y$er?uy{}dh%8ks{f8?#I5$UAIzfm=U*x|>&^&`|~ z?%ZGgjo>kR+XlOkQeP>l?44{<={zP7BbXV>F3vm8U^K|l%b3nymld!Qx3xOSt#Cm3 z1qvh7iNLSd=WBY5|FQ}`y-H?NfJs<|nq75zAIfGBEm2~5!^*T*<%`Z6#ZU0R1vFxV z*0bGPiIUrVXlTc)A=!rvW~k#C^d*{HHT^3-^4grpHKTkMU9sC0vLdq2 zdoJxLfe%4*n38iNym~ent8hi8Mzyz^Zz7$F9aU;+$zfl+kY!~j)2?=3FtfH(lhDBy zxF#CoQ7&^*?4oJJ)m4dUH0V`ZpSMx`3-BC`ZhFdoehTI@inP0;JPwGV-7+(ZX~MR< z{}h_R_KE(xz4}uig0i1io@(0bH*zt%xC?jrvKN)qKpWC!a<&@^)i<> zCSu<`p30WIbOGC#P=d@%5BxH;2oXDTOBn%SsLVX{4%fzK$-BZ1FnbFh>A%G*;Y=S{ zhDhN=_Si;}fwve)w>h@84&@Jwu)my@+OT`}qDEvj$>MdaA=FL>q-vhx5@Q@#SU}zJ zW<)1Y=E*``ic2<=t)9CSP0l#Ca-A*tH8Y3}T3zLKJ+vy}K%Vwv=KUj+G>-+!N;Pg7 zm}#hSe+*dT1Ku0;qg87=8L806Y`4 z*V)*V@l_S9yu{;j%O?1FClAxux)#W#lV`M(gG^y%!GrzZn43B@s(ZOPz;@N6{r+Z* zHK?DXen{<)9lW)djDJqnuQ)jeX=%F{(|G3##TEHFjmxxrJi{voI%j7JggXiSa))Zt zY^RLK&gU_EiAf5o3`Sa4g<&gwaEY}#$wz{E|0R$JRR}uLwG-!6683x2QrD2MjLaRT zAZ!(s_`{+|S350!h{C03C_T9g2J6ccSwL>ojzQL(|Ib!?R7^{R+LhKoHl;%dFJvc2 zV_nB+Q;~cbHqt)qZY;zhLJ=!+);4MeFK(?L$rZtQV~lG^c-eZxUfbnSOk4 zLnNj+D1Qjyg>Xc$m$0+&(f&^ zG?A92vaQS^#uKB1h|QG{64+4@AN>PPlWAC8IH@dI8(LXe2tX?ah{=gt5f?CplZaSV zR=X&J7?SKNQcBrORiZC4^WO^Gm3`0|6MqC)Z?VcL^U;Q|6%h^4HnqzV2&qAs5x-Rt z9G*HtW#IkSN40z$b=I?W5-?l%4oWq=J$Cn$NMC+i6tBbcX(mHFijQGoHnf^lj$QR~ zrzRA#ok8AxP(H?v`VSd{wDuKTZ3@mUX?DC&x$)AZYnBrRg!iXA!ebg-afy^7!;ewe z4VDYkMEgZ5coRSE$8Jex#eeMCqHmIXLoJ`A@;&~_Qp;XCYC1Iv()-HOA1P0FBrPcNix71lJtTDwZF z3J;ZRw8DRX@ZQ5ZdMR2&oDAU%qpJ9SYWCKW;RQ~R^JE1sFU;LeL9~GEo(~o5>z2qI zdv%H)yd1!p*l+&6e?;X=LZ2@n1oVwn|;n_(Xmv~RV*gGiLq-pBHtc@AvCMBKHZZ(F%GkhowGScyud;$IeAb%FE_0rtkR zJ>$5cyW&$Hy9(*sC?d8Sd*~jM2qWywy%7aVhp2Q#sCbV8&P5s5J(2;kC$$XFm5Z?% znfa0Ab;=Luno);_OK0)ohIs7aBCCJnjEc0Rt3mC4Ega#9TV2zTsrWcpKCwJfw01Tg zB7<6JrmFWWiR{JSI+8uUcT?dsW02!`IzkW5>m|Q0FL)_S?W{d@J-GP{&&-^RKJ0H$ zz%b%j*j$Ei4Zews-5U@H>$kO8HHw<5ipma{cWe(i_NE&y?Bs>jtvuqwIN-Hgz-F`k z`DxbPIRRBvWZit*t11Aw2CXquk?mG$P}?}z9(P5lf&O+u&$cM%WqN`=leH@&#VFS* zJswU8CsLs43T7Xh34;A+;)r|#RihwSnOd#9u!l=Om;BMhcgwI;N;q6tcdu>t-m09T z6~BYAkJacWl1L0HKdPtRI-Bu{c9YDaM6m6xV5ItI-YcDsNn?V0#PlD-Q4V*+QjO?O z0)K&NVtWI5?27h33)!+PFm%0!m7S3`ep_ZIU;h3jGS9IyUT?RNC)Q{?dWocbnJnYxTBtA8vbl@Pggd$w?>{QH|z7qW6RyA%BuO4v$!Hq7rbknPkKIPh5uQCd1r<%^(HX#UQtLUlQgtDceN|f{(WW(!1b(0my@&TB75L+Vw2<9JU3eaC(VcZ15xTmE5%%HRA zTjuMOSN? z)N@?4_;8c2@b;dua?*`{kZSBX;LM^XtkE;mT5PV4f;U{|R~-zQ}W^%X)VpW?0YtLZ(u$}Qv8b9jTLT&Aa`9t?Oo zl|Eq&G}aXT}#}e|(wZ8?NFWM#>!rgdF4Hewk9eb$_7=j}mFP>Hgig z3us0Et=KoUgk6wb<+00$Dt{eDSO~7mJz~WpU_W`nqpnW}g~M=W_6z+cMy-Mpmf4CK zjzJVBn^71y+Sa&c>9EfI9YQhjvyg@MCetGmh_s7%;^1B&$+vQ9Y9E1K855NLe5$x1 z{Yh|-Y@wN@NwZWWHX=p^;^%{4r*+3Z^RH6SsZrEVWQ(aV|7^5XMN^1?I(JvTc#zLe)WaNrCIUlICbr?@`Z1bHO_#{OqCgEvY;Vxi88-9 z#u~C5oK2c)%7zY!PDiPZtX9r@nL}GCd|WZJ?3-aYg;e!MSy!rNH=8OIq=!Z(&Qa&) z8cd{VkBUO3;jsqtz_RdFwa4I}WUNVdA3%wyguH0&dsU9hkdn77k;Jnaw1kjf3=DV;Xc{@dtS03o28xp zu9FdTOfRfhT=6!@G<(i@ZKqYu4Si|xcScSysQ&J(txUVcW9S0~pM-}-64tN8-Vt^q z-}7c9m6+M>4n?gfJ_S;4>8!78I4U8Y{nK)(){h(7H!nYM`XEfQd~q2zHk#Pfdj zHaS~AAA!BW+a+5#thC94nSi_dtHMha%D>4={cUs$WWAG)LVW6K*QL#~{4%VPs1w=C z3$&*4?fSM`>b1$&8%uGK2Lppo8!1(QYvD^fhnTq*P-; z%f*t&nQJ))FZ#CX^?kdb&G~}6%yubY1`_m;PI{;?f*K;!EtG-yS%e!Yt7)r25g$^! zT3LJT8??vgiJV%24r_IC`;_vrJ~BBGj_NqY{L}n<-y1e%ZSwyB1wi`0C`*l~W-4+_ zB!a0!XC~4?V0I?=W{BtwW@KuZn`teuX6sqYh(`hQ(bkBcQ0#RKx`r zGg-mpWnVn6e$)1ueyXkbKq>&^i2V+wa9RAdqQdm;NKIxG>XNPv2iNo5yD#GY{j0_` zcY{Gd5Rv`9a$Y4G|69!2vk2tRcdS!zAyNmc-S;ibg20oNDO=G~9+G+jrtu#L={LWS zCr!R_rf0&|g#L*kCf;GKYVnXmH*5FSi8WGFoIhIA28*K5Z7;V#)zyC4=7nQSDHJJI z#AW22UJ8H3@gE!tU%w<3w3=J1{_*+CinRNr7E>HN@uJZd;+Lc|P8Ssx(zUB=Cw0Cu zDLsO-R`j3JtW-`AZp|qXs^+Wy_6iqMx;~aRcr?UKXN2}TO7PweMD#`HJ_9jsn)-zc zngP17&hZf`I7fBJLfks;CtvP)LY9fFJAy?u0osJ`D=&mhbn%3Ov^-D7%L4q-!+q>~ z_&s>xvbsEe9xXTDO0uJN^!hgyxnRIbE4HW&InieYoD!Vg{-mp`7e!Ts)wf(n+T~A6 zwCfCpvu(ZD?aU9?TcLUPdeb=`3*@{?>SJ6w-+_O5azBuqnjT7V9V!1K{M!ZMSp~TW zl0e`}D41`NAdBwbMa3CZa)1^Umr^ts9F&Tr>dU0`&%&s;(1@^wom7DaJu8zOet#>@ zkI&`e{nEh5ci5w}k>O<0#Gpk&XSrPP<-M?2QK)pM5Ofuro$?pRwpqquVM`Dr206wI z`|E#uGZ@D5(2N>Id$E|CNER5gVkvye@jM;ph4y#(W^<|WHWHsz`~YQ9Yjy*}3_d^_ zWWYT(_WaTgl4+7XU0ft#M_P3h7KrG`<0fv z?qxlBGTmJId}nN;4mpon7OnG~}_7MSu$R6>7@v{^RY?f?&y$UXo`yJ*qg6y()D0xo8ic@1CdJmaFw}441+iFB@!q zy{NB-rY^6-6z(il#YxmDZ`sX_FvslNb7RKzCBxgb)own-<>b){S#rG<&qfA2e!Ac^2~-e7!bPTwfx z?7y^8Z%75hM3MM~!_s1e;|K|6l(0Ql+tF5{w4t}LvRk5eA{UDj0M zw<#&!oP2nN`7xwWq+}R$OVh4!dU?65))*S>WXi6*0+Kv23xx!QcS*n6l&VY+`1w=0 zeNepDI4xo!?=Yq(WA`7Mg=A;>BlOA-Ks&(q_mA?zkgX&d8Sru@>>(bzpn=vks_nK4 zoz;{*o2kcgr98qQ2Wzin4|ZX?bxi{RXOYon?)k{X*XP;p_o z1hGbb)`l&7-ZP>W>KH=UrP}tAFa89$_u98Pg&Wlx7d5Cv5McD}=h1J}${O;#k+2$l zo^+?Q_s$S_jW$h8gOe07RQio2cBf1cu{0;N%}vv50*W>D!0r3lI(wD8y)Qq8_TMdS zue|m_Bt_0j|3u zqx%nvv|Dvb+AsPR-xCJ+@hFWL(m4CaD0XNWG&S!e0H$mfqR`sOgTB+3LCBPnK=oKQ zU2sJvg(w~U?-3;&ir%?~nc3 zH=*){sATXmPNSC{8$aPK?A`Qn8P`%Zxz~MOe|xqw@(bNJFh~{5l!8;*7)8L%-nwV% z%n9A)Z%ubkzy!HUAgBGiw;H!E5=N2u=fz&40Q&|G4n+|=G8p(zun-fA;Uce$^nn4K zZvPxptVZdxC#v9C$ z@O!gMP0pN>=P9)nVh5pO{cM5h9W4Vss?a_wefy10P1#jzqkAG5dWBz~H5~n{CCYjV zKbd(%`i6Xiodbrco z=FA*wUouQ3f4Z3^>HKpQ3WjaGu~_9*jGnz=%EX0~YjUD3H7of#L!<7XlVRrY0&uw8 z-rMYz>u_QwaBhm@q8Awg?m6iTv*@RyoNVMhixT;Ai*c5O_z|Q0S&x6VA$-;MH>?N` zNV{@gn!kK4!^?GNB!=irwzAY%=Sa z5Cii|5~N9x!N8P2;tMxUkiiY<=~gJk?iyM1+w!`wJ3sp@3K+pgk%=UchwtGCnI??L zp^_y?9+a9-?Ec$tSD}^h#1QMi;Q=Q z&TNaiMZeg#ZQHhOJE_>VS+Q+aQn77272CFxyLavLpL5T>Z|iN1w#Mw3eT=pgiFZa& zY`k^!7{;f0#KBf`g2_5AvOjJ!1CF72UTfZ<+OkR(f*}R9y<^wSkZSrFdhy02Qo4e$ax4WClKigJ%&yJN|)XB z5%zePVsDmoh!}Px!s3(Y0%c%{>WUG{#Ck`q#K>G&k~PV;^|rA}K{ohEQgaZg05zJUq5i8@z zJ^ki_s(V`GNaOMYq-qB^E9n#2rxk)5X7N{+@5gtoN1(fPk?sEg{jb+S4SnVnyQYKNB-~MDMpHa! zK@_^RSaIP16%w>5e0eY-Z%7xry2|BtckcP=9s`7iJgH18l8h8|0BdYTz7QkCn^OQ= z!90y93JXPdr8yq?4Ek)0}Y8$gXXRv4lRI$TH|1#C5a9OS$VRJG%l7qrrTs;L8a?b#>r z=5j~-;gH($+BDktVhy|C1dOOn6oE%G%dtNCkp&|NXsHr{)#Es7?`B`NvlCj$kO(XD z%RX2tTjb)HVTfI5L#Jc7X~f|C#xW7-XgcMBlO`x9ge&zBU@#r8eA&S_U+E!r(|;%(ba4RXnI}K*p)9v4`9}8lIs4^-|1&p0&$`i zSrLe%x3OOh!w{BGz8~DIuGdS)7vr7WtOC$~^}$Y>igt}oaVS|cjr%aEPiL%Gb8K}U zmG&D?a9aE1=lNzcIi^({(96s_6@#|{=FPS6hzCQl+%E?9M(?OqpC8ND;=D5^kdY%iJq_MhCg9auZCcps^ z5z9c5n^O^Ww5aQ35|D@o#gYCT+?@`A4$Ah%XO@oQ-U*1=bFu!}^j6iZjsDo;IzN<` z+wn!ISE@B}p1$&W!9@5d$W$i~0BG%+E@69jc3-ftK0NI18Wk4%>(Zj7;DL$$jRb=b zEHlH*rDATcrU+O?ics(vLBFqG!0gph7IBF)2NHds#uUZKfrJ|?oaCp2c9CbD8;8Ii zkBDr~+FJ!pjhTRKiHvUM3Zzi2MaSEKEusdh)HE2S{UtdANE5A{~4w*-puh1Pg1xC%8^iuPV!ir>Fvt`8OT4(H(?!LHzhHPZg_mC(Pg7WCRPQ~*%FKPX2U((1eqA)h1&W~&7G zUG@pwvYFu4*p&i&Mop%1(W~rfEv-| zuw01L70rHdGR&!3wEd-tqubPCrPNyEuDA2BahAJx$bbI89e3^nj$98<7aa})F4{2X zdDiv8#gWN!5qEhr@&V`t5q(Ymzw+IGni)W6!@)G%!Qo%mTNsOu9n`)324>HaG<5-yB| z)-zJ{mrBRqmalXlPutFao;VqJdg7_*%&dW*2T;nEBbc*`U%KiI#|yYGX>77roECLI zLWr4W{w-|mpR=kxK}LymVA z`tncL12F^r@Gr{E;f%89w(5H|6G0OcF@-l!(EK=Vg|3ObjFU^*4HU$v^r3WW4IUr3v*oti&U-pnb;&3A%^BnU#Zx2rE~MPv>pn=$)vP zqhThwfV|0L-~&@YFc6A_jV%r~39K75PHnXZx0X9-pZcL>*-+Q6V(F;-uBSq6~ z0XsM;rJF@@Dc&K2juvS)IVUxphfHHUPz58PhK(sYF@gmZ3H2pM3mS~^$w zHS^sz*MB_p+_4`z?{x6Zxo?hHgI|7?WQTt<9mRD0Q}RUbzqM3$bq3?SBO?2^tT-uX z;s23q(-YYLP$~cYh5djK60!0REH|ryf>yF3j%?&$@u9)4MJAK7Vh0SPQHr4~CX#76 z%iMm{yUArpljh<&$WsPXXu`6@Tfh@Witmy&6uSG{$Qe|$v?q4kx@$k4a^1AtI2n|8 z$92+K*cQ3sk08xLB*iKX&^NiivS{SBS24Ww2sb4l{9D!p+yEhF@U?6oaD@j%aphT8 zi;dw--RRCl0HL>|{xFktB zd=6#+VmH)~Pw$8IgGG)UE1?Dc4EJ$hToFNS`YMLuwhZ`x2;hSM7XjWq{RDs-ygX## z2bT}S2K{hK3}%_WYpHHQ4wiXIlVv2%Qe8?FLkqb}xuzVVGcTRa%g9*^hm1uSoZ3P> zV<;cq?qpL!&ge*HZv-f;(e}(%0M*B+v-Mlt{4m<1368^3n$=41ovo%r_Dmz4hHcPq zy*PfiH&7_SOIIwhml?e&$`5qCMjen-~}w16y{hEWZ4Y zQz7lD0&=G#Q5|RP%O-)&0>@R&uj=dd$tr$<@UMSfA9{YC-f~z7)E5`idlDQuTz>n1 zddfy3{3rAOVp=hNK>fn7)PGFtcJ`NPZ+zDn9Mw5Z1Uq@lokVTFVMeeUTQoruz;5u~ATJ?pj=Pm?uqEb9|ahpYHk z)|<-QdKCBs@13#|(ILM?j)DK+i2@qtt!(7Jv$HDmlzQA2s`CtvAjT6Uj{o;8?SF*8 zX@fMD>^~tmONCx5H2hL{1#Zc~s$o;xK_1bC4h;~wc9!I4DvVGzH13Pa04M13mReW> zG=+&4oG;)(4oF57Yi zE96EHI|hN6i?*zru`dW*Us09X2N#lG!5DOihW`H~{ZA%7vPq}+J%rpsoM<>x#O-^W z!Hv3_R4jcVkqJN{oiLgVau}V|i3%EQrUKJVH!9vsIgPz>Ms`QoFuhaLXjsuk{050h zc8G)`$^}jA+EJ&2f8nGlp}U%e&9~M5t;i)4qw*(T?S#_0WsdW*$UF}VR#9{NBGbW) z9@{JLkEFCW;L$TNg^d68$%6jDz_qWKK>n&-K?muu$MX?Fvzbt#q6&Ngk95R_vWiti47s&Lmq@I0App0fgeWg#=@U+UQnZ!49y? zw{O?>2bZdzR8Vq6yrR$EtW#_%Qohg=?GM;h&ZR?gk$0Dp3@3V2ZBlxrfTkBiq@Y?= zHqrZyKe=B%PnnRQ)r6&`#*2lj)lk4{?EObILcL;F_g=8i)CHJuXn#p_-Zld&zJP%8w@s zbN*N8_P>#wdBpPHf~IAExG=`iD#ev z53=w^+iftXV?hwR8tQ+@p0lwx-%3xS77-jb&7=aKqYC$k$}e0EDunO1lbKq+l8K87 z6J=(GRTZC-#SDokO`yOuhEjjx_kC+%_m}CKvc7wMldKZxar>Za<4pG|HY{&WwH4Lp$`7zXn(q} ztRB2jfYNBu32gAS2F+X~Cp~XMj23z8iAdOqt8%ic@q~#868jK?ivklZ_kGM4Rhd;D zGzSag#BR%Gbb@)F)iuIK*l(fJjsttp>=*hUUFFxELib%TXT4E&i-VWX>SQkUz9!W& zJ##>}Dweti>dll4Ko%sflKwV!;$MpgcKyp32k?rsjx6kOBo1MH%`HjeNb-VVgWsYgKHhneS#Z4{L#)Cep}nqYddeGI)Q%07e$t~`;8^9LwSeu7XHYTAPhN? zLjtJU+$%wU^#fEve<^*$8v}FAr?ZO<<{Ofx?1xlnsSTPwxl={^GjsdVT&ctxBSQWX z8nAB+daM`SvL1~Vzc62VU`z)YEZ zbm;ZW#^~!SlabteOpqI`%UK^bRFIpLrI>V@ut zR>x1ZHw?4jm#@F0)PymoBF2BWw?eN}prSQp)tJ%73@`rN0vkEnAxmoNYnt}58wkk! zI@NLS;_s4Y2FD$C3eSoWv>V7)%*x1KN7eoXM*&WYo3%E$mpYF)Rteu4a~>v=UL+zD z-d3Z<>JD9c8fUGT#QZ~Ex2O&-^kK6g)liC?iW<1TofOT3%Xg)va%Sdd5MT5g$E@up zqsv4cp~pOVX6eD>A#r=06k>$kmdcItQX<>&hz?b|h(g{su)xN6X=fBN?S6ZJ>maIsp3%rCgi(p$Tk?JG{Ob8`T*OWza zwg={nITr>;-=YwZv#d_dc;o3j zVv=#ti8zq>TD|pwlpX;v??cu8(R5ix8Z*{)p<-(aokfUwH}0|xt~iF8#4}!5oQdbL z$YLvWgg7&{70Al_z!8&eYD4Rw2gcT8n`7K1A;L_nRIJC`4tt3j zII@GdeReZ$A9-*H`D$T2;fO8NEA0tip6@8nloHOE#CFBl#P;}gRLf`no4@>LtMnmi zVSNCh0wQ2=zG!+(U~5Rl_RQK;KDw^kC^C0Lg-v`FZ!pJCN921(8!vSzp z-1`!)yLtMhQRjV4R?C4T7X;!-hzirp7(mfTMqz#&rI^qwI~KHNoK$j72nHu%)Ch0; zw4;2a1mH>+l|qK=i`goFxteJ@)w!slSK3~Y(0w>!$TY(J?^T%1ixr%Ta~T2? zu&95$*74C+RWqh~{Ao?#t9LJ>U6EAI;29)^m`?c*w3Nq`tN#+XZ;R?viL}A$R5#=R zbCHLMEheU*WqMz&fA{gyMxr!)MaZNY7^>DJDE~1vl?7KfqIGJSOk@=&_x@pKmDsQ8 zly=2(8?q@*5DpS&9#cYWNA`fStMG1E>$z*Q$Jsc400}eg1S9cCptp9ZRV5}vT59|c zaC4bzHVB0QP7Rfwo}E-y>#rNz7qT#l&PL3QZ;*MpbqI)ifbsf+kyFgWH#ZoigPvj_ zp(u3-5j37nracFn@UO+}SHpetcW5K4Rd!ZhZjp@2r|$Su_n#@`9C;(WW!*Az;_a{3 zE1Eg;XN?(a^hugLm8(?cO|}iRnZwEg2~Y^F^tVKEJ_$%Mdm>jK8l5V=Zt<*=PiIG& zhs0^&V{`?MMpt8SVFVN+la;7`bDLz!+^D2U{8YyFxsNAu1YK|f%7U(0`!Az=h+$)! zq4M%Tw6FJUcDYLGc}a@7laB)8_>kicfO#q>Kv64RI*dmDMu zAdC7A&fs?M-LP;J1oM`zZl+g=d^Otf#?q5!Qk$$8-5)HVc@dIU6$P?RyPw{TlldBp zr@U^QV|rMl#;8hgJ+fJt0Ki~f50i;8^Q2+TscYwZ%_E{uwLTU|OI^?ANypd6Vc_8A zzEdBiRGDZsH7h%S9$4bFM85mT;BZ4GYK^$Fbp)hHc-I}meXuCF7L0;tz{Mc98%6D z%TyxTp#E4$y$Xs%K|3MKC}X{N!_<4c&m`v}Dt1n3>l!ycQ0$wQD_L=+kX3k%y?R<@ zoWkP!Ex~YBT~^76GC1RYDXu<`bDaPN8#l%WgMh)kQ*1Iyocs%=TR=sv@pBNr5AueD z%DKcULQ68lD%vVM$%ec#JYgqtS}jgGKb|zlr(dFlADOo0Dms3dsAwxI_1DE~_`GK5 zXxE+}`NK;;WIun)PLSy5Ydfo`gw`(>?oEF1cJ0B2@h6B(Omv4at6@;pT9035urOSA zp#mHboA)X~|LF}YBO?owlH~M^%!KSp)#Q}X3)j2N&i z6Z)R- z2Iiu(=>T+Z4n>_HRNN!n7l#SVp2;yn8AhjnCkON@=>@S5ULp?|xFX_l<+qc|pB92q z*sXaI_h=2Y8^6;HJ^7IXkPqp&O;{~XW4U3)&a>#jbyb-W4JXO#~q zqlLNh0m>KCufYY5rE-Bi`>R$LOyx=1sSy*Yrh$_@@hp#P!3r3zM`m zXB?SZgN%zNEXN)TINKb}3pwHD#oo;AnTi&cPP8NDdkjtU>~5XyYpP2_J)864*lyjU zkTOQgivEkgqk}2oOC<}auYJ9ZQykQFbfTw!8V)6M?6%!c0`< z_0hp#2{4?!ybogy)oP7FxJJA@SM-4#>%aKahaD;BfR440#?BiWT4famw|X~ACL z*F;W$>?hZRFZ}sua9<@_2g@rL()d&a(!s^g!iGY7U+MRK88-UTi*(F@O}U^Xo8-{2 zR%NnylXGA#d@Vu2Uh>agfR1U2ShR?&$ZKVGzB$cg3idM=M<|+G*q=P|#!0_L`L#+s z??G}adgKa4=4p~U8;x)d1^EY9R%hKxY0Spadivyb4a+K_O1-N9d zW+53CHvy?6E9^(d)}ky~nu&pb!ns0wTD3&VQVcLTym9nwZVoz+qxQwkpM!RKM{S#r9~=iqi@;6&EFC7>10b zeyp6;UXwK8*hJw^;!RUnJZ!y4ck3~;g_RlNJ=Uk-*5_OZsC9dP>%-4d{N4;3vTP{2 zY(`t5ruE0Z`bJ*a4iUpDQ$gO7-jenjJ4iCi+evPvytWyib8`+uKMiL0=F=8{ZqmAo z>pC$%e^Y;OAsi_vaFlH&f~FwoGT9XQUAgqOZ?gi8EATZNm2VQpSAztBr{lPR#B~w` zCzp~HS%2lae6xNkXOYA67K%2kS8sYb+~(g zn9qT4M@sFM46I5&Trer7{h{*hR< zkwgL@y0-b@g`*U(uUr%Hd0{*3tTGJ2>XTnCk(dB%@?e}s0YOHd_6k;3d%P-F-cbCD z2m=yo2C7L}{>;p2FS<+jmxlXC*kP%5$QoTiV+L(E>LQtw4oXu=t%A~f2ve>ghhyZS zZozZ)=P2``C#GK*_9yg+cn95?g&`wR&IwP-mmB-SGluc~r1QgC3hQ;i^(U8%SU5*W z8Eys04ON-BEzBOePx6d3ip-cBFk9LQ~f!RxqY6@R)a zC0K22fDE%IOBn8$BWRAR02z)PkIFB7^xPpO|CBr|ncIO!aBz@!$36Ek#5#~C7)OCt z>W#0Ua%c`_tEb>CrLdo7RT-ic`v{Gsa9=*i(O z__?@Mu+;tPF|p-57=?{XaK5MKPF_;)op6G#8cPumrNV%BxK9MwXuHD2hQcYKDQ1ijq#q7?=$ha5RJc zvy1T`?npGSUt>fa+PYK!UT=L^c0>`Y&H7khQG-`0N{&8Sg?HO!QCpK! z(9QL-$}yFZq+l2#?(Ts+CDN+>PHcYPb4;>L+H<^#x=Vvice_pCxoJ0#8@Rj-51QvD z2OYGa2eP%Oy@mk)qv9vQTMehdbFd71wH-rI|7v>6oXNgOlca)!~MnlXij5Gw`uE z{?Y+tB|lWUi7v@CzBW$c94|^??i(@AFnrjPJRqP@slH?_IoJ{ zG}*uo+)TUB2NUA-NP&0#i+54iS<6|As70xL^~#8u?W03tV1SaxQD9?sJYbK+-G(0K z`vSp4xg?TJt+$fjujB{+i-8Qj5K;uETQNCg>N2n=+~J|_HtnDBd^f}hSIHC~k~kk!GSSrbrnrBFaStqP9j# z385CwKN3Vm#l`u5qz!sF$#fXFD0*1M82AJP_$bsExCAr`#EGbWbAptQEHTIu^)d|( zs7rx~YMo*n9;cm%sGbEiodUznDvVF6tYr_h#v=g^tw?RUhQK_sH??(~*N4&ko@@U& zm8w{Qm*%iq;T%W)J_xH3u@Y^wBTot^t0QayuN$Q&jQV`!OX~_OHg$hfmn&tHx>#*E zzRS7J4n@p+)p@Ajpt{vht8_jaVo~@K(JGUp=+5n-AKW(OkoHD2=<)lUN{V(HnC*G}YCwu%0Y1EN+`zQvr~TT@1XqjkpE04{ zQXLv2qn48JPCRC?MRoSQOwl|_CN~ekd3`9Y#N>RibfDZvV_4oDw8in;Wy9IN%u>Yp z%9{eB5*S`MKOQ$US{k|a%xRfBgs3ijH`;KH>}dDlMEp-nZxE!UYHU1wAJ%(ia~D(! z`Uf%wHg7W+hdeNb0_666e+*;B!sHznpJ|!hyis8F#`+|k(CGo+P0g!L^_LB@OFTzB7|N! z^)^BzQ9D%#aZ0vUCt|(@mbMQImgzyT>LLHtRkJJC7X;h8{3;|ft%Q+qjC_0{ol8Ze z*^Z@YrCyb6N91@Nd0|_)j+FSIc>PPq;z#wRacxcco@LWpg;p_ZYB-6cWVOD&cABgN zSs*D&Zk7n~7HoG20d5rpZ&(HioFEnII=@jqoso?sp9l)jOvBLhU} zvdW38-t9o1;jp`+=F(7tiJS|;^LRo;w44D7Gf2v}(pv&+BCxFRL9_)BFD!|Xkj7Is z@?@gJ52hAGCw7e*A9ISg3Hud1dGm zdR!86K-M%tRSFtlEO;??gO%u;MVA^;jtL-hDk3GW3wZ)=9uQ8_`MYGtNX|TEAfPFf z7Paw_n0^Ovrqs-L0Sg1PMl|V3#NT$}4aOrN%*G8v#i+}+H!NWutHljn*+t?v$*k`<8xns`umubZftQMl#YQRS2R7RJq*(LpF$ zeUBS_uQXDlah+6Hl95RWaw{-t9IreAc+UC~57-iFGs<(XR!;1=zzLdKYbhsC)?;JE zdKIE-OJs0+e$olI)!th0`DKGJnKgVC0{QlbYGXeN8lmJV!fND3f=Y$iid5}9mnAdQ z7h@tm!r5$s{&Cv}uNw%K*ug{9E9R;=RtaP$#uX?)>zh!$%B?}?QW8=vy=2#Iyvj?2!H7vX><8`P7+l25 zAADPCxBN+QAzmOe)sTaHmu>}V;W9rQB0ubnW>!Oc`V~o!h6fYEH!u3Hs7B}(U!0!= z=_#5&b#;BKb8XG*StpdVgi=s50zri#Ph@H1Jb>awILR10_2CRN5d8qYa!o6vY}^Z7 zq%%C6OnyF4)gyMl9ho6kVZ+m!)NZ6eetR>L0l!MIJ%19|VYbt00&y*y;N}tP1>O5? z^lH};gZ|i-gnW2`JDDt5p5w^XJn+?#zb8RQ(c)jdmF1$aF@pGHa-OXbo&6NJnFga( z`3!&pryD_}M5a7xC2B|I%VWF8pLIoSPC|&%)K`pnvs76bz0Zd%2j5Bi#y}kU6Nrc6 z*o$H|0}W-~KQ;?`QB+rT@eaN&w-C56HXfm;-&CJ~eK9p-9u7j27{Aeu#KAMFe_Xtj zoYMsM0EHJjU+{Do>Ay=~0LPwlhlaF+fGK7A*m&U~#EIzM+PxO^CVN*p{z~_B5~X;4 zWUN*6ZNhK>s9-EDQUUKWLpxC4n*nv|cI=S^qj9pf&i0l9A23Na7yTN{>$_KGb-EVk z+fl-4IwS_5!;DkNJA_2d0O2lys&Bli^Ndj?Im7R2_7TuAsUZ%i+F(ZpGKZQkT1Z>6 zD#yJhVrZgiK*%aR=trQP0vlEBOd$HqwG+a<4@MR2WVN-byqa3d>$Kd($6sQG0w7#> z*im@B!VVK;;@SJnNdj<(keIPw{84D`8f}k|zd#ewD$t07i)VkN7&EMt2IfYbd-wk0 zD45nCmEk{yOlTJKRpPti=&iwyi^xw=+5UsKw>>6AwiLcEzvoR|WHck!Oo3pBoHEQ0 z{qBx`rU^@AN#GLh*uPmc(JT=WO%%)g+jTpU33VdlO4po6hfOdDEs(>4j@K0;f9`g- zK6XEhiV%9TP8AP^U=yt0xFntf4J#ub5l^}Owc!?WFNS|4KFU9`jmZlft60}8Vpce% z&!muxYyTo18YAzZQB@&UU60sO?E8HfL61*obAw@9e}?cCAEKV4G-n%x%Dq`3R}Tv` zdn_4cBC&^Aso*hrM?_2MXGV~G4jWBS;vknj`EW2c5ePv@oT5*p9t+bkozLQR+Fi^JKFA;DyxdUZ^@h*nKQ0L!RR>JvUu^51-Mc}fpKxZ zEeNJQ8?`z^Vy9+n?jdFBAdI|^9bk%{4AWZ0JRh4=Gk$B`za*dov4|K_O4DAOu7 zM`xrBs<1}0Bk=qjhi#?Y+EVmg#k3n|v~5}3GQuKS+JHRlt&qMILo5|KLheCofWeOs zLNk$R49$%L{@!5;;bwj;ABWw8@+cCjUXz}9mLBN}?}2$i5i}wsgg0W^pGzS+z)g3u z;1IU-@GlsCAk#G&ML#xAnA=&DS%t_xegB!C^wY?X6V!H=Q&jqgO3jg_dKeQExK!s6>C3V!(Fot`m0_ef-Q!t!OQTD^{huW4V`W} zn;UbWhifAhxfXaAmI1w8R^49bsSx~`z}GKtT`6^Nv(2%c*_kVNy#qz!-su~A)RtZwr389*rj*_{TS(Xi`a&1 z2M03FZe->dqUgBTXGf8|wR*1ccOGQCwHZyz0v7)-_*&57G!Wg|8#}%Z->?v1;|UEY zNkfm)XbdNPOF_%*w!kgUU(G%iacaEFKRVg??Oet(O$O5wdggN6&BLl*2Y2>Xd2aL3 z@H?1r>vT*iyX@{(cPS{xORve~p%PGH%01{@S+swN*H?_tC*V*AS!{v!=>TB2Ht;)t zJ0WsnhD*-=gmBas$1R;W6Ivj%x-{4hfV~liWZ>|)%?8?@8Y&#j3{Zz0jpkucE|^Z- z+lQ}sXVv@30F&2c2SeMqfi<9_nCT)l0=C~>>hNPr;`?bV5J)G@0|(xZ86Wb&qB_7%(Ge=*Ic0r zcL`k!FxSn&%8^+|Mh0`jt4W{tY-Ha|eH~*mWOh0HQ+L*51(sO41zZcJXV@8 zdEH<+X=$<;3i9IR8tVGEVeRnnzW0QVul02g*B)OA7EliH{U-c%hW{mAd9kmD{ITi3 z8`R$;&XhwAs%=YXP20FDlKum=BB{3N2Q@{$pkO`AiTzEgvXJSt->WNn;7@Xt?lnAN zMx@HOUkvBP$9sF@F8&eMFs5ACA>UWZiY@ZCl^|X~2>?`qv)zv1Y8wmphIE=MfX5dm zgK$NK1sH(B&}jcAC@SyCc|Kt8fp!E=6pLBit|P+ysQ@#)YAIH_wt5!MYIbn9AB$2V z*m`gWYdPw4s?7ftY$>F7;g)|(hkm1D_*NF%NmA$PW;ipLNRRx>DWJz-h@qI{#M5Qs zjfU?kxOm*F)anKG6{cVhm>}X>SKsd^v9LgpVDI6?&l!-|l^lB!C~Ol^u_zMd6?=A8 zx}>B8JxEio5Qpy#nzHM_j@soF1|c);J2Kc$s;k{?E)k|x$;$^gicZ#10*|P`@1GAm zi1y6u+7*$|M5B?*f|I>-?U#^15XpdXVfPR7yu4J>?ko8jHvd}!Kiv!Sh7TYQpe7A} zdtwRX&-HsMY1)L?OQ7o-m-ad$isj)BQg+Q=@)oHlNtOi=JcNa$t3KM>yUlC0=Ns!w z$prZXo52TFcQuVJuUZeGqKx{Gp3oE~Id#=Z(u%fp=}cNx>?#{+c4lgZ(NR(C3^5xD zm9AcnEW46)ST z&eOqYTD)_4Cz+qhwD+pDN61VjDE(8EDSJZgI*!m_6!qPYN44P{L`|eSB-*|HtSDOK zD%zFC;>)F^EKGe}GhAS)bn*%;dfB;7>KJhh4#bq`cXj3ezwCq;FzMqzm-HtK!~9oxEdV*3aR zB8;C*>OBZy4(-mtre#TH>|zgb86$&Dm5loQ=F`_LNP|9=_`pYKRVFG`QB`x;jMN1q zskx?jvG+5v*wYDzBS8$}a%cY?cU4kBvni<|HRoXmbJi#diR`|sovwGI3rI1&bLXze zwJa(X+&nUGa@M{nN%+-@j;q(x(}s0DD@IqzZzsDFd$xbI#BE5)-?QIK9i1X`3i;{- zj7`eBLQQk_P+HAOUF`@~q?jIRw%9g-$+Z&hv2H__5^IKQ>G_~pdJv;*f?_r1|Z*N<13>o`FcIPRj`=}{fc zSqzW5>Q5uU2A@GHH^&=?1AZVY<+Ahc3%qYV5%+;Zmd|hj)D`&WHFp}xjP+d-AWI5I z_tAcRQ=bOBT_wjEhrc9wRI-<#I&q9FC2l6eNJ#qq^E~Q;8?rI-x%q|^Ce`^+#s!)j z;x6-M_oAOtZJl#qDyJVS(HMT&;OW3xxhfzr09EqF;!n) zaC$Jc_d5#N4Aa*PxU8PC6$`PNsu!=$Wl9wab4k9=hMpvaGGYq3lPIzP&#pe2Eg-;)II)fSGgWxw3yp`m9H zuIliW8~3oyDKcWaeAaJs+St7}v4qAQMZNB=VwUiT0x>OP#glaTogAd_o89ap7VP4f zL}4NuI!gn+&6qjT6Xtot;C%iN zhX--FAipD_&nvy2=K`Od6mtjCqKwj~V8sd)(9w?ZlA&lwOo{uZ9trzGZ+k@XSpJ2@ z(d>SByzgfVq^~)6|8~e8{BVMq%*O@)9uJ|%g&&WY=Ej~1Blh`xd|t)pL|z@r+NzeZ zC6qMN)A~s-SO)ye5*h~GrDIp81hpBc3d$LB(W_8f%O^US(F$x|0iR#dY=PYl>pt^H%mI8zrU4+s4Q$A>w4$}4Vy@(6^m%E`AE?F4pe>|jol2v6lEI5N! z@e9w~N}ccTjOH=2VMsb>{Lz$0SCQo4=cuURBqPFinYH$=SEh0{FzPD=sbV0t>0+aU zAjWRm-mAN_diEl5evb;jS`$A;^|%1!kF71GpZH? z<+AXuFXStb%DTfj3sq&3(8U$E?hhdUaE)tQavW91_cw#EM1*C~KdJuk?HjQ7%_;%m zf`iY^{HnWz8;4dWKp?g2(%ZtosQ%{>{VC!#;8=LNxP)RO#wi(u*n?XlRwk!UC5EDw z!8-nKP6;!LQ+*PM819)02m!o#26-ZL_|>!;Bj$Yg6rPPu-_B6qcklq(t)K1q zc}uEo_D_yM@6GlK@FR}uG?n}hb|^Kc7sez3lGv~ zxUOh+PA4v|Y|JkK*)Rmk=dfR2#dqnz?4nI_x^OPUMAO@)L#<)TERY`p@1SOx_so%Xb;80fnI z2>v~iG@m!X}a3Orf&iN7T%f?k}l<4+*^b&LPiM+E)U z49)dA7RiP6Iz*;E3=WPSmUO9!2U`FQ67qmGx)u82?{->Zn3C%-PtGCd7)g+x$t&+&EeA8yAWTw>)@laaq?lR z%+o1-c91;pC^CIx!X6x86dX0!tmpw0s@iAwcSnH+@}RC%a_>PMbv>ZKx}^XFy86vs!*?0$+(Wa(Yx^Lhog^drO z5)t@^!O96VZExjP3#cCmv|R~AzKZn(1rQDa-0N&v_!<(2Wa)Sf{8FC{W<;axw@qw{LIj}e^i6+Vi!6Iw$RRp?&8VUMcK;_PQy>utXmiD&e zBlX1eE)Dzg^MDXBK9=R>cCS}W^`+3Fm-zMWFFg|nNzC1~<^;yx)v3(^*zV2ENkQkK z6&AsH70u{1B=SdgdSy#CtZQP*ae(q`#!v!cOfm3n>-aM2i<3GM+b#7>5<&DouZzUc z9|^tXYS-nBOs*Xl{bkg!JiR8qiC zaj955S2w_lXv}|_e+OHm716>e*IkaugxI1C8Wu1k$%GRTwI6I8@@D`b6w+{+NKiuz z9|@)D9XH9dm5y)elh1WrqatLJJhJ+uDGE(H%XSrB4*kdua(c`*f@dmt?RQh!#Np7= zp)$UCMsY+R-UVa29D`Rz1V{%O<7Eeo*CWq2c--7p3RI<`-k;R-LI;Y!DN+Nr0w(w6*s%g znfHvb#+ls}9vN`{50QgfKxK0L>@6_?QnPt9;wP+eN1SQ7ocFw%xW?#_5VI6;zhl+P zFx6_!K^ZjXhoVOxf>qn+>-+7|!Ru^S@92tl&9h2)jqN z^?v&dmylPX>fxXi2l+8`xTtmzxMKLU!{9f z`H0y@6G643(o#mXAuQMU7qLtzrW^wKE}Q0p7TB1cR%NTkE27a<24;^96eIQb;ix2 z4;nkgHm~(=jA%dgY2=F&bOqOq*}0oCGWU6BW>vow_1s#yR&D0;gJb&EHy7r=ec*J4 zH+P#hwB-%vjvmmCw`Eh+&%VIj+jA^zdVMsJ7IS3N)`JreZCY4|W2ne%5xmvSTX36^-ByhsH-6l>^_A==p6%^3XU@(;I$nO* zdigS{)>}|-?{LBP@a4;`twIM|WRU~3Mt;r4)qnkdmrQ?OxeX2%h6iD_&)dprYhmXh z-4@q!Itc2>q}9fnC#Oedhqx>Xt|F)`ZQNhBXUCK}c4O7BYXy^cJKE}Cn5i+A3+82A zwoV!~@bPlPaQaBY4G)l`y+p}3^kmk4kaK7@ zh%3e5nohUK6^vvnO#k5IP;lDz{OJ)3=O0`**|l!jr15IW$u+6&<8IYt$$y%jZ2xeM zXl?1}=ev=->z|rey;2*fWY48)YJQNRkKzXJ8-Axr|KO8J81rpS$2;05s@X5fcAMiq zK4VitO`&#v;FQe3IQK%gg&JEYVB0aZI`pGkt#>O=X3Naj^x8YPPr*lV>4l3&oV4l9 z_eak1jkV@p+|<_p=wVQ0x;)=NHDFE0VB-x_LpKRR`Puj7Fcc^jRs`7FD2?-sSIzOErBZ12H!*R{t^SUG%t35JqN zes9#%-q0shxahoQjC%lEwqk!x_p5wkWPnpQ<&DYlLoHbL!~A=)jecc>9Oss*MFy-x z;z|vj{k|`^=0BqynTzH|n4CaHx9Tovac``MZ&Y-AzAb=yB|j|Dzw+*=5s4Hd)Rm=v7GGUe64{23i2BczmOm*9Fw_%dgih z*HUC{AGOm|eyLt+%EQ%loiw=_PrNtJt8~j7xNowi-}&9i=ogD_9zAu}IP>N8#QVic zYPzmMMSipCr-_&I=t|VpX*`tz+8c{4?&}}@c0uJsS|V=J=HCW7bVnzYnV%-dnGSpk z+&o78r03?^u&jR51c ztYd}4!CYVWIf1X~3(L9-MN#{^^%v78S_WTv`TSMe$_yvDfene?<4kkbEAX~kATcJ` zU7B~7HeF6cx|9a(k3X+s>7!-t_JMmKHC+ZH9PuXOeMIKGQ8UJ_t5wq2Jqpz}adu>C zI(mgdrnbg}#WTht@fK4zAF$~jyM4i)na<-bJ75xb&#zi_yTkj!h5gnWp6k6Cn6bw3 z-t-Yq4o?^}aeb^0>R^7Y;nIqMGx4mnaNEjjZ|%*=$CjV6E9phhtqTHL`0J<6w$eh$ z8;za$sa(yr5NZFqr%W@|x@pd{ii8u^no38uZP85| zb|$b(csBE<%Vgi({SGff>K}M6xzacG!`{oM(?@$*ES^5m*<2?;d)WEFUFA2%?)I9r z-08;Xkur7T7lbYulixC5j}jx1i`?d{%{Cp?**iYt^1{5+6Yf~19kEMO6WE3tT1B%77Zo;}F&jhM zZk%f`nUZg69t<{ZK(t-E;EunvU+D?_Z)lf~tnkj~kz9kTP} zG#&OOP&79)pWd0#Flyptr8YmCcej@wbDPdMPW?2k#xe?5gw^rA{ z>{UKf*rSpvHLrBm-ko;dRITkGP}A-JDu2sPY)%>$B(q7u3VZG1gTA<32v37GihCQb-d)na3= z5IT{d5|nj;vNc3jy>vb=pI1`CbK?lZgHmFIF)`ueltf5Gy4i?#d%kQ^PhQ(tcTqQG z?G2sXtVqhcOV1ru_tT;yg7@jHJs$eR*7>ESvMkzVb|e0R)5Tgmo?V6w^COE^^yg zdFy(N`~vy>*L^#(H>4aLKi_P}k@WGC@)49xii#X^WOj5_WJ;*{-81py5aVadO)W(Z zO5XYg-IBxlP2@vO6otAW*Y0Czf<*=>{-6a;(ioL_g&MaZp+nr%bOA^ zA0zj41R5^sNx1FWj~Q-M?K})~H~QJ_BRHRGyKy;cPfoO59kH)m9xbzXlj#c}9@!q91im9yg6rbt{AI+;)KDfAobqJD=%Bc488d_u9j>uoVYUvb7Qt%R7I;kJI9JHy;} zCbYw%x0&bH-sY<76@#xvF{5IG6A71%tl=rlVkM~m+?BUOp9WIaIKYzboB_`mB z{a(-2BlI!?%TBE@ksZDJkleWXpuIgGjQrR=msZYU_gi&LRg}+ClN*lfe{5mF8FqAY ze#y37sW}?AUklL%3eVVY#=UTPtY0HuYjdEUr7^xRLw2Ia3`69(TDMQ(ZkhvQ(l52&(w)sb`a&Z|I^g$4CY z)0+nI_=lD=iaV-8x&e*7HBJ@x4?OO=my1s@)!BEuYklgGu1Ci*u}PEXO&y<^{Ne>> zKEJ&GH}|vk!h{pU^S5YWYHsh(j#Q~07=Bk^>C}o$oEMpWqB=GywwhyY{jhd;<|E1} zM&B6}!p?Yj+G80t=Pm$N-*du5xoHK557Rrj#v+~Ua?qnvF1XQ z>9)Nt8JWA6u`g?0cXU7~P^Yz)$wX$mdtG(DPTDah5#iD9cP8_PGFz#quGtSqzgsLv|<)QnH8Y@=7#T@k|R z*s3mMJ_qDr+V8BwnH{#)l>GHOE_>wHIypRbX>VUxpk{!706I6pkTq$TRSaMz^XNB6uc5&h+3{JLc0 zc+lV&W#zd&Y({#vKx*w>A% zEpXnG(?;F?Hw5kMikH`x?zm@Fe6S;QpWmxhzPqO0%0M78GtjsHW%+s!t99yT-i^Lh zAID;L98J_|;C78wMV#zc>wGMqI3_Y1>5bSukSm)jyKcKm?sc1F0mJJ~g<*d{4E+)} zG1`llc9^Coa}7U>kHfrq_eP=dQ@HKNna{6`0oy_#phKeQ0s*4uc-l?pa+`U}n*@~| zqt;-K^_q&)G03IEhRrVTl4bv=X5j(y7(_q1r(D?8i`wg*_CDoiZ3?}35P>j>mcRQ< zWqM@xg4x}+;nkFy4|RvGn#+$KKic`!Z{Cla(B6*ILA_pOr*d}*#$w?^K>O~ zy6V`rgM%*H+IqIGp##c=ZlkK28>!mZvJUOMt4YZ@b}o9B!rr2I?1~ik{K>7$Z`XU% zsy4r0KST4G#^cBNKmq@HTZ5Tu*52A_#9saVlMsw80iJEL86sF|%nY&6P8Wo8+=5*F zf^36A|AhJ|OIK$78`!F}=v88`r|Gj767e9qS|G{?(UrC*h3t`klC?*7l;Y-%+a}qr z-&g;JNFY%3^w4frW|odtxDXa%bz{P7`AaQ$CqfaC227dTvAaYk?e^IXrBhx%8j;`v zq0ANZ3Hp?s_JjU@>ljz|Vs=ja7q@@B8|3$24>|tpV8{P1gYmYBu>U`#+pH!wb#kEQ zv0lp+Wi`?7hbJNGwd?I|9WU0|J0d4jqvn?C=~&)(Y{%TL;?<=q-&gJ3*Jv=z z^U=eO=TB9iU)ZMkZgF!TFNE(`S<8v=Zm2yKL(`NmIzuJS8P84K(|Y1q?2Y=Az9pd~ z>c!WG>PeX#9~XVIeQR(h_booAHLBuq*4z@mCEL0J4qRv=dEWl?XyxkLE>_=svCF9C z2Yj@=7M)|{T24AC=y!XSVDIaAdd9j1ne$yv|F(ZUw$!83*`p(4Sz!H6<<{K3QUeA3 zU9%4#&?}v-Pu1U_Hy=-4yB)7-LaPX~TF`Q@phbNT&m+QX>FP5Dhw^qL(ql`6-EY^v z%lGQ>?KALuOK-5Mr5-Uo++I+C0t&6pX7)xcK09gDQcP0Drlq5SBAlDwjSY9m0e;QV zS_nP=!n-Xpaf`oj^z%m-Df8cVg}w`{a1p%JaL&ElkgKSXzHwqO^0}Jg+TUsCdRIX0 z{2{2FE6VTfM8<3l@5w2zpHizL2+G^CH}CEa__anGkWKAJZ*Ud z<~@CDjB|^^87-*Vxn?X2OgCHYx=Ky$_PVzY6NY8oqHW2%xk|a)ZT)K<&3D~feA#WP zoAL@~mqEUEZBvamWgEuFlSLzi+T&N+b*qdMDwn#CU+H#*9A~$xm41Bg>jLM7HuCtU zdKZ_%@a~jRp{w7$9HUscwXP9=JW4qit&VtWt>gU6Z5a~!WcEdnvYAT07x9+=cokiY z;-MhSJxw>2(U$YlM=#>0ug?oKoj+?%>8_Pf!I$GUra)(*e_>S^1JFj}+L1b-v_)X}V@$$BeOmq;NaH z4Qar-U?V$$w8q-VI$^%HO6YcnwX0@KkkiV=*q+rAadrrPqdqTS>IWq`p16br9MM;+ zL$@7qIlXA=`-MfJ9YD!^y$KzUI>HuTG+G=l%%b7u=PuvPKB{x#W5!OkM@L^lWwksE;s8qL9vU|@O33R*NU$3=Ik%t$GmZ& z<8JAlBc35XTWM|=)~y_Qch|7dGZ%HXwf^>&3yh*fEYVC$-F?x>T4VADk37Gu*op$V zW7#fp5K0K@366Qg^*>GXto=f}%!5{M_Dl4g$349Rg>H+k(a zJ&)w1^CPWM2BsaaO2=KDF|k3r16#FD?`rxIQ)H8HzL`d%!`6zm&RUaE!^RwV=B5?5 zG^!X-uT-BbcR&xPxZU5uMe)Lwbz)`x-8pY&MIzKSr@3cRwGZDuDSIs3x2Mzf9FNk{ zq^WQDLr@!!q6X)Zh=#nj7Mh=@G-08LH>}PA3s|Q15Tt9;@0v zAY-&(fuiVO&ap9tZ*S})JnKE%Rad=n?(&Q?2CZ_dhDmtQw_5!4eJ6NVUPTAYYqWlh zFLl^(>iqQxT<&fU{N=-1i?pKF9C2A4&{v+MYj;XveC0`1!Q+KT?wKncdrB zU$Flc?H)DQ`W8y@aOSHN#Oppqzn_27uHdszDL}a~v@AHn<6-N#0%P57pEn4t7{%QW zk$sTWQU57^=%Z)ru1tsY0Yd$7gq6u~$5y#iuOId2s?T9ejP|{iV%xd1Pqr4msaM4< zoTI6IZIw90&f6|$C)VTPq`6%)R$bn2p{mHwDtkK~F?`b${~z>ciEFVlckRI9-4)lo z`pbHz#QL>`+aR8wQq1^ye_Vt&JYyCIrqm=&y){zzQnGSxZfTEM%0$Zk7M$=A_nyfmTc zRch|LbygiWwvS9Y>Uj493W0tx<;F7^=N~~kx&MBpR_n713)*{qO_#d8p?1CV@uz5C zBgr823deN+U>NqJ95ils_w^(#y{i<#|1hxc<>D1~h*$ArhW&gPl;*f-EdK4&39Zt` zfam1MhR6ADUz(aAEDXlR@Ru#qhK9jp`O=|b=vHAPG*NQ#!BfB&RiBbVsuva1`e(Mw zBGlH(d;Pvi!&YOF8PtHRt8GuPN3&yR@4NfZ;V266IAHX^&zrP+-lE8u#kcogO`SIV zT{F>S)g}La?QsZ)tK*DX<GVs!((r=>jYtI5D3z}F+01E>p|K;sv%lHQQI$*hKc=| zT&{nj__z~^gZvk7HgT$^q$MwUy~jvD#=E!k;q}myC$F_XrkpLZO+AcgP9FX5cyG@O z=d!EHjvTZhK7ES9H)xKou~<3>8TWDer+-;XKY#L_(P8I{{Hu1GHreY2ppLW3qjeBx z`qAslM@43PuC7E?5tJ;uK909=n(%atiuUyWky>JR`}Nio9ji03)H?~+jO(iEUe?$< zy?j+Tm3=n5(?`W{LldKZ+>$z-v0Ll6rx|O~uUC_1cDi^>p6c8)$K05{^t?R|JoNi8GE=j&U854V=>Y^n~)_?YzCAhhto$-7y4r&cXUG6}afKlo5CZsDN0&@a<3 zvo4kvl{y|txV|f|Bv*BV?}>3_f}3pG@63hz1AF_!Uu&5*w$+?@yQz@TAKPN&@i5Gn@YO@&(0#$1-Q#puGtn&X>?t$vc}_u@e^cw4N#7kk_}e)>t>c z{FRHMx4F5DDq>99Xs=cjhzFjjC2)A?ReI-TT?PwQ?d2-K*=#zUEyfBD=D~H^O+J?REnxQvFW%TTDS}4*hxfbnQELb<` zWvcE?RLIsj8G+>o+(u87Da36`TfvGgwWZ~p{@ASBwS|4EV9%wAu9WOCj`Lj8*S%Zo z{PqL#>D)OlxakTY<)JU@ls}k#kv-vah2=o;<8gJh=VpQ z%_AOmHN1F|o7S>be%Cm3>+nNLk=fH~p_uPVa;77!u9kG940Af^D6G19-sH}PxHAa_ zPnP>PTP_J`e%$z`Z{MbR?G39AJ=v{$PiDr9wv4GZDca+6h{9ty;+U6}O?QQcBrRUC z;h7TKStzRk!)$IU(ZYdt3%#X+VWsnoE`+@^@gbU?AR!4ws3`cRE%r5uT#u1b2El8oUu5l#5~kG zhU2u-+^xtQH1pXEC$?wMN^?7oE8Fk5IXj0ZjPbK&u>FF@E;KBeNuKM>Z{0p6{V`#M zBb)JB2BG~_BmFrtATm4pLf^)yYOXbMd23th)w`C<&y=ey&&%%1t1X>Wfyg#R`LxT% zK}b(Q)JmFepz?gvv(X;Th27_`wPz_I4iO*KwAQ6LEc;oP)JIO++J&?lPMhVfT`7|(rd22J?MSe zV^N2C&^_|G&hrl(zV0Mi>-0dj>z!<;8>LYdLMqyDXJ7Vw9&>Kv>Ta;&WJf(Qv zrIO^y$qVPp%r{7Dp{n@MR7|5W6xL*iZ8H`O&?d|+tvtIPsWMR-Q>3{>6CxoMswGo#q7`#=PAk4(sN6Kg{NtKQ!l?ho{2gx zkJ7$|H2dVYuVKbv)Nw78Rv}PG>y?KBsin&r=x(4F&_5{PNWI1OjE@@;nXT_sZztobV!cSg zd`bsWai#zWK=;4A#c}S&RR_{E?JRa#DV+)HoKzt&jwln^Oj%LssdQ-Ul9UM{RjN<) zZ`(YZzCBv&fuQB%`%leVp7pzWdnB6q&_RhPlfsSj(sny=?rxV}c*p^kSCGox04jNV@-kGl|vx=oZ>e&_J+bgddBd%>57N-fZnAeLUtBreV&8B{6Ux+ew zammbZ_gP=GZQGs&>$dvsg&k?zymS0FY|Tjb_uK1|?Ykj!bGnbbS6XJ)<{ZP`sk_Pz z%;R`l%$JzCErBP$w!L=h;Z(#^tooIQGAvN<#2GD$l*K2l`yxV?gfjf>++xnQYb#E# zsa-OahG>f%HK`N1V%DIVYF=@^TOstwl%-^^gO3g8@6A5V&R9P^EV{ML8&PjEdIOmC zI~}Rkd0&p$_g(5se$?H$`BQo8Hg(?rwjcBtUy)kIn>QPXLloNG^+ZhiF0yPn;=j8OB%bJ0e86m3S$_}U^ zRi+iq8l5qMNS7_ycw@L0$IG|hB6^5V$gFb2ZK$53dx7})N~R%_={~-23B)H-LdI|T zGqnE*r2SbV$Fw5LtiM{tyz=!brt9!@P$a2*E0P*N_)d1{uUg~QhII=V? z-A83|v(2ypSLLZX2daaInaFf*Y}(Va9=Y^w!sMJ5ndREB@`XD%BRxtuqI=S(?7p@$ z+0Y(T9j2`8$m;r&x=B9Bll+mR{vFF8&~H-t3cP8{rLO98YQA!N*Ug<|tc=LGf$qtZ z|0hj@4R5Z#-*9#P)wcC@eMakAe{3NXiPe3!PmDwkLT<8e)U9=Byok30Hv9A}RzG)k zr%i*`;fQt}zpOpYAL%JGEH~Oi3%9PmY$t7tGC|Ki=h})(+XKoTX*hS4uDRZ^RpHNh zwMX&q7BqLNH#FS1k?YDVy1e=Ii;`$H565+TcCOmL$B&1y=x9FPDqnw z{e5>dik^#}-YTBud9#)-i8RT$XT!YT{b~P&$IGeN3j#wgZ>LmG*?s-)Rgdkuhj$x* zn%aJYgvx^#qBF9q6(8l#-E%d#I(Hbyjyff4A|mcHUnf@I+H%jCe}S~}*|4OMk%!9f zmq%@{n2V5EvEjFe!{dGf5m1Ck9f*^SlLcj-&!CR(VzFFqtSJBQabS+e36 z!50Rzx%>zbqB*~!w9#eax$BEC*@AoP-WXk2yss&IQy{JdMR=1Qd9`+EC z(pQS=RhD^J1zC+qbltFJ(|X^$to6PH>oPJHtlMG|YId!CVU2t$!ng-h^+aY1NNXR@ zm#hn`nx$z`k&?SnGn%OFfMe}NzSca&)MZ?HC`0NYE^wl-OJot+eWS5|hFi3Q+(Lci z=e(T?) zQHJ`I!n_F?>Y10V+`AKcG1T03!uKN(EB$5&N<6#Z&$pOK31JQ5kU53le#U=XP%~_YSTpJV#$4=hBZ%evlD3dgI z)|)doh5Y8u>;Bgo6K6R(SlwQ{AZ2D>VSH)WtZR3=qetzEvTWSg8M=J#*{kjfgdU|r zhaEB-u-C_pm~#30)zt(x?hV@f(9zY&l?k)Ft6ubbwwy+1&!3-lB;$7FE8nurYzvDp z=I94_ZM&1m6{PF+DJDHtzZIuWBs4{w8d%~q_LJd}Is5ibksCinbM0x8>h-I|`(Cx= zPrKB2MKq!+VJ|wLvQhiyR{wCVV4JWgJ0rJs3ajUJx}4upeulgzcdMo@W;aV~R}$rP z^?|bK;~p)_Tsk4S=YxDtS>zqBmwL)CGotTM8%38(?##Yk8Cp8bU=Bv@-<*5zXN}wtQ?|NWhCly* zGIc^^b});_$~j<}$6DKnG|k!a&>MoZ~F|F4sz%@Tg3T}(MjwMEacgF%F1pU zff%kUqX(89QhH#1m#4D*ip=ikFC0~Fy;)W@tNg~*nQ>KX(#mQdRwy~18Wx#tTt`$) zM61X(HM=_;Je+iM=WkOtynmoPv050db2R$eNAzu#{dtF-w)%Myy+^jbK5K8uf3m@i zCh(SfrfIZgwa!QSQSjqDG_qoLKMVFSmd4wEwR_kHGOizdzI-mxnqXM-yeVasDPkbUU#Uqet~~lmj7hM!meX6R{5`7 z;9$sSRA-)jyeUIvLk7VBU-ogXgHvJW!wkC`|EI`%-5cL7-=-<~lt;1!g1qom1O3(Q zGcUJC+b2I?nN#{<+&iFZ`_q+fBkjqn+(ho(b}QeKx+kt7EJzX+eCR!D?{Vw#)zSsd zMF-NWB}>O=kFTvc`MBSIW8+A^!O^DHJd2PORF~pog@xumL9U_fm>j>*VF|#-ce=Es zX&3Bcy$Wxvm^=FN1|DU_`#hslv*%!Eohsk_fLq_WiwaCS8d(!psez6XQvn;!^t`(G-c!RN_LE* zk2QkZGkjyQ`scYLB;$wFwCncY638WcM_cFB&bC-vM_g@Pqs7CTS+m+7c|HXS^4d4D z3V?zM9ph&b9ZF5Oeg%tMe4fq{>&y@zsoFJimHMbc=Gdk;j=cj>ev3Zs0T$lT?GLFu zG|G0*DrtDDE8=W(k!HgcZ9ziK|_bVxHPPAj(*Ud&UcH(owPl~F}2m9$9e-)bj-8sh!FG#_?1OBBgtjrRk+;tn zPC}$#Mj<*z$1~ybnadM`Wk!0dsSm$msW{TQJ7vw5CHu5G3UP%Rg|!;JRu4GJ&sd^~ zd39wQ%2dkA$Rgz{?hnb`C_DQ^xnr9RHZONclq-8*w)yqwM1!);hbAU2)6EZaSm+Qn z%>35ELf9vAD^p`}N>o&@Mv6wE)?)dM8k2gXUUBlHYBe%Vt!){hN182d<~RQ@jxbV=I7oT{iEK# zKq1Q%BeQ|k6{spxr9@{P+suaFW@J>(3{-g#6tV<)QP56#P}g{&IY_B?fT4$51od*zz% zxa;dw-mZS|ar&fuwS*Man;x3BqE+0<)9_L9*=@CwmJr>~rn)QnS){6W6sZ=N8J^ z%_>jD98OEuO?$jTWlMB>ks7kdE{af-M4Nkb6FYQPQ_`}D8oXVj;2tNfN(-(wE2!U< zxo0y%GgcnaD(e@SeWLbIhHZV*>C<&*EY0x7r8CLKATQoXzmraS6&+u`KPcmB=+#)g zLfVG)5y3ldr`0l28xR*M%DElLI1uG7Ud&R`IQWuuWhIrr)QT6wF~~dl_`~>(H5N+| zg~LXlMZ{s}E5vxF-Ys#=&rk?wJ=<4v2_e1yKfZ8y9NyH09yt%7vjE{=QwKqE{p>$T zVtQZhp>!fqPoIQ9NB$iH5GE4Sg<$pn=}!KSTqFZ@h?o-s7!xTZJv{dk@e^VfWo4)C~Oj)Ornqt=p-gdpTYuYR3@EBrL)OD2E~cQhR}ln zHizxHRaD%+AO1Om41>G76?b>H;uI*>BBeNm;!t34EfjaRBBf~YGPuj21zL)>KykNW zKKtGO*}dEQz4^UPa!zuRo8%pNo|E8~?CT^jjNPu-XvbmDC~}CHlcA$2E`Lrn6AeL& ztk?f+6mNV($czaED^6`;mS~c3hpVCE<=8jA6OPw$n2USBKxc_m!f=A9vZSh&qdf#I zGAd)2dIxZ#L*gq4Q&x4Vz|nnnL{4rIU~)S5GB74nDijg~%2j3)#8!x6LL0J0Bg<8_ zj~G<0T)@lWZ7g8`El=4I@4KPnMC;kiQ@hbb4%i@xRCB`ADA6~e3+BvW#!$^`IQ%uh z3jCL!|5sE4%25VDIkiD$1~9n~Yb3in{1e)4bqQ3$-)-#P9&R`j+$_s050OkP@<5jb9jRO%E z)E7gU#LJH`*xdfWlcm`y8`qdU|gzlHNZ<3 zKpWn# zMYsh?I1eaX0jXRYm#~nuMc}sGYIBhmg?xd*6@o1O46AwK_y&Y}0I64%HyaIn01$~A z4j>;GwLU3l{-1$V9>R?71u_AndtepCu?Y>rKo{2f2fF*V3(sLVqYS~g6ZirUSI=K7 z{GVwB(12JZ90FmhHU9HxatE`aLI++hpU+;xgrm8iP?i%wB@%!S12sVp^QUkaJ4!&R z0*{h>;K_9#U>t_A8jiz%0vhbkpJ1@j%H+1q*eH;!kj0dS2&gqoAcE!ld7u-e1aThU zZfwaaU8&~B=o}21A(Ez)K`7~EG>d3#Z1Q$2_M9?^cLC_Qo#w~qUZ3u1_+45PsEQgu?I%Eldl;-jl>Q}1VY=GJg_fSAw_cF7LgDairr2?uStl7 z@TvZlBJ+VDZ&3a6&hAyCB(xZv0vd@0<{kpEfi@>10+CSuJ{*vzpr^kch%i{xaG)MzkpeR=Gmc#&vAfrHaMm&76WsYg@q*9KaLhm`7qL(YsCZvbC@6~csLHN z8-JFGrl?<#m`SyNmj7L{L6%3=c*HC&(R}|rlOz-*s^uxcPSjgmE5@bZP6FNJ>Dh`? zwV{T}xs`S+d}6jXAs7UmD?$}b9Np6sIBHNFO8|=I>63ct{8c5!4ekM~c=p!=u=7aB zZQcdE{C@+E54Ar)6Cmd&CZ;Txi6{* zH^zyMArzM;Ct~((V~Q4!uqt6p)~EXzGxjIKH9(hb>#CZpOkRrywEc1pfatG3 zPJUHD0Amk96{kD!^zr#i7%EGf-kku)&g}R5lJw9sr(V!5R>APu_sU50R#`Oea1<(n z(=7M=cC@_peMB{;j=U@J^AA-_IHS7}wP-ygVGuReKGJ?iq|=USFy|aeS`Q+RI0q*p zgOd}XB_&B|c2#Zz{-}Y^53>mm0}&|IntzrHHuD1k}8dy zN-M;P_{A7;9Q&lp)vUH55gDWp;(X@1LNct{Jbdj{c1CL6rv4Z{tK1M!WA z7&AFV*@YpO_{8HF zA+^(1(2rtq8~rKgLFlT%23%Ry_Xei^RVn;&G!u!W{h!Wo!PO-i$_aK< zt$#5kC@~Kn0stjstPrmFP@jCHEEkAqFy7DBAUoQLqnFC&?7p8V0;enh54M6JKI_+t zb)NN0$-_{VkBUS^wvjUor*0Mjn>g?asR+(6N&>=Xs*p`i6;WLHCbUF?Nxf`3N5|kP z_J{Mm4H!%>5Lok7Ujz|Np(DjYgq3r~!l2!ZGrlF%Y0FELB!yN@ycs4ES?aspkHdC2 z8q7}+qwt9loYrGNInh@U**fSLN!?*39VrksszGT{hF=k@q8kRqtVki^jhdkokHx0> zgjW5UAswBB&iZaz1P|88_UThhc0!X16QWEI9M#zsS*R9^C`Ux90({2rndsR>_X~ln}8viZEGF7-aLX*@hC%fDzzVZ-sb(R7j<$K?J7IIzV&}JTGQR+yrqC z-TL>!FR1JdQxqT$Jt|cULm!yManou&iN+0d?!v){VKd@5k}raYle@GSQcp9%hwuSs zIGD#_`h#u7lqa0hHFh0(djg_$ErWps${FH|Kq9{cMS0v(4aqB9RJa>C>YLZafXb{S zM9wVjS!d+A49<|HXk3V(2Thqk3dSa7{3o!tud_t`9dNw--DY`!Mp zfs5dW%ci65)07E=MpGLI9gUl#Dn8iPU*G}@7^gm(DAnqv8lYjeMX-4C%7I1~wB+^L zx1P>FFV(7chwr$N6qosKZ^sMg{PoU*O$kEtfyfY}6GRTmBxA%U=gPElJ_z98JA_G+ z_=T`$MI}o1Tl#6^ko>Fr7er*@uLQl@37K_9j4SK*l_B8`X`JuYvubje+FQ$E4Wz5? z1FV9L67D*);^TD4hIzw2SiH~oOru0MI0CMDL3nC*N1A)}gLtyS`rfqkHW4K)l-3hS zF6Nkj$PfNkLz#Qk%L^ZhFW;cG_#k!q;cEG1E(ep6UR2-w^UVt6++Z!kI>vaB{(}5e z8s?!E`8=5yNE$SAwF!KB2XJP$n`sHC967LIoieeMX$*`eb)cLdKVVQ3NOZ$C!r1)UI2#T zoWg*1*+&aBLpG4APN%(8ws>2*DJo6UkvSI@m|` z4|Rs5L&xuoLt;(1;bn#<|IDM|2X>=td#|djyk7#t$a{aiix!8;q!NHD3g6_X_p&?7 z7aP0)V0<&A#((0fK2yutO&iH!OJV1O9t5FUuZ|IK zIE~H~JN9z%2u3?G%=w5#w(5756qFLMI0Kv#^LTXjhCW8d?w&5DM?gM8BY7PH^5%G} zTRyC(={DJ6?|EUJy=xCCK%0zS{p!Hb910(PA^(L8A<8`isv9l8#(|B91l{sqxc%~Q z-WoG|JNLGrath#uq{0Jvvc*Wm>FZCY>Ck&tYzf~eM@C$A5aUy0v6#f1#ad1<7FVPP z%=;keg%qlIOuGY2w>|eRi0)A~-RKHwlnMc?v=Zc`eaEY5z~ z4|1s?Z2OrfoeEbyLy_Pb4Nl(Y2)`*CVUr6~x#CI1lsgb=2aFuB{UBkI1cr zK|pAdIy_){o6NOR9ed}1u`2>c5jEby zzr0%&db+n8SH%VyR4qB*f-WyAmjq!K$br~!L5E0s@l{EvWam}g`_9jtBC-&*Nn}UX zI?$OG-seUS zEU<}IzF}=ebRSx3TCo@cId>RzVWl}dV)6CGEe8KiwRkA@Tl9}PTK)-2|KmhDZDix; z?q_Oa;2jbTnVt)Q$D#=MpXy|7La$P&3dApxU7G%A$-C`oKxfnX*I zikl?0iv_8Ex={rFdG(~$h7Awq`=#^2W&zTJ9f46Nj}27YJOH0mDP$e&Lzd7!xq1xc zsdZ|bm9Z2bCSrNhYu9!I4&(g9dfUF3fP@Bcn7=ka1rz&bA3ey2bBsCyoV+0KG@`U_5ho~*U zlEAUZQK}&??!(Iaw_&q&-(un-mo9rnZV?CYjnwOne7S&%V`Fj_HU~OXZ9$?avuFIX zXua&Dy9xtg@7Af_a5Nf4D1uMT%UMYn<4|?VX6s}^UMsaHmb84KQ<7^M0k-tsaf|<* zV2hOJQKTxDAtcFI9&oj+3{S1n;x^pbEX>!4Z~7LcKZj=yd*xjykA0J-d80@GcRR4I z70G?zn-toYt@3?`d<+{&&}x%m0$USzhVY*}=h(s5N>S1wzi=*OTBhUR=s?@W&&ADs zmpTvCjj16`JZ4B}KW9bp7A?WZ{v?NRFL1>)|L$*$dW0|4ptNbq7;1R3`W@ zCzSZ%A;xe-YjSE0$DRWaUIQ6Gw2PYh9;H95(86m*@)bsqKI+{$MOu8 zu|;v6HSQ-FRPLOVwAoTQOlw*4-#?Q27%TIH900wd2Z@`yF7K~qG%0(MXIA)ZOM@TJ z!Ja1PBf>qeovjC*;20R-H7<0HesYw=!=V`UEzOM)`O=1O7^s)-KVo~v9(rC@5+!9| zMqRK7L5(AA86>6IrqolMe_{Q>xVG)bHf*vLWK|wCf+yxio3siJc5CQ{%*pLO_hCb$ z@6L>7XF^(BF?iTQg|1Sg86so0P0}gO>e(t^~HRMfB$L?3Rf>PLgAc zCl~RYxl%Jv;0d@U(aao)M4gq&2eLGRal2Rrv6#yKQqz(R3`$dr@GsDklmVeoxm%oh+ z4uzDX=&l74ARxZ!49ZUv#g7IF8W-;G<>bx+I2w5b6pi;UtBk3a^l3T_ZdqSv(||j2 z8Ytnytbv0^Uk@Muo>+D+i&d!lF}E|J~h%?+V1KlHZUd#!t-Gz*YHFGK~Gc z>7(b`rgmJTw4&%avMAwK26?w(su25Qj|oO<%y2zwvd2n(P9cq_FXHAxd}0K(&H4GF zAD3<1LPA8~SNtx-+Y;fs|J#-s8T~0fG4kRfEy9aT1!r^Ch-Y-9N(CtfLUBT9r4PI* z8OVU(Od^T#0`)R^f5hLh48`t+Zfj@$S~ZZb`-LGl6!Z+`&-S8> z#se&IQXET8??LL#*g;d3BvweL;MXpH9y;`8J}D9lC)F>#JiPw5vYwu(A3E z^N<)w1J7p4+-Q45+g0WkUu=owF z#fhDJczi;^P&`IUFRV8sH)FR|>;$ub4p1stg??8raJVZ{8Ay=__X?5jhl^QHuU^49 zV6o`RW)kOrIZdY_ma=eVo-!AHOMyMP)1MsPXDT5_Vr3gC{q!LcZ>S{1P)v;1bI$#{ zn`88qCIMWUyfgf-629JCd7Yy!(2Jk;ZCOcOeX zBcOvS`<+ruxynDo%wxISqUzkhM;)eZ5?FhA1W~KJu3~n?rR%akG00LSOyg-^Q3Ju5 zn`7B20eF8~a;Q+$MGwmo{tlQ{)ZPhWs{0N9=%(jIxT*C;la-g`Q$^IZ(Ipd6PIol; zY>fRRNU2kZ!%9&PVA#6zO583rb-k!_>IQS!m4zn)#z-lu{+_~4DYzwwV}3A6^57&W z-*pN4oVSum=^>kx8VP0DlSq$AdNVtr+)w^O!Klx;OzkE(;4x6InnchJo7~F5$sIp9 zV3U`YjiU{mNYOLmE@uDi`>Th+;hW~fH=up{k^8A?4*Gf)Gi0=jCuw>`!ico2lrDBy z5(xu1<{tMqia|*ZvQoJ&cqk~5zqFau7+J}J!fGjB44e#L870m|m~zveOjLEYc|*_s z_QE~8D8sI%IQB_IBV!o8n%*%l!EjBUluYLWm+ZBlQ-i8Ou73G|FL@)*s$g6=nhIwk zw#s!y;LVYLijAhwR353%*(0q%%jTM8@FS?r{vyQFszY{t7%sWq*P&Q z`=_3p4JE@~hpEnhvCf$N;&8{d&zyq>osky-H*4pTx<7tn3u%nAtLa(7f8b7Iqv<|RAxhC9;* z4H}+mL@PU7Uwc%OIJbNqCu?UtN4$7zgN6L{QCqIl;5^a`-s+R5mkYzT5%JQA6jdYj zJ27tcvhjbu`0IW0g;6_^-L_87-aw~}pPIt0QnIeqd<4O1D)@H9)#8H3-^+;{F`%=y ztSGR$XFaldH@9oa>@FC51@-)318t*J=(#{D+-?}Ld=2HheG@+Soj|a9PA@@%8G%0~ z5u<;9q<&2UCh9(_e{-sVR@(;mo$FxUeA^<`UJ*?=T?jp6i-tR~hKk(`CDnW<#ON5C zQjI=f7}&DeRzlU!k~(j3 z&^e<-Z{1IR zrR|kg*1Z6(!B>q2S0sYMyaJ55xW|Gc?$R29RM4jj)6r?uBTaiQ(^*2(`7FBYDm(^F z{_c{Ow%5dp#_|Ywrx*iSFBR)-9r8hjT1gS{5BglitqJN?e{`9R74Aq*h^VetWZ$<5 z`3I+nVr!~vU^{j3gJ@i4<(Uh>S*MR%flJ@^n0L`FUU?)uH6z$p4JcT?(`gp^-~`d- zSX;7$*tdWncQ{m~S3U1F!-M(wZ+e2n&G{fcev%Z2zW!$OX+t9fUbPIwWW$rdf5z6t za5g$Ju5NG9kr5hKVt0hcYAd-r(^oz{TJRBArnB`S?pvs&BM?s&sg##g@T>%lQX>4N zoqFQT$+xfFbc8@{YAL>$Ox{wM{n3BUXZLO1cu-uM))SuU$HlBjk3*H8C ze5-e?S6Xe}E_!>l`#qEwiq2iS`1Q8poQ{Hes-hp433}Ru; zI1d^&mcMWgs+Hh}@k&P00XZitwha0N%3x=5j>N-YL;mw3kMgQCsm`8d8SQ%*&3_o_ zN^d?*4g>&tZ0oyWKNiu3F+ISZWsBTL__q3c;lmaSesT{@LXuro?vr>CEjAOy=ZIQa z5z9eap1-B-22{lCBp;O1vNS+?gqG}9WavG9PQZ9rwH7ti^k#_+F*l`agkxP?OSbM( z{*LkuIaT7U&&=P5;RInHJHfiqdG?8}CH*IdtF6R-Q|F)K@T1_s5tJ7?d%bgcT8nQp z*S$V8mKuyRItE~MunwGD{EYsCJlvr*~ytq5EwPxDj1ctR`w3#HaYV#{;g9%cyqx3DOo({+y$T>Cdc#G}|GjQY@48hWy`J z<5hhu^yX1h@TDTM5*burf}1#V-fGc{dJx$qQUvu87)PD&DdH7YZBs1Kc-lCN5Qddi zDuH7L!iBlXKRKSOJpaZl=PfZX60KWjm{^bEe`iSazIEy6y~kch)?1f6^5mGQ$7SjY z_)iL}*==ocOwxV}*kcqqwK~#rY*B(wa?QzY5GfqlK$dBuI8HH1`(mlfeq{l!VtJx* z4H$1<1CD&h@9*TDUmvZ~y(^#C1l51y053NaPglx=jLCz!W-fW0r6jMXvj-I;(}8gdf;!Zxsx=X-qsE(aS3Do& z+#!h4n#rP^lSLjSo|LEeU0#C62Cwdv(Y;06&%i@3(YR{?-kL{c-~*kWm4n*?yxcy= zXB!NC;I+7d0qC#+XTh(6xom!~mZE;KUL_pngtdg0me{eDS7AHR@9uxu7~-ngG<5D( zFxu~zlo%2)=NXFTlDIyb%5PIA)7w>N4APPwiHt>2?3vUJ?3>vET%V7R51RH7bx(`U zExfF$pb))a--*VfZUzBXg!Xy*{VL$)#wJPMhmt^LTIw6K83Rg{`Zaozr-w_36o$_Z zIZ5p-zrR$0In5FUFd7$}QueWj-za0P8y8t6tpk^8X= zhwUQBr2R=-j|aA%)tNE?c>sm7=Ac3Q&JIO4c~+FspKRYi9&Hzf)tZ-MFHtID!ed77bC&e2T!vi8`|mE>ehL^T>KxYx0w;S=&&! z0+f(~Ltif8j2gONEAt7t;{L@5Zg|gKY$m~l%8y(I1k%N^EXk7}>-rR4ip*-6R^^{?<8qXXX>hOFba zY&-^1!$85fi&W|niUW`ZDz+kd9}DcB#g3W8&7@Dx_ziRTfyUW^Rr-$7 zzhf}Tv7zz|zJD<@)yE3?QXTLai9I~6B=xbpBeXpyz_g6 zdE4WV)QrameXK`At~pCvJW6{!AyD09z}50@i)MUluC_MIrPSlPKF5QOecSM;V#y*W zWhb`V5b2O-!exret)e1e$<+z;dzekA1~5$ASmyb$aYFfLU6iC+Ys4x@-KPHxL1puWZ<0nscPTvMUO`C^>d8WXsP9bfN%y!Vym@7gx>p>3>7M=#l#~7hr8U=K(Q)m$f?3t| zp?rcXMvw(rUWzk<(v9Fd#;5EZ6b!9*0r%NT-FJ74)m$hgO(`Q;$>HaTr|q=vV_6sR zN}bA=vSgs%IW2~C{l{2S{fTBNGHIRH_Qy9usc|*iC@sa-6bBpvYnZmfJ^x_~pd`FB z)_O7Mz0aPXy{Nrr$hpzAS(ft*)~YRXlm~10;7RkxxC}%uU+9Bz;GLI<MB?7>B+<+|C5EU+{|kp4QF*RbnP+VW%ZWysA%v+lgHt0ULw&p{+D<{GrAh zB4e;oaqc8`*hc2FWM4a`mG^c;G*H0R>PO31YzuRfXmp<73_Z@uf2CQ`G4-oC4#SlL zwsdigL;`m7xj0?N zbnF~JtUF$?0<$lmxF7k3>u+2kSk3Xu*Zr2raN`WXw*oWI9;R;TFe^r3$p;9v*GXL| zW;w=(bo*>4XPLc8q|rJ5;{*=(6WBa_9*n`QhskLSXgl z5nq61?gE|uldYr0OYL6ZZUUaGjK8>iamsllbB5QBw-pFgSy=K&H+(R*03WRKcIeAl z&K>jw@Pfxumki2s#4H`eYM9BE+5-U=;0Q4rc5#8 zn9b6yk!)`Ikcs?_(BX+D<+yA(-PGCnK%o?&IcC^pJ`Hpu~7>AxPy$=+Sah>G3CK6-tah$Va zLRr626R*ZLo85}Cnc1#OkB?9UB;_1^F1$fj2|r4@Y<7m**@xDBg4)=2<=@8Hl8G9B zOy&{K2^ZqyGB9$tin;jF=wkZ-JjYXtVC1Ixearo>nm~^F!UmEk=&9_neq^kk^qae?tIN!B`EIBkp|9Gz@nn+>CkV7FD8SA+|h=N zc3Ysy`~UQNNkS1yI7{6go@?*m;fX$OTPj-P&Alk(9ORyP2IPbnhqLeyz#fSyORV+! zkT$zgiT!9TD3kobu3<>IkuVVk2wtIG%;ybh@s+eDD{T5Nx!nXP>fg@Pp^96Z14}-~ z`rZbP3p;Jqf7Q*O1f@)lkz3HRT7IqDdnkWR$+uq*&CX_)9t#$uwQu;0>jVGZnj0<$ zv6KVM1Uw5$)eO1PIB+}qW8DLujE{Z-LI(U=h*~s9on==u_%1!GmHsK6ZAWx1&nikA zICDRqZ0Rm4wF^2Aecw0#3vQrmDo5M)1MThJu$~d9UtbFcG;z>|dcVz$!~xz~0?ZTW zXqSJ!zH+@58-*x$mMTq$J^ek@n)nNa;LjYXb~mv=37*G=E{2x23GT{~&urfu$EE7g ze}foOK>GWZWJnQWXaqk|hJy#~i(Nt@U;aWzZ3ekg|95`=`Sc8VghKn>>;(-W)(&QL zU-D4jIp@<`4@OW%5NlzJFyl~@5J@iMExl?zs*}DAT4T+hWqF-hYl@R&6S_mrrl}yP z%{}+WuF8Z^+94|_`eqKM%f_e%&A8a4z|oOV+_%7(+OX_)DbA`J^LH(}J@hC+OdUPy z`N$iYRtxJzJ8ig!tG_ikOnIM+6}O8j*#+(RoU2z_)>Iz3uju&qNC&~_=iuwOTA4JN zd-?uf7oEsp?$cPgF+dFeM%TRhesKLpM&(FibAB-+U~AU$4bt*?UO9I&7TUfw^$#`5 z%Zh=zTVD0wQ-+h4Y@S;@jQ^{}fGX z%nF7U+7w^p1#ThZYej@5FJUcR#2jLz9I2Du@;Foo6Zz+iYs`ZapqLDjm0 z&JY60c*6g;hdpM{>X-_sroh7L_lO2xx93M6JAN%mBVQ@q-!%c8}NQXy`x+sCkS3U7 z!OtLDbTY)YVG>uDQlX4sH7V?dV=bhm&)E9UA#V_w?S+Lt%Xpz{w-Zw|0Agj3XE= zz>b&*o0yCM1>F3-&|eQbAu^zL!PTp=y(r&)&^L!am4kBGlmp;1}xA- zhv?o2uy>4a9ojId{Of0{;v1bk&2VA~j?lU(4^j1Ky`)xa7RY>C?E14&RqkRMY3DBk z02WfsQaWUU2dHS6XsO6C%7KpvbWDPdnx+~bsG2aT`+B6ZeTws+hmX-a#wZK|AvVRl zo9TN2V~L`lFKslCjdO^kTrA)Owix|{aQa6(oZx=BXp+vDH{*v}I8ro*XS!87xcKD>V|tCU}FSVcDntZXl+jIRLfRkdAK_C0S>FioSw<= z@(;D}4yXt=S}Q4SmZ{WoeLH%)ir z67+y&2QTKU-5qOw5&FsS{r$^lbT{sueMd&>o+s6&Fg#SiV$F?go4RpkMNAA^E2{_E z(cy&SUEcXhP6l4fr`SI4z%^U2OJUeU;2t}d`GZ8l{`->cr4ke2s?26uYa zEmya^pXYJjnbYV5?^%Y42QC0_v#onwuiy79hM^u@m*?QHhmb_5?7~V8SAjhWm|$!v z0&rhDt0JKSsW_vCAs)fC<~M}}g5FVeW+|nNQj5O(O@^+)xv!d@iG7=vgJ*pO#n zNk7rHfFxBXNA%t(XH{RNgdlWh(>Z!-(itWyRjt>bxU z{v!x~1+~H05a87~%j9HAzR8_B=V-gRXNK;OS*q_#VZqrqXcA_w1vB34YC1AszANYfuB4Lg3s$7R*4M~}h|5N{1X}BK^3L42)ZO`|sxz?Z@pU;b; zgjA=6|1L@PfOR2PpR#Xn(#5f098J{bwV-BGX|a{Dg3HBMs6>3}i-)G^^JZhct`L5yH3C_YK zTx{)a=OnDl?VIDnYXN(ElkLLG!pzz6J>!yY7rp*e$gsJ<0%JzzW;@oXxqx504SsE8 zyo~Oq28WU;*0w*pGOq||M&Lh-Rc3ft-kO)r|UK+zLECZgd_e| zzf0DmjM#VfbJcX(l(x>(W9%x*F+q2?9uOvzB`>t&j30;H7TD=Xs2S#%y}aJdVOk;b9+w^D18R_StWWXI(vd^T~gA3%|3i^R)3VjWY8Ka&L2m_^a(~b@Zd;q6qtV ze3*uGc_n8U_YWiAtDC0g;;3H@yCRf=KhvmU$DIY$Z+mPXKAQKAfAopacFSXXNZ}a< zn+tqzPFgZvKT&zggH@rYz1nB)pA-2L>C|;M;h0y`jy#*!T35f34PPyMJ$jP^F<*mV zhCLG>!;6@WwOyVc3uXv3xJEj62f3_nTs>xEX7h$jW+i`|XJl9k_W$#FPOW z!lo%J;WKs7n2NXEYW&YD#s%x@zf-$O^eFrCw7;&?hDK$vPjA{0WL8AWE#lqgoZ~3r zJNP$DGg?IHN6&4q$;pfQIX^91I^>#kCvaw=EB(E1w zda2qM`J^1wkA0IUk%G&*Oi}1d?*H4#+z2~$?IEIkZ`nLiBo|3LdHBoJeMSVW^p_~-ql)W!} zcdZW6AsR&pQ)zR!t#tzfru()PJe21LwwuZOp2#m!@!ppYbIV%z%x^Hyx*RS;$#GzV zj0u0@kOdLj1G>4@mRo_C;#1LF1qx2Jhx@4Q=p^#ka}Dqr$1JX)-f}@r^bNx97J*4@TXoefuXzm9%n@wsnW4oqgLwyH_d_e0J1zAcnaT7;II1OLLzKip0}+~)Pw zlDCIB4ub4UG>FJ;M)V!6?Y_YU)9?9#diin(_Eadm?54+-zUR%nwebsEarH7paU?XW z>nRINZ#Dht0kr%fsBWtd7r;$<#|={cc5+I0m%RT7OifDz7uc^?p+lqs2Ox#i^-=vz zEcNDo2MuKAtuhifp$gCFE~%>hL=qb5pFcpK@YL_tC9vW9l2kDp@<+<*r2m3AzezJdf(Rzg_B@lw!WkyeDZFk);{BYQ>No9kxq>Qh49E zdC=zbi>yU$d8#(T_SQXYY!SWFsk`wg6>}X*+fsJ!e&uZzHGb+vA6)!Xgopvzc*^!o zOrGw|<~K<~z!r^{N4;zJp8C94*4t`XtYw1rY&;J(Q#+OMI8X`m;n$44&DY}han((n z&SUKzb+-5lZPkOhbcEcrU*exu>N||D(h30L-UHLriXOg3>-5L=6QdzFX%~51mXoHf zTUo%O%{JGU?3`)C!P+%LHD)4RG|hIK9dJJ~=h|xW@wj@Vf0Eoz4~1!vz8!&@&%1+7y9xnOkNq5XiPAS0%=>R~w?KptN0DHK3!waT z){(k`nJ{lLVc< zGcr5+N_G!zv(WjjHP^)HV+fFV96)|#`(SJs-oahuEKQWx{rT*Dij~+nM|#lQ^Q&p!>Ztx7q1`mO!ZXYW4l~=nR13xL~@*n zo*_)Wa8s!_P+2xD7{yz z%L=*L7(3=16JY03s}Ve3&XE>=LIE9RozmOSh8_17oc@+c;V8eFUs*=*#kaA;AvSfu-k3z+B6`8UKW_{4yypsAo84dx{WIv|8q#{GXU$oPjZAbU9aDso37D zKKW-NUapol?aAj+1{z===2y=VypwiZsjGUz8Xv!YcScs^ra&@x?Rgw~bXa?8LiQot z2AD(rI0Z~0E&%XrPS}OwQM;LUyb|E9E`tXAz*RqGN5rTDUu;ZFX3qi@2{_r!nP!%W z4BHZkSn`6HjeZRAj{>8!v_(urs3h#Be2rL>*d0d9>7*vBoR8%v@F!4@b4JWFD@3V@+`wIEP+2n*EYTk?d@Ty( zuiF`*P2O!^MmZe)E9wC<4S854_)rxf8f|ybg0R+O$MC7!~V|10BA*tleidovpZ3U zPD~oKdt!!P_e|gvLQ;AV=9y|>p93N&(-_3ae;Kh$I>-_4#R^GL;&h0}h`NxopfbUL zZ>0r7aE9k#6lBOzNN7xC14_*9{Fr1Qpr=m1ASTdZgoiS+aku6SEue#i23Cw_$)OWr zu`;N9`p7Tg(b9CyaD=Qs56ePJgICf#P$t!F{shnSpCdce@115W;y%Ru>Ie8>1dnm@(y+vU`&}x8Q@@3TuI3>!Jp^Jix7*&}iFC<=09}1d)te>CX1<^LZSLK($+SixB6FE3lo~0P$AvJ^< zO5)|Z#kYnw;p@+=X~8XEUn0cvS1zj-JbP5tCeWYct-CeoNq-QFha`+8Yq&0BCqmb~kqmq}Q^bsQ&JU1**RR z9XEiwSz1iBa_axTA$R~6TSjtZ_#r$G3;uP<@$vCnBUt1kY+$M z7G=OiVCXKs2?#Ni#(nJPtxI(W7-CS6i;`f;|FGpSu=(@6v1^irq*(@`fxBZz6oZSQ zWcP-HlZp5tql{93l9NtgpzHn$9%)n(2_lRkCyrzmKy1BNYC@+7(<_paqN3`CQlctf zqLL9Wm^4rn8j0{%Sp3j)A+m-U_(cdROx#yR{1|pej0hEpVaLeAiie1=6N8FA1Cb+2 ze?ZEI9twlb8umM7HHZUS0fj~AL|P{Xd^=qjPmRHs3x^0k2}whYvMu4fEt}RqEr%=#u7D2CTm>ONl)q|fv5_5lAI+P z8c)5xRP9F?{mC;5kB?F7ph_IJSCj5b^VlQkyUwQfA)Jm?WUsQ1B}f0x8Z2BEd~TCpFUiWdV6< zeDl;P9$^wD#V0JeL@a58VU2E;a=;R%=o0;=b~v!ijV0GIbenHG(WT6i5M*;fpN`LO z1P`BwRQ0!ylLtQ81R600DRnnhjV2qF%+E+pYSu|{fWPc1Se(TvDn}V{ROJA~zHcX% zxNt6A7CxOQjJguMWckR5DbY+F#bCMg^+LV8X%0_G5~U$XlLcjAsR%kEct{9NnMHM3 ze=*4{`8m#)5qbz2Q(PRHP8mmYaasx$qr8xZU@*N<+=%5L*s&$jO%NTxwQ5n15C|6< z&NWo=<|>38g+e(+H}W|K6UYckGU~fh3ewTQ-3j8%oDEKgUV?t~B;+0#;M<~5R4GS; z0h7+gs5ds6jKJa|=euEiE5|3SvP~tJgsun|p|^Xh$HRt6 zxp06_ueN%0<~vG^Pf=x~1|#e)@D$5d!6qJ=K@4q1udbC!QOn)ew=s@*^c9-4!Wjdk zvQw_Sk4#$eggQ5TAvW7jn&}C8VMq#2{l04x(l(nM-gRbC+ik`$+Yd)2T+Y1;AYO>Y z_V0jYiB`cX&E=yf)Iy<^{>S;J_&l83HFfE<%9viaTfJ^L4la3n@Br*xwCQ&H?)=c8ZmMj_T?rtWEpF+MHpizDHV}DLdi53OO|1by|Pn; zXqTlVWG@LJq7sUbO0tFQOLkf2KQpSg;!Sz`^nTyp`TgcM_dfT|+~>K^Ip;agS%pPR zktl=+%-#fsbVA!Zp+yLOJ3t^1DG3Qq{I}%7Hv}ra@cjumMa3bK;*#Rn8^k#wq7stg zq6C~0zrQPs!O0N~M`62yaE9ABB2BFk=%w$&-ezw8ga7$7jxXQ;B_OxF%t= zn>_;N=;nw<*y4}PV2-Ai2wS)?8VVB?wm13tXJFrlq`3Is&OdhQCBB`1s00)WA>f4k z=Z5_k{6C+6z=sTQp&$f-Jv=y32n#DmGzyNkLfQ%2qmV}trfAON$HC0sUo%76!maGE zm$*2WLluEVf9#AvIby%DzXq+dcSBnu?S#;9M{6(>2!!ni8AMoAMpzU~ws1*+UZ+iw-GYK4adsF33m#{jZhecutlN~FnhSEHQWOCjkd(SIzULs41xU{GbBj40w15;}5a7(g+DHkf)G63Sn;L3f_RdxX_}7 zZ@}KeBqW4_yL`US4336>zL^PoGxm}u{>pCbg)hIs_78<{MA~2{1uTQ_h_w}37(b~C z699udp^;dIV28%eIQ9*iA2H2#eW~jRdrlO&{M@M6)8f=%QhLVc1p3Y8P6-^D8)=u5MAbJrL5{VXZ zgxi^!AYHM&v@^G|5Ksi@zx%0*`cCCNpkJ8tKTU*x5Ek=)37G}{kAG7z6S$+5siUxs zy|Aqt%*7lA{Uy%70L$=yh$KYnJN}Pd5hT|5|7rl>M+`Vn5UrH|gZ~~?e#rR=z`Otm zpaqDrZyiJl5Men#{*V@+#p3AnWCsE52DUHBp3I%>OmTmXXGp?J_Quh{ z364St5I_jP)C&(J2b1C-2So#@m9Kp)KYH2^1}{L1A0hyzz>f@jEc@r?e=+@wL1CZy zBX%%0R%nEnup`{o-UjiDV&4~7PX3b+7yXL<#jx}*CMGGmM*ph;Kr4S?7QWd%|O@3BOq?Hy%BL`==>J`Ep@6_!v|a2sJe ztf=8)FNBku5O!!0Cwm(t+{{q~3K5kSfryEiT3XrRUYfg=J(dXqrbt_?q~_>|Far^B z5<)A9flU^crg+f>&t8xy3z5&2HL{ z&y(`4G`SJ`VBBThPgk|D0yXxjkS|X{xMJtY@eA7F|98K(8tz0Fd%Oq#Qjn-M+49G* znE#6}CI6WtZOpI)jHP@RI~*#*uu`DM|B3ydxYYObFCno;|EmIk&p)7l!Cyd> zAJW`qB3wUKO#Q#D9|T}OLO>b-;eKs{G=LQWW-CJ`;!8 z*#8WHF9XZ2|DxjG>3>9_Yx+5&Zp|pH>|j>5SjG(k;g%2V`}xwcnp?9~fhG2TOX+`c z{Mqc&9gd$|0e*U8xa|H9`u+Y-QcP^k|7%qMIJR=~=lLl-`60oD5Mn#9V!Hng9r*vH z?OhB@`2Q@m{#)7FBXBPdE1h8}-x2L*gAhiG{p1F4x&5D*l=%1iKPjmA8vU;Z0Mn#^ z=gRkg{6C8-zheW)4dAwOgm4fgev?NG!XAFT!6U|R@RHUxc&om_TY?cUfd=2YeTuE^ z@csp`1pgOZg8y40Y;2G?8QR9|*BwEZwf{lBxBp2UjHK|A+fgqTNMD1E8qVy{T-hCkm9ifh+H|tS=lrHzwh$? z9+seg$P)CAb9z|t=Y-(`c^rj*MFLoE{|6OaWd9SBkXobv)c_!n^q*^BmP3^lNdWH_ zBmiAN<7Xv+A9uq7VTaq0-~&OR{&A>`Kd`h5^)C++yE$@n zvRw#vp#ccZzLqk$u-{NWLcseU3|!zB`tY+Nkmw&4f&O2^681mH68k^=*B2YgFNT0G zumAhr|64**V$J@yDgexoV)uV5<_Amc{}!Rj?@;|g09Jqsr}`rY78HNDGn3C}CQGOR zudk^AS6vOrxg0jE1%ChAUQ7`2Qsm{+e~~zX6uu|57kpx38vG_=_nY;ku9p_E)`tm$(0Yum6#NtnvTV z0j%)9V*4NakMZP(EdMqk_Q@+Y`~8zA6M(k@^Z>Dy9WIFoC0=oaJ7FSRXoY^=3jLpp z_x>K1$p0g~g#F(ZZolAzh&{l*b{HInJAj*DxdDFZfc!`lTu%OjN_TE-M$rmZ|@=tm73kc1yo>*(R=vh4>E@VAs!vM*Mvl zDp7pUhueR$($xAFi?DS2mP0VSl@?u{6~lRLq*P7SjT@IED`@F{`c{} zE2;kU6a4>s`5!7Ku@?WoIskN${E2Yf??e6;YCV-MuzXoS{D);e{;uZCLeSf%LNN;t zyk=1Q)h=(t4wh;Uez+(Ong)A5UVGl%lVoA1W!asQ!Z}WG()C zRRHiO13XvG|M`CwRhC%~6u)-u!>e&1->(k%bI~uZexmqu=$CUSPR6FTLz*Fk(4s;M z&jqOhyMLAk|NR&ib`M|x*FEh11lu{NJK(xQcOI|6)o^jN;{__av%>$M2q0{yB*RF(h~ zPx>#2LxL_M1I{JU{_8vmuNQ=-|3y^qU)VMO&Y^*EL)!?Z!@sldkQ^sM{lVc1(BNm5 z5=@To9HA+`LG)9DD7N80AVe*({);WQ{@WoO(FilxUt+*A2H|Dxzu)Ko6oZJb<$qco z00RC&{%?_AM3f(LzhpvOUslY4e`{X|z&I-smQ$?z5)t}8Y6)I~{w0^t|9npHf-^4J z+c;TR+2M2heJ%p<<9)!g_TTU8KZ-#lp=M%$PV(WxUvl0@dNY#2q3{Z z+<^eRjI(gOI6qYNg50AF$o^y(gpek<0b#G85JHX!J4Ymnib^}kjH{(1d}f0X?1chrCQhuH`J ze`f|=LjDu|dHwItv4CaiU*dcEmlB0Q*XVyW0PtKn{r?{2Zye#jK>_{$Wxw}5ED`@J z`M2@E76|lzB>wlC{U1L5S88qlw>ki{|7YTV7f|K5XMG_2F6+Zu^zXkr`gZ{h{ zpQf^ZFDw!NA@!s94^t%E2H|M>oAbXdivL=x|Fud04E=`uZ$Czr-&p#~;TvSN^=y#0so(%4WD9u|7yZs z2k@9_WoL$P#R`bH%U`#A8ymckFF0XMX#6(_ji1rxYoT%7S17b5H~vRp3H`6wV*T$Y zi`u7^9-rLrKUV(-r~j3Nh_2QDSrzy#^?!bhD!;M*j~iYIObH@%!=1T)K6Cv>7eKkD z3;089onskn_?ov9V_)nVPygevnEy*kFOmNdH)Up@?r{9o3gFA}f2hRw^*!AT%mRf#phZDc_?`TxvoGz?Z`z?;%?tjYI)K`WDujRA z&2MXj`w{|P|G*n^%g;aUNA94_3(+tCvjY@h{4(R~!RzpoNs2%Jasm43g6O9UYmT75 z9hS)dvxNNreg2VkUJ(p1;gx+LfJy)W$V{y4;3zlR1#3>qn%ZyG)qY&dvg{0_bk z1y}(vKyGDgfn%s38h}KA2+Q)nG<;>*$6vs$1@UWZ!K$wX%zujzUoQc`U&yhx2>el4 zBK})u3I31&`jW%p=S%|2bH~|4aIBy>cBa+YeD?8SU#&MD}vke$Mi=b0vinz70nHKDDLGABueDdb?oR z|7U~xRAHF_pSlW{68!r*5dWFsEnnDqErHX25iAk^A^xNIkN*Jwhe$!b%m0Vv|59uI zzpDa3De*t&|9^)n%lducvl}~p$!_e3&u;AaC8;;|XmOE<`Gplh7tmNyQs6J$`&7)p z5{`nKqOsk=b5bgNcgVmbxX$3upr6j5P=CVTU@7^@zWgkEh5S?Yx`h2-a=H4izsdlX zp?@fjUcRsYx|aWGbpV(n|8s>{(Eu*4A76C!uac_^Euw$5h=SArUVwT5Jz?f3oJ~m- zM32AxT`Rx^tozi04-upLlr7-vMy{R(2BHn@TajPolJ(6+KXDJ7FbgKd_ZsR=xEht! zf1E+RaY54jtz*U4A6uo-{jl5^*92~K(BC^cG5kz2<7Sc`1Oh(K=H~I^2L0L0&kL~J{vRs-z5P#0OmdC? zuL=OMq=5H7$p0+x^SH9iV!*vbE#JjipT|CX{i}XU@?T}0`Sp6lMEr!`sRlv_|5a6y zxjGm4xEi3eBB6J2PM(EYX@n+=v?{@*aooYL#e04a%gKKdq7vWne<)O9P5xUI z04!D>|3&*fp8SyGHxm9aL31xwto$sHF#z9+jSF?c2?6eJMY@f^V$qX{kPGLqfENUD zzv3kP?++eZ!v9}vDgS>f?B4yeOZV^2|1ZAC{v$30S&RQ(6#(XbL;nB2MU~$n0&WBN zapoT@Tb#^ggEYne&u8<`cdcIuh5~Dq0sd@dfW=7hjcmApAZxPWABM&JABXt}GjX^i z)I`EmTued+Ap=L4Nr_9C!$n19q~J0LI7ArBGlebOfASeWJ>@X(2ND(j zQxVL4ioxgT8ym^DUS)U!U8lEK&zrVCO@2adETazjLi0JM`s`Ri+CD-~9=^L#yLXs` z?@l}TD(`)ywefvsJ3kgr=}=?OgzE;39CO^U>hngEj*gDjm2;sjIgO2S17R=v!kSAh zbPi|}KEu5Bot2wLPrOJ{Rl3*MJYa(yvMGHU7#-b|HX!#vIi*@*-lARpj`s|FC}B2-SQeP+=m$yr=U<5Revk z$1BS$LG|z!SJPekz9A0bG-q`Kdn=C-Idz;B4^S0M;;DOXSOzO4C@%LM0{f4>3-xiMdOx_yg(|*Zf)H*p+WOeM|jLF=yBIABc-xy3m zFQ;|mV7qyuZ&O*!={RO_xhKk-Z4&N1f36t$zK&Z?-zuUubup|>RtTRp~@_YDX8k% zBwee9!t)n;_fLKln%o-gnQ-vtq-%K{u`3m+#z^>q>roeogB5eGr))a~e{xa!o;H!0 z=grFFhYUq~n+24T&*y$5Zy!v1kULS|o$O(a-UCZ>?NT7Yz{))Zr^7mm2Ga6fWaSzU z9TJ=#+Vuv5633h#;b48zI6BfYQ8l4D?|~eNeZJ!`LBU1MAT?i3F|e{;t!8#49pO&N zj|bC^yAQQ?WJ!!a^V~JPW!<^Bj6=Kl^xdn^0Zo&`lMu>Q%!9oby9D-QCXmSjyzY;V zALzpL&Uy}YVeBkMt6oktYgjnVdunxIQtv&o+v3KJc%H$@R_IMp_|AQYC;nQ4OL_Rz~inKo33hrq+ zK6~gzU}+dPOZ+tfzBy@*Jt_xE^nDeT?Th?clxq48pwm4W>1)KdX(k7&c$>AxYx}C4XWE<6o)uCvw5#4on5d0B zFoQw9n{9bxybU9lGKwjT!nnMhE~;<1@7OhH{yHz~mEF)_s&g6nup8)bZ>%AvvEl7u zX-tlbeiz1LI*N6>f~@PYvHCXO<`0F2H#h+Cz@%gz)Ln`jy4X zdwlG?5000uAo}Q{FvTSF_>tD}H@WFC;~|YZ?MqGfx0PM5l-{CieQf{XbVklC+}e@H z5{YLT=R=Suw#BTkGrX}e@_iN@l`d(&N2-E9cxJj!>;9eWn^wj~)OE)W#tF|vf7I0*zW&tlZPb(w3g9CK?SI_p)jl z4)(d8XN@l#o<4*Kq{Ogz%vE!^MQ4r_9l4dH>HO%Zr_fl-A-Q97vhwqCa^7@u6kD8O{FoR@cx@^yI+_E7xs_9x6@;0xpTY>t4_UNhPRzEv zJUlB^PTGMj=7T~CDqkglr~V+tcn?p*Dc)m&uJJY2R0`#r8n$J(h_CVQFm4#nYXhrX$p*y4NVTd zKYJpw>*kz%Z;{&Aoyk7TF@@@6{&MtA5x!diT$qmnKA>S(&v~w zF$cSkIpJZQbJJPUrA54c(naoyIw`EcZS+INe1@l;OIVds*3f-Sjud8I!SAl;Cf^x_ zF0vVnk<{yyvt0W|`=cn`#tn}jh^_D9nA@B>sE?UBDu6w+7&k28I5#`%J3C7=KfTUv ze&6)8X0u$;g;>=S^E*$>lVfK6&&}MJo#mUJ7Mz~8p1#@9#nI8_`NAw8_N23&v35kH zBVZ&LR;kIOfXO^qhWo>bY0cU8SFZCM#-141!Xu}nFp1=RG=s;{g@f%ExhSICe7r>{ zrWA`s3=OAX1w;Bi#l2Y{Q@5v7w>+`v#AJ_P4xYrkZtSti)+Z?DC<*Mx(2P8|A$;OC zgVCYVTICJ(#x{)ByWA;PCw<>~1Asl@+ zM^dv9mrlnyvR#;tXR>tC)@w(3nwI(>vO80>t)Q&voS}H`R^Qh8tgcv7GfJ5;@<2^k z^2MoYrS0jG>1gLYF!}ASANMxVz@oO>G_{EgPExZgq#t*h?d-9rj$!ABI>GBi8k@A= z?~EVD!u@I`RKT1*Pj&9T;@Ga!v=lK#uE}u@^|G(dN1kp^s_li%KRR*NYzJVKd{FE> z?;Pq*u!3>ltBn|)ZYqr@2U0U$*h_=^9P4Abt={^)M<3wP4r-E)kfq%>(prD2aWxSld z#acHb@X|EO+vZF+G#Ar9wQo+DCb;lkkIcf2oP3>xCKCCLD_WFv{ znLG-*eTH`(YrGO%&XhG<>u}5;Ezb<93a76uca7quO7I_|%S%FOakmFS_9s%RslifI zPBA6PJcW$8ld#=*w}Su?VWHJCMnq9^8aNdnR8e`mC(bxh_b^!f_5*)#qV@qY@@fva zf@QdjWM_9zPuplBd6+r3R z^Ya!rFw-8dFg61Nc4^KdfvEXOca;meg~rk`bGkE_gi%lC`Su9_Gfn&slQPrNQZk41 z@UTE;6w=utkvTce`u&*FHcb18u$_A(PbAM_O5YXbG)C*qPO8r1)@1?A%xqDeF&hB~ z7e?7jkPWGvA3a}n#KXEP{XR>NE7HS)DZ9~SGA>{C4Hdl1ud8JaJ>r>|6+FcuIPLie zqd$w0AMr%zciRMdpy z9*oNY0xb?G#`A>haBDf-;9PxJHU=4iacPuuobg0v6;@!zjJHpAUD$5 zd~1Z(plV71lTr6=fo>taPPaF@-QAOCo?j{76;kWncrK#5=aQMgmQnisUi{Uuy3xj# zPR>fraTisboEb8!<7C~2^J)!WC|^Q6Ee#p;(!Lxo_Q=@%tk1DdrH+1;Eh>;$>3fe4 zTTb2AQgKSreZ*b)+*Vj;kGRvo?IDEj7#-6d(RI(mHdPD{pi;@p?Uhd5=Ce9~dVlo? zt?)_fQ+dxe>nUD-;q5Qg)`%RxS|YVip8vVOXgOs1u168&{zTp>6Rl832f1ft_ozIn z1M+1tSXm%ql*7Rb`%UgKPxq=%^!iL+G*L5ZerV7(r)$jf%AtImY;o-6%a=Y7UHPZY zH`-&0hG%vTKa4tYKut@zxyPj>u|-g3j=?POio(uefUWUE|HDyG9dmq7>Zz*P?%fJ3 zd}E|aYE(|%iUctjNqVCBQBz9Y?Piomj5=INu6)!rrGNJEp0g25NJ%v{us2DE-qDLW zW54AUKZgEIs_b?ADX*11quz_zQEn!rXB&JTSWxS&53}5?^UYk-m4BE&{b#ZYLqpt0Bwct(-zr05~W~f$Zm~yYSsc35HF(l#J!{U zx=47BGI?CltP(LBv?3GVlX`mewwhV5jMsyzcdY7OoD6yiay)4?60Kz+;&WtXK@LRZ zjHm9GfI*Q_4jUe%QlXhh_?f94S(%@aKJkF0Lj%bY7_)e?;hek4bo8!iN0kPcUTxP@ zbRwAhknc0lVW^&7Xet4|!^=n*nM@j;*&kRR-Ld%sYEQ9x<~}Rb&H8d_0pTmX zB!G#%YE8*D_gk_;SIL-&%Z_e)?w-otm&Ezt9OK8D55W-~`r!&^302cwr4LzM%oR(0 zxywL)PPRnvDA_sv!`ZoT2CsUK>nVHRdB?Q&n-_S!vEjJ9wM!wR-0fa0{Cd3= zFFuZS*7$C|dY9{g7rnb6Ukz9zRMD5@%A-3TXSY+-NN0%qOh0Z#z9kml&0WY;7F#j3 zYus?V|2TOK)6oEv+@}R6?-ZH3^XN>5!Tg*v&E5SA+-lzLeY(Sp_Y~d3duml;yHLdP zWWC;uqO#V0*Q9thRLIApnq70Zo)wQk=ojzZ8t%G5{*L17U9&;^6tiX7$etL&S=~Kj z8B``_DZ5+^%W|(8&}?qKm3i6W{o6BcVtX!RgEsF}(|s>h>2lN?SMgdj90jGN%lKYO3K=?1^Cv6?wshEE>^|H2jJr&ano~`Wun;xV*L^QEO z1}^s$p9{?lCgw6QXuJG|qk4jT%ZozfkjEzFOY-!_uE6@}O_+=8$ue}(o}145e59lU zm9mR)Ip)MqR8`G;?WwAITFQD7kRvoAGT7vA_Uy=^Hh+-hBQ>^EQ5qkr{+H{GrrWpQp^;A!pscuu<9jK zbT&yLBP}fM#5!IJ350FqndqD(m3j6o+VEwdzht0iz{JG9j)b%;a=XbRn~?4#$KI)C zB|H>n-rLrUQrQ+a+j)TK?rZ+!3F7Xnwj(*`yd-9AbsZx4=JKVGnKcabCCWRP?x;TO zx+ObXyY==N#QQmIITr)Xvd@;DUA^*8hZVa5=~73k?H_NrAw-?vtQC=2tSxxVAeT2OCo2AcdJsB2 zw3JqZU)lM(Ax+C$SNWOHeBQqN=kip7 zYOi6dtFBp;+qE&X)x*`M=lZ-0Z{$|b?l<#!#|{zCc*pX3zm?m`^;P~Aa92I{F39z% zi$u-kL=o5IjMm-L&o*l*-KCBQm%W}>yZ@L#1Z0flGUQkYh+Ladqw>VLXA{-kdpQVc zNZflj^!31BzTX55zbzHuNXa|fZ>t)09y3{i@i>K1o*5LF8zN7|2*%wEj2wO?K+qD0 zX>4wMd*u~oz$RlD)|@h*ard3QS`p{@hohFg!j}>DA>c4!iTATU`Q>-wgEtCV93!pu z8=Npfj#7D{g=!K% zP}J1g)TSl94IVc(sPvjR=}h5~IWX~N)jY-x8VP%o^UM<%%UerK+|OOopiCyoQ@LZH zOYugWLPXmt98S*@VOtwwtrp4O|4>ht`?b`Ce8aanj8GDl2i6x;67r5Xs(>(Hyqx0|#@nuWltzduLRve)T!3EP;zLT-#Fp zc1JaxN8ZkYm=d7untK~PiOsYgV!O$P^`yrRQiIan9dx{+T0TZUXO`bG5O?K98p`c# zxm8b!TE!Tzb!L*qtWRq*H)5j>Up#Ydp$cK0_PxUfouSwCUe@a}()m38pewthjg*$) z%)Y2Iw@JI$EI?jgB_~AAJsq6}zaNxpZpre`OASFdD6N0hHn;Ddb@T@%mqeYc z?VWeG4n$cV(K{JmTz#f40VSjVSaFvI55?|BqZI10q`CVopRX5-F>OT*lUMSz@!mXY zVT+XAecNtG@F2}p_O7Dz%_&~7GvWqjm8ioaAub_orFthQZFO4q%n2Olu$tO%F{v&+ zm60ks`LQ%v;(GS2Nk{Be-|}Ye>vmER0u|lqJ-qv^qWWIem-qC#kLp}?cOpSQvhkV_ zptfNG6yq8QRO+iTCHY+udedA14~!R$LaJ2vOs^oAiK$K_Ep( z`jo;Z+m1LhAKzpe395)|z2o+<3HRhiJ?lbtfs^iq62=jttT}q7xf4e3$7hUbG&_xl zLP}6@rt~xq(g9(6dR=u2^^F(@BJ7GLwlb-kcVv8e@tc(Z49&cm|RyLpW&G8sH zB7ur2Qsnu#^BOW~cv35MhMI%lS;sM)N3MZ;bMe#C88&}D48eMG&LOq}S<3nbqv;kf z`i;k|@L zFEqXP&j(ME9ZtBXEi=_*7}g<5OHm#XakHGMGbsNGCbgm)5P5&{NTfxYLD=3#ZSLHx z?xPAP)6v|#;YlD43MsPi(Z}1)Cg~Q-f$zP)8cQr!z^`Tq;I5&czSLB@QWb02AipApDK z9w6*H!g8Q3O1d>6EM`x0a^AIT9XFhKO2pKuobL@XHtCYzu^$meCtf<;0~n3QOzbn{ z*1Jnn18s}T3=J51x?QE=pmyesP2R<@Yh~1THeZjcx$Y4lEWeA(FfpG0Ns*R^9}HmV za|?KMaG|`SZuZ#Y z@!0MlVIl}(Jh`pGvuJRaJ4-9~48u#=D)M5P-nYa6!Fk(E9v9+l^0OYI$1VU6jUc1ykq9W(aLyB;9fUtyDpF%CA+wC;c00^MVIX2-=O#VfjQ zDSizlAE4*OsWsTsvI1ytrC;e_I7zMcI9&T3B=ufWYM#u2J*d!lKX&;iyoJ=RFH8rn z`kkHv`M`E|LpDges4f=q-t{Mr zKh!`yI^9=Lu;0#}yn}q}Yre1{n;iC*0fLmF>7e$C-RVy!PqGp{&bu+e&)&(*wsmF( zt=h~r$G7#|RL)_!x}u9hBdP`3!F|ECTTG^v&K?a*1}Zn?Z+z^>&eARpJ~Nc+!8|RR zu6B+I;}bDE)GuRAe|onWJk$O?2eXoDbR5gvAsUZePhu)*JtTOtD*~+0!h^gHsis{B zZR5D(+uLsPL?}uX@n?rJr5>$sklAIe98XYO==CPsLQ4poE^^&e)HBu3W-bWTYa6W4zFzv` z$X&M3HZrIQ?~bE(KKYXtj0wH{{dX>PXJtjcdU}HPjPhYq0>|qf?y13u|^v1`2s40nL zLjMH9$lN2^3H;Wzc8|*5(W?%MLYR57F6eW=$eif+)0>+VucfQq8xnQGv#uuRTt&>) zr<~Wt3YxO`ibVsSZVIMTOVASD&}=DS?Wmldt{EFm~!$4)Zn0~N5@go zrsTzx-IpS}wH_Lrdv@qXRRxJl{dQUATO#O3ay*rZ4_OTkB=2CjUwcP{@ACMWFemUc zRR%)M*4_GnrJH0Kht686H8EOjb(QwT{zu`F{t7O5!&0s)1sIDkbyCrVwDpTayM`!j> zX->#;#YO4*jXxdjpFY=Y|4!uLuHqgD^GW(}{d4Ts;w3}wO*a<61n$?Lxh5#6qHXOV z=olIowO?$MloYw2fBxLyRc|)8kNpqCq!r2u@+X)ZA+ddgyic`gv^ix)5>jX9z+@&m zW__v+S+$t-v7(^_OjA?SVHvOExgTNDr0$@i`OQZZTT(FtcP8&L&KAiYN|~yjOu+Dv zLk#WuK02ASt=ply!<#4fz;xxvrpGTk>AT45Z?z!NYH15GC(iiPzI5P z>F8RW-MJB!6cKU-74z@Xa((d|F8;HBXTu;r!bj_Ua zC}Zs0hoi&Yhz8Fw)Wj4zf81@xn7JsZY_7k2u%@l9K|h1t?t~L+=tEX@OjHq5;cR-* zIErkX>SH-!f#*>0yoE?scYT%1)L{F?N%Ofh4=YSfA9~n!@VuwPi8s^ju|@9V=+OY@ zz9DC0J9f7F_oq-}w^^T3D=7!k@XggUJrlu<9eX>}f6T>J{t8WEO=V&a=S)!Vv`Jss zmV&eFY|ZL%HI>Nr8S-g;KDmZ=l8?>PCN{m(?=&YLKYzcKy6x9(?5E;pBhNKJD}_$62|_x=i>F?loN@mp+!x?@9+D{99yrDGSNC;n2PDP8|h4W z)iRekSw}fJ)4b(rOMi;OafkUwDbXsPebakp`3rrVWHGZf!R7i{1EXh$gztMC!!)O0 zdwl!!5K{BVX{*`p@{ZAq8GNssYf3*}vV3OzqN`8$@zln2+pauAi|HPWi!OV}o1P;t z?w>S19=@$IIX`R&b4%XUZ_a&sI7PX~+_R70P4Z)J9HyZTJw<9I4e``cWpzin)@?e=i>&^dvjES98uljNLaB z?~WHU?eMuhCU7*i!->xK>DB#F@u<_l9WHo3ITBtY%XG`3YDl=&lla8_c#7gEE#3f? z({I?c4>`Jmi>@na2Y63fit}4QZiin(GJ5A$ozzdL?4R9!e&_8X_DBuWh^^N~lX6AD zoGEF_E!&|nd%d{0OdxioviHUEt~!C@i_mw|leb8o3>wFf#gjz^QXZ1e6j4-o)7Sr^ z8QkTtPxb}Wk#MMAjChKnnXK)$xH+57ULrSoJ6c1XY%;J}Qd%8 z)_L!HVIQAvBGkP)ek6H|4eLFNcT}1ju}R)Air&p;M6RbjVZF=`&T459maS(o5T!bP zE<1c)n7O&ZkO_U^bn_Js<^riY^9ToZs*sX=lU-7po5%gcgB$YBlAb3J=2 zQy-ucc9=4eQrjB9syf;Q2^vfM{{=O2Hy^!G52idyOSl)TAu7x-*Nhcyawe4(sm)P zEQ9x#Hl=U5veT8u_-@HG%f2Y8Q=9ZVk~LdN`QD@GHUy9!Jxn}hr^8)ORR|mJ3)<#+ zgXO+gZMuMo&)1M5}Eoc~V`anp%lk$LSPJE9mw97&mi!Cu@g4gbPfq%{Tb+ zdGN#Y1`!3~MVF^&Q(CjL%B?)Zi|vb9=rv7Pi8QFB4wa7DZQ_TPWG;8EHhGhIgERut|B!X7`EgqtDN$Dg@0h^DB;2Iy zVRY|=#!Lk6h_Rl3d-0L~@bN3xnhdgL$c3TstRuT1{U&4~_vXxG-}?$k)aRVNo%|>= zD*6M7KM`LhZLsa})>B?5r=<(7pAgS|!DL(_+OXrCvF_c|^n$!{yEn;FdfUBgX*lNM z98i5oMe=Elv744>MT~}heokx1EK^w@M1AW;_@TS*lIF1)X!EC~+6Uj8@V--gJX@X^ z@!(AE^PWo@8C(_`-5MU-)2}tXDY-rMu!M>H<@NEsv}f)Rknm>+frz`bLiRRt=D(SC z%Jt%}lMD46xn=5_tTw*W9_5OeZnGNdd2n`Dy`FXR(~Qd&VKE9G4mRwycQRzi=M#6# zm~WI1I^X{GUTLOF18T5qcKd}#p={v%=ePFs%2+Fw9@z1C5BKG#wiAS6JA!WeK0EcS zO&GH~wc%}8Opno|bwV$hkmD;3CpyiRbSdS&mdx{qlCSnYxwM{~nI)^UeB)T6wFkW_ zy`rZ3O9Ptqmy3DwwUM>R(B#?OY+@8UqUbhd9)EkqRy0tvVMw^@6qRFh5tsGp*Ra!} z+ZZpl%H|ud>&%3a-~W*I{#LzW;ag4<-)7p--S^&hObE2PziK_XPVipb&gX_R&*w8W z-lp=Sf-1Mh#hdAGD{%)UROGYdLAIWHt3$$B0heapyk)Oc)9%7$dJMi82hBljz zYESD6dlCc(dZZXPAB1*nx~mL<^OT(!x!vmUSR`;;LeS9t8ys*M3G);8 z45%oe)ii}qXYtUON#`#V@x~mA|nT|KJhXx2YFfw#zMUZay-)3dE zS3Ubl!OJTZ9&o!$`(U*1&H1X@k?Wb9=mPH>n>sqn&np^BNu72o8vGzWzb_@4rJu(1 zI@t;T28(Eyfb8y!p)T__^+}IclTy}|uE|^8j4AaboxbI;cWgK(D2wzp`$T70MCjJ<+SDFsaGLfd6O*O1N>9X@xW}*R#&(~-d~?$^KB2TbBn$)3Wv`>i zK)^{cV$0yy8oucjNgRi0grupjOM^M&9BiOdr_UEtR(U;Y)sE0b(S;n{oGz2!*mfvD z$+(_4dZ*NA?KH@(Wb3nQBBx*+uAzK_89USsczb}(3aa#r`h&t_`umulJ*slrGjhU* zMg#t#q%={)Lxd)#T7{e5-*xV;zhD*JqnbWx1Y_}eos=Eo`>Nezd?w#@M^A8`XH%>} z`8C!s(chFq(jkw6=!!7Tr%t+@hiAS%Ezj^)Yp>6TiPp?K-8+ULeYtS!yzxwKYna~* zDRoKSndTa`$BkmJYW4ZI3bz?D9CGios`N*@eC`ULZD-Y`FK(4kWQ2e*o9*Rb*^S#s!TwzL5>Oq2 z*_+xO!W;WEB$>U{@^@Ym?&x5;cwp$AB7{mYy%N5m%_+(QO(xRj4ZVpvnr8qeYBTFv zuaCMeaHpB++K|O9xB&O@48hU-EcW1r*v>s8Y#%k>N>f7DHMa`s2*nLWcoS$4atG+L zv2xt(LcI*%?)PBM^1}04Q4oi&CZE0TF1~PP31yI={k7xLMC2EHPP5gC7?nLr%s<86 zW#)U^+k?KDpj5>6A(6A!5SiAs#P`n6F4EZuZxU@S-qGKj+QfV4eEqYwQ#I(x6q&T` z;?_bgjPaX-$@U2Q?K)?okxth>t0+5hLpsu|vPXG~vhDEh>2VpQV2PG9hGzbloD$5T zrU}efkn}+7W!>Xe07dIx0$vwJJ+3o$3`k{n* zW|zKCftmnHK()VAe4-oToKV60S9ye;MjPD&Un3lX20@WXE9wx?jrF7+7BBb2Wn4QF zv7bP+zT?iEFWQGlz`2_Cpf_P(xcZwNz9erTzT7ocoRN+wDP0bsDRo2c2MPB=Hn=p; zXR)1}W*Oy?Ru-?L3!XGA~&!!Gg zF(%7tY`%NMmEWjAZ#yJ!2S2~`NL(V(0so856jFP6x(|}x4n_vws*zBPE0j(W@A4|r zvVCmUbGk9=QX=P_fik0N(U+q{>O#F|Hd;Jbe`4c~m`l4XJYlmNnAi%^H!$t=zVmQj zHHC7OJ7LUI^AP!(d=0@}!{`q2VKZ~-L%uEv{4n~wUjJDxqd+$Sckzvfhtke8oX5Pq z=JtWrC2v>A&?_Y|Ig2q%TUgrob(6GH>V<|bM_ijx=tB68jotKTEvDX;w>@|l{2DS9-$aiTJoX6}O z!E^@l3XG=m|VYkBW%;bMmwA|f{E!8EVK(CBGi;L!I}pcov5^|mQ0!6^M` zx1B$DJKgbN(XI>(m-4ntIt6B0Tj*eW=#_Xs(A{twdMZ0*a!)Z-S=w#bEs5ym{HgZ! z$%?ejDGdHyuO6{$3x(#fACcAZwie+#p2B9G?0R9(b+fAl8A>$4cT|`mQIr9!PKy5SWHeZyVJ%Vu+;Sg7sKa&zJnl0owPT@mr@mlGXJ|Y!hKF zuOnBt%+t67b9s-f2uwUI5RAcui8sxXPTamiEzDIRdElI68ISDq19jUn8(6wV5A5nJ zjpw(Wx>qh^wTnYWmv^Tp%@!Z)v(e<0r7Z{#7z<`zw<4TQ%uMQZ-$NY=H|v%!?Zmc;dN4OkOE>vmd|3 zpyG8=W8Yk825YKYUbV56507zFuY>o^ort99rVA`W&g|i1Wz((^N(>t<_HM6l@Uow< zA9`8Tgce+Jh$-e3ISiNA2 zW#il%iII?x>iXH%;j#(3TG!QqhpG?vN6rn9zMG0Fk3kLHRdH;w%FQ zF>e~#V44ec-Nebaj~yCPb9g*Gn5-VdbovBu^)$cStB|U6!XZ-iXmd##ARP1n6G)J?MGWD47SZx@l?Ch@J?y^A?-A37g(jp+2w-9(b5pEOV1vQoQhaPKnbQ+59b8&pC!)N3mgMP%Ax!&!))@0_14c?Qrxki`_R)-;9QSnxxL3o|-yGXN6B0`8YV zgT0%TV~F~8B>RxszSb2TB`$rTxck{%QJ?#ps0tzoOzqE;oPVb1uqlyM1EA(HFKFOZ zg^^qeII^uXz6F)yV|;;CkG`6RBkl}W+&)=V%01iTgc?(wTu!U#20guMKw-D;kjxR| zY)ZBWtun1>dC`~tE>GaZrSE4YT%2WHWb<9(s+uevkx7$dP2TtA-m=&=Gxu6fRvpQ2 zY6)?cni-V1R~!;2>hE0=yadrP}#cS3JHsj`J$t%cppSa8>=V3hpU>C3yv!WZn;Z!wjeyJ zD*OrJ%C+sX{Q+CycWz2nZ)w;Uxw}P0hkUzE5B6zl{-JA-jq);KDkEIV8y>JpV&EADH<+`PQluFF7gdT*p!`a)!(!4Yn^XvN0k|#IC#`%jtl@ zDUwdR1n+AIFxu4CnAT9|!{6M3Lc|)4!(=-k(~2X4~{=`^h?;M>s-k#kVw`g z5RoFq7d~hm7-w}W0sJClgv*3)qK%u4_k{&*`_!ceVkrj7(;YG9Mx3A{w8XUUQ*J_b zhDg^2w+5739l6(bHH*{6EcC*VX!wS0Vq=6Onu@JTiFpJ<_5(XM4ZlAbC~$v*_dxE@ z5xC)96Q=bsu2V-N)YomZ7ap^m_cOgoXBynJMYDv(!L_0rbeQi1v*;}mx;AR7vB$z2 zTuzb&Z9I9p2Xa(ipwXzO6A2CnKOLEA5U#&WOx~mVW>43U*BaOs}OqB_mt{R zJxitJUwe69Y`+9Hs5;PqKzs_;TS_0+o}8yb~ypE zN2#ag(=ty;6X`#iC(QUi04_k$zrh{-P6^LxWZku6P2TeG?%H7la@gAX`pRCg^8Z-b z|Nar|e|wwl&CcFxKYx(+KkqL2e*8Z=d!6=z{jamPvj4p=`yXm5C?#P~xAz(UNR=Wa z7^2sZYD@B3I!y_R$1KoUx!=I2SYam1W0UF5CfOiK-Kdpg zxLhnHu;iRx2LKfoP(>2>y|Hegl)Ez} zaGT1Hg+--Q3uLd-WrRJ$l(6>@@bTJ|^L>2E!RD;+O3EPOu9mFQkfcZM4r8!~a?ZmJ zllq;uCc<|y_Tj2Nk-%s2ckQv&Z{GIjpnOeyxKT&a&6wBHS*ND@7Krzh;xbd56rQKd zB63?K@o_}}r$ipUu8_XvdmL&F)9OMl;t9u@>(^rnsy2c?+h(2VCIZ=XJjSJE{Ikee zsVoj}k|7*e1h+4~)3c1sFw9;2s{tkI2#u~p5O}Q(a#)9Qpd0X3J?ZBe&z`ap#&;zyKuUy~p7r?>lThM2t17eCDo41}T-U))~Q; z!~Q@NyH8|Q>4I74vD}atNC=JEa5J{v-saNg!^QHo9FZi^7L02Ac{`cpY_^<&HRnta z^rAs-#hrY1Hn*^NLtB8_!y#JKvgjJqoLv&EPscrE9$mW!8guP5EkHom-!u(I<}SPK z_4P*7jn)?y*^x%qHFWKQzvYU>S3E{%s}HjKHQdxXO|{ij+fB72iXn?a$}b|`=t}-y z$^U<;{O{s_x7v4B{(m2){0|~f&xO(a7`K2Q?El@_+(i7hmHfZb|E&1``{Vy!{LkIZ z?K>;}|H1PAkuJ`4uY@b)PtX5hv$xxe{C}1I`Mv3XFb3F!>3U1Q9|T9}%}hQQ*|~ax zPt*xK30gPjfUo$|(`zP}u<9rW(MqqQeng4B1I(MCnvGgt?kjd67V;*bW+{ zm!yv}?f@oBnoR@!0G+o8elGT=0XmELZ`H*J^&Y4a!Bj(>X@)%ojT9AlY5#05CF_yc z{m8a?t}`umOyj#`^O%k}A6lA>lFBC6`rto}@gF;WDKY>739VfxOI&gSq_8PYY-je#kTa3nBRNHoR12 zdhQDcW{Jx&4BDwoIQK6#}oz1`q`l-DRE8jG&Qi{GFUYv0!%I1DqX{p-zry!4|-ihQ%KHdJT* zo905vrRDa$f=dfDEpD02(X)&Yt#OtT!w{GPQDuV+0|$X>AxV~7=qP0uLzl;gHGAZj zMl6O?m6T|dAF-nq=?oFr8k!tjOfq!7G!FbD4HeJ)8K+7lNe*THBS)B}4&2`JC4St& z4X*80AM^D$^!M}vJ5A0&UYqOccWRS{F!!WGPxd{Rq5Bsacpt_ba2gGzc{(YB7CAsi zMG;Z*g>n>;t0Pciwyd}~HB)(V^_}Um=`}^kLTiY?qPMw+T&}g&}@0bvsdD*-`4w6tOo=cR+$Y_um zYomqdafQ)LoHx^OzR*h-!p_WM1b|}LYlh&cH0@Ps^N6C9DDQwhYQ3JCTpvg)6j4C< zs?1Y|3Fit}+~C+?PnviOXT5IovQD4IXIWe@7hE;xi7Ihz!lTN$Q~s5l6HR{JqUV(H znU;|}mxt^}#3kSr;{e6y3>rHmOMwMKvCc{!+N3Z{dmc%iXPDwBwqgP$HIJww&w)GQ zGu3%mGjQ@JYTL^qi?*}U^VN#PUkjK*PKygQ`ND#G^CG9r4U&i|!rbZuLa`lkesj(t zD%r!)B^(~0D&06ijx`1fh%;MMa5_L_|3%EP4<61f+JX|sCKuPPQS>?)O-3#^76t$U zp9EqW%{c=*Nw#N3#plJf#MHzoV4CYi75hMvUFoJXf(W858@toQjLba~)>9J;x|Rgp zp@lB2uAd8Meb-bje{;oM+r+XCcNf2s1Kl;-d6#B8KVq}87x~ckxp7zKp?*rsx4xh0 z@x*dX3W3beHJ(zItWTfQy;1MxWF|^(eVw9OX$ylt}j2ipf`|fjE6q z;3_QV{Qb+QP;<`y%iZxPPAPaxkszTumoNeht*?2j$8R+j7x9KwvKM#aU+%*2iR(=5 zuIj>5H(M^kqUQn*YOQ-=pqv??OE)*Jv9Ydh0}a8)%~QQQMp~wK>*8&_U_Diwh-r4V zY&r(Q){d=1wwG}|4ByR(c)0dl*2B}LJeJi6!?pEVaBOGOCd->&B#%D0=GXoo-j+3# z_j>+N;~G9#=jE0CXJ!9c;{Us|+g|zqewg+jA2##H@d18|{b#eYyEC`{_jWf|_W$>0 z|2gqiJgA#<9=r4~ct0pSj92TNc`quH!5l0s%Jpz@36)+gE$21ml1(dl69}^>g-)i<~v_1G?}H zsYy0c&Cid`Rxj7LfWko0hL&W5bb>2XOD*JKB!J8=i)g>O*W@t7dm!Icq;qVdd$*o0 z$)(f`Ftw+yL??Y+F?IC7)WMpn7e{cb%g~4<*^8i+a7n+tZc?D2H}cvjmi4(>A~hc{ z{1p)bZWI)8gF!w{XafPUyBf{vuzG@_t~hj&qiRieMKf?j8eQ067Pss7!GC|tCqO#^ zjCLy7w#b_3>(HDBe=QCXwY0pRs28aLE7x{7d*0*f4^j>5K8mC-ltR zDE!DyGCD|#aicRpKqQdT7 zJ>Xr-_p`iDDldt1jR{;}P!U~XR_}~W^!H)td8#+)4`4@1SA$SJ0cijY!3OPx=U*@{ zIBRVaZrqe~7FW(?gfqSJNy$xb83wO3YlUS6N^SE7C*RRluqn-W#_Y5*1LCP?HckgY zG{06b-r(%){zU>?!|n(Q@MW4W{H(te*NpX!CTW$lBqtqe{3hcj>+!j!8eI5{Rf>FC zk;6c)N?6(`wt59h%v&2k;H%N$1!@uXZY~ktJI8Ze7q@XLvGIy|Id&2=04ltP$0l4p z^ujx)+CrG1wh*XCY#>kZjnm1P!3#WcLoH#Gze6M$XmpHm#F(eJA;B9-WoXdQc#;9n z)$2h%hP%6HPFxF(wP)P3d-vC1(%W#UuX^0sF6qn$U5uNqMPgKKKhz^1*OX-WxIxh# zO|?eWXCG>fIFI27#A51s^qBmY^FpGIkIC%oh91apv`(A zk8{yN2wH{qS9Bdt2ZK=Al=A^a95RH`t{@i@ zMCdXAOlN1==GhtjY~xQtbb*$$(8544@L{GgPQ^?+A`D=cF9cQqD>0egDdl%b#(=>E zs`a@0(sKuT24XJJ1e}v3Y~{*K1ntR|h%ig?fFn+zrj8=+5GQe$BhGY`M+MAoATxLL zpav^pPl&}6jU*R)XqOZ1vcHpbi{nF9iGAUYOD|Az^~FDK9oR%^Gfpl&$xP(y4^GMK>!F&2to0Wrd#HO2Gp`~gME#lPC)V*qMjfG5B?Fw;sG_c z(U`h>cBkc=udS-x;;Pqbo6_y;xvdGcPinjKO9@^ya#T%N z7cK1%)ysN=?QX5B@9TfR@j0tu4xKu4@H$4MoFV>Lt!o%ONQ`m*c7fYJv$1~$pwO`A z(9uDY_=CH=eqxv~nYI{~FGo8wou+jz3|wBL$xp0Qa}W8hS^*P?QoMzd_=F&<>JZKS zHjb?}8uoF5+i|L8LD+4~0{x{kFOw^skKUs>a>M!3aqk_dZVBmm#3QVJ1Z=RWa(L!1 zWmGrMav7-Ndg3AuMqN`2L}rbMKakiKhe|ZJ^y|MM#%=ZaTi5?@E$aWyr6-R-V>o` z5WU%0cnr{!SQ;4i6lU!9?JPG1Vc;~Aw{M3*(4GGTuP$cl&@1-)C1ry92+-5sS4Y;~ zhdQ$n#jXr6{P7fBf18Rj=fKz4?*}lO4>6~XBD}0>vEIMeo>r#oJ z(CpCS5Jc9>yO#-g-MmwZBRC-nae2`N1w5N(UORW(_qCy@w~Kk7*X)RUr%Ksr+s)G(4diAOP>PXXJ&~^oGaP$Z4RS=DmpLn$yjj3lM!VOU}QE^HEfm~H+3jcyJ%-( zcwUTdV(0FXeG#M@+k#93EkkW~Y>AQ|;#A&G8OxsyZht&^_EcQv(UK1({b<4w8i@}w zJ67XNg6!lfN>ajdgJFmbGrvSH6V+1tWfkwo`C$JH_2V13K0T&_4W6Q&zzCx~5GRwJ z-Z@M_V3|c{=sG0`-qd5LdxDn3(#wh=wxDpC&d8DeSpz0HZq3* z&{9g)3+)m_xX4RbLc{f$V*a-8Oa22|lg$>1PH2M9VKKQb8JUWtV*()Fu%sro#X-L0xgsWFy?Sl3`mv{qZ$bvKsQmA zd>3)R5n9y(V=qU^2h#{Sa7(gkGC|=Phn`W7g^5O|=zzjHfg(9~UdCl%~2{VFUxn_*P!8L~`x(?V$wEdIjeR1He2P|$-e(x-F z(xC_g#_4&?96+WGT{hT@6E2~gGGvB#73UKIjCR2HV^mOp)K_t`QP^a+kBhv#eH-rS zp*pG8ESD=MEW%jEB3*h;B$NunOWv{UqKBc0pm*{vtH}Ncmi*f7cgCB zLd`75gh~PSPV}tbE{mzjt~L`c=|Fg*aT3loXYv?o&Y;xd(c_=iB<&F&P96F^%G5nZ z-&ZtaqZ=GhgF}rr5&D>`E&=AvCry&^Z58%yQ_+1)uJho)E!VpM#kF3D;PX)ak4w;h3{I3fI|_Vu+T*oKvErD z&fgw~-s+VmCfNv7>W_FHveU6UxQvgQl|N8YiC~?hVWsP_mGC~TAQPM9;eoNjt)tRj zRklGqoPj3kCOx4XJ(!etrX;epqKs{!I`&4YUyqTqT%l)_Oik(KAC_JcDai0R0F~Nm zp|*qEMh=pK9no^Di7_K#>3E#S9=td)I=4N@BMhS+t~7aypg@5dpvya!gayi(m=^nE zMky&RvRvIieo=}eOW!3K!d%Lv3&1#U+|A;B59{1=xai`KTNTL_ObAWS0SHUyz&T!< z-B}={2ja9{xw^iqy2Ta-IN4JJ!ObrNq*pFMcCuU=8-;KGU(i60|%7;j(oF=HmA zIleCUro2d)g8-KzBn|RmW~Z5{-Nh{=z?{%opz9GO)Ouo&GYaOu{3g97>tC9_*E`cB zIs$qsn-+B+smN?`cefay7ZI?l$Ch^s4}1X3!FVXbtViQ(abd)(D4bukgq5;*#{`Oa zlq19BJa@E>h>zl_fyrM-AWWv>mnCwQ)kC`)eIF)_mcCWG9G@_20#ZP(hqa^9@h-Oq zFtlMZwgm_5OK(@B;ayLFsMs?S^L`q&T^zIbB?}OUb+AZd=BUA|%HUEIa1>x-SP-`V zd|_YGu?=sa605{4>zrZCc)i=}ES)QMf9I4pK@k1XV;RpP*h}W1nman5I`>ikluJ;k z!&gihWIS{0Krnznu($1u-}Y;CEXR;CWn9lkniQAr!WZRQiMiUEm2LOb_}*)%Mfk3k&Mna7OZ^~@`)+Is&EX;hBuV`D1{r& zv&-7mJ0g{l;SYE*7nl>cT>Kv7iGW&s@_Bj%5e`U7*JM{lp#sB|o{vS*6pZ7X@CxYv7c`M;L<|LyK5EY1B_SLk8ljU z#s9CfyR|cq|KHx(T=D<+@iF-SOad)l^cGPXQol^ z<*_u~WKDE<9*QaPw(`qk1_MF_#kzc-3#HKM;lvoeo67T|FuoH_b$}Q3$oW-}9%V^8 zd4cHEm0%B-x{@>pM$brdN`NdduhjerTHw)Vim+GwJPOtX4;TK=Cw*OH8r8Io32MTu zvq0oOV_(a>Shs!Sw23r<)`aCc>HJN(Gd4-*#^L>wCYow45@3MiTk2^(isHFiJ)~=F zKs4&ErpM8!AH$@5{!|Q$ta~EwGSp{?#Rk`gRHsXq2WG4tMyh2zFq}IGkKgL2JS8{l zL3x%W@?IjDiJTDtvtp|uVzb_xzyhOwPmLn>-6InGYS0uRrFBp%%6xE-xE|UTkmQCMKLYS^) znGX``9tKxmhz}Z@PdUn*DaerqZFPZEF_yP)^L|Olubhj3^uJ$vs;@%h%Q8ZLlTOBQ zWYcFDvvoZ`0cL$lOM&BpE*~Hi=cUo;>*c7TOnBZ5ydcmSD3{YOF>9!+!uFuyDbLiwoR5HWJ3zHO@EdAr z3!|Q^G6;^WM~ZQNp_RHmqs&9n3o^0wz-j9#}P zXX{xs0y?I`4k#__l-Jj@Txd=3QXEb-6fFp>t5q9@!A|VxM9=S|%MKNOB2wR3!tNl8^$t;CzDUd392tID;{z zNTzv?pjHesu=Puys8#3+CXGIBj<+;QMqlXGhvIws@L zWY|>C*gABA1|(QC^2B5G8R^H2`?PGn;H*PGGZsb>=T9&9{yRGpAFLCfubdfwbCQGb zWwsC5p_ooGl$7g>nS3h~ln4p*u8zq`oYozanXv6MH|1mTq zk82$yqA||bW)BOzo81`*PUkTY_7ris4xF>gi$9TsbdJZ}NK3{fsB%^pV%SlFCB@QX zq;4CDh=aSFhRQ++Zjo50XtuL78wxsjtj=@jC$l#4T;>*PyvYvB=ZDb#c#?9SGxJ<{ zR-G|Ak6UXkcDv86YRg1yMSfrcUzlq5z{F2yC!-BjS9By~uAo6yIig6S!nnyJyHvYpVUwf_JQ} z=}>q6+SmtTDI0U{fATG5XuvRt-ECqwe0EaD$%_?OQwfe`r553Oob;Q^ zaJewF@RGN~8HgO>Dr(rl518G-W@mG6C*I!c^mlgd?8WW7cXzio`-9zFBW!gQp9wLUmpwTbPoEEO@KTEiN;W1@T`? z^c3uA?$Z;zDQ2jWKvqSZYL3OqyX=o(Ffg5afP;_n9rsoD(hx>GC{0 z&%;<>`Ae40h854dkoh03Hp88;v%7Jg6RnrBD@JAz8*pX$ge!*y;SRjgeTA+o_NsGs zP|mW!Ptf>O_oH$02~}@9feh&Ebo35uC%G30NVY8ah6%r;VH5s;}rxCGVp$s)a#BE#(b1P>L`?SN6Y^{qH^6 z|2+JUt(}$o#|LWvTa0S?YfXS}%m2N(w~+sPud}tX|GiK9-wi=c`+>FZeTinaXVc6{ z$X@hW`PPecJxll{>lyg^YW;~FEP`C8`iS^xkwoK|?#`_AtHmjtd>WehYzX0U?uPYC@R7Zm#ejLQKu`Qg#bZo zMOkflVMl$P>0v@v76T6q0!2-;J~i>HayvD#baUdhz23G&AbCh>z1YDPhlaV-IGo#h zG3(5WTC){y%wNZT|HBfiv$+=N=mb_6l|$9cD*Kxzd1D=1VH$}dDdNo0gtm{M3VaJ@ zcn3~;jBfEGjY+<2Wb)8?DAT0d>ym)fPbi#lD$kB&h%qF;~gEXJS zR%KQCU?2udBM4-;BIV7cW;lS$rT3Ud%n>c5xaWum(!*goH#CP~@HHxxFAcSliUP0l z97)CdCeB5d#}qit3xs^{6DZAv4)F9R8ul&JR!A0 z5XdM%5UvgM=J;Qkfv$Q5gMXM8&uCdsa8)0|syB@FqHBI>NcX#I?a$UQ1gXM6ly2K5 zf?kZ`#d+<);Cj&U272i46Mim+^1>a{&(?j4dg2jhF+d{-$MA@%OHlPm<02_^%iP5G z5=k=N1cfP+Vvokg7hiei;nDkhhI28>*4O@-qII)M|vBaifSz^;B z%9+MWx=WvbGJ|C*6K>4Bh_S2jH#z~Q0$#=CNh@E5wqx{5@8!Ys-qV98hqT9lcGr*` z(YHLf&`8>(}=e2myhA z2hz1Iz=EJma7`oiED{T?(LvK#LU*C;axeJ+87x_txlcPw@wP6P9Sq(H0gvq^1Z307 zIs0*pns7+sbEr&@O*AlhRY>HhY-Y9)kgVwtZV0@^q1j-56X_t3G6j@-ux~bmJ>!&j z5jx1!0z}z#cM)ABi1Fix9OLzY@EIhCj+$@|1TG=Se3UQY&}GK)tkl+qndO|>jw_oK z7O=?HFQ*0GSF)KIzOj%Nm>WnG`u2`eF3srijB`~vSO8~m!O9<@%`_QUpEBHR8c2aM zM%n8dd5Gy)`HQi%wNvkOudj|QvGI;VbERD?d(S(Pxw61#Q-*EuK$|$<68GOk)tfWd zUNju}6X%O;Nhmw#JwjgtBMy6P-;Pp#eVf;jH6r)R@KPO0S$=nZCvs-;0RdIXM17KCAfORs8P~`_InKDgnp`YX5-~ss==U1}$|J;LV7vLZb9GXv0*eOFs;9xXB-llGYLoa#z+i zWTD25LZ3X8brDb^ZNe|nW4^bU^wJR8Ld+1Am@rvse&wtTjzINDD7@ zCQAXP{k#m-0-$X|hM=>vCo_aYg}FOBTdwi<2lRt9{@C+FNdhs4RzCM0t!o+L5futn zI#+Qo&HFR~OUtJTLQto*(oOo;StuTJnWj2{nU1b$xYnk;!SgP9dOJxC-q~|%d3mUu zZC4^DhqMs1Z8$}w$!bARkIXtbmt-{NBn9dT<*CLXCWU^XjA!g9q^5MQ>D5^iOa7ox z+^FGE{p@KA;c{t8U`O$3U6shnIJjO?k*=lo5FNd91QmQ>`qEfm@}{l5Tdyj_8|{+v zJVRaewbSCliY)DvSGD=IR?1YBBW08oJZ_kB>o>Iw%+5Q&wc(8D1&+Ej#wbI*p>H=d>d0DfjD9^%F--JAybP#* zYu>diF6K53xVYew68A-W2R9by(#}*ng(WJ63cq`KSi7&5HJ>opU+}jej#Wppz zDb<%;7=$#Z>Is9EHvWk^0j`Z%uTl*4os82wipfLEvSo^qv!KunwC+cl_9fceTR|)- zLdLxP7553t?LAj+K@^&Qi~Hpjb;}mI^VLmVth<5F4gO_&7_X`%7%0! zp!vLpMC&Z1Bni38g7TtA0+BMZxW=SNx~|ctvkUp6cY}N==1IRUh^;SUN3bW{6ixKJ zzsTZ-Q0djalk*Kh_imzpN8k3lC=ptvG*iU5oTkWwZK>zDStg$G6*w&PIr_R3XO@=2V9Dd9M}K3z<_N)pCwWKH zIcj^4sk3G_cvldNOd<-aG?4)1ypW`e83Ha9A~;IOGSXSaH(+OnHIdDYWjiMZ;&Thh z6oFMHxHbiXp)|HUIcGSA@^NTyD#Nwc-zRT8{}9idId=BUVf|t_6r1L7?LG%vmFD`u zmHF1(xHc9Ub|d!A&ieHT?}oB5?L9E2ZBp(p>m~PZJa=0^L-;iO+Gr!mQFFl?%?aqfb*}Si>^dgF~NY`DQRWLaJAx}Vuq4j; zEgr+D4G`Q!M^{KTvH~uyRWc{mGDPzPw3N96QVwa8!iWs9BON3DB_=IGBRPc$vMV`T zkZa&8*fWd!B-y(x7%X{On6A&5pdFJ0{B`%^e6z&sp z?li7Iri(qFn?C*8i_JW>o3wx8(0~?{lfi`^MG_=~{`iIxrqii3Yn-Ry0$OeGSFMt^ zSu2*T#T#?oW*@1N>-KHq+*}YG{^{V!@#DkZgL`;$G;I#zY+0MraZB()HdsSgZge)= zcQ!V+HW0of&o9I8lJS}yw#zbC8c4f2+#~`4QU@vJDwO2z&I7`}BME^$OB&_RGl~Bw z_l`~Q{R!64FboKRyo&Vzj}DW#)h&?kL_Uyw?RJfMYQ>FQlBNo9Sa(g*2AyL1t0Q3T zPcbTzJt6QbWTPYKhRgR#e`CVez>Aa;+H26mE{sCl&6x^%ylx!W<*nM+<~3;@U*sNi z(OxQwazCD{Mxvw&b?e?F+(gXBrQdv{e@z(axqpcz6e`5f z-rV$6BS*X`B2LL@PVU&KIl_0-T@2Triy-rTk5pK_-W$R>bg^9X1@Wo+9>+tvDUU1& zsxC**9vu}R4;4$mm8riD-VaY^#!|~tjMVmwyY>0w?Y1zBl)rdk|Gw)U{t5Q+JM85j zYd`Ml%l6O-Ttn9|iBtg45h(obGoLNUGOpD?F#SZ1-4T@O%sELj_iM!2$HD^^|tUGj7 z@-$2A^g>=K=&qs>J_9qMqt9`GH};7DWF=l^sj$|wmb9zmB@MEY-^&b!W-GFMSZ|m~ zMtQ4XR%YaG7LZ!r#8+Ar7US+k4&iJPqLf_>Bocdx(g-_WVQ%zF7hX7=ER33JT$YOB z`Z&u9LOJsKuwrQFjBu>C$a&dDHt-0`a;godj00Is&SCm7elnH|mjbeh{#dDJ?En9rzw>jF_}$^pnY z+4hDlS*6)^!a0IkESz9~7)Ok_f=EIG$-63u083zr*cG#%$1@J6#4@+MXux8Uk!$K2 z#n}LNU2Cc&)S zkYX5N>FSCSLCrt=g)4?J#n^xC0I^?b!W zteAk=r`KboPN6I(i)v9}uE?;S8j~)`)(?&(1~BW`uuDo`bc(APXBb|yO6c7(D} zfpvsP%z2^;y+p$*UxU#c66^`n?8cf{B_m|L^mw;XsA!YP|9Bgan5!{AlF0<598qx| zVP9)BkSt3TTgVK;I#+!%f%`_36^$jlbo_ueF@i`*xIBTcN|5QB*s3irj-&W%{JZV~=Z~FD$J5Z|f|5g6K?epJWue0B;48TWe|1o~oeP#gOV*l;+4@%B| zEC1hv+JE>C`~`EX2qdyrj_FE3M`&>s)9XOha2;YF3RqW2OcHsxQ7Dq0;uez5V@Z&)fI9ooC%%XWpGo z`-9oDr=4kcHh1PQOP#?%f0y{clk90)BMMd0reD8%)9)jNxkA!O=&%&qM(4YlHElv* zjfBVXAgvU{W^Ur(0Gn8=5l4!q*r3KNQTIE;q&%=gU7>(liLo-7u(6^U)OC&^sOsKT z+UBdux^%rT63tYIpi;&<;{>s7sMK{F1pd^5Z4v-P0&FJAZF>ap{I~KSD=!o8&iNOy?3594;IH0?Z{Ut#QkE~M$^Hj5i)4=RY|J0+vX2F79wNR2bIl?5gX|ef2#QKaXM55Vn@seGk=9SUjzF_G%NMNbg>t90}OZB|Ia5nOoeHj0G?RKQmWJTOY^cTT!^1GW>)ds;!WC}7tS z)VvVvT~5zT5FUjITNoW$bzts?ezKrk$3>Plt7sF+R&l}9nyFfio@VHdQx7X+Az@PU z99;{H?<9;q8B}tfxUI2H*zOWUvW}h5O2a7VUqSz+0QuRPmDg**Ze+` zZ@hXA<5FfEJj0o~?8sAj#*{b>9rb9NCm=Ru?Kvvtm>WXSN|Hb}nVfz^{J+=}G#Tij z+O4<~Li6cH;geMIfHBRnWtL9Tr>w>)C23D4^*RP3WxfqwtPNU!ACz17m*{dtQ=z{F2|k0@S7Vu`Nb2+qls{{bfijs<4RGYCO=g>af*E z2yspel^qZHjo5~-%-VBNltIg^hM)D9XNW6y(X;&}!5A5Lv@A(}f?>h?wjhOL2l0Vk zT%p$uif`1>v=@if^%p=6Rk=3}gcCB8^THycq zF&uGjAI!P;5qn2}bf9}zy`u&{*}_4Af0P?0ktZ&lcy%~OOl^?E8Ad+AOln+0`GQmz zt<$k^&)pz#9)8ylIE#zHsZ<$=@|WZsL3*B@*74DgOuD1)Z*E~haXn*@aK_W)hddP5 z&R(gjbjpv^)6H!M6uimqHw7)j{?bp})S*%Sg?ZZf*t9->pg1cJTf0h5I^8b|h ze+J!7uUZ|C)Bh6%NZNRh9-!O&KQP&f{+~gw!hiaW{69SWwQG2N1L+fykS{Z#o;CU*q5C~v8jF9Sp2{Z-z8}x#uPX-?QkCw#9N>&ga=dmHD^kzYY zKT$a1=qh@WQS=bVH@ARHcM}JBvdoieB)@@=X0L-j8oQiR2Gu=K&>zrmqHT+u^F(ud z7&Pq828AyH4a8V)u87S?fZ8K)FA1A5suZrb_R{wMzvQtIDsS`%GZcj`6 zCz6kVx+^}#LoPP3qEV1|isgT@bLB+495Nx2ckeP12{PwBN0)?A*k)0|1d1I*NNO4G zD1MX-8f}o{nrSh+Y<>=iv`xEN14A=SNoH>7hlclI>aGwRSk?qNYZ^D1yENo=G1yis zdwGsrEadVTN9T;$k--tWR~l_ySwYx&FGLVzw2<;s$$%`ry8+HEf-RB%9DjydzZllx zEhc%Pc?Fw%%Ye)XdDwisi>UI`YvBd3H5*9&j&hQQPvmZW)Xs~wGwXe~Oib~n``;DRbD01e>$`^O-mUd50K-z1`chi=@Mx|YP%uq*_ z|EKc*Wd5J0&$>?scBgajv^&_Z{6CM<{{vcI5TP4AaPP?nbc_F|*WWM3{~Yu?2bKTl zq5MCuaKtgHIB;`rpBgEG90Xx7ERvQdLECg1tc=LIQBXaz)=5=Myi{U>1n?OYT=f0u z+ygVW!2b0S@>#6;Y=P`DcUzk*QC6)eP z>HpjMzk&a;*Lzy=|2$6pAKra*9(Uovjy+D&4bfhF%k$rUznK5s?dP2%51NunbA8BniwsM+CPJlyIT2U#yo7;nJahUR2KY z3MGYk_jaxJ5;MJt-GvDvE^`t`;zw!$NOu)SXP|syzOjJPVaeH8ayz&Uq+U@&KocZJ zBgK@x(An=CbsaE|=oGW!LG$)QCS3CT*aBfNKMnk_LK5Y0h9oTbT#fF}MjjPWQuuVp zFX7{z)r7RH* z#ySi$V;4zO)>QT+DI}pRh3pB1A`zusi!2eMF#nlR-NKFBzV7{f{_}b~YUX|3Z*$Ih zpVxW5mh(EVbBK<8&B?4YB{$Yx`DoLW!r#&PkkA+oVKKbfPNV=Y@T}P4SP=(98 zb^ceMyyb3D(b#(@`L0M3uggv9QO?eq3ner1>-OF^$Fv-Z(OFgN{hZC`mdJGj>-TQ8!1si8tU*}k!@g?7)?_LM5Gb?_s+(36dlUE|u}Rg~2^`}C_18GFGJzSxvp zDM%_@RTam#7S$E=f*?OFxl_ zbjV@seShyMq`6h2hq=t7rT#8@m)m>taQUQ3e{=)WI>c>MkOk#Ys_fTW&TWmjFF~sz zdeinW_Wq7C!y4LLh(V*so+-$s(Gtas_PQ{8YUv};iwPA{N8(34J0~(U_D$%!Jv*!A zaXPeJ-rPbnb1ciI`1!h;H4P;LoUdN7qB$r{Vl>TFrf;h5cNZ3+3;P7BOWTSu1{)pT zO2zB+Lg@Wad$Ph?_%3rqgXtA)OJbj^2>E!DdZ;xZWu#hT&T^&4VVl^5f;mN^?L|4W zgN9ixK^N;c?AkP7cl{EbG-rl)%=p1z6?a655Ii`b7p@YIjCS^CHdt$D9QNtK_P~)^ zOIe-bOoV}+4u9dyctqdJ2t{#y5!064#gN?FW3L^8ydS*~RFML$5yt|4wOkC%R6Jwv z?Z892(4Kq-I$uTc6gMaS@sIH#`;U+ZB&K9uPmx~V(KC^j+5Gq#HLd;4ianIwbbjfd zw}ka^92u>Q#AVjtzBErM(Oj5GomS?U!R?q&~o#%=Ee+bv^#%xP0fnu7mE z(au<5)zjSC?@XS*4E=22HSvx!j{M=N{W_c7Gm6d?P-6R;&%S(pb24SDM@B%A26^(X zx|pq5{o7Y2*Mcd>8pEX-ZgOxZmrkCqgu{hd(+3^9Ag2YoHV3B3UhTVu#R3OkkD)6K9keH$}!t~7h!+XB^&{Wvz7dfA8Kj)KC#3pks! z@I(6TAs2f?-#jWjt-6=i)T8xO+5^N46DFMNZJ5@LkCt1*SflQB9|G&W9w-U4lWE_T zG0CF&7Czc$b~1+Qc4BkMeTT9v>R0NkUdDCh2_>H1jV!Xz;CSP(m$>Y;hc1MuIWsJ>jCn5*ABnu&p7!hW+xT@L#|ak&-gbQU)VsI zAP_S~WplUwvs~#GjYgT`5%Il`IbXTm>b~W0+%9BS@3dW1o80Q0hyZ@B5uV#`jPiLq8an^^orjQ)H=A7ujHz&VBRJ@*0jWB}^d?j&wW= zAACR-mTtZJbK9AU!v`KaC&6;4&h(_Dlmr$PoP1B;`9S3!D^<91K#s5@oa@k2sF26# z9q5$EI7oZ!aa&sWi!0c~9+bY@JLC!X=(5WhZ96{S?X`INh2Lw>9vbLGl&YfC6OF-l zoP)|~Sn0GI=9#Zt$)EG8aOqPffBNjjdwF23S=seO!^V*2z55SC`N6(MECHHtKXX-- z$vVE>GkU`3W)Q7pVR!{-f?w0;-UEG#3)W2sZZ~YrO^-g-Ax2%7FR^vVKf(O*==N2E ze3~C2(@j~K&%tXwD5vk6Fa;| zf5sTyD(&I#r=atK@><`M5KXRTaY4V^**FuvaUR#l9mW{W$ja=^_ddikweRg~dn)Q^ zJ9Qc09meH1#1yD?Mq!wmf!ooN{GVY0amth)XxK z*20)xB?Jq+tPf1x8il)Vd0cU0t1bHoXY{#OG^es1(~rBal@C!uPL{V$W$j8qn_N~h z^)pkU{n8kw(j0kqiwKW~{PU~zt-|4%?jN#`@?mKtJB|&lyYV6G!o8|j#oe}hN6n3W z%40<=Cvl>H)h^arJJX3?2w%|2YMSAwRzwb>i5giZ7X-4yJ?RbU9Uxv5zlopu4X!wVmdHKqrpUj)ICZLui1!fcQM<^JhKW>8*0F=zs}YPq_^85PLyk_<5_L=Tb*kUoVz@;P!#kx%T%QA zbyhoen`PyEk?H1_k>#Fj@6HE{m_BFfX-4i)DvD#$FbleTVgkvUILfUP_KtSTz4w{# z3#2KYAH7U35F{{d0DM+au-$f}DaB-uIMfNW@+TsXhp5K)o=|o zf@hPb*-R+4TyI6bOrjQf45j?%+b1Ukg!MSm!zYj4zTK!^*w8~qwa=}Pq9bv#I*anQ zX5x(laxreSd&!JTGuVN5;$A0q>OvfLb#AApH(86Em*Q61b5i2Y zNi--ih)&~pmYJWPl3#Xu53AYmsF%UmUQMyKtMnxjO0D7UYcDgy6_WgPisi4m9`^$K ziSRf~@Fq4*?hs*!Xcao6%W#xmG{pYw+9TBc&TkUCZ)^9m9rBQm%w>5g8`~vze=}En zZ{{(srtqSNA#U6ppgZ*8G$DS~%-y~(UhgXSa1!2Aqf%WRa%^7}7j)XF(8g9`+q9+i zkdjuxWrzH)4g>=E<(;%=ANAu}o*3f`D~-Bv z%m`fSehO_p^{LYdN!Be$8$~Ke$9CMECN(JEK(`<2bxvqPXLCn|O}=8n(Nro5Lni44 zZ&mI>onGtx38hTO&8VEEe9SJr@J|Md>1nSW)+)j#gs#Uvnj#AkJvMM6g)zJD;b5qS zrF_8lTM4ZS`2)3LZvv>Ig4`{gfaD!Ywe{%i1CPmu?=<1=Ir#KwGWi=D|)Bfb61$2M|`)Au6<$0MRX?<@w)`J~mXX=Sma z{Lt+E9oE!Qz2nbPZ7bQqDoRsw3AHLaeqM-=iRZVf(*)X3YBXmeI%EypH%BleW-r_pIsilzLM z4qVZqcg!+l^xF@gfQ0Cp`3bM3l zq0yMgoe$neHG03?U=(+b)4D;K{GMw5T60*BDYu&=lunop;^vMy? z^n2BH%lMg{#*o$%>hL&)qQo?Rs7ilX;yWkx$kLQP|B9=)$_vw0&nu_w#sd{__4n;l z0Nn6!H|{0Rjj|hGMkpR5abBCHhQr?AQp&?{W7Yk*H&PG1OP!?3PiUkW1ZuIJ{v4F* zDnIO3{2@%_eaR{oC~sUCss78z2bJQqt~^K_nWEZzJ14v7}=qH++DKv zS;?80h5<<)PU;x5-KJHD(1%9e?2a2*%-oc3UlrU|QzV_QU+_wBm1^|Z_`_tMimEf* z6j=|hZr=-is>dpJ0H(&+9lJ>s!o{$8N^zBe^u8yJvUi_JgnB{lhhwV8*qqjByYf4AIMR4o6E?&KC7yNRJw`TqnKE7=#F3ZEp~@WgWqPBl zh^fBeq+{Z-^0iNI?Uzfx1Mp}UiQjpd%e=Xu>#%3+DWRRi_lkMk{dZute{OR;!{eQI zw(8aU+GB}|+a!@;=FbF9wcZ(`&p};E)8&k?zaV}4b>q>a*E)pFLQm`s37O8f%x%x< zk>D=FMtQQoCJU;2Qx-uTXz}5i)h{(c4Wl zM|3Zvi=(mJ)U5jK*Rx&Gda$?jF_DEi7Bm`Txjh%j*@o=2E$SPWe&Zo z>;~@#J*V5JUL2#^%sy~l{DmdP`a=9nQvvu1l|9dAHIc31>FXflhA(@Ron4$!F51TY zgY{>~HN?!z)*(crHcg40cC@reii>bE7P`LP6q{k-r*&FQB-F3yk+JGCa|Sb!P-dHq z`0@`)o*VKMY6}u}I89i;s8d(t^G%7}Pf>735vp}1{h`uYTLeDUL6q7#nJK5`o$g?8jJ&Eya0 z=7!z}%5_g%I((aMC`xO?wy?WNYh9SCM_o568rYjF=IZp{Y2d>u2d0I-0IGNy-{i{Y zB#C2&j7;03&eoqoc06V`7f*tUOPZ{!9rH2E5x^KHx5gy&4eYxL+s9`i;=09@SzGYJ zqw=T^HuYT6&#?`e&CO34yRPJZfd*wtkNW_qY8CSgiWfWsH6u=W=Kmr!uH^z zNSa&Ydu#hQeD+O){e{o&>^xi$gA35#_c?KOWBd*)1!M7A=Z$qKd>W6sySfyuwDUHb zUtK?G(W!Je^FphMtH5r8N=!&G}jI^SpZ*)( zh4e1Ti^0H0#&9Q>E(y^_^HH0wb~<@x_Dp)ED3wD`jb+}10;@lSAJX5n52DeKOrBr~ z6^|T-cCvO0w^y8k6det^=&yESOKq8@IS=BchnUHjxYC;)rM~5pTA|W{PVj)?$6MA+ zHf=0RgqbSs%X~c^+O4HCdP27#O$xnXR}(wA&vfrl_ns{yrP76ab5b2q&m9fMg%3^k zHXB@#_AcF?e7otcTFoVq`<3f&Wu?1uoKg(gQ$%@gtGT%KleRVD3G{2q>#w2Sk2BL=mVt zdc)Yy!^q4`jJ+w^BHCom)DN2k~u?4mHr<)PjbC9K}8!>R9)*-;;ZzYc|ILJd`Ip` z;EamO(MN=jy!0Bfy5T<^ zSn*i4MH}Q@DBbe;49@rN%flhKu$>_~U%A;kTWRbx0+V}beCyrw@(&h+pxP*39!1A9IP7U4|3;A#hOinxzF z5!;J!N-fiYTQnNp4^PaXx1)w}r}}YU{DN=ej0SKIW^m>MxbnfXBRHjV)2THM3R%_6 zgkg8Y4S9yo;I?{G?f!yO_3yrdcvQv=RGzD$tN%YPp`Sn-yE>L?5j9u_61}j5nXt&6_=PGceB=&4a9|NZ;W>%sqkA_YS-~ z@9m{(@Nbse9eIuRNw1xK)O`p!J(PyPCli8K=aO$RYGu<;w+3?)@>wmohO zN*?d8@ZsWoyWVkEviRwTV{NSt`@Q-{Hd6$8ZUgf@G(0(628`x4zt}ixB*`CHYN&S2 z%J;4v=QF+!eid;SPUark$T;Q5m>zB)baI_#+l(J5#9OYgG)JCs016&ZPPvP2)_=+P zI6rLb3;KHFv3^&_JNuL@^%~P~x?SW45#Wh~4G#Xo;YHU4qx|62HRkFNYIq2o}q24h3 zd~bNV^CV6cet@^*>g|?k9i?N3==r|{3~sR5AFqFUQ=FP-$9T;c2=(Mn4_*QL7}H7% zv@k|bAzYL)0ycJ--q{;m$B1T|lsIJNYMfjgTBYqaL0xjOF~7h?=_boiA*Z4v#fjH@ zj6^p(aI^>~oaQSKOsC%)(6{S}x1os%ZBvS^m7G4WX1tG1ux5$<5Xa|z`L@m$oRW#k zW|vI#ORM8h9HwbS4E>Z|(gX9^t*-K#fA-%fdA@3re@ z&$HtzY_6n?^j_)C+3)nBFqC!6^^61S3S|c$y>Dm!@FepBo1x2rN0)EFxe--oL5AzD zDDZnU1nhnCY?N*AS$;Z0F55}7RCazp`zNveQ^Ai7IXw%Lx>x6)EH7`fbln5;YXnaE zUg4h%mn{sKbkz$EmfIp07?gD}_}VKkaMxMqV}a_>ZaGbv)l|ME7Edjn$Vjs`_Djd< zx?a~Qy_ow}D=PdE#)I9V=Ke+O?Vy@d8zfp9XFTMdZ40m3apQxcoJ+*jy9wqyQ#n-! zuhh7n!i8BssVs@};H`=nF!I~4|JZ$3gN~iKe?0x&^iS4-mDnp!5j0P-KS4c>MViB$ zEt&RGJq#E>S-E#Oyy~>eBUJrfJRtYuHc#Ma?kdKvde-_7H~Fj^b#(?cg8Sr0Q#X-X z9;}SODcyVnbHA(9v3qLNySJ%DIa*soUQ*44*UI~O-Hvjnx8|2U`*QBr)q`(Xcj_GG z;{MWtjwq~HE6jAH1pz%wUkm?q7Kgp}u78Y)x_r${lc|wesKDzt8;pcg#Pb=?)+4$~ zT%Ni+U%`k(P}%qgMk;jpoEkk+R#t6yrZ_(4Jr(7~{<;shB3m*)SQUBfnZfl<`ssdLwT0M7WxrP`P3-h1!7r6Ak#x$@M*>YRt#M2B(0z)=<`scK zTXJnE50j@m^Lf{%soM$7R8_yUvDv`L5wS_x;M{PBrv&Ty*Ka@E1s9;WAZK#_u_NvbDYxKZI?$YH80|N0zY@= zHR8adW%#>9kYC+}E4Qcd!++!cgyY$C)IlLCBT#to&=+s|$DFwGPLbTe(?R&VECM%c zaR-NkJ1}7Hy6cm1^-6EZHwK&vO3g9hwm)^8DpGyAcVfW60IF;MqAvfkK!+o}Ub7m5 zA-Rm^eRE};w85&qr?;VP1P5~sRTMFjJ%!lo!=5QyP+h+9jpoQIjHe|_0dRuDR@s^Y z%g-gE;2a2b1>3CS=~)-MR;$hfTf*~Fje5@py>;(c)>U>!)Zov1bkktZjC-Z)D$9UnpW% z_R9Xi#bOV7xwGB^`^wLRT(|&v#ITK%y*K7$ZhXJAP?cY2@|QI+xn~dOIVd_*0_mK2 zY#FDkE}k8_Q{wJTv7JMy#`DOlba9)54JpcZK|DJKs~ITF{2UWI|Ck2`tH{JC;l6g~J(E%{$Q7_8eZYkhHUzyA(E;Q0(EHc2}ol8GU2tuwF!S zA^?25yC8bX%vZaK<-?_Jt5CTFs}o855gWH{5&H#}Q8f6>C1;A1_I7a#A@# zXJ=_Xvs^CJ8UU$VQXVl23CmK2MBIGB^SXOS-UEy3Y2c<>8HLjR_?>zA?Rgp|;?B~C zZozVs#NXe4`;p@qb;SY4L$p`N6?4PIFVyedxc&3{Qe!R$OU#Uo>DnDif=C6enoHqc zSB{f4j-4;$n54#tRiD;5Zbgw;-PUzT{*+I*LO_j0CDUv5G!2(V?FO0mw`XiIGrMhU z0-fS+*H&B&K)E1K+=(qulU&W-%&{%azE1LLAoND1mfgAPSI&WL$(yu4pe0oGUX;Nb zq9b@Zs>&~w$h0Q(DWhJafM+C)~bzgzr9VYY?u&bQfn?suex z98Zv{DfTFgYAlL+$~fi!xR^)rsf8L3950dYnd_t29>2aAFAo`+R#A>Bj5p!tMVS-ER9?osfgOCNDG1-P-{t)X6- zF+Qg%vBp_ReFgshB4I}k(#|-^l~K>ojHcfhRM&jAiy~R!LpDbnUlMW(ZLnp7LmPWx zE{&buSvrUF`}Wi7RZ|)buG+FUkCi4$$W*&!n&Xk)F6(gYgM&=Z`PMy2eq$c|dMl?T zgQB3$)AR0njfXl1Fgbxa(_JMYw|YZ{cA8Ser1kAme-ESk)KGMVOr4>9lcl>cEr+GI zo_MV6PWPZ{)}Yr0gzmMse?d`Jfu(f6n@Eu`Iac^kyKgR$$&v?qE^zoHmG5#G7b2qS+yRja$ji2dcn!-$N zo{gxheF_!Q@BZ{bBY8YIo>uRi@g5dE_sb`kUpRlUe`)cu3!1pYFG5yOIMq8YZQ2K| z6D*lzB4CfWdoH3g4jeHgNLRZ4DAOjRED@ zj|VzA5-2vlSE|U2Wti9}df(X`$WET1MvHg8IjHnjya1gEITutllu^%^Tbz?RWsjr--T)y{C*FSt@ZRm=&J`#8raH{`C$*?j_)E|x-q3{Fpdqp z_q4aCPm9a+hZ*75lA%TL=Z{`>7Jp1-8=dq$7QRYtAmeEL{dc@rCVj;ec;-jBI~)j} zSGX{7J77&FChKPR&h8;5X_HH3Ue6v3Qc0AL>OZaYe=_tb^#C%9ZGgS?CGx4x8*Fa* zj`(WVEve7-jEy)0&qW=cK3}Zg@yh9Vr`VJI1N~DR+mvR!vDlHm2OsJMj?~u&KI#f$ z%o?V)tZ8q~1-0n9@l>?K}tT-Gp?_G?;*U!3 zRaq^8{IWAAn=`JmrKlWF_o51;xs`ZtwLk>SUExDhTGI}u>_+vc$He6zi0eZQJuAH6)+)ARN5? zQAs^#Wr5b+nU^zt7 zELB0tbTS2d@bck-53JQ~nASB+9$_Q;+j?W!a5e)MK0G}AS**IYB+=>S=@g%L4^!k$ zZ`zyvu-$)uTj~WPc?It)Z(~I1BSbkn1j%0B9W!Ic?mXbR*O=MEe&Wf=q2Oq%B*cqX z4K@)zO+uVSj}G37Nvau4u`uNGyqCg!4U9Q5$e(M>uUK`Q?{JNs@{H*9FvVuLky80q zAIK|dUhD*7O;X5?lEcxyTingz=lLf0Z|um`4H$gvnMD`*XkAGsg16eSQjlqSi_`{t&oEg``(xfAOrl%Fpi@*Bl9g+KGcp^OH zQ&;gmRNRw|HQbE8dhZK{dv(gqMABoYO}YY^IdRvX3hbVI8r?Rtc3*&hp7Ar6@u&L( z^Ad2KPxD491ziU>49z+2aJ7DlA|-qyMAW4VdN_iU5k)!3~~ zF4Fvs*WQ>WHz$N=^y{U&b*RvnxOVf0WXhU(0>aq!`=95hm2FpLS69$!;l3p#7&HsI16y+u6#3AbvZe}u=u$qh1vO_~pEyJRcipVxJ{Rq2xX$R+ta z`m}rS*#+Hk(>8}QOpkh^uj^k!R}OZ#iCBi)9%g%*&+?RgSGK%HJ;O&<&4Vqe=R)Ep z9e^{1*eju1J>N-A^OT9m8^Y?m*XXh&=NfgFV|4rg{C+hFYCwg;J?cc=Cl&0a*m{D>o0Q4QTj=C+EA zME@p9NZO##2uUk9Yb%ro*3APeDF?M86iHxx+z?h69}E`ZB4Oi!!J=HOP}WWe8!Scw zgGD>K+B@3$SV1J*tQW0AN=ix=1`{NF%E`(QKc%3v*93w{%gG2rVEAWbVfY7Nf>Ka9 zsGJO$pwtTVpA6qKI2zv+geM${LD@JXunRwjf6UJA7r!&x7s2nJ|Bn#xnF=^aPD>5~ z`}ql?5%!Mwv4vwDQLYkhXcS?z1rHnm^US?xi*kWGy5esMi7c5{MCaAui9loUpZK2v z(YyIz9Z;^~SUAQR%nbtJ8$>N70a1{EfT?G1iIQz66A}WL00w~E8$<(8;2*(%VZoPB zprk;w_yRf*{u}fnB_L``7)Z2)BTDkGVU@H)`d|?@D3r4`{+}YD-Qu1QFuR)%@rJk^ z9D@}{cq42)um~`ZxH#O_){)RmI8xk}&}K(#55gsw&M%oZMLUpAvdPPbd<1 zLD_mB5nzEuxByH?eA*T6f&kNf=LjJ(Q3YU)hOXIebt^6X-Risam36ID4fHj%H23UM z-mPVzZ)K>wdk2VJ5{*J(B{6VUTWgdzzPYY;j`pG|0Q;Oj)zVYeR0sXW;Q!l`?>|8E z@n1%27XOKF%*q;$akRlmI3SQnl$93>jkJ}(z*ywR%L}m*$^8DVgLhwwE*e`cr0I3@-NbWU%VVq7GlQ% zFfFma`0t8;YW(NVe_5y%9O(u3!B|19kZxAeOVjawMT^aUX*toD57!xKE<_^B?k6{u8u9Gzw`&KyC@NhpUwf0*!}83<`~v`0K0HtZIz>l`C*D z`%eZc{j>a+hTy-F=Ko3%aE}@Y{|Ej**m8K~PgsN2fG!{bfC!Zlq&3nCj>Yq>hbtDu zP4o>ea0jnl(71ZISmWygF$0uf!eieHK)_ca`}GFFwk#ysmMd;s3NFS_Kbn_p3osYS z(EJ@*K>u6F|MyMcE=wI;O#g%7FMihlU{Ww?68^6Q;T5xG>wn8t%o6@3b&wNapH&7K z0Xm|LAY5>h3z7Z*SSwt>{{vlM{u4jG8}h%21&hvqxq1G77>wlqUl9ThEPwuQSQ?-F za#mg?$G2eFSnwxWKn7liSN+K0AbQ~Isxq9LoKRx@wPY2D-1>hOB^H?f@(cNYQAk_- zE5pBfFIOZAZfk|tnykLM_!jj5FJ}KirDW&&f8}II{+|^gAeag`{15!U;=jc!iwbD6 zAMG$v3KpUrCiH05&$|=QS)QMFZi9$^SAxeE8bl5RF5mdwxa7Ki(QlyvLhm3TJwWpx z_3rCzgd>qeUp5ConhM zkMPDK@DrCf(%-^)h_<^M(!<`-l_*)iEdu^p6I@LHlaYeW@&8H5LP`F=6(QgV`SKM& zso!OkU*i82azbO4Es6eYW5~eV04G36@Wz3d0D!0l60iQpG{FVtKXd{AKgPrQ+iSx} zxFRrEgsqhu9F1_r5)8pbG{8mXKMV?$nLGbsFw*>A5dvOP0ipk3)=B;*uPid@cFhL( z!oLOh!a>`KtNzm8Bfg}G*U<0R&>tegh}t6Y8uI-zK>^EubHYol_E);&qgmZi9Z*_c-~Jkxxt$9l2L&#_a~qdj z?{8^}#1hC4B@ki>^oJ5Cu|)a@r5B<|20BlOa{O0^3eViodCV<1ms#hAHwrzRWnOJS zZK=k=-!~HrnLEl*U%-3$rofuT>-!b&_RsR}pX?f#&@~P)8}XenVj)(JcqW^bYedWE zU+k_ZGjU|;z%<0hk=qapAYTh0_yRnehEN0l_N2q}smeS)m0ApB=Yq1(D{_Fz6=jPM z$3nzs>;0eP;SdVq;QbldvVqX4HDG~xZ*C4J&$;~{kVB%vMD|#`?ehR!Y94??NbZ0Y zqy^%Cq!*9>AuhNRgDZX+`16$(^Z&x;>;DiblK#IU1e~BI_|8kQc;qL_P&?px{ETIS^NUTrr8$@Fyh}Q=W z0Q$fx540ml6Rhrl#kye>B_(ZaUB7l8i^o#5BOEE=ibo(XH*o^2B3!YO9&Q8>#7IJ= zAo7w@(vmg~j;@54=IiK&muG+t$^{SP7!1M|L?K8Hy|W5fWA9)?L^L9dq0sh{->_TJ zllZ=*{!4;IZ$ZH_yZY+ri?IDmyv+Leev&cY2IXgA!-21uaC`UHyM}mqi?3Dcdrb&$ z{5WC0vmNnwjdto1E_UO;s}o-e3QZC@zorHJKT-?$e_Y^hvqR_NV@3GB#K@0XS~UJw z7B)BjPg+)rg#Rl+K+r#k{}5d|qx@1JWReq_v1||apK1mfm>mESeDH+*0kh5{LM-tA zRJ_MrT44S!6#uc{p1!53gNyoqW#`%dGExxI{9g$I3aEht%h&%lER9wE)P~P>0MSv1 z*C>$qpMrwezfRMiO6NQUS@0>yf_~x*k|*K6?I)%p7L$~^KSm4Szszs#|NrOtfAB_; z+`Rlhr2StjLqG)WAISf+G+tRm`8rAtpntWp_uJe3*8z-Q|McslY{WcKwCM%>h1{oSf{@=>9@qd_AibVgf(0utXCHpJ?51e35yTPrI zh*`aEDK_Au>%VgIcu<2$-TG_+FNcO26{G%;A+km;n5T(A4=EVY5j_+=?4< z;J;^sAI&%BIV?dkoG0{cG+n#Q-?bUtnf3}FZ`9xhAs0WRwQgUrkS3M1|R zTp0pFss8}}FNs(F1paRV2-`BrZ9%L6gD3z{TjOmrv=0kj64;U?!GA&$2rbSKKS~6e zugpP`1pf{#fd4W}+yC!|CT!~<#C0tu1Qy4Cxq174rAX_)D?&g7HDUknvhiQ?H+khx z2!V|NVV!n%Z~hNE^A`{Rc_aa_;sRjZQaIvA5di$f9V98R(zL+(4`d1Zzub_H*gv=a zFC#T?{U1tN|5*_NF8m*_{}Wl|PoVzpMfQEc=C9-Yuq&CIm@4Ay?$hs2Ku9b8|M?Yv zA_I{G!~YR2kpEeF;r!3`Xar*EnExX!ivQBkdHJ8EN%3DRLO?t<;J$qPUpN7829Ws~ zGm%yP1m;@;+5`-TyAUy)5`_N-2mVVb0sjxi9Vs!phh`aP04#$4Qm}dXe_?WR zr1jqwA;4q#;s5-<=96CvfKYOL&C8BD`zJLMj)nSPj_ChATHyS5*rMmZFP`%8Ct6JZ zla-!({=1AU>HOc7As~qc@LB#u6k42BmT>AL13>QcEuzC`u>;Stv*s(D(zL#p~q6 zZZZ?P`9qK+p}^6`W8V6oER1yi&x#NbLJb5gAO06e9=jl`{F%g${CHb|&c*?bhTC8fXb>~ekNZQx zd@+zo5(EE*SnzK=@l(pjANhkM0RAOf0RI=t|NDJXe-+!`rreTJKrV{^bI<>V%E9DF z_`f0q9H%Di|6R5KSYZF}-}1_z5CSlOcxD3Td#-s5@c%xk)4bGc=aDj!vB>ZV1V-93&dat$mT2SLbbE&yNUqpm&soLF7xp0n%~!S!PEdH z{&#JmZY!PSSSV;VGtF{_ln!5mu7PeL(cUx6mVQ zazcssUnSoEq1qd;SAVMoyZ9|0_Xw@L#t6$M;J<`6c*YCdXI2Y}M}{R7?im2!M#|g$%&=6+^t< z2O_R1{#6G3pV$0mX@T<}Aq(h##Etq1{?RKS7d z&%_N&W0ggw>T)2n-@4_{txU8Sfs{ZITJt3 z?gIH!-GdUl$3*BJ9hipr=E!Xb-L;v9-~WfPaX`4hC2Z}Mv;B8*{SPWT&;FMst^cnG z{d4{A@A%}Gm>>TK^uJ|QOa>;L_kah!?>@f&^%K5+P4nl!ywv>pPxx+Y_4OtHZurmQ z`rl9azli>SD1@~CcSQ*3r2@Q`FXjaoW0gPQ0u%(uK!n_11ciVdU;;6KR{`YSU@Cyz zhlPUZ06a@_0Is+La6SnCIP|2rp8q#!f%s4P#o|BlCLQ5=$qsu|VEP#A1fZz*AM*ja9Es+0F=5O*p zqO4|9K>l(2Uj{Z;|A*lX022PM1pRaS|L^$ZmyrMb57__9s+bIH0dNyDN`ipzIVESq zL8~fIQ`(Ji${x3O*ENTDeiV!eD^#?LPErnP9geL$DkbyV>c3?I|D2SdoJ7+JT7fC*V l754!MEHe5(dI9LZa{|d3Kq3;6h(!NB{eO+GC1C(;0syF~aW?<} literal 0 HcmV?d00001 diff --git a/flytectl/cmd/register/testdata/invalid-fast.tgz b/flytectl/cmd/register/testdata/invalid-fast.tgz new file mode 100644 index 0000000000000000000000000000000000000000..28216a03e55716bc8689f82f375c07a5c1448209 GIT binary patch literal 56964 zcmagFRan&B8#YRJcejAFl=P4iqI7pi2uesv4c!gW-QChKba$tOB1m@*^ZVxgfBV{p zdmqfPu#JFJ{kidWq#cp0r`X$U0TzGeADy;?o`b9|32aO_rj@KUR-|Uwa{xX8rP4w2f41+Z)3$$a-S2GqY>OV` zemkQKG^Sg~AfuB09fm18fHGaajUYl3r^31s5l3=KsK^i*PgLKR>`a1{5i{~zSy)6O zL;h8P<0zy^V4h%@eD=G#Uiz+^a2~Zt<<)R2_(6&j1ai zE@Z*=B9xUO&j(3ZaHJPLku+L?7d!*At^xflz#jLw24r|FTfuV*jG>m`~$DV-y#?snPA2Y%Aa8@2rpv= z2X+*Pf9v;j@3*=gOcN`RP;XgA2<=1SB&;zHaA8BZLDHuY;~mGrUBI!3$2%mEU`#j| z+!KrL7}!UR2BEmNCnM#9^x8(^9Lqtzh|5fZDsFRcBBsej_?a^TEs$7SLW`K?Yq;8? z-CCHD&v-c*aHNL%<(&84$h8rih0i0i%?0lknIlPj=$%VMd||&qrCTQH!IvtMvAs~> zR#dFEzg?)Lx86A%-IKN+83{VHW1CYv)YVc{d?O?lc9kwut>mb6SlITdyd1G(WPC1B zF}}PfUWRhKJn}Fa#2b$ciE=>Z zhOb3>(8*rNEL71F<*jI#Go^(i>$2_}Jab$Hvz=MFd>Osp!Q7Qvdb2Gv`5OM+_AlKp z-uTydH1fwngPm$X4}f!ha|{~H5?)-WqaW_i7}>|lessfQ4xq+#PbVJ4I$I>xSMvJ_ zn9uZdzrpo-0cSo?A&y>vB@`wB3$7iPwb|!C?;_0D(wJE>d$ce@NUGI^qsNK}Q~1!? z=YcW)C(sWS=?BO=gh|<|uL#bL1f`1;u=s-A-16%1@&-2cYTSA>G)4_ULQt44r4nMG zx9);vC@lH}o&QFyFY=$+prAdXn-nKJKL#!3jz!`*)ph?=AxHfIB@M!iCSZzvgoIBk zC;=)a1f?AhwkDw3a=E=@JemMWK8w)aLb5Ds_9xmHRQcp}ihs+7!$BX}6D8UZ6VZiu z@Pz?P%|$Y#+d+(=hyXB!^)0xP{|Owd+8gx%LR3rG14xiacL6Fyf;#NdN*>RjdRTfS zqef&2AI&x8 z?92a|TFOG4&4P?d6$lOV{47nMBIL0rWOE`fjb{A-3ar)#!pSsR^vN~H>7{pJAe|_H z*u@L05vU_XXadUso}Vd77dvrIWCu(%zB6jt>Z$AF@F5=}#1ICwGP?5}20&B}>Tnyc z%=8R@X5&0-*Q2Nw66etojqA!>rUfuP#;f+f9|OxH{fL=`up<09M2tJSlD^K{QR%)Z zVe4t7%YlIEQOKmzrm!q988|{r5Lwu!dkGKaD%py|uHLldil2Ge&@t zFg;;4xAu{yv{#gAk?`+p)wo_!u9T?~frn`nnqNbdif(w>y?edLdHq#`gS<8gs1Y{@TM1)FOAY4^#3QGzEHPG^WsDxFxLD{r z!lM6TucXJIUxn&5sE=m$TSNI6BT(1GJVK6MS2?KLp-EEooUpZvrSPO9NRsMZvnZkM z&pis+u|1iX<;h$`(%-bV+G(~)4ECynM$dp9(g`qh%)%}A>Ns%k1#JJ!8ydvS05u~< zP;rx~K7vAmliCXLcx)C+20WvIv8Fo4ejShqNz(l~>YG1xjxOkz8Oz0I#(%SI1=WLwzdsmOD_W}3UM${;F!%fdqQKntX&c&6{OjO66r*! zVxLCIJ_w645?I0rFjzN_f`>ncsI4&Reueo`laB;PJv9>6Ozi7T^1+Sg3Yr-PbN6W_ ziq}jP-GlLcOW6W6`hl{K(0I#_@M9Jwl-z^MwIyWX(XRghxkUNZ+m2BGQ`V^%$;tZO z$MO6y%5Ic|0`2mUDUN|G$q+%VEVGW%sxO}YU%Li5%TbUu_bjoOdG(u`d^7%jXdATy z3QiVlbtvNyEw;uicf4AL*PqsDQ zy7En>&rQc3bbAH^RSwH6;xS;mWs-BJb+MKHk1;jdD5bIG4#JEC=M9+VvH%L9D(eWE zEi&esuva!KIflVwJPR)@dcsEfcSRgRQPUc(3!2s-pe#c9Oiy|V%;O*w@I>h5NS&ng zk-DF}5Xip|mf~cg_@y35(esgwTR^b16!C7AgfR9GQWtqM=^FO@gQdps~`e_20tv@EmTn%I;VCwhLvfLa>kFH(% z5&|LBKjkA+S`FeN0*`{)=xAgl24FO!!+^(2Vg zg&BVVUteh%`Ay|D*k|8af%d&L0tHHguhoMhBVsb{3kjkXqFX)ROx*&9JGtqZ$-_Ds zbM+u%Xg#d~9o74XQGAlhZi&OF%tTVzFANR#I;V@J5za;RBPAAM;JC10F@t9C3?|H z`~iTvK%QLm3IyWHH#GPy9yRvJ!=f0yfmc zX6X^1j*(yb4iYcOE6*?Zp4Zg8pB{0OePgO&WJs~Z#s9$Ul8yAq)8<#%OC#tcbD%h- ziuVADM6Qy;njMM@?Dvh@;93ZVKBMYeiBRby71ktY?Xp^v3Tvbv(r$?04o?i|*8~G# zsppBa5G?WnQucls(IR*>(+W7F9PTYrzi|B;Kt!)`dF3RO038d^y>*HN^0yfZg47Y& z(Xir~I5zMPXYiiLXonOrk9l6Dtd*m&-4q!XRYIlOrS;%o??FoJCP(@(9_#1q zb5naDqT|;9Yw6O9Jawe;k2pve3;_s87|{IyGJ2dCnB!XlX@tOc7<}ORL>ft!5&J!6 zLsygcu8S47v;t#u?_6&ZXv!kv?Z*5JlZxX0*fEG^D#r;Y6@~v1`QV$v$K5RdDE&S+ zCe@DJE;5kl3$v)Vpxr12!$ltAm&-mJQ^2RlzY<`E|04KJzI&H%w|C)Z5+uri6+`Mn zC*M=v7kP|XB5LfK&s(IXxNh*f{2&(Q|lA_9%(aj3A{RoG>i4=v+YVV{cULzDmFNO8YU8f4S72smc z_M%wD%=Jm@)r(0_pv8`niN`z#1b!Y9BPF94{S)07OITV2?hXs$pQ*IHs*hjH)Z&bo zwiKZJ{64*Wun1;G#0vYwU<4!sOo#R${F79Q0G?>UhupGFAxN5L`d5kCg5c`6Xz2I8$W1=twArc^J0sWGT*fR!U) zb(9G2Z+m0RW`X}0&>|yBQUER&(iP^Cp;R7&*vLxu?|qC&9|A^=-?B`12k9C{5`xLY zMDps3ETeyc;g@3Ax!QODM*|Z3AAtXszCs&I6Ods>u=yvHl-V#|i{QNUl~@DUI09m& zPVtb;HL@M<>>K+HYUAosAl&2xBkq#+g5@EtLF7O8E{>3<)ILm@rIG5U!Xj@MfltoN zB91&cjIPV-(+|;_Hh@_v3_CRB0r-s4>$7DRZ=#N*x5)TnfRwT+1`#KWtV>*e6sm|u ziRfK9l=cAPIcx#m5IRFz5&7_6R_4f2;DVG2fKv;|k(K}7DHmUEpW<(SM?J;#z|nX? zxnWw1n_d3u7J0?lDtpUg<(vFF6?64i+)=98a_MClry5`zE{6KezK}|SLnP$&BA~2! zxs5^;8SntMLkW;}zlFGWM`-eH%*e^%>l$nWq3A{RR)Ms9ma|26n+%31$)cDGID(`# z3_q!BW)ZM&L@XE)Rq2{%DWWH*lD-{glFk-}OLs&Bva8a$kuN0Jhahm^5q|I^kQ%b`@p$NVHft^S~egmsvQun@iY z1TTkMkPuS7CVfc7N6%$=fRJQ~5%lX8Y+NoV=n@!2#TSM9k&oUIN3$ zg{aG4QSN%>U8x3xi*R@QXD&Wy*0eZLXQP+K6<=DlIbSjVKVVtmyIssKk?WJb$(+by z66w1PwiP`&L8ENacQsb8%DE3>;myj)&1`p$a8X>W@bE)Rz;-d};B(cs%`JLR7@Fxh z)l$U|oXQoIxP=NU6U#o!YU!GZq!|Ulj&bQ(>Gqk3d|JxsrGR4F*szGay>RoQ&a})Wj6Z z2DOn(m%uoEG|uh)H=_9S0nkw5zXY+!!xnJL`v5gj_%%J(EolY=c~nn<{nN6@8=$fsUqf{fY?!1 zb$sE)7EC)#jEFZo@xj#qy#gK_zEZ&9E2Llp6m<{AfS(JF)GYsF5fznH!08X!6z?^F zNpKPI#}9lVH-z~bU_OU-A71~8kxyzr{VM#mpuD7WaAXG=fU%Kl`GcW#R8N=NS1-Xb z%P`(}*rNsF5);j~a)499U70FO(H;QtCx*Lz_H;r zenJfpq*o0nA0<}u0?{!q;VSP=;Ed-&7x&T3zro|Qjx<1~5hCb%0P@4cVrVpBMp=XM zhCCgC_|hdrJ}P8)>6zR@7+QF>0Bm>wkj;PQW*&pbhDhD(!Mp*;snTyFMzU3V1rr}8 zBh{)lF5Nfwe*{S%g$hN{ytz`5p;#HFu>LuVF?s>Os|s9^GEHy??ufe0&Km||h%Ecx<^!q+6jUa zlYc&Y8uCpb1A@fTN>A#oTdXyaAhVEHtLW-Kau(tlwEvk;*cz^9m3 z#r1Kq~e#Rpxe+AYP_ex z1Dy?1Ar6#c zI#?*VjP$R#Th~Ri)sNCP8R^|XZF*CN0-HZ&&UZf)BV)Ps5^<}a6X&*DNk!=O6_^J! zV!!iq3i*%1%7+M}+I`&mNLX61)WygE{JUk8Y1H*QFY(s(zcUSzzcA!?@N%CrpkBh7c~jk}VYr4+{-n z#&O`u6nM=N9%}=3Zp%?sa9Ss*;yt1fQ(p{76Wl2X+hzzI8wP&+YXXYe&@ziaFp*sw zK%b~0zYI^l6X30ZdrTSxC~L!sPx?v^Ge?*_KV(eLR1xoOEag$lsg&p~{i;L1mMP_$ zG|0m6k%`Kas39So|EHv!o5Er6Lzo?k^)2Z89k{(QX5Jzo3JOvp`S;+2g?b6h;z-NZ zjbDO46MB2*QwMH-L9O9PFkWpgMG9akaVUdGsi+IXwLGfatu`dfwmgr-hy>*#0E!o zeV&d>y7Gb@VW98N;M*lYhYN{g9bhK-bOh44jDVIAB2?i}tL<)ub^343eW^cQd1sPP zj(y}Atg(KJ?J_Bw9Zn)cP>eDg(~NOGr%jxbl$E zOV4KkU9F0=yOE4a>?bv?@omh;JF`Md0N+K!?2xn}!!6DdJ3#g&Pc`u`U@Z?@!3k)G z7>*WDV%hdDPLso3;ip&fW!gO4hd-4#6T>jo25_S*eBUb4MuZ!kR$@yR3FRi>)r%Z zzv!7l^;|ps8OBmx@DGXxc0+0! zXZBW^i*0*lXiZe3DWgGc0+*grY83=)DUnMLA~`{d1VUbW*shH_hPO@&D{tHXzBr42L ztem_hiP1)k2fzM%`I!<&W^j)?Ah%71HTSp`FF9b)=Nk8-%%<}IAL<9#8m6QnIJHUl#g^fo3D!P#@)pEiwRAx+il5gl3o_%8}tbapT zV37Z7_eQenoG3E$?Bi4+`<9_82Sn|IC;@yXy#K(QdF9cSnNJD9f7wn*brdj8luspg zVU~vYX&?02?-rt?f1mlfGNUs)qsme^Znxa=hx5VTcEVL%RkV}WY|1I_d zb?t%v`{i~FyHb9zZRQ9`$fbxNS$JQJwjsH8F_3t{{|FjYg0|Wq)B+{HPRv|g6lgmb z5cPv~d-%2Eug#IYuaM#3c7P{bNj40?1$puK&dX*2rMVjmpFJ^F7e^ki`R5gwks!Pi);ccH3 ze`3A+K0)S$3YT@p&vKWy3mC|nu zD&1ZFd2s2o>c*U88PPm|EHB^<8qv9?R38@i=Yf^a1AyWQQsW(nh?}KS_huPC-ob`N zk|kxzQ3P3C2_X6Rq{hOr2b57FSX3@R;1;?jFD>0WIW^r3MCf?3#wt%eZNd6vH$3^6C!kZwP3; zHc)SXvef_@m?T7SppEE!srCa^+MN{G4E)L>q{Pi2N$`POIbiAW56l%)eHq4F2lJeA zQ#rWOQX$f22Q(_?Z{ihC-~?Npu@ZhM2>SG=%8b!s@-jvlvleS8(w&4B^>0odVP?fY zpbLNQM`Xf)&Yk^d04@>qNw8|o&hD6{SU$#cFat7q1kZWz5Pauh?(d;9&I*Ce`}k-G z)aHZvigRr;%^0lTh)OFWqF25mrAn)1FVI?X?L8(5q@OOx$vc{%BZHG_NI`P%n@`uU z+bWtHu<+#tvAo2W^lteARlc%Q`&_g%$Ts?f^mNO3k>Fpf?g^70W6-~hYcgqgfJ_A%Z()#{I zCvNi8x|t8hzd@9?{z{PZ@(H#BPm&aJfVXu#em+hbz6O%AHxMpc!0_KT1dpQBudoXu zyPp%H)Rh$2QT$1*A0b^2Ad#xC7|H1Nvc5cOJ19W>@PAUq3Hz%U1h^Bg+yditWBafA z%-eIRx=?>8klhvshFJC84oNNf##FFq)|D3MBE50^sn#nsXp`@f6&TAjS)Pp3D4fa= zhCCIB1F)%s`+)+qH&-hp?yxyc2&!}ejMoH+j2IzIcu<2k_j~LoP{D4x<~f!#7Otn_ zr%&=*TQdLC76aTU2=T*o$&}CoJMqMm{hTN&hMyw*Lr3;^1=V1!%PaoJK&byv!aTh~)h8Ht^^ukEXFYl=JiC zgL>VBCsW}sd*kk=6yPtR?K!}kumub)$QIJHBl2Bdqh7FFWzZ;z>s4HpQINo`fBR?p zz=$HIM|!wpCrnkZa{x^J*;DEE-8S}xSe^2kZ;bv1{$KgVjxyj|izUl*!%q*ZH?Bs& zO)-o<&=ICbuJCB~g?pZ^UymYdxw&w5E zHM2*XR0y&l&c{FBll5d6vjFgu2AJZ4zy#L6L4St8(Re~}T1kfaDhG&~<-qSt{#)?a z|L{4vyG+cHjp%>&T%g}Ha&wS76d^ILE>;Fzu$NLPTi`HqmC_FW>`1ecw?b;d1wFI! zFZ=g3w&eo?Z59s<&6Nv`!rhGCf#+R!Wc;_%5}OE#?`O~HT)P`(%2Es8a&22Fr|4tE zv%nn!xH$gmbvbZDeFYj{1eg;OpiY^H2?b%$cn)1lCPYH3gB3oHo`{BPOrZl5(SN&@ zgVn$Ay{i7u7%WICQ#Bp!H9(I9BY1(fZXrQd%G+{}63CEpesn@J zx}zk<6|iVT7d`E<$A>yiSP;kO$1jR>P_HgxOR=31FwiOTJ7PMJSf9o#T}!{foPdvz ztu5qcU0pwTu+7rsK~-47Bq`UeA@JFPc<^`FD#i|LPi#3Lyd);Mt?Wiej68{e@h1#U zDDq~k&38WRJFMr|`0kThderU~KK2W-PV||#XY14W4P-KTv=MIL4;r_}5f*q89UBs7 z%HW6bJ}cMam0+_5iPFR68P?+`<-!TlJMX+a4+IF!nRR{VA~)mj#s!GI{-oC z*dmyL@d;vsz$F+^LIt0@qMB1`i3))tBILMUy_n`Z=g|^@_HKb9Yh1%B%_yVont5y@ z^~fJs=wE@Xc%CRL-igBYT6o3Ox2Zcb)B6Ix|pDS363HvR>Sp9tN(}g-WShbdL zx!%TdDcM4w_6_oC@*da3?_LadRcY=X)|P`65dJEUYvL^%Z$>=@E*Z4HI#K(mXP5*N z1x_tmVAL8702qU%s{t;=E9GhpJjJsme!2oByNo`;UtIXy_>VmCk{ggz10ovcEBKy1 zuWg^jN*OfP)HWPx2@m+;f=~Uf{GVC;>tnLs*^0jo!}=G$6}`_E5jWhV8_5naCHR)p zb?b@w{*G+vGn=mpT5#jMKGT2bs6BDNoFx5E)k)iit2*OVYBiCT&I3p+x7eBec=7IH zAJfBNw-T``65TyRxyT zLZFPGg8$KsT?q;o+FQJ>7YQt}~rsRTR{(DGicO1@fRDXs2QJ88u0s+XWk~?+{Z74y9Y(yxHrlFH9g2 znMUhbLdVg@PQ$~-u~uRIEcUdbHT3$r`e`{|@v}*A&>@#_G9%UIxv4Wt{Ab5~*Z;b7 zBP@@|smHuDU>M``gK&Z@K%eo%%YsFi2uJ@rp*$E`wC8Z8^~bj96=^V0yVqA~V+oD)KzPVVG6DQ`TeE?=IbW=sPgkn?*xMO7KM?`e!u=mVKH_adj6r>!kb4Da zx$;|NBV16W&ytmBRJ4JtS?gxOT3a%DH`)aZlbKh+{tegEN*LM{A9eiD6s+=)l0z<~es2Pm2NnH~IPJOQZ8U#`pc!&-U{ohbDkq`r+=Fdgg=xd?N*(QtyPtCPe$>{kOIV%w(f=tgRPL;^$r#&%?THA4)0xeH_vLxKsZ8rY<%5-K&aAkgpGh zdgk%@d)d$2nmV^W@2|(+nZw0HOWcF$cg zV+_o9TKMyKGQ-gFGgEz3m6` zDLab42A@o=-JRioy=}HLi#gsswz~D7Jt5EX(GkmDzg?>uBdqS8xe{$ZZ}Q&UQlah& z610rGPhor?#Z zf78Y@*{kU*8O1NxpsDQwGi%i4jg0fAw{DBA*;8|7Tic)B8Lc@TKA8YLvWWwDv!!- zM#|0NREgu!PWpMfoYg_+7oTewEV3krI2b*}gq@qi{qagQ{WmGirhVH5XX`@3PI8@3 zO3GYP$QKR{S5V_OSGoghNOuhfbN_zTU&vX zEYpGC)?zlhX=aa!dl<>yN(mre^Q&QOPUg1nigp_&_y3rH?Eey~N z?jh+&`{|#SxUw?dOdFe#eO9j<-XrBFAC~8Dw_a`hd?Ps^*E&M_^*wm+tF|%J4qDk7 zBy^xfcD-?;rfQi-9AsryixZD0EC%xAYgL>N3ZD`0`eI>l_VZR|Z={a)W2^!BR>#E9 z4`ej3v2xG7$*7-c;`1sbyxvGTWA?g~?^)Jhy<4&3&9>9mnGd4Z0b2Ub_lwaU+Z|aV zeq)=Q&`};|6%w1gp!3r?MyYQNk?zOo>7&gN6(jE%@UMD@i-_V)NQsL3YbY>D^hcyZqwIKal2au6pyQ#5_Y?GI8- zVBqgxVOrbohJ$p@&$%Y`!EppHg^wdD&L|Tlru*wW^#;*vahVn}__pVH=cEtmkjWpZohXXYt8? z(h@9APJfo(y03QELljp_bZ5disP|>}{2~3AQsetD=`H_7)+H8b*Q6^p^g`X$C0^}I zVN++Q&P_MsZk@B1!DhuD@)71ZdLJ4WN6Q}<>KfVgmEZys->=omB^AFqc1!x7cl*%K zu*<$qy79EF9az2p?3mnK>FM1crAK?mRZgWYRNA%YVURI*=JEPLYr=J9^CRaN?_`$f zYv5njO$h6ZUEdGyA;*>WiMg#%7jI9RT5ykxoc_8*jb+3|w9lu~i}k=&y&rmzgWSJ( z?d^rtklTqr_}L{50>2H9(|&v(?7%nmZy#S@1uv&$pTFwYKlnZ*j6HxRGSccW-+4s3 z@OkX2u?%P8Re1aH?ZWuEyAtQN;gjh@d)J?1zc}8ItcvO_d?w=++~ty-IF26I{LjiX zY?jK8QP?HuA@okgn9Ra{#U}o`L$-7zsW5?S)q5B(&EHS822cJ<`#kqaP~jh^cVsaH zA6*@E8;g#`7V{^L{&|V-zr?H;h!g4$9jx$^R zfu?5%xU-@0QQ~ff*WUDRTxOU9hbHEJ)K!?R?B0Y;{p^10T_(pl9OXiqhgNLDZFK7S zy7{0%YJY&t#IT_%{CrYFH~QVSA*7As?Y;R#&%h1xlTqH;nU#X^Q|iy=gLJN%uOWS} zPStdW;|n(pvJx6R(`;vgCva;!amEf|JF^IEVo&DlIkU-=TB$3M;!VQ|1@0Z9l8oQp zLENY$ce|EWoBkM`i*%m(%smJH)yT_xOF8eaE0pvqQ38$V=8I zy!_2L8hdlI5>1f%L=WlpQYSubcdoLJ`|6p8axb6RK$^IoiJ{IcEbeSa(KM@xOX`L` zQnYo3^J+MM+G(~5@2UH>DXeh6uP|jJH}#y$4&BdiyE}-}PFG~q-r?Ib{#(Nv2k;rR zUWa~Uuchb9mu;TBt_i_2cB@!_XUJpxYHhUl(Uz#5m{T?VCv~(5pQ&0)f#>|#`;Hs_ zo+@H%p`kBNdlt!GO5G_*>a_?Q3gylPHXPbvMZfMl9q-gGsBK+dzMHDZ($Cy#JY_5+ zo)M?Imvni5+y7$fivIFS>xt*h&z4^~1~gQx%FL4PC zO-aED-}tA?icc(imdX}OMwWI)F6EuweIDu)AF|hs{*Ko<^cAU7-nkc-Zvy+K*5coX z;wUJ}ZZOvFtClxE)a1j-pT=lBKTi|s8=tuO zwGXT{FK>y5eOLq3))O$Lrv8bB&S5Klx#fx2V6poY(|Nh(@nu0*E^T`HD3U&5t>op` zZP>z=MA@?mMfV_17D%|rjhx-I)kFH?PbhllM|wU1j)~W^2KO~nTzNI`N|R%4_4j{m zN)3H>xpsO>nOb+H)MbB3mSv~vOxU#WP^ou5pm3)JVKaol$eJa4tkkO39(dzda(~jN zq$jlY=JD&ZbtT_+9{1PkW~W!8KlVQkxe$tf#exWZAj;*$w);yvOYtCa0!u?Zw02H@BG|=(W#QJ8c>S`_q6+tNKV2D(>z4-^M~3rTAu#d4 zka&vB=dW7n{(JR!9v_mfFFLQ3$5r$;b=XLS>nzqJ7eqA`*63rL#*tmnn zkt%+i-Vsl}@LEUV==T1_u%4(&<()oF6)J}Q=m=T6J8F`tF0 zht6Sg*_C%fpN6=ayI}^mqy9a9qK3Lo_=o)6@{m$ zmil%k*Gsc@X^ez~yr1tw!f!tJR-B5K<^wyNgzFILmx^?sz1d{ z7QZ#)`&MM6c6TCPLi%~^gc>`NIc7!EZzTRGX2dwp^CwgJ;Gg$VXP9bkzbu#MVm&D2 zfLtWKWYKsn@1v&^wHrKtqT*J9lClY>X$l2Cn^+1}*6D32DxvE?&Df{aVG6YpeNx3B zcCk@+-_-K~?Bx%gC)`JmE=t$ulxXL!acLc|gm6Dw?QHtpWnWFm{++y$^v{7*D{oNv zd|mFpeD9&EMk&D6(O5ZE;BRm2;DZkd51Zk$4cxura}#!k-J7ehO4^}_3sMN|-noV2 z4~%kdYnsx4B|g8M@x9+fcEG_|#qYc@Zh89>u$$Q>?y}-$?99@X&^%#p5dDZ$EBV{P z!b5#6OSIO+R}8dJ;B$)6%c89CicAdkPuXNT8;eEAn@c7>99;G85aBfam&y-TGM0v^Ioe!zm{-@=cH*ovF?`L zm{g&7XL&`&FR970@@`i9VpJ0f?v9}spQhUj@m9l@Jg*{pmE+AvSeX-LM)$v>EHO&Y zDd<#O@Jy-S2c}0Sj9=ZQsxwZfgC$!&U%U8xMl&ABVCNi62T-jNpM_7?iF*HlOq^bQ zLt2xs9p+8Do$+XFxVEfcuGd=H^r+8s1f*7Z>py;Y6ue9}8r*p%>@37>o^fn}P*0qU zXG&eIcaP+?=MaDR_XQ>ju^ZrwR+^U^S!>GM7N(=Us?U4LVKNl|Z94UrNGeX>^6k@| zt=>F}<7Tl{nhC9(a%rjqdSklY0+A^%=eAdg!+hF?QzjnNLw=_3+j=#b-(f|Yc+&`v zl$ZE}#yH&y=`uxuzpR>x__iE%RG#goaE9sNIz z&eXUR)6TF--rz=MR%L+>I3)R__{@Ft)TTSi^bXf=qeLuTi|}2leD?M2*V*9f{?YoV zCC)wKH)jx?)qzoTzOeahSeZf0Z zbj}@PpGFQnhxd%Gd$>q)r*sJGJG1XB^-I!W8mPhl-o*8e*W_g7C1EJ+vVgwsFI%%2 z==?+8Tg3CCvgu7{;fDAA=B>B~rc)OnQM>D+>zbq!_t;GdTOaPMoVmr^gqe(eVO$CR z4hU~_+uC{Z=^g2dz{l+#)4A@Yu#?+mZX{N(+UA1kCSwGNl{H%&7A+6``xM}0IUvd+!b+LUn?EMTI zbB4i4Hb*9(RicHQQax>6T3C!bO|GYn6wR`_*(@I&w#bgtj6m4>o5r(!&cDWsSO;D} zxDpq8^w(>0TIgaK$2a1hygn|vZNC@h zFWaqOH&fJ7l-#^OA=B?&zxY_$_nFt*T%N`sh$&EauY3cfJ8RKvASv*D`%QwV<47cyJAGJ8 zd?;=9e|%~|iT_=7=h5Q>gk0K`h3=}|e~CeH*$V4gcRJmFwuv`Gf38G2`X$xGuNW@= zsYlcq(A}3_P`yslFcOxG-uG$uTQ8oO`ab|UK*qn>Ic8w)-UEB$d{gdUZLL%FZ+U9S zl=mC*naNj<5?$7frN$gtm&3%QJUi-J26pV;W$9i#HFZYH_kG2s0W7D1fulC~WQ0Wu zmluq_bUJH+@2*iBcw<(Dd*hCD@*4K+(q&e=l=YnhH?`e?8RT`L*kG_FDC)V%lX~4} z_VnPKHjb-jt=rlu@#vW{t1BnZ9GKwt?14$;$;ErMVhiq!U*>o%%#D~s4mVzXMfXVm znC2yWzQk=MZ8N$(RfeYUYpK`Xq}qnAAHyL)4)AB7Z#4$Y1pD{ z8)utq(zc!ciKub-mK)E^*B;Z?wsYKrQ4zyAQOuF1-jyv~OuV*dp1r$o!@3W>GsX`H zb}7QY?P#2AHs)@qo>8;>rt8lqEvN8C5z;+Z#=ncs8(A{tgmbjpy^p((`kOZMI+KHS zzGAUB`!wD^+P=8_~ln2pU4z4f!KIy%;=P9H4)Zw>1BjV?6Je9oPKW*RnmK&-{ z+Qg37QyDi=nAEHk($~FP3rj!c2($2qM!48ltpwAKKM_J|!Li+?!ZRQDl~)Nj6$qz3 zaGy@jb@4vBVG!Tda>@1bXm07t^ocLK$ITn?Wu_m^H?Pgck)^GB4E?b6rR~7*!=nZn z5={%kEH+g1BDI=!I-= z2@X-L#05oz%x5M#eeX@Zhjv_l+URNjVBeEkt55HEI*hWSQ+E7>wV^&E`({K0t=`Js z=kW0MQjceuS%LbGm-%G9$#UxzytwVMy}rXNUeb2Dopo;C{Qal|RO_WH`?fARd2rMF zNq!}_d|wnVcQkihGW}`7!D0JDI1A&vGfo_9Z;QH;^pCzN`C!=BJ?-?5G`nG^9Z>b0 zxnlY1{(TcOLW%cmw0(^Ur^60Sn>1+ofMd_cqe}7j9{JtMZ1JA|Ftx{B+|4x~l9Ja< zbr||;yz!NbZ2LL=DC@Frx^*fURMD=ya^+Z^kj(DpriHDqG1~j^jy)?MBJggGUUQgt zujm8qK>5-fJ(nw~gD1HSm~*!4)hF5jwKC*j`v~o$eNBV&`kD7-8O~!=MfI4sv&S2M zpIqF4pmxG8{cqY1Ub(3hd%ZRJ2z^A*%*xWy=ckOm6HwvkJ4??{Ft5{*Q5%jB);P9u z_U-@T*~>iFNe1`_VJn_!Wlg{0LKx6$&OgnW?Wvc#H_2T3@2xHRkG9@H$4}WCL%R2& z!|Vr791N$qC5*j%?)2rwT}O`R@@|fAb#Zgn)fN2~1g>+4zOtkD6YJR0`(K{lnGmiw z?y<*_(nU{iq$hsNEBKf_FJEJ_ zsxrp4J$HGPx#fV0?EUNCx?i@8>X@_h?Y-V_Ee=iH(*LM_)Z$ljpMt=iOBS&#jITr- zi)>Mb-#^FgqVPl4Nfrye7^%kvuiLcfGazwu%gQmP(Y-D&zGfCpp1tkrMW0an z0{bn?teg2;KGJ=h-)qBY+m3=_Bir|L({~SVoiusk$7vR*6U~Q?A$5PSr3J6W-PO2e zjEfoLeOx2ftx5|FDt-4h@JY-TM$U|k&kM&2ZjZXW|5&8I>2%?-g*cC=+xm5)t$g?o zOYcCyKPOIM?!Lj1*M!6eo|v<6jp5RSb+@0MN;dMnSD3V&__T2K>7cJ}OS-?q_FB{O zsd-v_!Hussf>P!#BCZ8Ny<&8SgGjhwWE;m}Ioa_-b z1z3bzo18lx@Mi7yD}Fn=c3p7l-9Odz3rmRny${EEIL_sim|j~>b<3#I^XQ)Gby?=fAQwAn}S{&ft>9_E3V9+sTcn8 z?VayK@+$1KKRnK7XH4B5Z+OtY1f{#YUGUYz?tAGr_PvkYzq(g4SaOUzR?4`WywPW4$ncIh3nfU)ZjIa*&h5|c2Nm-x_G;9-7Zqki6H(-#XC zh4PMVY93e4xfNyEI%f5(jGGHaY+3CbL<{q8rRUt{e8!cT6`7{TGZz=MUhgKX7_vGe z-uZBPM)L)IcVzE#ejJgUbuCL^=APr`I`#0k@>er&92ip2V@i41i{$(j&2vqU`FGj4 zA-ZuHPzpw>tf#%sMyb%kzSOgJD!`_o>aAqzzpEIWyC{TU`0I2hK@s|2v$r zr#Bbe*pe|KpElT^k#QmY<(r~(HZCQ(>|RpRVEx3z!UKDQi_^PDezL<}r1`qhIF%h| zL~P!Y(T$Fa`t`?LU z)tE=KHmhNOUj-VcgXrS@btfh+JUnc za0VYEKdO4V)UhYny7S1yfw;XV`nJsuI=a`q<&rKH3$oV^(EFhGuG8Lm*H*mhGZ;ha zJ+xm%=di*@G52m+U1~o$=h6b-Sv@BX(|O=}flBun>hd(-DD}wI#TzD5h=*{h`-9qWS&rn-=6a45Hg^o{i^uj+)Z!=#bAR=XnO*>exwl&pP`%B*q8* zV0xCT)xpU(KRVrx(~eEuXmEDcQ2UE{21mPXKK8nZ6x(<33@h!ztO-jU$1}`(<@VNj z?%K|Oty6OG_py3cs-{eEZM}?PnArEiqAb*?5V!KL%RYH&Su|}rb8_cfpAxU=?pt9~ z*?U3Q%FIKaetU&f8}hU6gC4$1jcHn*wQv-qg#795}Oy@>_MDX_$nn|E#e8F0m zj5~chOnhTGqugLE%KAla^C_N1b{2kTCuislH}2Jj8L~C4^PC5T-~EFxyh$uumfnpR zV&CGy`CAUBJ5vP3q@hdtCtD@;UmMN2jC*A2Gn={&L~q088OJ+^XWR<7yot2r=84(6 zQqH$?>NkC$UhwgO+Ci8%uf0$9Om($6&~GOGdWSBj9Sltk``z?sFSgp%WTwjjVZUkD ztn?N>Ib}f!SUPs8zcaP+>xQ(lF)el(&doZoy=mLc<4^Y5Jwu*M< z(86pb4N z*2HDKSHLVm_jQ-Um-IbCCmPw&AI|GK@_PB>hn#?-gIaF-rwsZ5Y^v?~F>fyTO$c_m ze8TyfQC>Nv*Qs_l3fi2wJnP1cCg}(7=#oZ%=x_($+;7*e)OF0Lj`z3b<{N(2^&a2R zGQ0e&Il5_a$D+l0=|w#QBMmPxw0&HC9ubD^UGu?g*Bd*Xlk?(&i^ruc$s9xP?tRNY zYG~}$4c?)rjz3#eVRdQD_=J&88OPWqf~!4fS?AWo&vY1ge$e^Z3(HmvX+N{=zQemhT(+gfHD*B|R=ymupZ*)h-Xu)GI8I$mpY zCReOj&^p7Hxx4fQS;WNmu^E0(H!=%OZs9zCn;rIgLgkoayn)U9TDM5fvk445);(obl^|rv)OkJM z^v}e;Pi<>{f?29p10{6_Gl0rYLcLv{To*E+q<{x4VAqI`7ctiUfP^wzuIfw2m2(=Tgq#{E_c zLOdKhtp>Db=dA-Sm0uJL=*I2WkA88_#Ac_O4z};4OP|(amvQs?S#KsdT)&V-+6EC_xSRBjmy19KH>wst-^Hq~SbZ|DZ4z4(y8F;mF!{n{_i`|T#=#BHb_>%PGrEgXddGpAK86(*POPFh}6ZHNECP3N0 zCu8W6ePK~9D_P=G$df8VYN}=Cwcb?D3zcE6d_kC-oj8ZTHDJ_D9Qt~R&Dr(%fxNCV zjCHr}>3sAK>CpJHQN-G;+;!sebUkK&<5i-eFJ$}xixI*a0|Sj`5nU1@)c87@o**|fH74|= zm6c||q6@UnAX|Wh0^-aN+9I~opsO9O9#>Y+^n+!f@A zgVKmg&hB>jmZ6bX^-#yq%_J*)i5y{;=FpYIuMRxNla*JXBrKD3g>q#K*UQV|F7#JR z8O`O+bw%=ij1Nv>@%+OlFM2Nyo>e3gibA}4+rky+vEt};oU(J^N|99{nx$twPs)37 z@=kk@%8sFEHo@&^42sm9w~03;iHYBTyF|ph$}m`L#vTjBP)LGt_Tad=QnXnSS38qy zx%IFlYhQr-1rEYWNbh7J07w0eGd<+JeVgKUN2s9mf9WU zt0vXaq|)UBjP07h)!^Pii;lm`sm5}f!Qu)9g@7*26+UwXcfl4U@`C{s=xzkNT>_Dv z?TS#kAc7_3JG!5XHo0_H&mIdkzAYpddI)nAQ~TF>R-_WI~B(P9*y~O_n}AHaL6|P&x~Keex@6yLelpZWq#l9v6%gNl7`=-|HQSEAhX~M-Xhf^`Yss=;1ob& zh}6OHk$NU)9qB_D+>d4nEgci_L3MNjMu#`ha+%!5iQs;{k-V7_;feX z%=&}kdA#Njwac120_G88$3~NeFdY%ny<+$Qse*C_hS-M*#Far1U+^W=sA|;AK(xAmiYgzot}@)|%{H83DU{l?~h&$)~TX+Qx5GBnw4$fB$ z9WD0+4+v6LA|^p1$VGJxP^ddYVN@J8s!QTfy))Jo{$8dT*NRbu>Q1A8Ef@|8SA3Za zO)d}$3J#p;DUVg*nKQx-QVABV0@;mjiLtS0ghYFBP-#|xzff()WLX%uIWbR4Xxopt zo@1=%IhtD3AuGC zrtZtt$e7wzxq5isL1EZN*Kix~k)cU!X!90p0j?nb#>Fs#M`vj;J-?Z$#{Gkb>rU(x zRD(hNF-8O8%`S{|3we>RK2PSDm9Xg*@f(y5&!l%mfCeh+~s{a6_tnpf`O*^Kj?dO(e>q@D!dg1J?%YQ}N$aN4a9lj{ z!wjYZV+IP_w1iY7>8R))Rr^$2{1r`-&Og`1|kZ|^J?<|~QIg>t{j>w7*wKVV@`fXoG#(xBVd;_!gZIjyJ zwJG4btEI}z^CU5AQ|e4H@ur|{_nV@TZ`E(Rs$GiIF{Qi`ZBigsD4x>nZ!ZwXSL`r~ ziJvD$e$-+z7=NWl8x2|acyE^LDQ#`Z`d5y0P(|vu&BH9j&<{5zMaw*bbJM=*^CqgT&gd#aTF2smm-`pC)_cKtBn-3!(W3$pelrh z#U~ILM0_)sGZX_7Gz4``y0AbaD-rZItHR?GxpZYm6p2osE` z4hG4kgoX1d&A|`k1%^@oiY6V;*@Y^wyD17`kRgPaS%xUYY@3m|kx49SO87lZ?4%q` zrG7dod>Ih{-l`tZbli|PBCHlBjl}5^Zpt`NrX+(E}sy9eR1zIVg z5zI(LG4pETG%%T@6fH!BqPR#jsu5fSC7`2qs-@?v!z?q1?M2A(TtZ>1V>D@+Gu3LT zF#jL_@!vCNUQMUeHIpW?0V`#uz+{2~=#WjnwB?4e} z!pW>y>yL3uu#iTMJO$Q)R0Rv#u&H9I1H;rpM9sD_g1#XPyo>;2aFqm=%|dY@ryS2x z4kc#1*(OR~1ek_kJlSl}Dpm!(EIF!ZR7pNWAw@)&bd(Z`d_Y^aS?cZ-lc=PzL9r0r z7PfN0ylN9VB%zMJ>OVHtg?Gqd1H!JHgU+2`b8oEo^qrx;Gu|6--X7~< z_x5nRJ=hI)HwVRQbb*@$QwjrxI~#f$!x?dQPVv!XH7PoWKy5mu^e!a7V%V`}b`;~m zGGdGh!hyosqj^4du%dvJ=!a}j7e?ogl8HrjZj%9x{t|6u2$Ziep62o{9q4rM^$O+*$H>0K+;*-LEQ#Zlq-q|fWOlGpFLan<%P`3s z$>|)4oV6M1qr+~<5=I+o^PG~sL}Bo~Bz52;l}=HCnUY*tAgA&(kV6TB%48T8X2s`Q z5KYg60m7<~w94=%Q;f64MP0WtRvQG1Z#KVGx1e78Wyk$e`e)807f?qI%dEXhG6At3 zPiPQNtbFpR$l;X3jT$!z;AlQViP0ze3OM=tBm@$)74YlbE3O6ItZk(ncYG`5*)BbG zW!NtLyZ$Z%?p!(G&b0&X{MZBTEDgAG?SMPi40vb(3s&7mUDaVmaP~@ zgC`!on#J=J51ey7sh)5wbz*FBamthMMjW0px&&8=Uq(zE$V3!}G@0yLPO}TOQtBI}AV$TU%eR?FF^}M{WQ6$MFAeZ+7~-2p_P@?vZU6gF_CM5AP)b6tZ0|Gvkt#w+Fhs8*)t2P7EHou39hRelL0!z;6g|JS>+^1`Ck>-?9 zv#}6L(F}vaDsRF|IYT&ZUp-*`5voW$w>Q=;lyY}Q1a6bNv9PF=YJu#P6&Ydsm=g9b z0zO`ua(;kMIoO;PUSZ}1+|`U#8j|#=xWgFip@j3W!=!$%t%>kmjD5JOk0tP#{9Su& z^{d+c3MgL_A8yo5}xO@HcVh0vY~Da%61?q|82QVQxaQPTl2q5!niT07-yt}1I(7tWCq2K ztK!Zzsel1U#(PhJkGx-C^C4oaS>=9lJu*nCbhVBNwjA~cqS$>Zt4bHlR8QrG#6Uu5 z)P|d}_4YQGHWx0IujPm&iMC)=<5%rulC#-z3f7!6LC}i^xfOSEzh7BcyrC^Y?coqD zYFTiFY0fSQ)~823WFB3+2O5=jnie3S>u#C`BXein_WF7w=mzUci(HUKw`l0f1%JyG zi?4W$&Q=~|_ZzsWb((6cskWPHM-)RAg_K`JywO_zujT(ADE~YD-+S<><^PXT{s$4L zSA^007`K48`2TJ1?(J0bf41RAE&qQY`Tw3>?TX`{XVtwnxo1Hc25}j^HY7WX$)ah* zwkU|tW(2!mGyx*Om~IXNK%42v8tw(Q!yBXl=h`IyGJA&@1gMJUltSoo2=anan&Me) zL`%}-yXtW$H$=#OlzuYDYkF@n5sUF zy+2B3Ab0T}W%#Ib&Fkik6gFG!bzIsw$tnNANDo6o38TvuK^GG> zxwi)HMI+wF)U5$u7wEULQohJDQutp%i~P=hDF;H~e`gwL$HEM#5*&e;y_qgAnn?_E)@RSGR&`4JeHn z`MkKjG40!t6-YUyxfCHdR<~4Kx>GR`)NAqK*P>(AqI|F7Tp^)O8*uxe`M6?fq?(4~ zn`rq+W6kW)Y^^X}`{B6Pu+^&Hch#m3yZ1M$`0jUI)%G{nop;a=s9~t2YYMt0(CxO@ zsJ>!0dG(cdHgS#Do>~v`6|>Ua0=j#>`hm&#@NN}t`a4%ug^%92uEK^5ciw{ybMC5` ze4Nb^v4zwohOtL25*51EqC;PZX{$;{Jt6evl9dix)vu;xltlx-yZY;NHgi@p-VHsD z+0J#36n~_-1FE&TEo=vJ#Wx763aZ7lrBBM7zfV zFD}cs?8oD7JXX8U1{wJsv)0_dnv}NQMoOsM`g@?GpNEXt17l>5V9AYH4nMMjE*|fy z{73|1>!e*?%(1wI6z*x*MQN2;X0z(f!wCX0{V=-G_$8+)2*CcD|t8aY1SmnC^38jrDb5vSy6yhNbfNW{!(PR~W(5@i3XCnHG<{r7UM;q$;+)b>5`J zrEU%;N%4D?fT)Xb4pWzSPvRD!Th*D|s?JG`#XHe#2Fm~n5zaV3x>bh8-c8MxbQU)K zC~U`bih;r5QVKf8T?4gUr3vUHb7Lfk!9IOa zr3P#D5kV^c+M7+a;{?x{ zBke9$WY-TW5Uen0~BME^Sbtndu`OO;#`QA2AUXJcn@0JhF z1Kc3XxjhZgc^EA?&!@A52A&I(g2o8c&KC{u)0KsM^$ad+6m`~GS)j1yQ}SuC-u7|X z`m2fdBFQ?5mt{1qwNc=RxbeSO0Gw?IT7Ll~k!ceHl zWFNIeUnYNk>KHQqc5Y53e|7-jIJKF#6Y;NDK?f)OG{ePm~0)!_edNC*3ESX4RI(u9=**1z_qD{u&ihcBga4v zQb#{uUm$FAxB{kl*Wx(1AiAK#-RRp8kA+=~IbE*0kHPzterV)O19TSi|K#Tr^m|2@ zSd?l(Sinvuj?E?WM7fVwSKCV{h>eH~16>TybgU(g&0Lkl{6HpqG(V8Dfux^gMbt=7 z^K&zwMeTXw1(!((0}rznxt9{;MQ$JmRKSo45)_Jd5j4!ec8~&GA<#bFM zISfZ7lmP=UB!BZ$*4L<#Hv*<$MsLWs`y^ZgR)kfU+66a5W)H5y_^@F*;>VcV)`xo1 zgpoj8;m#~^HibbKF0-8b9NlEKbzWsSp*dc|qf1>vlA*U7+>h)Eht$S0w9N81=)`=* zg+yxqW^*59M~q08Z`Rd@>a2g;Tq?P;+`dzAWr60B)+VNmrZ`KXVF*ltc=tnwfrDTr zCIJq>g)L%;33J~Qd<(`UAQr=^>N5<=oQT>omc*ubS3RG_sNOXIPH;y}(uF(YR0&T` zM*3U|gkA~Y<2+x1b6b$aPxsF#T_Vp=0>ClsXCuIB{>OaXI z%W2f%=Fi4b*lg@d6{KlE$+xpfKu{MziSer90%}9$$%?ShS<`6>7+|VPm715?v3|%| z<;%@tw6d?BqQ-!XoS35fnM-7xK6;M}dSs6C2hg z3l4*d5U1cA=j0~`yksokJ)zidSPRVfOB8JZ?IOsJ;M@q7hmN`Cgo0M&-svNl3o8x@ zAOq^ebLl&@XBqV+W39LFJkAl#j>c{|pYNoLXD}NH0)b-KYh%u*y((=U5lS89owi4< z(^He{9chISr6|81^VD(3xuTahI5yamCf>qXuiCsE(?R32EY7Qd>s63Q1lLe_R8~3V zU&=YrW<%zFid+M5mkk3u(DzT z>fJC;8bZDm06wBpE)aG&aptFL8xAydzQi@b*s08k)ej_IADBWyi;Lb0j<8U?d7e<_ zZk9^&;6kI0FeQOU$JvaGUX&OR)!qmR1P{nPQ$R4L8iArj9Us8m#fY}{<;U7GFu zh|S7g!vB<*gD^1iP$ga(IMz@R z;PFj1;@U?j;BsR62-B$&#tfN;@#aGtl1yTfHe-YeaokwGx+{*y#IQ7aNiX{#8{`s^ ze9@KAx*s8b%C0D1aR_rP>2y?7th||F_eOT12@;+sGs>1Vl;}T|qIoMBkLBVBdhmtuXBml9HUEG3<9#w_dpjHXkluzps0_mBfddYXDvR|&@BBgCZ4CG4AqR zd;2MNrHvNRY@t##7FTT(rEZ|Z)p8$}H0Uc1UCX!Ls!T6QYOC09rN(#UBULLw>H2oA zBSgL`E^bM2Jc>^Q-ckf4uFNHj07L6*-eMhl)>vM|YgWl#+=+h`7lu!Z&Xn$|1w83y zt3cT56$Z>w>y9OpJwm#4bF;n>w}6J=Q_NGjJ4RZjcgx~!xu6q~T8L?dP1~g7ChNz@ z0`e5*c+7eFj)o6o+I6%kk7PA`e{H=4j@n^#RK&`vE|NnZT=OgU4`<67%6nBk)VPL^ z7QCjm|J3%M75FbZyX`vu^W(JtxM|aV91NJZ*nc)VyOsFQ_TKJhySD#)DErTev*KRa zob!m1s*{!h?+2-qNMmig& z;ee1K$sj{8plCx2<6$(z6>_KE#mEMkT^7-PbGOMbly}iLnskm$g!j>N2N2lY)SF(a zNdd|FpsR|hqx+@~)>J(|f?HjTMkMjrhgSR*{dT$;us80YaON9d-{*XV)O^6{Plyn3 zqmXydFqww5fq>YH8qMmkdV*7(u=5}LrJC-FX5ff4y0F1)-j+Xj|N54Xhjs!O?OY<8 z$(rcu&-!((QKOY?-& z$s})m#DpIf?vWHM%5XOYv=5P~ho*=$E}^uB#iTb4xo4Odq>M*(bl-%O<7krssk{W| zbVT6N!<^_cM+*;|=?IYeqA zpJdxBmz0X>&3x~rX05QS03~?k0f*nyR=9-gpFs$4r$B@hO`OMY1Y$8| z#*PGHQVuuOV3u=ch!Pl@LzRqr91GBd#XaM5h3sw6X1S2Vxo9CIVU{p`TQdeE3{W#P z(!&UMoZ0y>{D2~kmhiA}C}WuynCR^e`x`L&Fw7uN(yOLg;4-ueAgftZU7D|6l{EDr zM_jJJfY>iZaQ&;9S5dz&ap)u9VVq5BX!2IsaoXXLZq_$dvC zETlX}+&>e%FEKQYBz0GG-N!KeP&CJUKA?z0hEUoSZS zEyuov0cW6qSR+oEnRY~ ==tTa|ayaCt+v@s7eG6oFKQLVQGJHWf~ZiXos>GtqXK3(l$kraUxF34C&coJMv{v?w6mEm zf~iTm#qlAl#J+IHO(+*guCDmUtpl6Lv^^tNon$OLp+*{s+@72fz`_=GH z(=j4t3REd|%?80&Zx^`zV~hP*jgIyUI%pDqC@!y`8YWDpEl$gnWF~gB%!Pr=Yc%X#mPW%qPK3WB3&L(=HqleWXRTGCmmaN-V0j0s zTS0mb@d&G*02^$o1fID|8I;YlTn4JRnz)FAl|yeb*AzfT#P=k&<)ISIt^E2&ihHO( ze@puRt!4dxyVn1I5dHt&D*b;>7Q+vdhkv;X&YcCOz4)!*COK#Dii zPObm1`G3v-e-8fN-s;r+|KsHU&khgnKR)!+EdMe0|26jCovlu%n*XD{Roj0*4FC64 zZyL?c!Z_gu<1plw{++*KWb^@1hHSu&M-|e)d;(@kwQ_Nc?q@FXN zQ%;DK!v~54oN|e$+;-OQ7sJ~qhjqZt<>nqeT&Vj851R(b1vPT!n%ZZuEt^+?Yz`R6 zW#j$CAy&L={Tj( z5_?YfFo{o)`If2lEv8q~7)eUJsec?`b3u_sY06*tsF#P%!a8Jrm~7~HBcm0feAjRo z7=BF2RqgOBSQ9L{KrtcZj-@#5smM@@7>ShraS|uTY=UVS zcooHknQ#+=Vp6AQgJgLoGK4C-Xq)C?WG$!FJ@t$|b8k^J_fa zNgiM>&_a0tV-9EOkYpJ#s*%tEbQ8qk_W=hSp;gT@_HvYb;COP9n~_zM2@203=TF!) z7<7kzJ0=JYyMn8LRPOXfHWf7b^!-}{uc^OSj?Ef5%&=??EgkUo_Ff&R> z3N~?X=y(;`rdg&NqOna_E1v-6ELQ(+IT$CcauUenLFv+#wd;9KPhpe0u^mOuEAn2z z)br}QWT5CsL|_J-yi}1}3cdr+L<%d=oeHVyCgY4+41|~3g!fucme9tQ$?CAX6b3Iu zBg*dJ0Jn{jvPp})3UP*71d6f0FR~}Q7?RgR1OGu3sBw7KeZ075MCwB$QR5yiB5$}8 zJ#)y*i@l)h`+oCnr3U3v7|ucQHf$s!^von_z}IAif}i`PvYvMT7V~i<-?tbS%kwZAL&u9zaGOp9lUUkdjtEI{ zH13YZXiI%h2JF4G5GBOJkD2y>%7MA__fLes{{Z$bdz&Pq4sbNS-r!gJl^a`$Pnm5V zh%F!Gffy3)^G;5Rt1A<1aHPOt`4o3sFa7S6(H|2!7>?F?t7A z9G>VpU?i6}pqWebq%B`#1o} zedeFNMr{sSnc`ypf&5beRb?vmg^H1=u^$v3|Qa_$(DI3}U1O;R&XpUujNc zK9sO<9a}tl!jLv5X@~f5>d@~|rtXoX?IAZfpoSuAXo0Y*Fgd53G-1rQRoJ(fD4@8` zqhB!z5?Jf!fsq{SBH(B-=P1^|sY>llmyeE&x7x}5FBCaOn@L0J#yXE;&b5eFFnHe5 zgxmwYa9s-#a46st7P`m+NTh>{>g{pttX^hfl8r#6{)FdY6>-$~s9E^~C6xfyIT(}w zjC20N`?P{gY(oMxP%u`wb>!Nq$~K6HGtea6q#0fo?!xFP$&sx&rGfC(u`^OkJ^`HN z5b0itRxjVHovr zsmW6W1q##vUEH=LEU7$+X|X?M5RuX%PSm~Q=b1RN7++|*V8eh>7l3izxSPfM9@e>4 z5}k8AzeZ*X7=nq#<(St3_iJ#%)Z6(l>eZq}zpA6OaOOJuDrS1@9{M0ERZqrncaaed+CLG@R=R5EXkyCh@ve+l@w& zEsg{T#5!1}F>}=5RfQq*Ww9&^!uFpn?Mphg;SE$`Wr$Zl31YnVh}XNl&eFMJ_jf{h zvn8W5dMx8v1bfLGRF$LiN#Q=~o^l}yb@+-YgN&!L4g>=T1bfTQ_${}_g5?-eR)kSB z(WJO6PEL|sV3P7=FmBSV`{4M<5+DO&a6OA*q2HNczU~achXq(`yh4)9-dh~+dY{ul zqK+gDoxxxVa`OH~n4CYncb&*eNOKF9B%_N;gSpT8DBOk=p%LdRR8t$ABe7+OHrog% zXB$h_J_`99o(Bl@3Co5zl>H!r8_v^<($za4m672Ocrh246S!Rb0pyE_L01UDo9i=& zU@RFP`BWkmON>D!aG{=JE_3g>I9B5(1Toz?m$0rDSBAnKMMX)}1zC#Beqg74jzrt9 z&DMX1{vUPx|Igptn&Zc-Px+~pKJfW zn*V=L|38QSZ*SNBe;+CT7iEC)3i}a`fw%bob#}LQs`&ryoz0s6e~6F4|7Q|t@uIhg z5?VqD%MO9nkF`b_UEiVA$i4Md?}>ry#H$^F2}A+8YoS6{Vu#V3E7?%pg8J2YFr!d3 zwy#euet@`JMaS{fsc6pjemd zbD9u$5Rq(@oNPLd)zbuQS$na(B6fzdP4oDv`l%qum2 zf);r6nIh~JH;;lf!NZ0Bi`hV@u|_p*gK{ldXMw@ZL!iO*Q8sFu>_e^(2`Dqe`s~(ls_98ug;4N5Nz;f=T=0i5M1H_w+z= zxf_cOu8m~8T(LYbV{JcBE#rYvxP$Qct$xZ;a#CNLMG@&JKlAn4X9F z(&PoqhCqF3m67XmUjQUuIz{4=1)|T~*_UsntLWDHg*pkUG*$acv@V8?91+xiPW= zo5ZSFPwszl6YUGEwhh!Q4zbxFGFBsx;lDiVm|#uJJW1B^Rg`>_DG+y@3(8By^doz| zaLbeLTZ&EZGQJl1^|UT-XMJ^0@ewH84p1!*{DxZEqFjZU=N(y(6yy9tD|K~7o9D98 zxD{u!5QIV)v(u_g86vj1AyTBc96PQ9TnTw)7%#Hlkq$fCK*z=nLE}sHJ{l&Br`hlO z>>65n&mCRhG2nv?jnk!&;~%A0cl$4#wzp>vOiAWg}q0RM-KfWu5W{dXWgN z30_KpQw>E^0_$p(hGDtGJB>s&ULGC8T>gb1lh)Y}4p=H20VSu}d(K#!iron(L7JVz z)(P0B*p8M-M+lN!f(xpW0nJHB0bX!6L-f2dDNvlj6l>yn=0vkj{n96D6}p1SBqXb+ z0Sj@gII@#kjz1d~L5onaeGOiDY6O+36;v!nh_m+*i4Q%stv8|BeVKLfw!QT|P78h> zo}H6FHncin4}NiIEP0lZ>pA0&1J|0JS>w<#8HZ-$rh3ZOp%XM9!J?5T9;44lKNj4l zRr3XB9r~HEFp4;TdbRgozb`&mCoW&<8-H_>gYadx580uZPBN5K(HArMRwl?066jqW zlfzL|c1&i%w$F^CGVxKLp8mey>j^MXXxUh-@q`GNm6OPgeUpI}(`6`kWL@)*?mr^Y zeMISNQFJ9Io^VJAg<3=-O6~whKME%ZvvD>z$ufwrtoJV2G>gNZU^Q5zVm|{H^LuE( zU8XX#uDjUrs#E$(-fz!<ZE{+GPcZU>2IjPteG!vgPScLsvfIShn7 zMT%Spg|o}^Ka+%XhR5AROU5Lqa#0py*inKd#mr%(#WoTV2X{FQm4y)8A|oB4+0N3e zFX-SSb(TOsLnlcuRZ-$ic33Vyg!ZSii1VD8=fbnfjIr>zwbtTd_t{l#nTV~x4NTw* zQ|TTUy6Nm>w7zOQFp*xiYCae799Z{>ztgmkC-AxP>n*u=RXiSnNUw>};BXI|rhe1L zyCIV!j=btce&d1oHq)EHCF9aPLvC7g?S>Y-V`a?(b?2{*eIS;yQE~s1Zz)3qhC%FZ z6T9KFlR8dbtVrCIS+yr##Y0mz3_61Px5`W3#VwA!_wc$pDHG zrx+%fq7V^e9Uo2#Qy5D8(wvRim^U!|zHriSuEOQQ(83Ge4t)?g#8uR=gZG%-;bv!Z zZ)dc<*BR{W+}<0t@7&ql+8hkW!@cpHJ6n6Zdt1ZZU{e>bk>G+I@7d|@?CfydiC1;T zDEnr;g$&xB*tUEx&8|Mf;lIOAf$^k|19xG`qEvpXfe)t-i6Hnc)98C_?_L2 zvxI0plU*?}gV=y8%cop9EC_etr5-4BU9nf4{z0~ghd)8%b3F*A;ipu+?F2HQ{>e|; z;ECHF-LIdf=!Y6R%ftyt0#jbJ2C{~j{NAGj7*_X;DcwL2LV8ZU6g#_CE*zV{4~&|M*Dlf6GxVf2|4dZTY`9 z_m=X1?{&6n``?GO|6LQ*wC`E_-dAX5dpeH`3E7E0%iemCE@uh9U_Aq0U#&lJ0gE8l zsR1H>S|riYi0;m;^ee~k3ycC?q9h=eLIql6nDD&O5RX{Us}b3qX+*cDP)vjf*;60WAawS}U@A!wEYY=va?Kva%R>U=S!un)SJf zUzOXbiKVNE*Y&2{NCu+@BxKX{1{o(x*tFyTl=;#Di z7?nf$!YcclCV68STwxxFA}Qd^(S){-pbC5oW_SlqdW>%I6OBo}Y-IAd@KB~nx7Q^B zsh?3e6)ofPWe)Yv++~?a(vhPNy_ijKQHN178(EcA=7ND3EDg_-;fj=3NzHHomrLg{ zjhG`^NO8{*52S~~bZ%%4!{BRFDqk3CB^3o;{5JV_DqeL$cz=i0;5 zpKMTWI@m!e2}u$DE!I?yX_5>WCTNP|<3=-5D|nua0tDgGK(CMgl^N)&moWGTN&1wQ z^#oV-0jzq%STDNfmxgq|yVm}E4MUJ}3`FU+Z6fI9C|;b`9t^Gr9dDqA{yyR7Vkj@% zG2Lw4r>G~Ma25kJf^ZCvsJaAIpENF#LN`lHd@qqC<4sVQGAZ_GY<%&RXAT~{o4Fe; zbtb4B`d5T)V>m%qDx$7;@t>vW;!)B=AA7e1-6zT^2B>2ulG$b$fZsRCEJ?GPrl9nOD8bB&M}^U

VH9>WLl)ucS^ISW&WDteX-Zy+xir$cms} z12JE=JG&MKTtc%wWOV~Yur&rpO7;7zDH5^ON%a7YB8WJ`Nzr)UQS;_zPxL+&w3aJ~ zznCBad&V^-Ty!`U4L}WBjp#VBhv2cqreRrP(!L#0zgU5%o$AEU%kR0V9Zbsv6Tp$=QXF>4jeFnFl!u0e= zQGFRi`vrv}!n*mr!MW*a<2TinJ8|9#Og{V^Qs{ z@l>^Fs#-itYt2$&0(ZxMn#*+vlEafEt~|A>_^#a(AJ%|@Bi+z$5I}fu4i`E`UNmEFg zIhBBDZ6w~P$`HAgZ_1SV&XM4I~PE zdq>GuX7qT&F2>5%PMy=eygIVP z#ybklm3FP{J?}{7$^xIw8MeUzZQ^`O+n!g2Mht@Xo$#erRi!JOO z%Z6+wg$rY2jA^mf)+tFxaZt>Cy4*L`KGz_HV&=4HgbdkDqg|Pr?s&b-wpPijL0mw&c|A7;#1ReU<2Y|iB{QwDN+rScP`_Ip5|G}kqEI;DDCl2i7 zKl64A4;wTXng|`Q;5AIe20{$suah=^mY*ja++YFUi}dpxypmfm!Yl-NmV>;k^2vIG zW;*xqW<*vYQFPf|zio;^p3wXbRk0QmJu_QWLzzIjQgq{B)cH32@4EFu`~u zBo&|wJIxH^U4Vw66P=?$*7&;vdM}MX_WV$iKvdAmEAP>|W0G6tMc(iyP`bLP*;6ZXmMdhR(8s%+WcB7WvWV$ zGO`>VH%z(p>sp5Lc-i&8OTyT`(NyDgVvJ(~7R9pPik)$aUbShyuuEXxp(QA55*%$p zc@S6CMJ*K-i7x#SjOQDu^xG?HrMC*2i1nP+78MiAa^Flzp0;8d%AMsZs+Iz3)F&JD zs9`EvGEtfbg{q{)bIJ^?v~5HoLdTIfdGZUK_%~z1)^yVb3P)>8<-=fFv+ooy}LFDW1xYxCeY16!od z`J>aLL(v!&7Aj`+Qnr9|j&-nI2PWhKiR^HRRGDVr7Vknkc*H>m~?Nt|6SD3gIJBqGh&(!4Ub%kqgIj zW~hNjc$e9wB{FB~^Tf=2#VqccH22FQSYZ>Tt3;1%<#zU#9^))6tz=OOA(n>#DL~f0 zAQ$hu-4=7Yv)tD#wS>ADQJ0Jv@g*E;>>hCzV(x8;+hUs<+my;nE(}7NQ{{v~D;xh* zodDOytXC0+`p%|N5{$@0%d%yPk+Y!C47Bb>nGPh{+gU*@DMCio{)+pA<@R1tZb=lX zzQz4=iWbY}7w2nH;d*s|9T}idSHSp~PF$+fX`4wM^OcS1MnLm<1&NkfNJbKJmj&fz zj|3uRWO0pI8g`3Dn}uD-6}=neLs2FDvLLp;iXFk8D5hwptNtR(8$v~w`-Plu2)cJ2 z{TK9Yzgtb=hOO9aBhFEUzzPzhp6b^5Vw9S|NC^THLZ@xOvc4g28ri#0HNsU8T?-9! zHZHLgnRn>#w-c=`_EwrTtvZFHOP}e(M>_C<1e!&=t7z7V6SZ?}4(kdv7Pl+2A-Yc0 zR&Kn@Zjgc#gdxI3#b_O$rL0TG-%SK`=6j zD6G;%0+f?fk}k#wxRi?EC?U&8XF1=13p=cdY;LUDIU^vxVj-C#u*wkECPgrm#+D=J zjHgh3=n% z^7RPshO#m3J#a+ZB->xrOYYzF|8MVGyW2*NwBN76ufWpTV^Sd@UUlJyIZ-S-<6V2~ zwdKt2YJEtMXo`qHfB`^JwAcUrtxI>K0Yb7oku}K(IL8(VHu_p!sH(1ds-U^rzZ=0# zN@`Zrm+`0C|AsZQlgZ9;^=4i#J)G797-h?1P{~iiIE6;zrqY{Kx(pI@Fhm@vRl8A> z?{Vg3j!*k(rikf{MEVYf zAknoi+0ESp1+b|7T*{Ev4d=k}Y*!}QbpuMdh1h|yKa;>RDvAit?pk=j8u;wfDX}G+ z@Te3-48Tba6hot+2a>%8$gzx*MnXHxaLpuI4hFa}j+;7mMDU}qWncwzY8a4~81W~b z`YB~kQYd2VsjlEHT9y)|T?%?q$2;T?pV&B+m=@4inUN8P^F=u7egzz^qI1AMro@*v#ch0BgQ){DI%@h;)3rE^8ZibKPJ~`gYB}ZF@>Sz%X zlU88t_deR66=6`mHWcn;K%Bx6)F=2xE-*4)2Z21kue)f;N2l2&Gt96%c%x}?{#A6* zm626UFd%ozw6ZHutvNrbUa)2c$)r$T&dn%4F7>f~ckGp`w$nLw+WV)`>{7&Z+_l>F zjv6`-AzKC4i2;_xIlraHFj@m7Zem7PNH%f>vba{6IWdNUIb^bP&4~ z9^zkO(jq)0r!YZwCFc|59QX?MOyfSu>|GiRmOL#~*J%5fRY4JM8b-x255hTzX8BR^ zWl1BOSRN_C%y`vL+KfxO6iUA>zSKP4h)u9r%W(#CGk zWr%rchxSfd++2jLv^NAIgu>_E+>wu-w?BR~26v_iRE~fS142A@k;yqtXZR)svZ&XT zrcGYT8w?=D4&6MWk)lvZ44rn{G>yFEP2qA%M)l_Ql$pc1o9$v=dnW~%&to!SjmKXI z=P--qDi*|F?aw$KvP~IeK~QxOdiDr626-qh0avE}X7GOaW@aq4Fu+J{<8U`Wf4tpx zW|8t2@9f{Z?&0sSkMFRT?`uE*y?dHY4-DeEBUy3+=zk0<%%}osu~LsK`(I`MdqnXc zM@PMG*Eu*o?sX3jtL^_-?0=jJbV@+}``>5(9}WiJkpHdUNBiHPvj0{5zvBN7$p3Zx z-%;nF;{T76|G#^Fa{BtY6DR2do&R(??So?e&rZ8jo&P)t|95O&_@U0^Bad#Bk6R*U z46eS7)=z`L4ul(r3JYy5lXp`UZ0ts5lAzr(h(meyFwu@sm=?qQ#t!Au8x*nj(Gu-( z5_g>it8l8oSa;~EWLTEi>4m&f&|O6!dS1TITTaebU+1)&^yeb_KG&ko_(ZV~aaEp^}#mgQ6%nK91N8QjrLscA3W z(C4%ba@uF|+{UTi6qWv8$$!5h|DU7wLAzh=>PIR6{bS^R?^O8T75}gJ|1YHfciWwA zl>q*6@_+iH0pIT9E$|io-|P3=Mf{(3yIb-9hq%y%>nEk=TBhgb8+7zTo&O49LD7ee z5#b3yLAOtpuRj>YiX+3uksz`spUpsq(0G3NhbO z{n`a06_f*zak90BEwf6q>qO=VsO zYD5FZ>yTViYZPY#+_l!UeMdM7d*wfl5~a^K4ZloTjdm53Inq=!mUhjO-h5>7Ao$qK zu%RO230g))-kOPKwH<&uWZ=|86O&2Wk;a&ioh~fC+r_&D;L52$_JD3G$$GZn+7|w@sQ1@?&H)*&0oYW4{e37pRd@Raj;@%E8D$QJ&|sy(E_&7r`tsjyxg1R35vI z6L*npT8QF+Zh#cS2uqhYlt|QEgl<9%f-EmE5W{SpP&&uo6N4Oj=x`;(s-=e43L{S> zf0#JdR4jaxL~iM_Q-;M~?l@WSmox*_(oWqSqT7y%2Z9bQ-r0H;h%c}}_Z@9Zwd)FA|DE#F!fTO%~~>CM2XQ>ehrTv?QFE2dRX4N6P0 zO@qsaUd!4cY(p`NZgC4EnUUMJL9a+Hz!a|B*hd2#0zTs|T`SWTW~en_ad{gjvMI-Y zFG?dc)nrdf;9=)-%5#%YryJR1UN`M60_4E@jNFEffy5acA!x~Hn)3^S;$Ajo&!u-S z4)Z7N6epd7r!uW1p+KcafW#aUxCtlIjdl8zEbZz> zFi%m~XOqc)h%HQ!r;$C9$poe~qUr=8Tx-maEEW}e$a#WwMEYa`^nP_1k@aQDxFHc`Jv*HNYL8AWzp=C zeJ_xyw1pTP98A07Ky=#2oo;*HnNEBC+3`_(+L_JWIZ&zFKkV&OKJX-an)Zl7m2~LW zC$D-vOku8&bP_r&#lF$`uFje^A+Scm<9Lu>O2lUFV*e1kXjzmaMW@)H&MZ+XyuhG5 z&_g|$0%|3dmC1ya6`es{#|VPdF0RuS-&NYBC&Ea|tTGW)%2;O{AhrvYx{iaupE?*O zCz4bbm|b<%Mj*OP>`zh19tM={()C z;4K&>RhkUwm|eIq9ZdhAZ3KRZ`n1O6p@1o$^zEh%E8$YOo>Wha{BRUdh{}ZvQtjAZ z614EhK4&mbMJ*f#=4|{+pThkdj8nvKEBv;Ps8vyz?7RE!(f$jB;d6uWY74Ty?>T>6 zUC1bkZ>1H^SCG#iKF+8oKI)6j&Hzd)mC31WMd_I@B{g-JMqE5T-?Sf&A$ z;Hv~47$weIH(k5}tqSO#cF-&e*mMLfFC_LZhi4`TkHQIC7#&&-VD5*0vY=SUMHV)z z(k7A?_{!&CngE0vqE=!l33knid$}NoMrPppx^6+v@9tEg$cDji$mr(;JiQ zD{iVQVkWE+CW)6ye#Q}hQXN!d&GV6b=hbuQmoj7L8IIItL!OE=rod?!s30~^Kx|46 zbXCYPcZ8soWB}P@a{dwV|6(E0WMG7fTk#-dnolnZpQbVn7{eT!X6-cl6xBGTAnnPd zRzpXm%*?@?wN6`ctY#@w_4RlQFu&%;XIwj~!PxxxI_Mm=VeKzsA(GtV8-Dvrpf1hF zb~2JVMnMDhmm#sJ!6I6#@j%nA0jrM?;+!@r+aU6c*nzK{wdblh2TijXe%4=JAg-qwQ*efA}$6aqb_`+`EXaqpw{U-gWo1&QCURQQ$vikxAqe z8#i8^%n?%?=HUW8pMa9;8>n9*)kW)cEOXD@GUL4bo-yG(T?|g8>OhpgBxe)Sbar0D zM?Z4X9aX-ug9XLyjA4eeJUxEMOK~Ih%C<^Lex#mm?3$+FO?JN_Xc_jGe&V(Pjq)$d z^Y+Jv{rMXo_)?R&tCjv&*?%hgPl^4f-)UFp|BuxE69t&G@g6NeU$g%Ju@&t<{ceT- z^b6U4c=@dx^7_aFTSkHrtlxnw6>srun@xxI$sDCJ`hvjoRA0dnz%&?Pssm1-DWShX zE?D}c;IaK^Nf}v53&N8#XS(vAJA^1b&H(wMCbM}(y+T*oP6ofKpE?e>^u5^59LjJ20}YY+l-m) z$4M&luS(4cwf^ZkWTT3LQzwjW-JhnkpU8LwlwI*DUUI1et27GIpJMrIHm;m$lS4L% zWZm0Dat1l)J$sjgQP|?C0s@L%L`Z5H<|uxY6dJ9N${T&(}6Uq?sGE`XnQd?K{AbKKK^idlh zp4^N1Ava@WfhgfE2>ebd?T|gh;>wTKm?2H=cXB^tM!^wbLBM6D;Vbh^AzlO@&~mOo z1j`DNSyr!k7IG%HBhd%>9g-a{mmH^*OUbMVp5kltqM}-M?S5nEK2AC3$;wxEBTKs{ zBOvi0B-XHycuMxCX2wNm;y>TKk z$zinfKG-!lnR7kTk75_TFTPRfkRCJCQDy(B>^~*=Ki&S}L1q7Wl=dHTejJk%@IBdp zzGDCB_6|CQ{eRf2;y)hF{__K_IQkn0Ue4@eks!!U5JrYYlJcbgHk}45C9-BzRLit= z64ersN}nJJ_zVIr+J1EGff-xi{Cp4j%Q=`N!H9vkj#peI>^`PH(NW{|2iDyztfbnPj=aKmpJAZryG?iV=;09D5gZM z9PYob!@c&k*Ut5Ma9iot7h*Q-IVf+^c9`TrW+>VVbjP&{(}_8id4?>b{7T$d$2I8~ z99BvL7Y&QhBxrqMQbCne@_!}&-yr`R_#cDrQI-GaamxSj?xXX#D*O;$VsqfllLE`4Ya2C2v?_vwo7!hp^i65y4FuSWbx&Yx5 zdM|6r&@gRBoAtziCer&^JaDE#2 zVTDPQ!x<)F!RIV0pRGI!q9pZcmtVriyTsG|I`nYiu2>4>F=5gQLI6bV&jq>g!kulU zqd!Q96Fld-pSzmg{xI=&a7*{+<(*5LHMM-(J`Ej8EI`XpOZH^ z>WFn1E$)Slx&PQDTBo<>m<1!22A1*4r{qm?I-#W=X5J?1pz~imYrtkRSO8}y68)x_ za11K1+2tYS4O3^R8N(q>!6@3p7G#Y3E9lHQwDK|EoH|HRTMy<)c3Twd?PgXtZAQ!%mGu^Rt)~WIdn} zM>C&K4%vXDRQVl{ivY1e70n~s!#M50#K;CQ7$M!((+<=yf_t2&D{4mp?Xc`JHds6F4d3>sdJ7r9i7*rw%LcX2$vvdwp);qMK36C9rvr6a>Y*MCH()xhst+!j=MdHSsX(?^MiOv@j`F88TKZopYvoSZV^h zjbeskaxha%!Yqig-ROK)@N>2WvYDmPWDY{1ItQi^n@F+5&5*0f%vc!WMbZN<3i*}g zsssl8gTR0;$sX7E9-c-ZtQ5;xAV2wGH=~kWvg|6dbyu&u$`%HV_lW$ z&D9ekcBg|9g3%PxMklv7e8CVc$W_0I(wH+za>F{L)6;n=!6`cI!@Q4&x3NaT zXXyf@Cn-&4$6z3|@ezy(Ef3;K1j;uVdo=7oybfE)itGrK{@6!U0z{VMv&fVZ`${-J z%<|{0$;laQDG~aa8XZ-gSfUt9XJ{@Tipu-Sk|B*4O6XVa?~rm zJ)H{KP_@>n3d#2TIgOM~<*}vQ^s0)I1z{@|I)P8fY2?~M4(Py04O~`b3(=7t_yg&^ ze5QKo6XN5XP83yc;oFh0HL1DN3u&&z?TH%p%dnu^cCTKOB*7D>UkK2 z22_e?KI!&o4Rc#Whq)lxq0-M#fchL+H>(GqV3hlb{Zu-bKULd>D4C97VMNM`>ZyLA z%?`5$`=8i3w$5fr136J59yTy?f~^2lnc8l6zD?UXq>X@07gZVBUFPpVTf9M6oWwhC z)gvF_2(>L}(agL(_b=?a+R8)^afB8|k7EKr`=oCl4%i|RmrYGB>ktUiEO!3fRUKp2z1tzo_ES8k9&F&6XD!jJYI{=eg1%je=ZJxnL> zBclmCurE3?KpCi3g(d_TACZj(eb2}GH@ZE>nXB)_TQs>Zn8O)c8>2#+RZ5Nb8o89d z*w;Q>>=%SkR&3aF`tGHPy2|l&HzB zH+6qyuGr5tsH`@$`(N~^`cNHJTi3S+`WB9H&@j`m7V_-w?alq`y}jI6xUD9Fjwo0R zvSU3>3tR|(%Mz)hU6$cbag%CxKeg=RRfR9?#XsMC%oUV%QrY zE{D0zO%K$e>^Pc_>1PH&4cF+YBY{BO<F$=6LI{H`+aF!~OulqQlKzX8Mo2y*{Yr842l@r}6~6B& zS|vsqp?)ZjIruSt{CC;o_@5_&)WsQ1Mj^9!oJxK`iJA^hGBSd5_~6Lj>y3{p)G2q@ z{=GfO0z%kMR-Dw_3d$#Cgb@;4_Bh&P@iY!z6|sxv;Ke%e-GnzD^%Odoe62M}7QLoj z-fpFeSN6Zk{`ZU8{|x+(gTqd>BOj;z58pAKJpH*J6p*jj|N7l-w;2C%Fc?(!zlXB_ z{pc>W&1NU?0P`4R+HdRbmvv%j?oH`ffy9;Er6uX6h4_Ikia(zJ3Dg8~2nuDOLlEdn z$Si|&Yau9X)M?sL7yf~;;lLGz6X`NFi6+V~OVx{(G!P}(^`+D7HXSF_g+K!l*Qf^i z+Br=d3zc@iM%}|=g^^FK4Xu%!749(HOo#MSd+DN=73eC7&l-`L9%D&99f1J3e!9N6 zAP|n&zVZ?H(f_2NFO)&%!^_MY4eeHD-w;xhTseYm2BAqE(e@G0vaWoFhqdwt_;j4tLQDk>-E(IQJHqvKp`yCg8GEMLjnT9Z{vnVIB?tu+cz!=N?}Oq5t~@kgTRT%~Gpm(P2-e{=x<-uKR8p@b@0?$jpC%%h7h7=( z?l8(FmNynJ3Xg&xbTr}SLbLG7ux??a;Nk*d7x0Bl`xJ4E%*3bPOKkn8*=(ts_Z#4DM!a-!-y2n24W+1fc9@kmU_w&@L5= zfo|&BL1q=KLFHwsisNl87Mheq;*)6UavGM}*gq$9gw(^2+rCQpSwI zfo^}YJ7QT`m((>7v8)bAsRiG9SI&zOi>3k(WOf9oo#ZM*aGdKDof6`Ka}^Xy_;lQ& z>b0Ka8`nyw%$8B;Mw4bwIA~pY|DUhyzpW8E0B(_^3(Mw|Bz3A>#7Wb9?_LND8H-VG z#1%}j4{mS~0a+}TAgszNB&q@SgaQf3_k~l;oVn{!dtvh zGsxcmZ&-g&=|d<+O?%4Vu{(RD1TLzsvZaKhzoayaURUVZl3Q4cijpVDbkV=7pVrYIVLIOIavb#y!O(k32Nm%C0Q9jFO4 zV+fhj_ReT(Uxul;z(aj}{vGLYS@&^}H21)`M4-DXtt91*us5WP$<1{}HLnLI*BhBk zS%_MQE(Zlv4~ZSwBy!`)fLoJEIGIQV7nvh9JDEWDF$K$$Y>p=rUP&E-Nb^gF$FdR= zx0azFeV!q^&X0O*mTi>cuDnn?m&Pm|LkpI*d_a~q(Xqj80=L_f303woq=;Nxdi{#h zQB<5ID!&jskj!C@!V9S?6hl&lXKlA-Fs^gqASrXBO{}d$|98oe7@5Ezo-6R;lKQ1`hR);kE7#uh5z_?_5bk<-d*CptN^#` z|D84vUh(|DJ*e`(KA8Uh3>F(tSB*@sBvI(oUy=l;e&DBD4*Z@iL@{JNcK||)!&2qj zFmP6k5_3196VVe;3xc3E6{xLxhA^W*>@Gw|5d0d0#b@6`Zkw^THMX~*!*D`IDf774 zdC=ui5u*VR!U`S6%-4a!V4>gy%q}ajDwn7u8hzGEkJ%O;*GIG2IxYaH;PI1>=n?tD zbkVNZ++u&m6HmehB1ij_PXq6F>9C@QHg z7<%|k3ZBk%c_-aGgS!~sMNKc#g6AjHOGYPReE=~B@U+`rhp1(Q9($oMJlaeVb8^57`}^ zG-pU%uRI0_f@;)YaNzs^>1!FEBb>_228Wqi<=H-_!!Q!zM1iN;CeuWnzEHA}rkxwW zsMc}XwZ=cP?ZPPDX^ptsnAqvYp9#Az zt~kojr ztDfOKoW;F8M%&uk+c{rKZ#r9YWbnCee+W;@PUA8W0wPIRGNKpf7EhFvbRq{+7$t-B z$xv$bq>Mc#QJyiOV1Ijv>xZPm8yW?mbb~;F>M3}?E~Tt6qen9=YFH^3v7qDiN}Uh1 z^yJ|{Fv?rtYYbOEl+ba zyL!L*Nrp2Z#lrmNxt$>S%qS~N60D!DQ)F)Xzk^S5u^aQ!1mb!c|b>6gJhA5bfD+k?JiS z(t^4W(t9kcHzT4FHqy+AYgj)~Ev2$FMRNO6Y`%b^x z=^hNK0Ki9M|Mx?}0s-+!#Ln{ad+h()@;|i?3i$7x{^6j?|MVc&`{(aop1gYbKhICc zZ~ruY^Wp66hqLkN%Xjv0WbdcTmDCO`%X$05n;-vsNWMU!MgI@2-^5G170>P8)^Dn( zvA<_oxBRRs{0*h&wOgy(>dJbdV19(9KMikv@;9q3De|BUN<^Z4T+#gmq{nG=?Z}(D zHUnL~HNRV*7=1~^mil0J^EcFbYZmyrT#NHGw-)wqKfieO-)GOqKfHN=_65GZ{PF$s zXCK}@AHR5Y^5-u!DWBiId-LzlpTW;91X;flLA0VwKdmeH@h{Kcy?^=UNBFUIxt@wR z1W`3__@>X_j~`(9#ryw#s4e*|8V?Y z$A2Ef3RL|6aq|E17$L96+Zs@)8 zLva>GL9)M2;{B-~?o(V~k>sEvH%;SYH0pMouG6+S^T3sl5pZsp#zI&#%mqI8p-3AF z4V<1?3M&*znpm@i8+#%hjrva8DK8QDv&+%w(1DhW-<6}kHH)LrPenW$b)bq)ue8i| z7GMeZJ>SaGO;6${E2 zj=kzSozk9re!Os#1vUglN=rnuOA)vHrF$VjYNG+b5Xy?u2j2^*%#kzb-B<`dP@&^o zn|Bc{FXGkAk8nu6Bd4?%z8AW%;`u)6rR2CinC#Y4q%KZ4uKOTY)uq^C{tiq2h01!k ztYwW|`Wruqf-7G8UapX_uuC^i7E4NY))L`*iG>Hb!o{UG9~q6H;@tAcPxkI(>W5;B zR@NJ=uAd|1yG;CYyV|xi1XhB}*UynA!_Kz+5M8`eD|FKYW}0_R>D)oDke+}z+h#?^ z5cK@1TY2R{-CZFtcanYGx^WzB@|p&(a@QFY#$C{4Ev}2VOuwwxD>q%>2yp_Aas$(B z2RI+C+EIZo83S6yQ5sFxb6VO%b20QV)Nab(pf1p?b&AXicfA}tR@*M$9;@vNNQ225 zR`BqK{?VkhkZ-S3Kftm_r39#0-)=8&Sw^{F&lnTp7sJwn4C&U4g{t& z@sK8aHx)oWi@->{@!GdBM#*PPR@9@-kbA7ajq+b{nh$PoWgQ1Vu|4V!(8L{yLcU~n zr*E?mg5Hb0gVN1@7Y@AB?k09uDN)4@F9$6G>^}R+U#<8>U{c%e+tI4*|CRoK2m62j zxLp|l9*zE=cdq>|`~Nokf3JI3^#2(g_ACAWA+GbpyZmS=|LO6{on3+)m5h)sq}VvV z65-WIy=v&2Wu3e0bn(%GSL}L;@B(AsU5+uW@5qhAp}R?jaAP>^9QKa-?e?I1*zXSU zXU3Y!BK$BuH<`NWY=M0MIWCLNZTYTe#qLICEEwbaYs|jRqog<7-w(F)w6%;p5fGrT zh~bSJT~6U&#k&5v?El@}_kX*3|3Aq4|DXi_@1WB?si7S%lV?9XKYjVmIXn6DcYgo(+C}^S zVXs%ke?G{SLA%;VZvXIbJ~%$~x<_8;uzPrPJZ~Qy9UUCC52mxhV8>HfLX3KTEM{pG zV>ZPL2{vnp6OK&t;D-pY${^;P>#^kVq={)HhSrncEYfr}+~419HqI0t^c;MCp8-n! zcpn{qoJG0}DlS#M|Eu@^J-`2t4hP583E-oC|G#^Fa{BtYv-Iv~|KIlh@Ar%TKZl)e z<^S_Q`oC2Ai!b9RGEsAOM>+>548Wgd4WZ`&YaEp0pGstMnW0;y<<6xLo3vWNT;?-s zwdU|KA_RZLa8C$@9sg2EnYC!{Uvm-$3-SFCRD5rb@>lt(%rqP6R30*&5|n)}gnf?H zc+o8RSVu`B0Z{_KNg8*e_+np#`w1nvW~qXti3Vk%q0GdFyz(o?Ag}EImHofu{XaPF zSFis^{rUKM!)9f2{VvW4@~Q zfA#(^dH){`dcErXU%mguev*pS#!tlGxi!A={eRf4@PDiKe|1&w|LXn!uey3>vg$Jtl|3h315obpVO4UX{Oayn7 zUz7E86-P6XB$h5gVxmP3KnfMeVO%?jIA;g$I-D)WtH2El)#9A8FheQ28MW4NP;2VnT>?NF)shqjXWWN2-F1+TevCqq-Cc-aHLAU!w7G9( zh4zPcujGTOv(R@=@igZ7txJGI*<0uVj$Qg)V{+MG5hdxc*KQwmYE;CZD^NrU6^8R6 z$5uWhS$9_djnC_HH_wkQ(x6YVNY`(nQnye8A(SZ5yA>4Vkc z$I)NK42XDS8;>~wlo_kv#w+*257Aw|9{5W?9Sxdx8eNKz7MMqgAeOjO1Q3^etYQCt zWDm^V$^E7}Q&?GU8ai?#1yHeI1x1XV>%8|aU(wgM_-!uI*}@=UbMIudnAXim1 zK~-#$pips)8Ed&4Hx~Bk$)D{6!?@RhA703Y9s6t{>_5luYGM0nB7!+S2d^amN_crh znk@7T6-qmrb3ht~m0?VnH47qmev9cE#Bz!WD;H4AwKLFZRL(DAce%v&LASkFyBES< zQN9SSY%0=?5TU&k=_2wH$FfeT4IDryk_0=qiZ&wVNOv0O)5MN8p>51&)8;5R)uW}m zO6+Bnq@^85XbuuVHNc#~%x)HL%I)YTmhOc=gF(aewruJY%%XtD;p=O$jQmd&vIgHy zVA9YA1#>2X?Dl(qxeEOG7MpfwXxYOkI!X>9pUKjHJ$v<%=9SF=_J^02^)j_VUydku zPhziE(7hz_r#@)XKJ*$^W4^|iJ&NsH%4QR%dYM%6UnT$jW6OU={*S}XQ6>L9O8IX* z_Cr4%kMHgD?=Jp7JMn-0UZ;}(D*j*b|6fS|?;amk@qdq!|Ic7UM9XnBrK84sc?*0k z|MQ?--2X^{75{&Tt5&O7A25HY{frjgeoHx@>^HprISWAXQVM>uUZKlHLK-wy_3!WB z{0OS5Qle8gxdi3*PwNzqx9vnKprpdD6I8tsbcMf(I3bPGM=%#}J!5USmAG?}ZksyY z@NSz-x2(NO;w^UI85=J^5syOn&qxvpjf0|%#tE5-8FXJfPqzMO6dGeDNh%~87oHTU@V}c(R(T2?pJd&9k+VH`5LH`!2i!?ikJCo~y>T9wlo!q|?+-;}{hljHxu4e*t z`7pI6JKg%dLb+LOS3bepNN<7tVlK@6KTPa^vvpgz`qE#9Q);q{joB~xv%Y2R6yXjO z%hBDu$Brt4<7(Qo=q z@ochnB#ADUGvhD;KohTl-9=aE6O=6wnKS5Ff)vU<==t-xK%&X4G(?{Cj32Jnh(i=d z>x%`g5bcLq6eba@t_ww>$=Kb{k~@?u-Ek1bNDNix^fyR}5j-1bR3!~Sa&)0c@SY!X z_h@pPv||+2`6-npqL#iCvdYQikNE|eOsG{igia8Z=azbIZ=@$EYK*NY+7$6~l~(IF4egFa^eUi~eVlt25J(E;G0> z@b7au#nBuFM~q8vV}6zxhmTf0PXuVGRK`wjK-EPbu7}9h=;L;1Cn;z6{WO$&&pGvH z>A8=-Mey6lY+t+yXT+ES;5}Y5w`7t=*cFPK=WKcKHzxDmD&^ZmtcmqU+zRA4#94ZQ z57)V04ZHORo{IbwoMa6umn)iSYWBj7JvC}YE6A^4nusg#15U0&Sqabj_2{~3Z%5FX z`gNmee;R$hrm2B%U(f+7>#ys1*i(9}i4#blZtC?5#dD~ydHXT!kt=lDA@nkwN7`M? z#X=w{HzP{NemSRd(53YZ?V7+KV2fcI?AfAes|I4%PXxOJ+3`9=iQ1MsA=j;I=aaKu zVPfX`*7?*Zoe$^Q{++#bXkM!Rou|fQ zdo;3Z<1vnCJg(*YM=uK9wCdVAw8?8R*gE#Hn4fU!wo_yZs9P;Zf@Ue2yzK|B@j3ciRAN z*Z(`6Zl_(0|2*hd=l>6;|Lfy>Oz)gV=28CAU7={I&+_r5C@lo&Cvc;EK$iaxzmQFa zkHBROtmeS0mg{C>5j`%9*cg^!^wb>4Ay2n}9|hMtwyI)wK!C>#+;{g$PG0CnT9uvtkhm6O$D zXA7D^RUL?gZklz+`0}%=Q(78)d{5%)-&Gq%pQ!SGg3rPY|GxS#v|%6rcjMUIsz;}O zh}IqX?Z+t1NJ8CwC9rb)G6Wj+=e$MG=t3%x05vB?!hq&yE_$S(maF#EOq z;P;q4U}85+Flq{C`C|$k!pldID z|5>$v2z|1tz}9;OjKJPk76ts4Z9C9xn5&+19UpIO^h0@jws0=&$;7Dq{Oltd<6uSX zGo^?{p-^nP+^|KaEWsRfGSM3s(~9iVpH|>s;^!!F-n!}H6@Sx#f6Vu=phNuT1$@%G zDu|}ISIGwPt>bf$)|gr*6WJf550ihkEA^ll+ z^FhrP=}gV?sfKgknNW@N&aei z7Su5D4dmIL&klbuS~4O6Gq*3r7JfG^Zg970|3z*wtcvvRdb{_?Xni7l=K z8Z^1&X*Q}l8;2X&F8UCr#i6(8i|RU>bL={svz*nm@iWJWRZb?E0c?thfE!{1ehhc>`?iSBLq&H!}l4j1d{Ep3P&&j5%sM)aMn6_@75Bbtw&wd7} zqOiv{&&(+8+AB0VU%A0r{fNCZ3gm6pW{;@kjxk=pepc|an>aY07qOeY4&KieV(ET+ z_uo=|F#W-LX^OTu*(-F6jj#A+OO0<65SlOVuk~lQHVb?p1f>g>7MQGLL7X)rX;DXj z&+>Q4Emr= zcWRi;w8CurD^0f6_V3qm_y@Zc^I>7DWusx%-ok%Q+fGKc9|S0DHG4Wbi`N2lxCo8X zu`lp=6}EWnUo28Pi*mL<#NqH4nz=LJZn;TAjT6rds0}2`Tv16W^y5?bEw4LQ_}Aq4P;N1-h)@W z2t0b}oxgkWtk>%uXL(yd_YD%q7wMeNwJ}Z0emtLHA-f?rf1-|r{lr=)Yce&+*DIkR z?Ct$GT(4iBo}T^i!|?U%;rsXhv$qEfsQwAhK(J4rFytOsvKIJJ4l(M0m)hPQ3=1Bs zqeus228=&W8hFx%zr5euv*=^@6w7${Mgz&KaffBfPyYYv;Pt{Xlr5Z5cx?x(p;6J$ zcy`D#9=Z1WGw09z*Ce;0N~B}dh@5U2nRi;YJ9_%L=GKNFT+-eGDRWBS@DvCL1N1Ds zH-mfUHBw7atgU(Q{d0}w6)a9~(b|_UPc8C7s4TJ7`A>EJ^UI$98215Ai^m)uY7PZ-c){(lx=AE2V9S+c&4|h6qhvA;ARss!R(UJ#>^RJw%Xwd97 z_2Zkf=R-cjL4#lBqFL~iOZccqNV64s+K~;0eC^8S&zn0gb)o*XnH)4hUo)qYZ+vOw zCR1ciWjvo`%2Y(6D=)gXv%y-qhq{?hx}I^;Y?q))#oK~Uo;M$FzJb8rqA4-&+HCDx z30M=?77hq89S}lTgou_!!~zLPSR$xwiUCv>MeBmh%QAsLn8C?}h*S}+ic+M4R211n zK&7%+cTg%8wNjCyAXW>4VpS-vs4T*p3AMFq)%yH=eedIZPbbDyZ*q_?Ecsrd#6)P{4(P=-fi72+<&=J1qsmob=!teGVI>A1<6^D9xq!^ zap;>c`C-#JJG$qL)|j%dZ>&YHi+6GMmHqkQu3p_!H&1HFm<5Ho z-q12AQOpW~R%&@63GeuUVlXU9tg-EV@I`@B} z<)=;#T-LVOgVgrcH#5m5w-N>Q1+K$ zognp6PIF3$WqG`2RqEv8+%h*Am22&r4%^#CnsvsIucSdGO~Bf2_TzEd zWZ^KoBWnj+7EvZYyhG8bI#r!(5dN9**3-2vRGadDt!NTy%zO~wX;XHF`=wtpW4OQS z4~nB3FD^R=ebjVjN0LR?$?lT+?)YBJ@=-fHdUJjICq||%qv)-L9$xyrH`8F3I%@W{ zg3w&ZaqCJ8#-gv|PBEY6xeD#nC$7)GY5Tc~;Jn=DiuH+${qSwent<7tGdAh8+BJQZ zqWPfL`n;!g-yL9}?0R3Z0-LuhHmRjjle*ld)^qIQy7q@LzYbi!3u0NS#Hk<3*5vFOMCKdPj zZ_62evEO;!FRP-p`dI&d;NSlg-w+KIYw&H!LRmp0lx- zy=82JG%ii;R_F!APrlLXzRg;+VcJ@)eWJdislspro@xFtqeN$a&w@`Eh$m{4sP$zc z>N~E@q2{G|?20d6nU`}Bs`qZ(LJ2c=OFwlOF1Tj^thiu*!r^$ZJi}LVZn7)6B{pt^ z`^GvN@q2tm?5*JVhOp_wR+w(m&(l6O(tnG2NNrgu^|Ne`Q->WFvO~e%ZH8gZL3a$A zWqq|r;y<->tu*c0u&plmN$}0e^}qD)+?<>mp4MSN>0*8|ucUKT(45VJ>2VA1+XgnA zfEeK&b81Bof8gDx}S2iH?1e9 zaeHbPxv>2gN;gxt;!4p0hNCPyb=cgd$6nrv35@xnMhx~LrLfsUTULMC`@ zTakO^Tl>o@HN3*8z^l_wt{C4ZI+A(5Zp_w%oV7Vov-`>NIPsp@qPd6K+Zs!Mit2te zFM?fdnBwsD)s_)YbG^e&o5`cCUU3bx>ERdT>&B^y2~R&aHlE-!kT2m}PDwr0>Jc=( zruiHLip!n9o_p1#Y*k%Ar@bn03y6yQHtM>iAoM5-&rDdQzM&d4S&x-?WuEsUM_BYb zoc%HG@a{`iwbgAmIyo1A$oHC+RSKcii#RjnJl$vyF)L%8H6OLIaH6KweK%!m$IpSJ zZkuW1`zOPjPa0ZevF8UQIZo*;Rpp+Et&+GLI+`jsCRIJ!>FTDd7z=bKU&=Uk)`POt z_K}tkw|CKmyS`=Vjf?W8>T}DD_fblEJ1k@Ow~mbSjwnNTg~b1|2hwX|M?9^Fy;7t} zN^0@B+U1;B1i94QIXHlv80eI1YxGvEt+IYPpfY$HvnzKcaT{ZHx-Fho=B1ZytrMJR z@20u@o3CYx45rHhy$1=VXNbF)YvZZrT&=a8 zP{5Z-gfgaBB86m36v6m-9|A+50zt#YQbYlAn2~}vjlp8E9PRB*h?48*pe$LO!M0Ky zxoi`*Jz-3fj3X#Y#l#fXem>G#8VUQ3rS+i3-HH%|KRZbkBQ(1|M|6jttll>t6vFJz$lts%hD1s>yhC&g1 zCSN21MPiWs7LfmwyaE4gI|tSa__uf9It=0eLkQ5O{+|c+U&hL75w9@_QwD)fx*?5* zdqHL~*-lJ0ojj2IrT7CVU7N5YS|Hvcl&TB{UHjQ+&jz9}7!nwV zn~V;`#4wdr+*F&v7(^i>5{1N)C3GEJIoRW`?7(dd84Q%KcxET!WBg~vhPW}V@>6Q2 z;)>s&!Tm!a86w5kp6>KYrsT^p1cyD0;oAzKxc_3lT#6}q6a4*AVkR0y7b5}@$)yl| zz){UfCn%#VQRlr}+6!^XAQ&sZNSx;_c4?Z{mM@2hNN9Z^s=v|9=nx3dq2+cjy0cZx<`?gZ}3NZon7- zP==la7C}pJ`d7tmpX23iLP~g(t-KmHmm%j8RF5NAHq$mvn z(kW6>A|MT-fFdp3-EsdHop~|y-ssGCzVqJy`*Q)GbI#uToW0iGYpuOvZ%iRh<{Tgg z6A;7&>fi$9K=@w(AP~sU%S-p=%J=mO zw>JY>*m^+C*_|D2*&SWXojgEp79ehR2b15`2Yfu>bNlb-A3pW}JpWug{6J0wI^h2j z&Hn`dkIz5A1p}FY!pn=!$sBCu40SSwT0!jD9h@N6=B7|OA0GbKLCzk|P;)zWQ@D^o>_8Bc%c*f@hwA{Y-=hP*A^)6w+`PY#e_mdG{vY!HR{$Ux z9pLfD1(E*Syz&iU1Oli4*Z@R#0(1Zp1|k8X`{k3z&rco%cmNy#5(G$q0WZKLfZx%t zAOeu=fdpCrl`oQSV+CdZf`x+z)DmJ3vT(6Cz3c`AHFmaP{}z65q^#`0Ru&$t2tWi1 zz$GH66v%KixPlM?{)liK{@}>4e1FfsF+g95<@{eJ*5ki~*po|Qxd>DMa(@D`#%5+; z$i%%Q6F`CSg=ygYb6Mc=Qvv4}hJshX|2Vn40iJ(+2pGNxpWh&!74Hk1f5nUI5-*{@ zLjHfH|9SqE{paLj5BiCmOA4LY!RGena1zWxoZqn!d`tgx^Z!!+^Yiclf9U_e0stqd zfWZHOEOyGY)ml(6z!trs2 zQV=5d4=K*4PCKfs4OA6h6D=PH_A!j9qM@U-T{LZ?9fbf^}KM zW(P5Iu{Ecl|27X$V19YQ-q;RK^w0c2kH9JjxGJZjry~neRMU~wQj=5xNvo^LDazl{ zlGIUDR|9EC>L?HpaX3LBP!4BfdovS=I~-wq3o9_I6oBX#uPUla%F7b`j_LnT3*UbM z{7V0G@_p6+mt5ckv4zhk#O>>JLhQeagfqJxoGGjvY^}_lKwRGu4)~V;&-*L?pP!%W zhyMRd01%A$#{&Rtzl&3TQ~g&XUSjfx{g6Kq69fu601W`c&I9yCAH!D}xB~*m>~AGx zi2sM;2fvbkKHyjR|DrTOCdSTIrq1jZR<`hU+zA5xUX$;i;9K?|&oAS@TyXP``-lAh z6#zI#1-Sfi^N;4YdF9Wr_(TBA044yAmEEPOWeYL=@*M&qxJ)7w{Ic{Pf(5JyU+ls3 zANJs1ZV!_F8>aY2BM|K?gZwZ7|HJTW|DXSR{Qut-0{)i%=i=o0h5qN`;{T!l{}KR% zp#r@BxZQQ_yLjar_7)M`r~k(=FY=eD+~==hULAni_XY#MGYWwKMBoZR{I7_5(C>c@ z?`i{7{~RLWiqYA{&iv=Vr`bOSJ}={(T)~Kdfd2vEtiJYyfn)>j`&5oeAgxqy)qim;iJgC%EgaXa+YYP}JbwB_0yN&uv)C5#h27 zFooE`-C<{Eb29=YIz)gP0NKUKia?%1))ESJa2Dd=Fg3IPi3BLz=XJ6&wq>_BhjO?% zuwCjDb9*R-OrA`Gy9ikA0MtBWWd#b?ZLwBLm}5M;|2V0 z3LgAxbag!c;kTTgHs)XCWS zZ*2GFyV{y6mk&Ddd)Y680&)5gVEAqLb^eF*+xDNcql>ZA_pb-v&j0^1{>#S){Ln1)@r*JR4;4<8s_aofxcjU zmjK`p72x;B^*{6X^2(pM02qH+0FVjbH@}J+bLIb70RHj?;M#XF!9T77NKnonE5LsR z{QCR{*Y}+N_+4kfz8U}J`=$Qp<>lx5q5uC10C@cI@bCZh@JA`)fA;7J<7JfB{ii7J z<9`**zZJ5&B&Ht*B7eogrc0eF5h%=hnN&R>(>KLv`>04VV9nsGV&)!}XW0HiNT z?b`s2Ka|tI96tvqD|;viZt}oo(FJ~I3bA#uvv>YNAu#~S%z^-y;>wq?`Z>=1CAlB= zWfScmrk3sZA@d`@|9=2}z5iF>U-Cw){Ncm%Rd45Jxjs2>_0vr|1a%7 zKHeYafBzBy1S11H|G55V_zqtAL%Y95zb*wD0HyC$qW=~NXJZf0m*+1#zx)yZ=kf0E z=<0iwBk(`09Dkkv`HuZR|8)N6+nV58_8%YbFY`bA{G31J|1SZ+GxYzSgEyD|3xMJu zj^6y@;LWe|J@oHUzsL|S0Mo+B_=`sPY9x^ZFxmh18a4&s?;nxML40=_Bb$yB_*X6vzqbE){?+*}h^-l%o}W*E8Qa?ap3Pw2 z(*HcbU&a6Uf9(JIYXAU41$g~&`C$AWUimX}KU`my26QVs@MS^;uJBP?gssA~-_;~n!wf~o&`-lGjOMo^41H+%^ zoe>i3duJYDtx?~NvMYg|`E;+h)@h`8HcZc^-<0Zh6>7Ic90G(O+BhYSnfTtzav3G3 zTQ0mY2uNlmgh>t-fp|(KhUa|ZM(O=$*~h56z89UnO|oWYNI5x93EkBMuHlSaT&2RU zYagFLPAM_Jyr&fJ0>_K%o{x`@e`59R*c@A5Pdm7>zw!qCsQ0;u!qa0~ zuNc4U8U5+Wb2Bn-WA$n4C5>q%C2W3`jg576ixc_cu%nEJxNp%m!Wvf({PquBy_{>D zrPsYX&oh`5eec!Ph{A*?U>8$Ju+260U06vn%n$Ekiu0_wvfc;0dN6rV+N@W35xp>r z8@MJyeKB|D=jL@x!j^!`q7bsM`vCOp>lo19gh%lxA+~<*O_L zCO^JCb}&t5ngzaVI$=$cr0%*&A^A*jh``2@T^yI2H-aI}+#2!Pf@ErurU1>V&Md@} zsy9m{yJ=eJXp5d_yzzK+HI^n=a-1@K_VBdX&inR>$$4LM>L#q`3?!z_KSR7RYmpZ; z(UGnah{_|Z!bE7xB>v&86w$R^pqREM*{Vv&Y?kynbA7>%%#{}uOqy|_Q>%kwLpdPT zcplwoHBa?u_2_gl!R1NYs(cy##Cgo>VvZn%l6`q&r77?^?-AGi*L2#NBaP(dE0v%3 zQ`#%@PgJVt7q=hep>L4^QW*(Lm@wJUNkZ(=pC}3hUIk4rF8K)fIx1_pFTR$wW%L@=4)B8Vv8O`7zA;IC`#my+pW1Sa{4GR(5#MQ3;#3yda+! z7l^4T+L=1&cV&b50FTuzGjAeHs#;hTOU5Lr1c^||+`T0u5%aJ~(vPsy=mB_3>eIM8+HI;RR_OZ5ZgZnWx#09&ZgFFCnrBm zjx7%@!sJ~pICgd!H(IWUsK0Ahce`kQa^dIY45<-=*<65jVYpqeu^I?uYO-J-MoSFK z$XIT0NuM7baD$C~D%ybc)13GXox!BXVPfKfqMCMo+CKQ#cklS5Be3Ob#-KYWzt3^< zJDRKW#54=EK5W%YETWSyaW5?Qrm!GAns!^hUTK|?C&Og`nOC+jC!rXp zw&=F%pgS}NPcgL=-FC?J+kDnCE{?UkJ8JZJ8JgHu7v)S_nwDYv8V0D|>$>d)#%jB- z3K7eQ`1twyGC9eKOwNb2^@Hp6`YB%2H{T>EsjesR4xhpxpUEI402-6Nh4w5spH)Gk8l2 z!9KH(7w_$U)H&*!Ga=CEfYN*yQqTra@~u}mMtYtUYK=s&*gKF z<$q2`b0to<$=k|CdzZ11OukD*`rd)?KFcuJ`0?rxcXRE;S@2!RmF%~VZDyK+RtAQ_ zWwatED|_XK$M56c^KX3^jE`^i8pxnNpb-&rKMG}<-`}px^Al=7kJe}4efLC2DR-{w z?aSaW4xEfMDp4OKTz%5Y05#LJ)ne2VP^k0-AhgvCO;+6NO18TrbhF&eVRQ2RqI&sr zk}}8*rBF#4CP$lOByo3C^FA_MHC)e*0UTPY^W(m;k(2Fx4n9m#Nn>S-5S2p8&y0+hPej06Lucnqk zJ>e5&$S9x*(O*6pFP?|py@1Kb!#FRpo%7bGB;C#%g%IXUkFeu)U_+dAM6im=U9oLi zuQ6elGx~8iopEP-ZS^^^!33GNt@5qVSD1|1F)Vl-}&?I)2RlCdVl<}BF$Xo znthCKkRLVr@v(%jxN2PI1r4@gu;=9IKFpURe3vfLMTsMf;fn0Vyg6BP-0_4NN%V6_ zDthzD@b%`CoWoVv&dL74h`lzPH=C>qKe!2{sG@=zJa)UvE~5SH-J(z8+YifN>wV2I zx2Nl%&glzh^K#hXt)NB`#aZU?fy9_q_45Mp{YBbyhT;ufn2jj$e%{4U2Jx9>*MNBU z0Bky=IcBl>Q3hK^cm%V>uGKF(0`z0mZ%kXNie4KWb& zy~+lYvS)5Ssyfrz*^S;88p$}RT-nVy>L}Yj6K^=V0Qs$`pC8MMEy9*By3XtQOGkXp zv`_+?7|3b^{coV0#U+Hm+K-z^P*%R;2AR_ygV~(Iw9Yyv)xbqQ_0=#x6x!#oDfLiN zq4TcS5|g2@+8QEQc+~x>bC|R@jfmID9Y^5&#bdwv1lgG!-o#klv+SVyuxOpQ^y4m_ z4r$YpzB31cR4Z|1i)D?XU6BlnQ%XwN+Ih6&o>s3jWfJt(h~8a8F`olexyLcm&2C3? zA)Wy+TgLa^vsxWb_J*^AuHz1i!j6}NM(i#=8*WYyX1~+z0Hyg}>~(FoEH7$3IV=#8 z#ZWx*D-ILt34}_<77cAG%ZRsOAa0KCUS~~QDB(^k8if+g-92C6KS%+hY2BwEzMIcX zWfp($Y+I?h`}m1Yhl5nL+=B-DamOrM z#YpK7A_;S;?q7R(9;V0lJ}J4ixIj{>JPxB*K)qGuLxmE%F=Bc1dxw|i^(4LA`Gfkr z@O7HhIC&sYp#@}|+(u^biudh`eZh!~u_A!fW9Rb~^=m37ZmLbAWWn1P;G^MW;m4+) zpoe=zU^<#mq1_Ep(F-N~O@)1sg>hj;Rqp_3{yF2jeG@Hh%(?u>9gjDzy+>6YmB|_; zT2s73@VZ3Cy-(%F65``>ou%ElS<3RQx_6Q!D@34jP3oa8;0E!g3VRMI(^?<7!nN0J zT94NafH}+5Obm;>1-O1yW{K!vg$JXyLJy_T-oHK!H_+izX|+;IEZD_kvdA31DUCgZ zVnOC98W5%BNauf3#UvlImuKH^Z^Y^SC6A)4g=kB>Fs3;vt>#ZDG2+tN+Ux4hnBTRK;e1TC z8#>9j3)?*`g^hk1E14A+OWtk%fHe!;+&^3Xoc9U#Aq`fvMO$NYwwMh2a0Uz7fvuN} z)f`s4p1Usg_owx{_QAv{F2t$#$aKtR;q5m`VT}_TL)%llu(D%V*aFPUO~~tFVZ{El zU#$e;jO-Yujt{uF*q#!uPjNXr3_B^l4{O@?D`h_!Iobq`1089{_}}oO@yqdl;;){p zqTQMTZ{2oasE>UzNjvqi;VERTlfUL^8(z~y(3E{^JmOi{Jd!&Y1Ge76-=g^l`=+iW-njZzb->jHt=GY1{%rG?XWcDym+UB5>7`ED)((d?t^8fyr}!^U-|$LF zP{Z!|eUWXy`ixH(pfQ;4vETao`p5w+dRn^*W*S%|=>Zg2ln-%*0_g(V`+m? zlWXInjg>Wvtx?+pO@3u1+lCj-Y5lk1U)zPjZClHW=9>4*wx?e8HEyo1LcB28oulR} zF}Tfnk%5%r7Z-lwu&K0?Pq3N=7`(3hY$_Z!wme?C3-f6>gN@F#oOguzCeMqHTr{g) zOxbPf9Ka?mylNi9#M>4P&6gW*&(C_GCjkKCX}7WG*{hV^&D8bpJet(9M`4+{XhDM?CT$H;QQ0Hq+0L3UFP z)MdJ0%^WOTN9;hdss3C~vMAD{elwE!86GG9Frud*bHE#deC%!++2>nK-lu6a3r7~Y zVJuQ)A)I@kl3p>Xq$STp81kv2xU$l$^uh$m?0qgiEW#e_`nl!x!;bJXU~T)Jy-OFK z8vZq@uzIht^#>OaXB)WrC*BFRv+LXS85UOO5_sgb@p{v1($x7xk5iIbFmDPo!j6y`puj8ffNNjT8MOdfbvZb_d=8@R-ld(|i4ez<8`7M}lNbBI(h%;2VELZlv2 zVlF04ORm^(B1%L6JN1VrJqqEgO+wwo#yEjgz=xT31b55Bm_2%f1i+C^R*!DhUXwx6 zf!0dX#u<32`83JqP%Rk)dtM~J!j3RN@iFEs;7o6qCdu4t5ptDC_J5!JV3V* z`%VWF8fPwEyup}M{^$mh{r!6nUSpN0Ri{rYhigmLMP$f@t(-qpA&d{)~6(I zB^F1EK*i%JEsgkqf-mtgH&xc$gRsg3*KpxhYf=B<_hm>1&vF-8&R*0SllTv31olX5 zNzl%&y=n0OWJ{aG;)}X;^`1&R(BhRUbHeiY(8*l;;5kEPHIIyhlIM-9gA{5}IzcFu z(Uymy$aqAyR$UHKPjrdXGaoeXWyJk46xLKS-*zFEU9{5&%(Mt&u6T-e5 zV=c+c#5)VJH{?vv=(!bBjdCitZt^km4{2x8xZ@A%UB_rl!hbq0%ewe5tcNQCNzWBE zvW*}-Xi4!#uxMLZEu&6Rc12h!@tdcIhgPv>0~t$u1oyqD9VO*GsSu(=`Xae?v6J|< zjr4AC67+_5pIPkV?A4*xN+QlgSyg2+5?~riL4|NaKh;U0YL=#{fyXV-A`#F~ok`8~ zxUj8sRe8A|ehYTL&9ybp8pz6@uO<&T|c4RfVy{Y&1RQ130)O8kUs5nUlk7UNn;}Pv^WUR$YOcP z^L&GX*2_217Qqyw^87;?YSi7rt@#OlNb3?~#5WN2Z3*U1X`pZUj_b*+j~Ze1 zbOZ147Vg0=`Y3H*poVPWrH1kBV z!cih1A*+hRjmW}WS;u&Z8I$=g5ci-&@ z@mNy$*;IE5u{rSIk|ZfxnRhoQFT|c?b_r(ey<5UpK6-)1Ea@LiE@#{Xd>>*ERsIe< zT2~|#PeTAhPnJSu)UHV1{oMKvCt%Ae)4g(A>=x{7U~7Qk(P}`WZ0*3fwpr+B8X!;J zXPb}O79RIe7el*^-95OJjO4aCP#fY=8KvE7NuXucT}@$O$=&oWXbJC}y;|#{rmfSa*{NWvEgQoEUC)Cne!SJN9(gq3Yb?2O#aeL zxHxs+_p<`JJ!d+r0=%kOf>j^#9TuK6r>(>7i=Y*l(hZ!BJ!dUN5v+ywYuvk~8nc7X z-lT#Y_>;iU3X}QBB8lX|3BxtJD8!g39gzy6bR&oL?#1M5so_gWwKk~P{!mBECHB`O&r6C2Ws&&0K8A1vw*7{wYX8RX8=*{08pS8Q!~*Lx;H zl|GhALvCUznLx)MP7(o-OkrwOjv4I*0@ zy)RG{>+|MeK2J9%zrupoKxC=}5=k)~Mt}#G3jJLq6_X&e4t$U=A@NLO>az?WLqT{O zjaN@dkz3pXDtT%g&9q4rDfBvKctRD=_vq5FQ^y|_T`KL zPQI&$Qs6zt$_V?%eCl(mOnC`qTrBTXid(YMx3S_5nR=Zvgs%3*Y^VYfqu#B*W_80Z zd0xsSo}p;qAp)OKNt9rU&R^_!xRPaV7xuv#i;MLc?v&*+8xUTUiWOj^h zlsbl2G5Op|f3fiiZRkY{ax6hYS1di3M9t&k8$%t+>t#Qk_H~vK-F}J=natN$o+>UY^3$#x>83`x zcy!Wa=ee4`XkOV>#VwFx!0+=SWzw9WZn{eQ7?4+3Kq9{D-4s}NTC#g+V#Tg(s+X?W z>f#QI+qm1&Fc_g-pqK8X|JYRx_<~hNYr3P;ilHv`hUwF*c?2pl?YkJNB!Dfcr;_}= znjrz;Nm{li!6`YcX;qEKWL+;C%Pd8wKj56dj4DR*-FR;l%hux}%00>Jiv6Su^@XAj z>3-3kPu5HavviuPeWTHm4(}UI0lO_DNmS{lZFWfY!G_==`fcT+$@WP7d`$A=XZFv8 zGM?odrXk$pq|9u5fUGZ1f5Y#Cp4)AE5A!>?YUh*!I5N2duZBv}Q`Tf#jg-IwTb#=* z*p+ztLk?(I#EbZ;Z5eTVPI_D|k_lleUNd+0J!?67tLe-IDgof1&1N>_0f zB8l!j@q!%AwOG%I_=PL&1?hmaXJ|9;98!yEtmVwnE4x0|Q^DlM-E<*JKa=L6@^5h4 z+G*20S2~_bT6@tVvKyqhB}%oH`1Cfeu*@8#9~l~pf&#gLqdqcTsI%yH&>(Y8z2+X> z5WW~HLDy!h>^YIZJS3HWiEH@E^O?<4(YOu?I!0xsVhim@H#Tf9D!T)f8xl>?-ZR=i z+zWm|ZFOHbqV%A38t%CgU^;CFFu$R5ntTK%NC3FYOMjr+b2bVi#f$pPUAsR^J+Q*_ zX3o;qzU@w*2QV!VDw6#4ZR^1U{S~tMtcwo6GtdzEj$-blaaez61O`WfWbcMZ{PZn> z0DWxY?Seor3*vH|YU5`igy`dYgO#0nRVJ3q9#&})TPlP>Y3!%6{KJTBsSQ{YieT-R zNKYE_CbanCS;xXGlN>bf$hW##Jjt;wVgC3oMq+wk&=mbstmfd-pr|xB>S}DUwieMG zC|~py$2HPby<`OHm;`z1t(WCbS8a6m-)hh9#<39!MF&hImur>U*+=@RwboW&qetk< zxP^|(TkdjD#DM;SxQ`Lp@N6RH3&>&9Cuyh+G+ndGt0LeKhAi zVwh*K56|%0^^gza%$WY7$p)RT8#b<`-r`YqHkR_MZM!YvMNWrUIZHEz}X{QYrP zDE85s#f-1lL0eo5$NTwek#~?u*51q4)aXZVK>ddg4cZ;;>2(W5>BIc3ObSHFRO1qH z9-sRNU4z735RxdJjg_V@i+7TEuuSGJ56dnSRd{DBR-t=D&EKB@m`X)Iv?9Xpa;tVH zKjth|!J~i$MxJf13EB`v%9u6PKo@Aq<&@I0D9`nAy`(#%dhon>L!NcN(R5(iV9JiA zAvPo#Mg6oWoqm^|1-gqxzk0u=@HTaZqxHH!5kf7ghCYwThiq~u@}Va{VzW1`Mw&uy zDUX{?Ee=mq0$^*>EsgkNl$qgnYvtLN|=oWzs@mABv#zE(P4F>2YAw^e z!pw7JunjeWOI|PD^@bQpo`zF&Kv!pCRRiPG&?@lt;+5v2*z_1VrMbPZ)u^TfodYs+ zH1f2W^(axqC{8n+ZDy(&y;>>v?1Gzp)O9b#JUjtJt~5BW8%&mxa=Uc$1O+4N=k6M# zzrtKfOtu2G-FeifpA=Pz=Qb=RL|(xG?H9hLw$Mg(=XSRwNz>2^4sgYO4DB-W9kZKA z>94{|aXL()?333A6JK)l-`R3NLLSbqY`<$2P!4+$ytYkiF{+|$7cIeKL*7nXlAsNy zF?f}FHmPv0=_IulMPHyVlkm})wlZwZC9+>k;buA2cuI^;&MuwwE+dfPIob33Go6O= zGLI@#okVvC#&Zzr4W*Z5^uWV^(#rSn<#D}P3`^5+%+nkF3Ys=vH=Lug z44zsnU;!p`HO{&o1fjXkEx$iipE+YhUi-9Y+v=SghFQ+EkAND-0PcP+UTjRqBwIbw zoqiXlzv?%o3ahWL*BAEpX*dB1pn4KCUogxCHyOgltTyd9j{RJ!SB?g7b79xefqM3< zCoU#4SQ0uC0qyl#$2~h&-;6Li+!1!bawdBE7Esz=Lph($RCI-ElSAN@dXsm~1=o8b z2|0d&s95?d8gd&F#jVna@yRxlHw^1=vQrpzORp;2NNOar$R($6U8)!n!OiGZIX1%{YUY_jo1-sTFKA?JsL2rEQiKgLhj*+_xDi-hi}4LH6e?fo@sZ zt-{7YkL`)2Ny(l4F10h};3l`G)MU@5v)u`n7jTz+pyo4euBCCsj8OC^ zLE_D?4j9G`T7^mFapeYe<9B-`ulGbZkEz|5YN2Wh%<%AX-?SHTcfWqNGGDYgwRvv& z=Df)Zuv>Fu_;O{H5FBysn>b?86Pa z0i(#lrJ31LQVzqu^2TiRdCtLPQI3HR1(Dk}24nr)mHj*K&o`NclV4=dz z$#{ZJ%P$rQ`PIE4MMH+U6<1u&_U49Y1~ukec-kZ^4|H5fWJp@a4ugViv zXzs5z_1Vrkh*S@FwLcSBSNl1#aVW@HAccGRU0?6{h}t#EWN%2vo_7IW$oLG4cuHX< zGkHvM2-V=={@q-(XN1()1ATiv4iN-RJFYCfkVvMA1t)I8k<+IUlgui{^jRUCPLg__ z#8v7$FT*7*-mlw8?QMx#%4>; zV^Cv7^~fS}C7BHx7gMaX-Bz#J-Xsk^SOc#pA? z1}o!PWXL?4GmP&&)<-BXq_SVot!?!zK&7r<# z`r#Q_hrUtr9ro60+kI%a7-;ZyVptHfa+^w9NaS(6`n8~|j-}ZwX@*v>Q_BU`k849+ zm9ct06JnWC-H9Gykd%0bgqN9Gt$FP4`K@&wLY0~j5K7zVc+r03w;WF2a zqwb}SLql6wde_;)w@<|DXl;4dbT=l~r^I2}59tNu_TbYyg8e1J*j`Uc7JNgdIto8l zNSl%hRV#>|Gx6A>ni?>2>f5R_k!im1GTZ+1 z@|eql<+*;flQOXmHF@O>ovCTHNL}y+)GpdPTxv;ifMT`jDq*b|f4Az(KFx%TLQ^zE zvTHIJwzO^*`n@yG2lbTKWI{1FL9x6{YaDX&hWJl3pstNX-Nwxa2DAEIrbQv1b;hsI z8ab)Lp>>LDw=$RR1u?J}FFinOdHpHuAk5{ng;lbKfdxe{dHrYnk$B*($%)PoW5v10 z^az@$q4At?T(W2**UcVt(kTq8wvJFm*h#RlJ^_HH+h|NWPToM3gdqwF#&3$OiRKu&uj^dZXESupFG9F2(= z3gKhNwd)*MG~l!61E$@_8!2`8kDW~y@*>(}=yu27_Izv{<0;w9sAYM{5rjdQ4eg;Y z`1JB^-ip9SKA%_UDdfPq1Iyux_y;#TX*%3*$u*E`+nX)K2un6#k0uMfa=k|q$=%xg5HN_FBH z-Z#2`6wpx073os5vFyDkT~va7aQ-nr0Azfiw~*$`a9nyvo9Q(NCxEAB^<57w;2&_4~{su9c1vAFQZW=BPIvYE&uMVy5g4 zfmlYI?vH}&#$|%u-B<44a6NkbG*)+CqvLHK;|=d{D&xlsZxhp##z^Xk;jHbeXu;Iwy}ZM( zQ7DtSC5k8Qd8NfCf&h{Fij8>j^A+;Lk{f<|7s<&*9pg2nTc1Y^vM`xnJTNJsqo6ff z0S%%E6L%hBo%r6GdiLs2$LJPm&MPu39r;6c1F6Y@@pQeahqZ@7g_1|E34FNby`=fJ zveQ}~b_o$e#3HB^A@nbEoaSy+U7fW`{y(o zQy7DTJ3iY-&hv()+9N3c;B2a`2A@OpYf7V|q=$E2;cQJHutJB%Wp_uhQ?L}V1%P<< zA8cy6ZkxL}yPNPtoZgZx!tJ};Ga+cz8EBl0F@yIkF@Cj8pgAVW=UNogs1urGnQ;|T zJNT19n?@5|1o~auh9>vYI|cc8A$Vy?S(X9m_!%N&5>tUa8Uy@{T?$x5mfIC+b`GkP zRBy?n8=6*u+YCdSI`R*X(%n``)Hh1>c^Yf%1MB;id23x!T{wpTCOi3iWM9DZyFkYWv9c5wkc<%&kWu(Yub6vvi;e}Z~(gAN!Y6FcmM!S>Jm%zt(he5*H^SKNlK7LAKHgkR9FVf zcsXiV-S%(RuzO>sM^+=qsjg%>7G0ZeTD&Nje0S*Tjs6CkGgf~Q&anQArXvQRkh>lO zFaSw2^hr8qRO&vGNKzkxSC$)A33ki-*!QnyLuPEROeSS{Yt9ue?nXFJFBB{d>Oj+K zye)J$c9Hrb7HfN`ts4weZmy*cW>@)C@nO8HV&dDkXhdjrew@9Eja(>^m&o{rR2>KR zF{q85d+Ec2sMEm5BmP<%ukNaq89r=YyfrOp$c^Pk*&~AkbU6c2!wwG#U^O*$K3?GZ zCInxV!)Bgv&rUGEZ}NF_O{MexMcKt990E?K)O=t?$9{boama33KsAooaoiDhq* zDG!lsRQN{y9c)3>YtsAi6Hs>=jp_=XN3x%T`t+|PM7Q!(&a5&m=3Mca z(@4TQ7tO&aRrOvd!SQ>t?qhy-N_ftiC!nS1xGa(B2$f_yCX{o)&HLys%sMP!>C=e+ zqUri|z|y2Sp4Gw1$2LD9;Z-sDHx3j$g{AVmytda)iD)Xgjz>l1x}UIAl{o2AtX(&~ z>L+NV`1-C;{l>VwgyL%MI|l=iomT8zBvUlN*o$Bt#^wAa255BC9W2II%JNCR9lAIp zspDV{-WCE5^?jc9p-ir!e)}RaHdmV1y}T|c2`ULOSVe4jJI3L_Ve@9Hv0%JdN>t|q zoGP9z>JvMV!W%ynKX2s91H1T7GgU0pFN>aa_v|uq+Gww+aBk;j+8w53#X^Q5^@aBy z3~@edAh6S-yUm>bZVkeL*P*)xd=Q>-UDkKVgp17YnLK5JMRub#)0QOoxW$^HQT>($ zWHpVYUtsE9RTp8<;J}<9Z5#OI;Hb+|jPh$n#KX@`zJ$sBEs$qNw5+SaL`v?E$Ez%M zc3mgBQPA1^4RuZwoTtm21vgI-RCA9_P_H~MyUj$I%Ik^aa+ME-0be2^I?l|xb^peY zUd{_y_Ku<)3O%nhWbdS2mypu??2~mXD%pnR`SrU|F1sd8Y41p&-lzqmkwmBlg&dWR zMEHA8=u^3_k8_3>JtV4X1qI1uvId8?U&kYp@#cQQO@vG^ZB4=n&?V8 z*GRWW=QZ1r%NbyDyBEdSo)tR^gD^552d(Q_aL6u8UkmOWYN#gc0TcDWXb5Y0Jqy4% z=4x=FUMO>$ZAxrytl~{;r6W<*wHzwdXTCx#-sJcQlZ7;Iq2n?9^u;7h58IXr?7Iat zav6g(GQ+OTLKld}3nzw@3;7k~Q17xl#qU*+;oP0w9bQwmroSHbV35ej&u_QX4Q!VTopuHyUu5 zrCEIe68t=gYHImPf4nspxt%wn@*0wn>+7!KJFC%-%H=U~Q6i`#0XnEypUMkN3Xxlf zq-6T4IRl%nVmCx0m^vh&B=ku+Ud^K#(89T9(J;!S1VTv+H4+)Meam_qwehB4p{0(Z zn9NmKnJ3Uk1P{C=^sDt&Hi+W$b1Eb&@Wx51onAFq6ACdtjcQsE=Nk!e>oi7gT{z>d zaTBT$uCEE|Pcw3c6d&%TJ#FHiq=Zb;tQs92IMj=NyyD7_-fja8NI}sCAcqK3dQ!BK zJG!cE51R3^2!%=52|e3mXKXh4SYhExG~2>u5(#)6@Om`cL(H{2%m2|*n5_n>++uWG zxU8#vJmSL(0y{H|N3|_8Q>o>F&uAoF@5mD2sB?)V)W))qxN^w0rxYKYRKdC6gMhyAy&|+TjHq~d+!u<&OB;;NWqUeZ7C)dK6w2E zAaH!bh(hp!cx!dyMk(qo3@mHw*-)`>T*Q&ORb<+`Llj zyzVdj0o&aY5$pDZ+`UmpJtn?NMLP%O4dPJ$Zuc4@ma&){!QS<}UU#=3IZ3AJS1_Lj zN9<*9NexK1Wn8T-W0kig3GcQ~mYE+idPZO8=}fR3z^=i=Hlh>sGByo;txYUlb~fe& z+k}di+uh>XDs#s8a3q!t61EA#Yj0j+rhI&PPyBJ9;1v~qDkw?t!`{IiQ6{cHaHyEX z1t#YB5)XbRYAH1{%4F)6M*D}!HUKW*&Yj04WO6~*X_}JTcZqOQoka`M9d5dq*g86P z$8X6|rE|SR(G3U5sZe#w5QXu0nu6~O%OJM{WZv8aT5DdEcLb%<2iEs14zUQvFd)AS zXLv#~k^>`oXR?1~(V~n-{#gr3QYOQ^?2zW*1btO+5YR%=wzO|hC!s9#AT>WO57ZKr z7(I2mq$h-26gIF^!QjZ>zdoWN--S5UNc9;}?7X?}vG*3X4)!jUMmYq3)q81jn454 z6+~+IN7x=Yxyhl}$JbYs=RdLzSW6%#H$F`yIABK-GfZ;w^;Z}Cm`ZGDynqUy!dnz^ zd-=7kWNS}@cgtIIe9KD0x9&yy)D}ix+e$jS=ViNJ^yvb?3?ihpABu%?FI3$u)^_$G zZ1YlbB)_2s7|^!BuVafl;<@gxO^>Uqt1z`Aic=M;>B~;K9W&dzU&MlXi&8Sft}sroyGH^~Xa_{4}W@znEMW6e53;Yok-gv18L^ptp zcCVTg>&^Q*igGCwK&zrKtEmpqvp)K;7AcYT>Zs3$wn<1?4uz&v>>uzw;Ui^#TsD87 zF}&JHXI6LJEUt3Y2{4k%E%`PAt&Z5usTrhqr{O7^zI`aYUJWWdCg%vqQ?-0+(d# zqJruaYk4ARl8{FrnTEl;7iIG>T4tE=#gx}p!8|Nl>jE7=UpIL0jI74L<_KoDxv{RZ z>sLJ^&j$0OJBFp-TYoT{0UmDTs{>1tqdAf{@-YfWbY)q!RWsiout2E?@gUN_O0>s8 zl1N$Zq}V{MZl%mYT>QicQ~q9CB$ku_06)?B2&=%{r} zPEwcDW^9Z|xf>x3CDk%vw-IE5(I8BsjiFEQ!$7T7&RNsFM|3Mim?}~^eftO&PLEVd zYiR^F@A+KEnldx#}T33=;k&^BZlCOd{o5J99% zHP5x0I=QuuK#~z>{k|;dQZs(m{&Ep>?3TW9*r1W~7M~~R7M!iOj!jW*Qk3(95dhL@ zS4!+KW?pf_nER_F*L~$)g9rU+m?(qrw%;7+Hkj+y1X^8Ten@`YP}|74J{C)?Ao#3~ z=&Hc&8Xbd|+MM`9Hrq2FvP?&^yvsftTz#rW>2R8PTx(*LlN>smVtK4!+PC)BwghN+ zI#c_he7JDRZ8#UV{*b@$Xv6K^@B#maG`F|7`NsJJxj3eheLsf0(dO8Pqg1=tTVVyJvJ>Rb=|c?I zb6@a>7V~Gv_j_(qPK#3Q-J-1gaJ*cz@F4A2n$M!@cCm?7Go&>CuyCT@^Zx@GK<2;0 zBe^!#PAvnUV8Ry6cP7r?o3s|~&9xte1vvBHZEu#hZspm^y}R`udl!Z2*+jd?0xvGh zx9rE`Zah}I&juO!9kbTlznYY`-bPBO-1>W3`d$ z|9`c~j@&#)l#e9DYu_MAB8?^)L-i!xn2cG4clK#Iqm)Mv0$5c^csirom*b};u2-0e zk#Dk;k`u10IsmRe<)lzX#oiCI9^7Mfze&H2v0_?7{Ht$#zF6hD`ixR96U?=STN<5_ zW!c50>rCg8ok-H6kVZXlZDpl5${A;i{CdW)XN34z8M%$jM9 zD@_UV$QvKXnq6LTRHeG07+++4{sC?N4j9bNQp^<+gG=~C6s2ni?jt>FtoFv@KD&Wf zEQ*k(Lox@V)nk=Z-D;QG$!4@lKcFFb^U8)cmqhnLkcGpZY?$7BTxrx=6`VDD2WbJf z;@Ud#b)j|H7mf9GVX|h7>xQNB_hycZLsuBV)A2BwrI{9wyrnE>WTYy#zIEQD#HDTy zCQ0#om4K*=a1K+Kcu(RMpj*|M+^Wt=jm10BYzE5!3K7mYK)O|i#@L@TkOYHa&Y4kApto60s9giKU8M==By(dVh`~O6QKbv9 zPpw|`!4Ft(H*yuT`-%=m_?->Nc()^H?HNaQEYUa4nx0dTiV;C7{@R;Owc`ZOnIr8k zR%F)?DiS{XdU*%Eabz3&x>(@lSyNb~j8 z6x_u!Kfu;s+y86(|2x|M?`&@0uI>LHt^I$Z(=*-6;GX;e?EmfUb~XRg=H||BZU6sJ z_J72HH88Et((ilT5z1;5a|=@VV|=1c;E8v2@+Z=jAB`f8IUmpBQGoBGFgOb%(z=sW zXzXqrara0Z1=h`V2Muv3O-|F~EDa_TPT0eREc)xd=N`Sy0>HJYhOn$?3nRxs4pK)y zUtb_>bGQPgc-P`MxFEWq!`^H0dmO1U*&X68aWI{ zC6oaJFeHETQ`Xn0k~adTU`B7qxBDbq16G7pnA!z5LuL=I!uYUZI^xHe+t!DA(u9#f zT;a|vaW;iP7cR4$`yAb5wRK))IH5US!=p=GLXx4k8{CiV3WwCjGPKO{H|WHC#f3y_ z|7LR^Wk-ximT%V8hU%<;+gvKSvfRE?aAkq!lGY}sjHWnCpNf%AAPWGM2=qcvn52#i-sj08Vg6P11!s<5USxPDc7% z3WQz>;Nv`Bf#c&{18rnAXWx8Ff6vdc(-aKuw7HH~DE9R!Kk3kueJ5o69_l~I9?NOe z;pWfAQrK+lN)@DOK*_hWNkC8+K#B3H;sR?;k zVzjcao}$KpjGUOG8@(jRXzaFFkkGg^{|GJcyV8uqH~XdApePej1s0D=6X{QrX~VtN zm2tJMeYs;_c2-VQ*yYu_{&~k%K--VY6?@?!@fgCro9f_#P8agHFh_xeJ`)?(B?}IN ziV&yZ9OvXG2fSn~;60((Z&(Y=_)8RR0qr8lkKo)0mWPhH=7fS)m6x@5Tz);9`n?3$ho4IH#j!flP2E6S+Cl>9MeJLvnFsKyfgtp&oj!Rn6RjxbDn9uZZAY_PIo0_xo` zPZ~nL6#zb>QZ5j7IC18uY8wtTbiTwj!Pu$HiPaAzULTl3LW_&u3XZT)ym_8b=5Cfs z^58(W%_OK2UBgVdR@*H9;P{_Gy zCA5DMyb33?Nudr!r!U}>KunVg7)&9__ROgGyttB>nm7eabG;yE3=E1Zy6%i1f@sUe z?le`b=RE`KRuT)kmIRAK3n5I3elDH$T~oRI%@ucT6RSGhUH-}|G;G{#=UtlZ{D{rU zUgSgD<;Go^hw>>c-?}&>$1}?{2?8@YBUjO8DN?Nr*Ffea460-A8eu)?-Ak;|B{g3? z3@n1e7d@=zsS8aUQa5#aGn zHsabxDByBp`Uumh62=UfhVkY@84KoBP0N^kX_t@j2=~m*q~Mk*pyG}5d!I%qk74Arm|nI;UcANLk#3f&Z5u_%6t1M zcBPFL(QKhoG!|EF6QypT!_{&hmNe)q4qeN)-l|M5NouRuZ>7d}J7JDUW0|e1C1d1diHabX3I3sxFd4A6)Y*_YY^w8p?ZBJ=C~{j~2Y9 zw*S=jpB4BoJG<>V{`2Fs|F~(>ejEߟ+JG+(m&-UK#X1likd?@?RiL>Hf*_`u; zlB$!I0q+N?ljF~VbC6S2B`qMz^>A_Vm0LI88p25!1u4JGK6(oY&A?28nFj*gMMwss zF@c0w`Gd>_;?oqwmr%z|0nif_#ZdnNFC;P9m?C!oAgQ3;0 z26oN>H!ciffMy%QFVwHlShW05iBlxyY$P`-pYa!saz=tvIZl_FWFu8|envVQrs05) zA;};^Fra8d3*%ul!xeI;-o?lUnOzpqesj0UFqC)EH=1;gO@#N+a|aOE+|-+1s!0LK z`kXw1I%wiyF=9uzG@1ov`yC`=y%hie})5G`g_CY~GeXc>nsAkB4>w80}mlo5`B! z>d*=VrxFe&YH4{rQ7=+TtXbOOjJ$-aKV%onVBxX)7dQJ#cUl|v?IL@U(ZM*;7U7+! zMsTs*XBjDjSeZ$|;!fW@v(g-w&PqhFC*=v6r0oNXz+Y*@p%3gWbHih1hD-B=)5#=n zeZ+(x7VeQ0EXr^<1+)*5sfVVBG%lgEhQ*{e4Y_BS7^I9xb#&i^l;dcV0jazM=X6Bi z(!-qSGDiy!o9OSs(341S&>z5#l+K5~dJNJ)VuIW4{0ruJb`FyR9btcFS~)~&BA;a2 zE0>gt>CJrarDmz_dgaHo|S5Kld`aXJWs>RQ2gy?+1Rc?es> z?g#>SWtvaXP#z@~?eOogIBn(h9G}6Ne zcbwVzF#Lcbj+XGSa42J$7ntbn4*MH0`Y_BOPtvQVTHrFY3m~gmQ(c;`UX?WUAV*xT zz<}5T$8k#5#ERk6|@WFtyYKtd918e~c-9xS9h zM%+IWye}~{jU;tfblt}={7^Ktqu-A=`+fS^#-D`f4=u;O zg#l-vfLJ3=nVEJ(n8q%j3#>F&Lc9Uk1+*~_GcpDY&rz+n1UtaScMx-lCg7YTVJor0 zF|;RJBEqntu7nAId7?CRRD!5brJa;I%A*2iHx?h47w5y*pvd&<;TkGm|`R~=p1pC$SPSY_W zWeQX&bA$w9JKp%WE|GiIuAI zkngHFFo7V#TPTT7m}E~KqPgGV7?wuEK2C(cBMZWAV>Z!K#AmHlp_d-5j$nBQs#`&N z4)F-9p8y+dssx_7OBs~Svs?zMxSF_#gOx*XGS?J9M#T3dw&kG`&8__UM~Zu>KYvU5 z|E*>Hf4kQIe-Qou-YWfndwZ`A|M+ar<(txy;a+PKMeo(Rc{*2 z&cZnBF&XT`)vx^V4(S2j)CB*p^4w$JRdxcGa5eFCCEx9|q~d|LbW_Y*CZwJ-pi@qW zl*0##1e|h-r`&ed?-#?{D2H{x&gJGFJzS{!2M?PD$ptlX=9=1Puq~Tcfou*K$YtaG z#35F^YN03J1($)zu_rk>JVE+0IkcCO0fwnU?FE7k2do-H1v~@NiiO7{`VdP4r@ez2 zyLBs0OhFhp&E&0HzUOtTAMfS)LLEBA{;;BqcMnmm+WYFr+WSyvHd$Dx8G7 z_%-(XKFsC=#8FiQfSfPa`-4Ahd1|r}R?-Hp4De)KDiIW#9aWsWZJzp!f9ED3IE-z#vwIXxprHyOZh@w;3?`!8cDPV;$*VZJBJBKT29d!7M+p|uGC|wdxn<7%*l!^ zvC5W|n9wpVaI;K{=wxDpC&d8DeSpz0W+{gN&{9g)b6q3|FCs5t39kWb!ySE^260A+ z;%VPwXm(2T&iHZoP%?On5rX^Og~Rl!8Kr#uEWRAn%spn#2^)V&qFOY2PgAD=qMrcSiyGW#L6YBJ@ack-ANu` zF3>`G0Amhk>5ya@F{+W!0dy0@;r9Ut9HCXsGxllmG#GS; zemf=z4!eS@fK=}EMm7~S9*%Ti*}Es*;=_u#F?ktHP3-?1jnEh%T7+OTH!w3wND4M_ zZ|Hax*``^h8=|pISSz0Zz|`~V zyJVo~NJL-;oV-+#TME7d&qN9<(47jY>L%liS`37j+JyI7PnOWemdWa{yA%d5L?g=X z-~hLclCnvQyb5uKS_F!*zb~>UyBLz!Lj(Uo6sU1{)_uIVXGH2lBT?fXE+TKZ6Fqat z%Zt6B>-&E5ZKVd~QW(xb@iuHEBJ|88X~5THgo2;@rLvxPD@kt^%M>#=7zeWdX|}E( z@?UUQQ$jA)Rd&PEUT@H|?%D|@3{kiE#CjzciB~>hQ2b84e(g(Q5B%cIo3*Bd0d*Us z=P;-c>rIL6&brk@N4LzyARCE_<6KqYiL1zTV(h`;{A8iBFkr9*BGZ z`-qT8+%ruW71nSD`$6le#EesYm=KYx65}s3C``Dh*$YueV^>}!%m{wviZOZzR~(+` zI$$T!_D`C3#eugTu((0_y}kn$FT#LvdY&=|kZD7g4ff)MODHFuK!ioF@CgA%JLLN@ zCwxJ{_;XkR*krek(6SsynWS09s4){$$uo# z+Df7Xj4y@EdZ`c78N895!*rPmHM1ZSDh1d((XoEJIQT3TEev9$1>p&%p>}W3G3O}Oz^O{@O_z_3jJMj!{Vx}P>c%>cV$QXQS1@?q(uCXt zy>ML%5pXEr6BfG20!XBTi|Xxh?5tj9Vv>zOrT&EHVHI)I_^4U=10|IJ);SoH|BQ3~ z!uzy>Ol(5}G*B>BxOL>(smeBphcnP5-J}^_7Vg66DanzoIi-Q{)v+^DOg;ge3EuqobpA^-SFmKt2r6^$n z8PB6n04I4K5e|wiG))px8Q_-i?h5lhUdg2~&#+s*`wg`t<(O zef5$$2NzbXNc$fC-_qK-b~= z1r%SC1_379MyXn1k_9 zgjo-!SK`8$99`8#3t1_PcTAv&hY2!Fs)Dx>@liZAl4ObwR~W}aepw<{Sv_=7qwB+j z(b6}0^rYK`Srd=~ay={^l?CrA_5g-9%%-;BkbUXxYBZed2@n-~MkevPRojh5k}Zw| z2*f&ArZIEW;8leo^JTFt3&QrFE$vG>w&4v_Vr7U|KM7*I_K4TJz0T6PV)u7Kd9x*> zGkPrJSp<8@98{H~^GV@8>Yj2T3U&C3DT9osvJM0T2n2h}&iF02#)9P-QdWdfG|{BE zEKW|6Tws#&WH4^ht^45k$Pyp}VsJf+VWHodV7~4Q!G{G{YrH~|%-&lZ?|PrpL86W% z4V}SY3Uc!PMVOpFymy_*N=S1Hmn5T$N`tx2`Y7Cn6rmC4D^yb(oFlPih&I~@CubW= z);Ph(T8f!JF$dhhQuj z9{E%v6-$gkC2*mhVlH#t z3Cj+F)sMAC8C~C@)yTc|Rqu&`>%^-afeAzbxoe?9S7L|JoGaN--Gchnc`&0;G`6o# zEq;Ku9*bmK3gW!#SI5p!s8wSppwTEJ-I&$ggd9xDx;<<3mb_*dHIMj|8j3dw`(>`J zMaS{fsc6pjemdbD9u$5Rq(@oNPLd)zbuQS$na(B6fzdP4oDv`l%qum2f);r6nIh~J zH;;lf!NZ0Bi`hV@u|_p*gK{ldXMw z@ZL!iO*Q8sFu>_e^(2`Dqe`s~(ls_98ug;4N5Nz;f=T=0i5M1H_w+z=xf_cOu8m~8 zT(LYbV{JcBE#rYvxP$Qct$xZ;a#CNLMG@&JKlAn4X9F(&PoqhCqF3 zm67XmUjQUuIz{4=1)|T~*_UsntLWDHg*pkUG*$acv@V8?91+xiPW=o5ZSFPwszl z6YUGEwhh!Q4zbxFGFBsx;lDiVm|#uJJW1B^Rg`>_DG+y@3(8By^doz|aLbeLTZ&EZ zGQJl1^|UT-XMJ^0@ewH84p1!*{DxZEqFjZU=N(y(6yy9tD|K~7o9D98xD{u!5QIV) zv(u_g86vj1AyTBc96PQ9TnTw)7%#Hlkq$fCK*z=nLE}sHJ{l&Br`hlO>>65n&mCRh zG2nv?jnk!&;~%A0cl$4#wzp>vOiAWg}q0RM-KfWu5W{dXWgN30_KpQw>E^ z0_$p(hGDtGJB>s&ULGC8T>gb1lh)Y}4p=H20VSu}d(K#!iron(L7JVz)(P0B*p8M- zM+lN!f(xpW0nJHB0bX!6L-f2dDNvlj6l>yn=0vkj{n96D6}p1SBqXb+0Sj@gII@#k zjz1d~L5onaeGOiDY6O+36;v!nh_m+*i4Q%stv8|BeVKLfw!QT|P78h>o}H6FHncin z4}NiIEP0lZ>pA0&1J|0JS>w<#8HZ-$rh3ZOp%XM9!J?5T9;44lKNj4lRr3XB9r~HE zFp4;TdbRgozb`&mCoW&<8-H_>gYadx580uZPBN5K(HArMRwl?066jqWlfzL|c1&i% zw$F^CGVxKLp8mey>j^MXXxUh-@q`GNm6OPgeUpI}(`6`kWL@)*?mr^YeMISNQFJ9I zo^VJAg<3=-O6~whKME%ZvvD>z$ufwrtoJV2G>gNZU^Q5zVm|{H^LuE(U8XX#uDjUr zs#E$(-fz!<ZE{+GPcZU>2IjPteG!vgPScLsvfIShn7MT%Spg|o}^ zKa+%XhR5AROU5Lqa#0py*inKd#mr%(#WoTV2X{FQm4y)8A|oB4+0N3eFX-SSb(TOs zLnlcuRZ-$ic33Vyg!ZSii1VD8=fbnfjIr>zwbtTd_t{l#nTV~x4NTw*Q|TTUy6Nm> zw7zOQFp*xiYCae799Z{>ztgmkC-AxP>n*u=RXiSnNUw>};BXI|rhe1LyCIV!j=btc ze&d1oHq)EHCF9aPLvC7g?S>Y-V`a?(b?2{*eIS;yQE~s1Zz)3qhC%FZ6T9KFlR8db ztVrCIS+yr##Y0mz3_61Px5`W3#VwA!_wc$pDHGrx+%fq7V^e z9Uo2#Qy5D8(wvRim^U!|zHriSuEOQQ(83Ge4t)?g#8uR=gZG%-;bv!ZZ)dc<*BR{W z+}<0t@7&ql+8hkW!@cpHJ6n6Zdt1ZZU{e>bk>G+I@7d|@?CfydiC1;TDEnr;g$&xB*tUEx&8|Mf;lIOAf$^k|19xG`qEvpXfe)t-i6Hnc)98C_?_L2vxI0plU*?} zgV=y8%cop9EC_etr5-4BU9nf4{z0~ghd)8%b3F*A;ipu+?F2HQ{>e|;;ECHF-LIdf z=!Y6R%ftyt0#jbJ2C{~j{NAGj7*_X;DcwL2LV8ZU6g#_CE*zV{4~&|M*Dlf6GxVf2|4dZTY`9_m=X1?{&6n z``?GO|6LQ*wC`E_-dAX5dpeH`3E7E0%iemCE@uh9U_Aq0U#&lJ0gE8lsR1H>S|riY zi0;m;^ee~k3ycC?q9h=eLIql6nDD&O5RX z{Us}b3qX+*cDP)vjf*;60WAawS}U@A!wEYY=va?Kva%R>U=S!un)SJfUzOXbiKVNE z*Y&2{NCu+@BxKX{1{o(x*tFyTl=;#Di7?nf$!Yccl zCV68STwxxFA}Qd^(S){-pbC5oW_SlqdW>%I6OBo}Y-IAd@KB~nx7Q^Bsh?3e6)ofP zWe)Yv++~?a(vhPNy_ijKQHN178(EcA=7ND3EDg_-;fj=3NzHHomrLg{jhG`^NO8{* z52S~~bZ%%4!{BRFDqk3CB^3o;{5JV_DqeL$cz=i0;5pKMTWI@m!e z2}u$DE!I?yX_5>WCTNP|<3=-5D|nua0tDgGK(CMgl^N)&moWGTN&1wQ^#oV-0jzq% zSTDNfmxgq|yVm}E4MUJ}3`FU+Z6fI9C|;b`9t^Gr9dDqA{yyR7Vkj@%G2Lw4r>G~M za25kJf^ZCvsJaAIpENF#LN`lHd@qqC<4sVQGAZ_GY<%&RXAT~{o4Fe;btb4B`d5T) zV>m%qDx$7;@t>vW;!)B=AA7e1-6zT^2B>2ulG$b$fZsRC zEJ?GPrl9nOD8bB&M}^U

VH9>WLl)ucS^ISW&WDteX-Zy+xir$cms}12JE=JG&MK zTtc%wWOV~Yur&rpO7;7zDH5^ON%a7YB8WJ`Nzr)UQS;_zPxL+&w3aJ~znCBad&V^- zTy!`U4L}WBjp#VBhv2cqreRrP(!L#0zgU5%o$AEU%kR0V9Zbsv6Tp$=QXF>4jeFnFl!u0e=QGFRi`vrv} z!n*mr!MW*a<2TinJ8|9#Og{V^Qs{@l>^Fs#-it zYt2$&0(ZxMn#*+vlEafEt~|A>_^#a(AJ%|@Bi+z$5I}fu4i`E`UNmEFgIhBBDZ6w~P z$`HAgZ_1SV&XM4I~PEdq>GuX7qT< zxvC0SfWqK{l|MwAX*je#Ww_ZikOF0lve!5A5Yr>&F2>5%PMy=eygIVP#ybklm3FP{ zJ?}{7$^xIw8MeUzZQ^`O+n!g2Mht@Xo$#erRi!JOO%Z6+wg$rY2 zjA^mf)+tFxaZt>Cy4*L`KGz_HV&=4HgbdkDqg|Pr?s&b-wpPijL z0mw&c|A7;#1ReU<2Y|iB{QwDN+rScP`_Ip5|G}kqEI;DDCl2i7Kl64A4;wTX zng|`Q;5AIe20{$suah=^mY*ja++YFUi}dpxypmfm!Yl-NmV>;k^2vIGW;*xqW<*vY zQFPf|zio;^p3wXbRk0QmJu_QWLzzIjQgq{B)cH32@4EFu`~uBo&|wJIxH^ zU4Vw66P=?$*7&;v zdM}MX_WV$iKvdAmEAP>|W0G6tMc(iyP`bLP*;6ZXmMdhR(8s%+WcB7WvWV$GO`>VH%z(p z>sp5Lc-i&8OTyT`(NyDgVvJ(~7R9pPik)$aUbShyuuEXxp(QA55*%$pc@S6CMJ*K- zi7x#SjOQDu^xG?HrMC*2i1nP+78MiAa^Flzp0;8d%AMsZs+Iz3)F&JDs9`EvGEtfb zg{q{)bIJ^?v~5HoLdTI zfdGZUK_%~z1)^yVb3P)>8<-=fFv+ooy}LFDW1xYxCeY16!od`J>aLL(v!&7Aj`+Qnr9|j&-nI2PWhKiR^HRRGDVr7Vknkc*H>m~?Nt|6SD3gIJBqGh&(!4Ub%kqgIjW~hNjc$e9w zB{FB~^Tf=2#VqccH22FQSYZ>Tt3;1%<#zU#9^))6tz=OOA(n?A7w@~>7IV6@+}A9% zgt{0}my8+lB^+w(9&r|8?rn+NVw)PR}qH#&Zbck zjL1XFvSo^qv!KunwC+Zk4kX&!SwSo*LPpj8iu;7+_FhqLNffHS#r<-M7R%-r=W9{n zdUb#u8K6*C!1$O>T&mM)n@Jt>m5u2}K=XM8iI!PNMiO$D1?6Rr1R`Z*agA9Tc8f-v zgGdAhy1W9l@R`rf8el&Ul$yXu2?7&Br)|Kpz9DZK*}G6R!c`Dm3k`ENF0mAucj)i86Rj=w zR+=@fI)$T4pXtL#I`Dx6nnk;-Xx51nwR3C^>k2g%w=1(Dx=z(rZoJEGkb)D0A;Lw) zXdR!WtXgWiUS2SZ#f=uj;a8nEMXV=Dl_NrQz@S8EmC{TR<0>>o4s1&~$IUA7jIY3c zs?X5ZCGA^U^1T(0S04S1^^zk53!da1P3NfXJ*LiD*x+43FfxfKtkOgRl#^7FF2)GB zl#1XeA zjpHBUm@}t^J#$>X7>>oJIbOTR!B&~MK5%8OHFs1RiwwIla?Z~3^$72VvN7#Fa75cA z+h5g7?%(wPZ|_^X+eVJG-><>1z|z@cQXwH;b>W6NQ7k*-U3=`c<;?DCeMpdKiikjf z0YFi-*Z=*kOLwCILb5!OHOUA##})}T`dVG6s;+vfpt;(=8^KLVYF5;j@u%AVhBdR3 z$#D9yHS(xapq-?Py1=6i0O?) z`VNNU#xtK$ouNq#w~nPF>(@@P`Mep&Rvj=`=fBnY@57$|8u*__{obJ3fsgY1H~Cv| zf6&i&IR9-Qw2Szkoxwq;I{$sp^Iu5tZ14_At*nzP>lfW`6iU`l{T6n-3`0Uduu_c@Es1!sDz)21iL!+Pv zlD!7Vv5b>OLOaZG%_Le52DmYfn>uzx@T0J0UPmC}QlXuHY?N zmJ+003VKqVR$%P+KH8rZVNkv{ z6z*g|oWc>*C-_D#Ffv{TfjqviyJ*Qrr`aSk%&Zq9`=`SCp{XY-F>_c^VYZbf0gv z653`hPi8INFLaxIq!O;%JR9fcEbIAyoxFbg>iPKePpCPnHfLT~*5+o_lK3F|Y#~hc zyY0@=e!I7i@Fh`n>3s56H9hPs%Uq%$?FzU_1OjBA1eB{#CU?&~AoMdbA+T|hM)~tp z;y=p0qZ52T!5Zp{0U?lA+_3P~p%S-d3uHQx&t$%Ky~aGX(v4guO_ji5qnb<`bcX4# zUIJ_X5u+m669R7`8(l&-vV5=f9TUDOay*m9kf>B6!bEbkZuNwz;8LM`#9+R!( zgWQ7=o|j5Pxf#!uBT+JiX6xQ0+(gXBCA<*^2T50UxrQf+_80Q#l$#NijP7U>BqTxf_skmBDm%G_x|kBZTaZ4?PCM&Z0HNKLzV$hIXFJ_%mhpxrWvLwWWv(T-4<7Q_6;4&~At6tVWv676vkcbx^RaH_yqcj&5Q zSeDr7g}hSGT}2>#24+G>pJNL(_O%4a@{P<=POfJy*{<+P8e}8Ckr@n+t?1-Kd&8_l z%3B4qvL$yji_G#WzEY#GD0eS%2I<}+nsKe0RD0EfBK^V-|pir z@D={w>-XD5{GWEaTk-#gxX^{`C#B|Ersw7xbo4`={|aG2(T9x@;R!%Q2UMZ*y_DeE z25yh4lGJ4aLnke>%uJxI1fbgLo?u)HXLeNj=_b;t@~CwRG2c@C+65vNlmn1)vbBaS zvr4n;MCJ&pv2d&zVjMBz3L**3WZqSY2v7n`#IBgr$lG!_C6;+=L<7d_kX%!16lVk6 zwbrzKM>q<5Sp69c@B$pl+!7MS3JR!eS9=nbccadybh~j{5fE2?B zOP4p4NYq?}ZbA%#EH5w+!)%>UI>+A=gB*J3a3#d5rH0oEBTpoMm^ju{EPRthZt1d9 zhQ(j*I9c$QGy~PrPTd`%+m49`f(|X-*?JX-dhHEkf&b|lM*4RUS#`_{&Au-)a(u~o zPPz8)>@LRCAp~eG-&z-2BQ*Bu&A_NrsKCu!S(I-prd3Z3N=vd$gUg3r%i1AqLothP zaSJ1vk=wRGuShMx6t3LZM*|!JKI1N3E7KNcs5M}5c^fCPDaU>h1g15j>I5NNYs`-<78QHQd4hFB`eXv-Mil#uHN0^BfLIj)p(I?N1gT0epEu>C zwnZFA@wa+I$yFQ;+PD%=7YKR#v|)cPzyBCqpep^Z(*H{Izi#`WSLuI`QvYN8uKSDt z{EGfJ=pB}v|5o~RgUROKu4%?6~pU52=QFXJ`}JNk(f#3p`?`O zG>lhMAu6#3H(v*tXkj4m=p^SaPhT~&;t1G5qW=V;WlGa&XZe7AFOaFUg%}(hOuOPh zblS(AZhPLDPJ8{?@lku)na$lfP^sHL?Cn!N@FaVh_J~52bm-S7uX;U9VXlyL5;`o! zzR~%v&YCtMutvh;c#vL7#Afbd{}8)qS(GD1r`Vv*EKw@Fz@R+PLp_-SY9*DG$%K^^ zok3m42!hluuG1FZRobN|!br-jG7(hDSZ5p{whNWIj)TCTIv6G=l2jL%U3Jw*C63=o zEh>x0;;b`9G}a5k8kA!8D}lJKAc=x>N&qoSpA|iY)VTubJl(S3Ef^(LnhfZeUAQnE zO#h&51b&G6w8rG2fGMB!?WPSY;ZnGsR8Nfja1>C8%7qJ3?bu%uwD8D2XE0AiEgS~s zZ2U`~!u=eKQ^ap8{I-v%RZ*DiyZi3Z{tJZRbA$0}3$niNIe%SU$S8_$tqv%3ImJr7 z{eNEvz8j9`TsPLa-yIyRu3Ni5Kw}>Zsd*^z9cXSYnI9z2P?Mli>F8)rBC*LtuNdhA z#C0Sz8;9cB9Lc8B(1en|K%;00VtbYLejsLrNjQQl!DgdarU8}Us{|exCC*znUAzLV z3h178&@2krbObFgB=#g1&8{g$9pAMbmOroukc8_;~zvjkgTsx}4*!=i9=p40S?Jr^>lHB7Pe)~$GF3rbwGLkt)K?C)dA+e~z zB3i5QK+~=PtB(-koHi=kAo7gZfv=pk=c+gdO|uz()?Z#AuGm%A@s|W+WRz&yGWZFW z1srun@xxI$sDCJ`hvjoRA0dnz%&?Pssm1-DWShXE?D}c;IaK^ zNf}v53&N8 z#XS(vAJA^1b&H(wMCbM}(y+T*oP6ofKpE?e>^u5^59LjJ20}YY+l-m)$4M&luS(4c zwf^ZkWTT3LQzwjW-JhnkpU8LwlwI*DUUI1et27GIpJMrIHm;m$lS4L%WZm0Dat1l) zJ$sjgQP|?C0s@L%L`Z5H<|uxY6dJ9N${T&(}6Uq?sGE`XnQd?K{AbKKK^idlhp4^N1Ava@W zfhgfE2>ebd?T|gh;>wTKm?2H=cXB^tM!^wbLBM6D;Vbh^AzlO@&~mOo1j`DNSyr!k z7IG%HBhd%>9g-a{mmH^*OUbMVp5kltqM}-M?S5nEK2AC3$;wxEBTKs{BOvi0B-XHy zcuMxCX2wNm;y>TKk$zinfKG-!l znR7kTk75_TFTPRfkRCJCQDy(B>^~*=Ki&S}L1q7Wl=dHTejJk%@IBdpzGDCB_6|CQ z{eRf2;y)hF{__K_IQkn0Ue4@eks!!U5JrYYlJcbgHk}45C9-BzRLit=64ersN}nJJ z_zVIr+J1EGff-xi{Cp4j%Q=` zN!H9vkj#peI>^`PH(NW{|2iDyztfbnPj=aKmpJAZryG?iV=;09D5gZM9PYob!@c&k z*Ut5Ma9iot7h*Q-IVf+^c9`TrW+>VVbjP&{(}_8id4?>b{7T$d$2I8~99BvL7Y&Qh zBxrqMQbCne@_!}&-yr`R_#cDrQI-GaamxSj?xXX#D*O;$VsqfllLE`4Ya2C2v?_vi@}6p@6GHA0qTXZ|zje!J<$?Yi#$-`_mt zbIy6sIdk4~-sgR`_gS1oBr>F_MuW+=IX>CVv0X|`cC^ulGPnHDOSlzSP{{98S6q;= z_%^uP~#a{9xu_pFB*B+cGRz0p7C(O0ugO7rCxz!B*D z#Q8iRu3pkn$GNXkK#H^E?-I2$bw&yZbG}KuE-(=~qXJ{~A>~)Cbh-pX zNnyqm1Fb0%wJ{NM~AAArOO}VZFT;%`ad=61w zQT(WGPGQWWJ;xI0f+A}HH6o3{YOM zzH4{?P%(v#<29nIzFJ1)06P!;XR&UBR1i#eN_yklJZ2bL#WAOcN{Cd|a+AXO_pQ&~ z&m7I#iGG>wQuZ#m?zQUVrP5c>#7K5$H)zTk_?C~yeApyD9gQr)z7^P&S=bX#wmFVG zZlp4^%g{?9ErZLURq$i#XM~c=eFtevB1a+6+~s%=8qwUwZr*NMGsi3J4|xqA2sb@s zwLdu{)?2mZ)+n?sQ9;LaH+_%J{!f~i2lwf0MGm%wlpIoFx;n7;{3iDoCrOYbn_{y7 zr-rga)^BVpU+U;(a8`7&>XaM4bRxgtTz~N{q>${2Hglgwa^K1NRH~5e7ur8ekoF62 zr|^wC!x5UtD&um1ybByrH*>aRCqF`<$11NN|A?qnuhIKr*xqm&*qLX>?134Edk^p3 zbwR|b=9)&5cd&S&(VG}KBKa7*u6jinVpy>K?AzpXN#*QpptHpZ$6g&8!3;1(A3W%B zsWu7WIcS2qWBR~=4)Z2tx}bk3-szUj=Z8j->YwxDneDfxGHOew7}GT#y0l}8^VA8V zn<^|XHa9(#AH4tQDLIslx8+S8-D}9&1vACi2= z)iBAGti_Yf{M?F1c?t>u2|gI?rgiO%*LNmtQ!*0Fsr>Y4a_Gebd# zUoqEe2^GQ*JYbM`y0h$fZM?Lu*F%L%b#?wC4@49Oy4|0XD$)!;Z}g8CNHnu;kx(AH zb$Z4;{2BXAHRi93IGGEtRfW?T;RENF|rqdr(rkJao!=7#mK3u;w zGkAXA{0DUA{&~e-i%BfKBi3J2o4>b?lQmm0ZaR|ActC`LFa2Rjba>%St#Zdcl1oA& zh7J{bd2Wp`o}`kX@6aQygtG_A45*aQ?S2|DKzVllt@aKQjkwPIr)NPkdh*IuqaUt6 zd&cf2!Z@7(=G>WNd67-u(Mgg!qH?A(hBuN;uh-&JXV|2%z$}L1IT1#$CZk3E%&u3K zB(QOcQ=Z;+Q;&kY9%_C#B#~F-6e7;SmNfe@s7B);$TKYD4hhQ4FQp5fJs@s-YiknF zXj1UzD)4N4c1z@0qwbp-@5Zi0#E>DySQSEypE`FnsnPY`*P-2Gj-q~bnrm`HU+IC% z0ewszory-wJJIdU7pmYlF}e!ImY<2zlB=}y^tazXN7|Lf)RQ>I(tc2%gYU>kf3~CK zJ0cvn^^H5xdhgZ^icv-vWI~70UYgReAI{*L+#0&GQc( z@T~?yLz~m7lx|2Vz*N|;m>(4+W#c{_Np`ThVj6yT>yw16p+~!AilpKnvhU_dS3AE` zFLDB0boO4OEvoN>=NbJjvU71o8S-a~TyJIAcf0ZmX_MNk8@Jb)WnUh$tV!$eh~M;4 zwmyH`*(=X-;6A~qoVV4oSF+`9%^=3EOq+1-+}%(}KFu2CSp%uN!8$tdY4F8de`)DE z%RAQv4@U`G(&X7~HKg7{8T1@};x|d`M+x}cJ9S<6feMmYtSbLe-jmHjDQc9V63yJ!GY0oCnlbYy zVzqR(ZJyKf9HW>f8)vyUB(h6Di#;t!IC{$@G-%eZv2!v-=e&5 zr!#`V4tr0&f7;d`87=x+#IIq#bn8}yhi}A9``H2%vSen`B(1%6^o4GUR=-Z&lN^?cr z%%^hSVy9csg=|<)2-}YFvhY0YT(4xo3kRWLqR(vhP44}l&iU9neKPE`40#m$E<>R2 z^3ll<$q40SEY)jLFG>KFs?N}>_f$L-{gHI=L+39ZM3?V8Cx_j>q4@1=3d!vk#udtU=rOvAMJbYfoK|5&f(8jR+ z%$_ZW-N@5)IbV%4*5u_J2n#P5rRWw-?>Fi>{_IG8`i-M1E_=5~6Ti^YJxOhKZb*Rg zSkl%TW_LNSqVtrwoYRPHz3%F=av%e|P>kY6Rz*?rO<;D&)uI^%zsABmhy*f663L`7yn7k83eM zmh@Z42C2PjnztVYF?ouW||nQ#IqN40E3!P4bwr|&Vg$ozFL)eWQb6=!Zj4NOk6Qk4 zeqIq1&6s6Bs)x-T!y?{d zKits6j#_>R_PSAOL7$r2haG$ng{?;BTK8e;Gq5R0qKFKopqB=^(9GMO3S?KaLuSui zJ$^|+;f*5H+d`e@lY?8EY@R~=v6Q2vsRItDx@nO$k}M}e&>x#r9ayqeyHQsoI^D!s z&!5%kIOEjk1&*t68QIWvjo;_ofUAjYMF1Q#TKQ$e_9rJFgrI}-6m6}n&b^jpxS36- zbCs+uz~bcz#uJxG=kbUrP|~oUFm->#VsMil?ZHTFB_79< zT`9_cjd=VB3Dwhyqh?i!B?m>Q#2H0f>FFP~yx;z0YNL)}`R)=E>8Gt&cgtXtK6PO& z!@$b-Hx&afkxE|6$;&vBUUo_5gpEaSW6W;Lh=>@Wrf)c%Y&0zLpr*4JR)|YmQk05!6EWpYK=Y^#nD9h|KcJ^=XD@uTWOFG58#odStd8wE zCP_iIgZ?;YBfnSYvqQVj=*lPPkZnxZEUTEHG65xfe#SLQh{;Bm^RUim{qTxB5L01X z8u!6u-r|?h0j_awXFGCAOcc*O5$9B=jw?8z5-0cS<^wm9!satnJI7&{j_uhKFc(p4 zx+76Qw2VRNR24F+ocgLLv-8@!DeK(Z0nWLvTgD6SQ=IiV~a?GTz=EuIz$X}Q%7I8d0X~&VcJ6vH7$|P zci#Hfbel4!6El1#=qx|NJVdYMpdIpC8-S5$pa=Kg~zAogwdjwMhsKV7jzG52XTb9o)i?T zGP&ksW#f17ZGtJ&$DMhseJu0`FPKKrH*&@w+~RbZMqJEv@8}>e@^Vf!$AwweNs5fI z(HWBF=00H|>L>ZN?3$nLk00|J7jh1R-2%jB>H>P3g?&E90nRovTDnd3fLJy&mspiTYgFQ#L17R*{D%?CNgZcKIO$)UFYd*(6w} zk#x@_@ATy)j{8^Mcs3P0QO+AI7XeGTx^++8o$63*mOSqto-iY`mog!T&#tQm=C9}+ zd8ax4ZQqj=s$$6;`O2Eiv$gs1dZ5s7@DN>-i(*LuZ~EvdZt4vu&GUTO&tCPiZ_o6& z{J8^U1-oYT?2&|Oy0lx9ex>f&i^UdMs0M)pC!iLh55raaP*NpfXI?ZUwp$tS%N~G^ z^jy^73`mLHOOpRg0d~e#`)07})0)~Y^^kHaxO@+-+c_uQsxx5@B;?X(`ZtH%%xm6P zQDOURk0G7ulg&-=-J3=#6w!l1l~c}+fej)}VdFWz^B#$=Hniz1yAtfPL4Z&d=NZ@O zr^+r-&fb)l{q$S?6`E?lC{^A&SrnSn%cLiqOd6lw{q7ujmR4QYLEuDFY%f%x>U?p> z6+<(@?(S>$ceb6Ln)ZCTuTBx9Uivu9v99iAZ0$*k8C63ak>UofAlLo;H7+sChnmju z?08WKFVWenM;yK0V<*qdqqaC*n3cOpKo& z?v_#8*HvBZq!Zk3G%68e(VCUqzBTc2=~k`grsn1?2t9X&-Cp*?Md)Bk$HD2*A9WzQeC|}nO`D!=YI8@X&%rLU zqV|d+PV=X@tkx?1C| zh1sQGGtu;%@|`9f%yRW-83r5Cr$0(?)*imgP#Y+o1>bxTBv)H?+{IGaR3al!M$>C% zyQ|;qInyYyQ^)O-VvhMfV$(gV`|0s@p4L5@Pj0~5upTj-%3=%*2sK_O3cq(He0$w^ zDz_po=UZsqt(-?RV!7|nw{c*i=%Qzg%9{JQXs!|6*S5n>sF#xvkLW&nIXW6RfNdUC zE}#b{hmz*oQ!BA!JPk7+hHR2c0;ZI!jVs)-GC`l)2L{9QNBW-ojeFP+Wj>F6O(*f( zf9Bx@Zfu~=J(V;~EdBMiNBYGq)q`zs+^=QcEOWFfoXr-UrOo(Iusf^yV`V_v-k>8H z%CznWN8wo#BBQA^dKwoG?s+vwda1%0Gx+qvUAYa`rLtwaQ`ipbK8l;(>-!o0I>3c> z^6s7!pJfVJ$K937_J3(}tgcWl@edv+yH`3pGWXe$yLBsf*?ynV4^lEBDQ))xKMz%> zJgAl+wJHOt-nwX@d|hmEM5?;2GRC3R95G z!TwVNQ0I=w}{J+k(vPl(s0cmmQp#ef%6dJzC&nE*+w+*y%bj zl{-;lWI0uBDgN<{&CPd(N%I^o;bpfz`4g87#T4vv+Fx0_cfURfZm?C8v3VT!Sl zG2+3y66L^&QDg3xhmLt%ymz~{J}^H9D>j9-5W;eEZSsktPxPJWP4zP&CQ=4ZaT`-? zhhA=YH$Tyc4G(?rVy0}esBUN?5L?Z)V>I|NR%{;YF^i}O=6VS1n8kXIVn^6`b1OP$ zP7u#U%w-74e+yQL#G3*%*2}Rk-_KCOH!V#=drV|cB#8Nx3 z^qvK_&7R|p0!rEx68AosILu72vFCW-V&XEr1!~VPvz&DFt?!U;i?Exmvu2q$K8iIP zogd=lG`}$Ac@JCHKZb0>&OHphI1ld~7n@C?D3YIvN_o3KPM25KrRwnmMn7h%f>8^J z1l6R^Penh>@8{h2=+T_Tyo_(>;JiqRYs7vm`%`*!Z|SJIC#$AvUYSwH+*R&RW_$LY z?n>o@8+O{ueDqDssk<%z`F?CPqX#5M$OoZ<&9TBan|X za@wd_M2c}T|M{!lnvl4YZL#TPvM17Oj5U?OKB*B#xwoo(S@%*+Zf&cqHMCGYOFsWv zZK%WQz2I@3UBQMI8T8e2pI@u1kxYL@)TH#%M=`R{WG@SK<;JMej|xe($$>#79%snp zNHz8JHS+Zt3uiL|c~$nM6W?d3jHsn(qrOsgTDrHzl5(3#TIZe%evA@Q9rabw9y+C) zGjDCYxAE?cj;U=QGrI09!21`Qhgc)u#m?zPvrlU|nJ+hN&ZUIPYiJ_f9qURPrJDW(UnD3}drbcl&p% zwpjB*{9+Ea-1Xe#HhP{s*QM6wR9@+qkj@0iDoiVDsVOu=!V) z3QoD_nknDU)6O8hV%dh4a<|ed+FL_O8S|D?b%R$_rD9@`8XeuHjNm$%gu!Q(cAmUB z0w0Dx#O2+8CH|Ph<5Y`kpRgbJxMp5?s*S655MS6Eu@7%<$y>g^GfQ?+hvG!nmPq>= z^A1GaCeHY*^VdmA_n<#XdcSau;QzwDTd?q*z{4GWGN(IxSd+&|4C52^bm>Sh%Z!{7 z41}|&Y&&sZr(~q55UTae(ZKw5`ioP6+4mzy5uWGi(e5Zt3YD8%KhoDc;ykW)&)zrF zJ)hxl>xt6P+803^=}PK83Hn-ym_DYJqL3gN*f#SFaeY#A@Al?T&9ANvU}NWlDQ1GP zcdXfoxFY9M{Bq_bXRvZJ!MTB!V_5c0<6?7I-ki^mif5ffuze$yN!Euq#hyGRdFieE zJy3hSPU*hh3#g>xe$2?L!xjSp$A?Mm+N`6X*N2`)K1?gt4fC**AJ{Y=H9a_<8u)gI zZp87)`AWW7$ToPw-9FclgG5^-PrP)S%5i-BNy|Z;t#ihu>fX!rOYnDX^tV6XDmbac z$dG#DSbHRgwNX3b@!k2N0c=alL~wBcR{7}+HkA}Rlv=m-+U=T7e=HMID;Di`pcw0( zTemHHHkg|pr_7cGlg{O~x%k~3%<+cEqbH)o=7vs>1XDaZIC=kV?#x69wk#4$Pd7YU z*ny2cinW+mE@Q(gi+5tRE9O)m&vVOS{Um2!mr=HV2yDa_J_#P9P@F0&4v(E1;>{5n zmsSh6v*6}Cq?CQxZfE;^Sw~haR&*}c0IR5wGa9V)aRQrv#!*>G`QX&cEs9g0{erL) zO`0=UWUj^I;B8N1Rg0Un(b!>+ZSvd3?rPh7xDmJ?qvX!LiIa0v0sZCt2YV~bEY(g1 z1c^I1Guz2Mrlyi}ImQ%a@cDf><;_Z-p2Yr}T_cx{JM)LVInyRyi;;cT*5)erl9_94 z(}AEAV!gTj+?>IQns;eLC3lu$vnH@x%dpXO6czPU@6&_6`qAZ&eR9OMjn5BFoS0V* zPeONNKdVfa?U+6x)hPrs_4d_Ppb(X^S{ALnTn;aP{z|AjMIv&Zk--Mcms{AFIs zAInV}Q2KEWQHp&W6cbVZ#Q0HLk?g&Zx!||ghl8^wf_-)lVL#4cZwz5u@ArKP2oLp* z#de=A#Zo1plzf zEZWki`Qs#2Z7*ulsQ@fbk$V)6%R5qhQb?3|l69Y!x|=db=v6m^OD%1TEh;2>um82z zN@2M+HzclCssg?T=(&bJ+&fmUF7+kp@|+R>D~06a`Gb0vaR!g}MGt`MV~>0qfL*o9 zbhk+9??}vpsEgcXFL>i=;_|W0nnVR$AHz)U_%2+o#phI1&`Gt^E!M~O%3do?y;bCn zIyxTim)jM3Ex*RkXhf!G>bm|R^~T-3#8KAM)^=Wvdl?1#ZZx2|efI5mlpJcPis>}*m?M_4t{In{?|guC4zPBmX2I+ z`a3LY3gvC3kd>-qk5L!t*YdRXtKEWc?SNaLN zdq7#mMRTTFwb-n^Oo;~THvp9^d+}WPmbgsJ+o8S-^)Sijhx1a^D^j;eYan88%4k%ZA+J~HR<~zJ) z8$~WZR&T$*#(D8E8Wugp^WG}puvnx)yeu`}{-6_m;748&RAL)VstTlQoOisGvh^!^ zG_G1$YFWIo+{W}CWsa+8Z6rflDRUp+D5xUO=ql|d72z0C#li?Vz8)PvaBtnCD7iGZ zDu=orVfp&>jAFe3)Y(fJoH|Z)AXVA>i4UsKtmw+YUctCeN0mcWACBF2{m5K(@lZv3 zzst>&v&PJM{!D!6J09LtNbEBf-%z*y_FN z8qYmtGSZ&}`cof}zzlB<5WIGU) zXOs3^Qw=O*{$*&WZI<%dwe1(p;6-L*DxkJI%+2~L>;e12(b!NZb*x!MK9A?35EpeUaP~*m0NqK zJ{PH6e3mVvkvw*iJLkqw>hh}Hb z7+mK#qY{VX4gp#fFHD-wa5A^ogp=2WTXxL#QzEef7vt_R=T$!Iik>1%Fu1Z4e#D3& z_Cs6%+C9CX)Dw9Jk_1r?kV7$6Y&)JA6mcsZ{a_mvi4(Ve@pxa&j^V+rSz1C9?ma7$4Hs92FqZ+~T z@Z>T1DBCOu*%QAL^NulD(sidKrSCw8hrG8uezl2Q`=q|RT~Hibc(nOeV^XK9JDwP! zRq8dlbHbm#>FxA&5)yHooRc{lSiR+oV_#A9J`(i^UnLm%OkhS z?$Z=|n!ES>F|pwdMmcI$RMpd8dha^BYu6-9`=mPugAd-jd^N-!Q9~@&pWE;M)+`|V zIFn8a`r{Ys$KF?R{b!&9r^PVMykoFL?I!E0$7(zx@XdM^L0dAtYBIji44%Kwv-boN zJkWU2Ig8x3!I-p|v~fg1<9Jh?B5%WWmk($1ZIHG-({H9;3n$TkXqrzd^>MPvNs>6& z*ztN#C)0V+pqSY+j1~va4+ym9-<0M*SwEfbkS8B{p=i&(^Y?bg&Av{(p)i{Bgf5NI z&QF%ff(V@zNDmt-^Spf?%CO5PbIWDL1(D))$7Cp8EGac}8-*drVGM&NyA8{Ao0`kk@PHPPV&) zPm~Licl6<8Z^T9HMDZMeZ8!ahJrE@(jg8@%_G>0WH((W$(3#dJu}ZxbAF%Y7vHhKa z21AKjJ*M-u)@e@Hsz*mMge6FOg*?&^s>EUG%T5`FMc+r!X7}9BitBfs(S9D+4w%?PQW9c`{(>i?KXM@6#a606{ zqSn-a=-7=(bUJm~>Y7A+6e3-h9`w%_jkmp-AE?#p9)u932$Q5na`Kki;45Kd{4D`f|^Fm$@E;9`b?=g|7Z2k zf-|4BK609GI>kX$t*lvb2qXP&(&nyCm<%z-PPJTBEK1I!P`$D$xdlcQ(lWUF==tH7 z(qK8hF$cf6-h;XOOhp+F9ALlPq4wxw|M6W!KApKYtaK$}&(zyFQlD4d$$9Ju`n*rY z>(Up|y**7T~0o+6SJ(kwsJ<0u($DK#!@{I$V_SC<~Eoxk#aB7W;$Tetya zAH|y%Q|s8Kv`?>}DVtB22&iv)`T(mEYiwQ5Vj}R?r)S7Y*t&E&)kW$6)~XltPTp^|U?rQ4b5pEwjn7K<=HzyF9aHxYyzL=5@a)l*+1Y{3;Lg381JW7CG}BC6 z@4maCd0G6yCJgKq$Huydfw~m)_lS-U!k(>n`#M;H>q3I7CT^sv&-RcVs4W&fcKMFQ zGxCw^o!+P3#P1ShYUEC*KXd%HxH`6dXZgFR*V^m};U{DLxbJ~$omk1H2Q@gg0!a!} zi-T;;G+nr#T|9IonZIAah;94r0Jh*$-r;@5kUOvHUdZ2(kFuWW|48yM(VTbAYX4`| z7p#2-FGjD1dAB8)M2@}8zoyT6d0dvJE|^-X(LJSQ_N~u`9@4Xs+--IH=q9a2pSk$4 zzJ`p@b~Pqf(*;9z!T3m|3#A^j2EirJ9)-?WP4_UINVLEI!ytXWSAp*QXujNWi5ya} zOi`D!+%*M`aE?aFX@<*>(+Yb}d{j8^J)m$QKe7JSh;+rVokoHQ#IB;FF1H!0PSToj zY&$#?Iv^t6BheypJ{)-z{)x3(LN^&brcgqa*${I+=c|)}}g$ z{OZLU6>`;8!h=m>G75;I2fOBumC68JZf_i-uXII0ZOVeohx0GU%O`KVd7+eUA+Rkd zaH4JdLCD;L0OyF?@{MAclaaZTDE&xxCWiA;L%ClZ3+1Q}@Q`Lu$Fas|+p8wZ@;RGo zAF3YpdnRE%ujdoXM&Z|=xVt@{p|_!8sM)3TL6y3QXx45(HtVe8RmZSPBe6YJr>TxA zJ+m!Pk zt4Z3>5(8@Sg)O62vG3z|(Uj5c-hRM%;7z66Vdp_sj|B1fH}lFfe5_(KZYNJyr9MoI zKwWZu?YA%f#jSGJ88O4#Z^nljJSQoNSw16?S*Ud6o7VDRqh=$m0&Y@aSJ^-Xg%b@V zm^+k_wKt`P_p{vIKY$S5u6V-hw(_I);f?2uq~D{9bk!r7swJh0a=BaQboP)=ghjfa zNolSwbH6Cnp#N?Yq~1p1_-W~^P{cFV9SY>2Fb7jLHbl}D{+wL@IA z_QtWTp%%rIN&$UIWq~8v4gH*s{<~EsXh9Vl`x0LkKnEg1?W1TdmgMK`8 zuBnxahMFrYU5CP+{G_rGcz?X20)K7+2BwjP!@<*#`c?G`&l9ua707*%SPB-Bt{kF6wy`#@)xQc`}x5 z9$OJQ?pYwj-8p5fR{MEt05-TDo8Qn9i6tdBNx~{+V}-H|Q9=r2LfW3Rhbg8LYB;#h z$~b%NtxS8W<9qFyf19o~`c4y_?glQS2nDHL@g^5XDmC}RPsrTpRZgEcI9}6t!a$q3 zQFD4JYmR&SRGnD6Ko4VpKoS^U)0OGj*HarmDvtGul7S zRO5{8p&Q&d=c|2wul(_g!Hl*qAJ)qqYR|vU6&J6jA+qzc0>6-cP7Y;*AgwtF5+x+i zu;amFrs8X%1|z-McZ@D^4%hNA-jMB);gGJN5Gy|8dm|RDctGO@GZ*+#nxRO^8AJc> zC&9Z`?re;}&6lx>oUkjLJ>v5wZ0*$9lcp zSjjk$9)68}qMHVl8Mq^yc*4@}8tbGfuji3-o>p-r?=Z z+2$m)dtb#+M10Oo%yOz3ko(ekA^(H=wuh>rh@Oj9!)Ns;uW0M!vjjAqrVTqVSlLs3 zK~d5tZN4C3lZ+}tIy1)ofOD6inY|H8DaF2WhsH%Qsk^uHAM7d$znfruH`%k+^<1jn zdm;B*FN#2inp|J{#fS~O5a{8E8Gh=*}_=DHV1yEzuPSSMd+>M%PVunHW8}(&qLyB~l8pFH(=~`dFDBHV}d> z3$-bWzy_V2=6*KX8CXwJb{YGHp8WA-S*t1wb}n^3xF=7afyX%c*y-VpYjy?A<;3o$ zOoNG0PUL9S?gaO=2(JglyUOn5@AE0*-FazhCnvS~tyzA7nQgkcsqYFdyC~~S=@{+F zFLrx8|mYp|D=$S0e0ef;qkihx3`S_YAI*8LzF&l$ zx19srk)@`?GSeH6-d4+y+L`H;j*>fnSU|!$JETH#E<@Q)noKd`a<9}8V%s_&y?0^{ z8|Kj;gMLa^xCh<$p85L6zeFhaJpOevpE`eF09(Tmp8CS zDwt?yTI_OAq`pBqo9s?@sdFboM!ee9V z`@qI0$;i2St1@|ea0spH=~@sz9$zB3&*s>hefk>?@t$SLpue}#Bw@2-P4P{J1F32i zMRL2LPKcRAwta1ThFIIYXKU^rvyfIU=lv3uSZgzB(_0?#Vdl!Ym{^zi0anT{k|LHj zK85btdCpcpWcR4ljyDfc5-tO^ZIimpdq$cjypEncDv)|efb;cjjXO5B?W#E*o_#O0 zwKiXoFH{;mQ#unro%Z%(>=*K^{tuK>l1ydqa&Ak=d8fv1IG3BU*^tiGDP%gYyl#+T zhi$xbt89ihMX6ctFiSu>K|MDG8OV^ z)9w(Ymvsqh8ddrP<0!9|cqskdeVJzBm)cprJKpO*IV3!5e>b_Vmh1e9wD2@vvw3o# z5Qpn#_U3o`yWiey@|_yDbb~%;J0qL@zMXb1UDt)Tjhs{T2g@*L$4-)WZHo1ipF6T? zle`}GvNNptOl(Dm+8+IvZPgN}kaVjE_&|1?^G9*AB;2Uz^w@b*@sniQ?cp{W6 z>N$cZ0&_zrxlV`NO<-R3#jB8_YmK5c&%1j*!5XSA>ugWCiSl}G4Kwi3X7X2afFvCk zLwbn{Y+;D6eWZSVpk)Wql(?3|=o6Q=Cu{;KP%G1DIrUFBN#K>ikDa&ODUJ2nMD%$4 zin0omA3rb^)0lMcg&Jjm)Ht0Ue8yUS*r@ozTk8xB7I?{~Ta-6u284nOIyQ#rx)r-? zXW?zx*b6U%Y3Is<-{sH{MYrp{|Dq6?gWC3Ts1WP^5c|o8o_eM%{IS>^mUwYB=4$$3 z{Avu})9z!SVjbpGF-Dt685NqK{A_Q(B*|^Nm_MK3t;DazbP6+UhSP|#4x8^Ufs*-KSl zy@2?1Uq$2Hq$S6+3x}rVDFIeKDZ6z=w22!H`7}&Xcp`;KV zwg`70jE4_K3L-Cqz_&>{xcXyI2wSALvz@mj8tI0zU%JFw(i`cIa6-Adx+9>H9=0n# z0|J4_$;j~Fw{SVxg)IcOc#H?AG_DaUgTF=^27^F&ATT%t4khA&{Qa*_MC9X*L3-i3 zg7QVWdb``XpfEqa4tJS@!%u!^@m+X++x~w7z$h7Th?tTX1P%=3@j^K|dtL z%mxDCIz$eUgl>_9g2@+8i4v(0@qqy%5G%k8kU4sxP#6$3Ktj0zw0Ho!N(zWNI@x(i zI=f3P^vB)HadF4a-QC3&_osmGtAr~OgYw3JnLYd$PD(f+y)hD~{U|#h3<}IHA%V2F zcgA-Q=_+B5@2j(|5B?C0@4loL%FP}3rXEN;7o;P8i*dq#AV5OG9`~cT8@#~u`0MaT z2;33=B#DFsnEvb2zCMUjLc$r1|3F|MFi>(~7k4SWgv8=^lko6DIXLeJGvZDzwwNq5 z;I3hlknlqKeZ9^ei9vq7m<@L^?v(Mu84cWt-|oTn&kN=4?uz^3;4KRsadE~-E)3n` z*F_+GFz&dCkH+A}73GENzXQ_86@$Q!2jaI|@oz$nZ<26xxA$>Hfw@;0eK6I+)%Z3r z)o+-AxXrK`PjyXp>IVJA+cvy_*+J4VVI ziMF?O-;e7q+QHdTR1IMM?p9qxRc%espBVgqdeZ%iU>W_FmHPqxU)Ui0+`U{JT;2U7 zG0;^~{zX`c{>$JFeoy~paX_H|>jA)Nav$^Yh6;L2JMel36wpaF=HAPOAGCkEkm zWB`7E7Kez=Xv`Asf|wT0{k{=@m)*i$8$iT%uyg{GSa&ADvl5Pc%OyxKPy%~cM_5Mx zVOtjIKYp0K++7h1li14#jc`MG;gH$e-3ueRxVvf=up<4JllzYT%gI0q^nYCd$R`I5 z{yO~^Tpg~g1q-kR3~(f$2LGct0n-)tQ!o%SKnljw{NJ^HcNO%9S3yA_fB_(Jhk$^k zv$%cOWdeKnhuFhUQ0QCsK(^3K;1FvD%k4k1E82hD{1JW*2-vDMfR*S!Ocwq<{f9{t z=>NI^kWB_0pd|TK`Y*65T=^;aCj!d=L?8&j3Xm@vazHc-()!ZTZ|%_EwL|$@i2)Kc z1hgG6_#rWJ@Il+*AGJV!Bv)^xB7zXXLW%zcHnGJQg#LG5P;}#OBTEaWUKq?pQ{HbU zU`r>UOD7cm>Dlt%gJtwzTK)&}zqgO=S7psx(gW#*!s*vI79hPk7O(>Shsel&Z~uWq zpmGHIza9Vt<4Ec+k^$k>BFazc|3zY4AAXqutxX?@z<6zd7zv^Vz8aX=i1~siuhVZyyoZV1cp>i-8 zX?ge-7+exJ9?&haa1Fx%9UTNWT8o;veoeWQZJyY>DiNphVKE?Fa6UA9oj$$eRfByZar8 zAVer4*`*eF+!c1XRyb}?9(TqT_lLg@iMz)R_Xo$dAaz~c?QC7$ZI@n%9{-13g4KQ) z0uX=z1Rwwb{^LNrxS^!}XS+cF0ubO|2zdIyv$R!N+8$cm5-*)6S=y3*a}UGPmS<_J zva~(4xFue?j$~;|y0oQS+A=I{d6u>+OWQ+>+a;n!yrg^(FFl!fNkbuCGEfrpENxZ( z)GHH!0RLxT!{UYk&;K=v{!srX009W_9|mGl4KocjqTdvPWq{|kJh;ET-`?~GLIBC4 zv5@VX>v)#7Dofi#i(7&qKmY;|fB@?a%j17!{viGb*RUAW;4NwEjytgsZ?Gyy@D=^P z|L6a+=>I1Tfyxs6f7S(n0y5wz@vr;eN&Y!xS-}gBZ!yf%b|GMs6olJhz_s9`bSQzP z7#+Uh4GXTq06>b5#K5~V<9&oBZ9!z<4Y)hhYBm5bHUOW90Xh&3h!li7111GXc!)vG ziw@(afc|Rzsekrb-adAAC~xltcj^$l3*#?)Q~$t)@eiK$laB{(T=W(<0rb}5?HrKK zt|XvG7IO1rJBglTuvjOj4L*Hur+O5k*sKTWWU^tw@%- zEiMeCExfJ5iGY*Ek*albbu%!N<1e`JO+)oLhHqAMCJ@|@rec*J@q$)WM3fYzVw^Jm zEcy<{tMx2f&IPG$kdvhXM2P_ddWSMByp|L!f6fThqQ9sl*e`XnSZCJ?B zRMasJ`Olz=6A_A)05-cSrPQo$`J+rl*p6O=OOgNQarf&lJkKz=x-$8@8ec+;Gxpuk zm14Er9^?e_ixh`A&s|9w8q?v>oTSCqZQSgSSyuUX(`TjIGed=Ea$T~yT1sJ_=kOe? zWI7D!3sdcuI~TAoK{}0{o&afEmiex9%v@cqQ-_Z4f-rengO1+Yg2tA&!le1AeRf~hn4k}zD z;K_0-j+E_`(2Uh#S=k?t!TYDnv&}st-NS@F2qmB^$tZ#+5puPSgR!cJOSR`|#p6=LL zrBfdvWVHUsT(@mu?HpUes%i^<_vRp^s*B!~{iJhTHi3#BQbPEh`RZeaxt9Y9Fp5^|1-!1Qz95=v-e z>gGudW~fIz;uKq+Ha~M4!IfDSJ>z@DMc3T4(beDOTyLQ}lVzsAu5&`L^d)gDcHXYn zbPp7Uxc;Ih!*AfRFvD4Y-H!Rqg};w>Oe|~TB&vJ?#RVkyuo;{t0dgA^s>JiqXYkw@`iA0w<5NbZ&%*7L3^Pjx%!h z;#EI%!jp_lB8VsiQ6^6HSOANL%Dq_J8OAuo>}W~6kl}A$G)V*+39F8ZhR*SP!^=Ge z?W%@{Pjz~60w+>qRhLUjx^gqi5YJUU_5J6O==l9PWN-RDLPP1>e;rD`--G9>{y3r{ z+k&XmT@(BNUJ02$6GuJ!ru!R&XkoWHC)U3}U(3vNR7{Bh&z4fss4)!~W8Y4lirjs- z^oR#J6v+QD7H+OP^kesXi`aW7(3QQ65+OB^Z0^N@RWc%wF!=@5H7@{0F%gby&=Dr?8)A;`==EE;P*V-Gp<2Y0a- zYE^-#OC9_d`6=#v;E6+?ld=cVu#V%sZYo*`F*<-DVAY9Ikf5V|9#r|`U#~;ESMM0h zG5cT4spYQ7s1SGdfMdrkxJhSh=U(!k;A4?8b4@C*xJvJKirGz>YOt!pjZ{J`O8c(3 zw4?fjBjdD#&kyp^hy#MX%AazFR}4&?IRAwdo@Q3P%hcKdMpB#akgdswRjg3XG?=I7 zQN6B-2;w0utfZu5aRWFCA?{3c0{m)AgWy9Ha%vCTjR=nyt81BP2v3kBF~aG-jHs@p z06#`KVc{-eLPk$8K($H^LsZN!HRnaz-CW4t1;j=d1M4Fvt?NJyCxSJ`nI?2YfG!nO z3;v~Zgu$RSigyWhgF1yF4JkB89qY6@o22zGk|k^3>CLS z>*)!mfQ&!??`HXa+~jAX+5N_O@1SDvKwe43G!M|3O73hOm?Wa+1cE$O-lM9&yjSb5 zy@#gHX;SNF9cV*G=2^Xhyi#@4R2DV72Dacf^Bc#Fi|<=J5LSp>WHZ#kL*Nx+=0CXg}(pnIKfV+vRb=D{xhGE)b`fg8IPESbD=h>BST zyG=85#Y42%256@_1nK8iyaX5&o^dIPL9Ri95DdJE1{wK0C! ztR;p?(EuCCSCgeo`m>8nLcwR}LtTYCHzp$_`-X}>II)KHqc-O|Zo$u;Re_4g_&@QO z$H*$V|IhP4e?Q+Jx>O9GCr@f_)A(wtj2KBdDjSd{Z9BU?a16Wela=w;y8`f>TT1D^ zfIh-`4AF_o;Cd8xJo%8p5Nk+jwGW>fVvL?sxwCTUqn0??o#T?`RwDLW2k9yOdKDkh zUf##g7!HfpMbT{hSBNOB%MZ+dL1R1jU(>sz+@$`PTwr>fBbJYfr3X5w)wzwGf5=YR z?QdXo=&U5q2Sll3cRQ(tDV7bw>>q`{Tk_bRo%iWi)pyrO70O-?Xdc1D0$Pfb3_=dk z$tLoW*?7w!oZ^)9qP7b!X?qMx zLLSPYM00D=D;d3C+!!9_bR2(B-SJz;`!k9#Zf~zdBIPbfri=*x`#V&Ie44N;#VjEAv1oS^8+OeZk; zHf6w*kO?BA5xQ1Kkl-WffCye~w0ip_>51wccE>xsG?m4e#Nxhf5$bm7iV-ik z`pI?66TNlt^k@{W&|cS!i-R0eb;yuG4ibWT%Mt{K-Bvo()HT2EsZJZe@dW4CL28Sgle?%<@)&Ux+gbkr!& zx-IQu6$Q^(_%;tCoV_uN$6*#l-v}ydnddK1J_Zi&$3hngt2FRxVH8RCbC?6LOAUDh zw#m4!p5gZE`)*8Y3+v*e+LUt-A#%PiY{z;oG|&gu@QVd`dBdZ(e>f59$puM;}6G;Q;G|xl4;s z?9BJ1rBk}CncK}Ah>MEO=fUokxWOe2qgrNvNI8+|$--u&|ibG*QMd;zt^Gup$nl4!IT zxf1(6ZPMwEnEsF`!910kyrmN^a5%P4!^+Empo$N#$oz)-GaOhxIubG7iK_eTy??3$> zgIvB+-0A#>x7dJCm7uMGt!0!fdFi1eOpCE%J%s`JMITHWG5~N1<_35HA zH~yt1==wq-@u5!SPUC>@8EfnJ&L5=Tjn+)=-mQ50F6mnNd+W*^^A&bw{KGT#=RW92 z1U%<{{PUP?I)^0z<8{c#?;W3ZDqB*TLCrEd9FxmY^zJ3cH4e37O^gzmyn*<_dV``! zgE0Lf@yIZIgr&ZF?dsgd{UHM^Za@V#m>_Nkj&r$4VtY|h9sJ&4IHd-(wcTh?%{}w4 z)am_%tQSRVdk^{u-y9H;0eXCK*=uCr!c&Hn5Jf*vvUAt{pvy!le1_^P)~oj+QeDg@ zp@PK&(D?M+q=hO%2M(~^mUNy6a;Ai@a<|fB$i-}ZN-DcJQe1Kk3?EVy4r^D#x1r{jmCspzjPbR? zxVSAmctigwCBAMyAftpCj1IP%*B~6fXDsY^@ll9!Ti?Y?t6;AicpgBZPtN#gT8b{O zLrL!rHz4g;kjd3`^EqJ=@zmddqw#aek($m{sSw_VZ>m4qBXtM4RtOa)XT|(h0&}`< znOxsYUZbkz(1xsC*dMS2?qa#dYk`24G&m~V@>JsOCHaWgDjI3!=4J0+45(*dw)Ny5 zuobv2KMLUtmLCERZ#$5Oz8Bw@#^TktzhV~sXf7^Y=awiVNvhXuF7(VP>OJ=YwY@_i z@IP{CasTOy+8wMIA0QfmrRpTW#avySOjE!LSHQ18M&}T`WFir_CBAR1@tO5O*Uf2n z%hQeozc;bT4{x6SZaw(zOw$yZen|y+8`h@LirKob?rY#^oWr8}VYC3F;+;gy8mktv z`q@ZIeizGZyF^pTMpn;UWSP->kb4~nh=B!9#QkM#%{vwWFpy3KW^8lT8CR!P?2aM6 zipb12eZWlS=^DipNU5m~PaE)lmSy-8p7z-sfxNr@`nlpm)QqT~eo!GUqb>gBC}3id(@4mY0!pLioQLd1sc zQm_ZV7!y{(l?M>5xa6G-(BX@t&&>QvqS*^SUvGA{P7B#Eq zk80d>uU?ro(|oK<)YV++C!zFC8|DnWG5ai;bYYd{`cPB(*tPTGlTT!<;8pw``cB~g za<2CosoMYYLr&T_3+uoYCxRn2(AB z%_&mt<-+@Nh#US?n}a^^;QT!Hq$#0dPyL}(68B-^CjZ-*i%6O|Pk+eh0u$e=s9Wg< zc7}@HwHm9+PWQM{sDHd7Tk{O-rZ4)q6dIK6pxzhM(P0#R@*{juZ~KTpoGa?Q2~$cH zL$5k!wuWhxjFzTbBstwo_yB9Kj)Wa#kh!IF+;@uM#Q4Sf`E)nmJfoD9UD_J{_@mBj z64d?04(3~y^eD}$=Zijes=um~?_e?=r%$nQP@vMci$L1UEp>TdSa4#C0+j0#Dbw3#3mYKX+{B#Ft+LAb#sb z(&d!U2w6y!c+%-(*EU)}d$kWzTHfsjbi}QWY0P7jJOyjw&iqlq>7R`m9*AgLPl%ID zPVO5ZJ z&Fq8Nd}r@Uixa^%+cS2dsc6hTSpV|(b;ZNV=Rtlhiq|Jq8X<!Pu{a_=4TAcHH+)?nw8-U+(m{=}O^cFLb}qvdm|_Aj(UO?EaqH zlAqzWdUB-5&fxS&2VkNY^0mV>iU;YV^2G6BtsG1Fo!VbGbqN6E$ zQU;GUjozARbqW^E9GOJi13Z-=Eb=VvMofv8aSiOCKsvz6P{9B%HF*y_u0pWVK29{rBL z9woix@Sv8o+IwMYmp=M&)m6YI;TvPJ-NDle>pT68r*~(|iUv0E$2C=dg!FN}FsSCM zJaa28X1HNYqIGaa!0-FWh`l!uJtqrr9Uh))etD0-s|TWwZSSE@;19t1VVv|n#E-<= za4o0s{1K>W)iz(*@X4sv1)j@2==g)fp z^rHa?muW7~9i($TVPqet*bB=~0PlOmQW0iW%mx^w&>(XcJ|a4mm#WF_P^QGm#dRdj zp_@YU?`dznQH0Vi_qZ>9fUaJFD>bYPJJe>N)Hd*hxjq(y6m}~mqU>q4LJobZeu9M? zEq{R)1k|(x6imRyg!$U_t_?u?#BZ_LhgY#o<-nG_hWE(h?K?3azcZLDXUL7f=%!?# zbBfG_gC{v+4r|v-VLg$!hYxmv*Z&G=f5>X>#ZzvY*U*gfnP?PU$Lkic--<4K`_iyl z=0L3koG>AT%FwWkZt*>*Fh?yJ#E#P1KU{#+u6spIW4x#+dnz{ZO;W4J?C%!aw|t%D znU3@Nw4wg>YrtUyXo$qEvZjD#@=8{x-Mj_A#3hgK>T_L>JfC#)<#ooP4G~5&+{@m{ zEAe&|wEH;FY@;SzMlP;H@3u0)@@~Zcj#nQQFPVBgT(D_4!e{j$fnQ5uWT*H#NWKzM zd56i-B(#0x+ai=^AKm2Pm@i#`&_AplqoGIS6R9?F^Bd1KJUEj)bHZJvf>cOZ&+YsM zHT}z7C`qhF%41*I!<|W7{0Ab+1l=-DuF=60-9edRS9Z`UdzoM@sfYUS^^ZcmE(t^p z4UY$}6whA&37s?{lrwBXP0(d_eTEptg$1)S=8F$qd6={LMc z7j);G>vUKjlq_6f7yRuRY4NghYPeeVnP7c>+%d+*4d#3K0kFmde0K%#S(q*#37jFR z%>wJ8bTZbA?EvyI*8#%QqdiI*GKR?4QIJJmSZaQl#T53F<^G%t-8y974!QrfBTff9 z`#Ie!U)!V5;xBcb*9MGHVbt|O0VM1$gTy}XOj8A`d7tji!N z$9()aYl;t0;ur^$|En}4_Hs|tnt$ujh493sVm+q5y2n@(Uuu?e_1;siWmgtj*9Dey zti>rv;)b<^Gy zC(q6v+9V%wbz#JE;OW1GR`om8f9gXy|L}1qck2JYPq^OD}~dg1hmt|ES^sTNPKL0=UDvGzrdp7m9JbN}SG64s^W zp*Fmsy|;^*&39&#IKyqy*{C3i_Ksp@t9I!q&Mvc6sFF&>{}{CWEoA|hshAU?;Y1qU z3FjWTR-bHO>>u`ic$(8fJjytZ#lyH4vN;`_UjCZtjFRLD3&c|4%S(Z}M<}zoTa(|O z)o#yvET^k={U>)_v+>*G6V*`aqRIj0drj|C4U#yY;6@#d*@wUN`yaCAzc<9G>pj zJ2s!PEKXmbIy{K)hRy^pQf(6Elb_!Vf;C?x-iKE$-5lg+=W=~Yki6l1$niu6}EXcXG?yi4x$ur#BxtJFd z6TpHkevJ#W--?f1!Jh5IyAy1e$NCy=SIE6-)7W|5%i){HTgX*fx|iKkDpWxJ?Z-ww_@jW=92P+XtCgAy`!Ey8*Y zr1E~sPkOu-g_8WHbaQU!x`eD^5l%p{D77MdZgi;v{|*s6WrTDy&sl?cl&LuF2cf?l zn-?6~?}WaTbSHr29cGA%eVGpP(CwA7Ks=BaYfRV$QqHYc&okzbpsT^Fzh(Dr`0KGG zA&c>7grS6@%BY@gX~0kq!;ZpYYag_(d%{W9R*fg-+P*|*;4QxQaK*t-FudNPO)fSj zLfU39`ZN;n_ZVI!Sc#EwK~kdFPZOgD!%8I#{-WH&ZpadbCki9mSY8+{Z_kScwQ*>8 zmD{wR-k-q&rl7WK(ducYQ7_F>YN=Fo%8S7uH2md;ejv%XfR+B(7cGPT8fdI{>9sFR z+&2r?!xRJhp+C(4-h<8mQg_qZ4lvVoNj0US*zdYZVCr1T?a$OoZD)vg7wN6h)|-+d zQuXZ&mrp);=wDwKix#jjU$iiPtur0Ylin^N$S 0 { + if len(sandboxConfig.DefaultConfig.Source) > 0 { docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 36e0399b51..a0bef27c8d 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -61,10 +61,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -97,10 +97,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -133,10 +133,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -177,10 +177,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -213,10 +213,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -249,10 +249,10 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.SourcesPath = f.UserHomeDir() + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.SourcesPath, + Source: sandboxConfig.DefaultConfig.Source, Target: docker.FlyteSnackDir, }) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -312,7 +312,7 @@ func TestStartSandboxFunc(t *testing.T) { }).Return(reader, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker - sandboxConfig.DefaultConfig.SourcesPath = "" + sandboxConfig.DefaultConfig.Source = "" err := startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) @@ -348,7 +348,7 @@ func TestStartSandboxFunc(t *testing.T) { }).Return(reader, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker - sandboxConfig.DefaultConfig.SourcesPath = "" + sandboxConfig.DefaultConfig.Source = "" err := startSandboxCluster(ctx, []string{}, cmdCtx) assert.NotNil(t, err) }) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index eccd8b7498..b3710406ef 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -4,4 +4,15 @@ admin: insecure: true logger: show-source: true - level: 1 + level: 3 +storage: + connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://localhost:30084 + region: us-east-1 + secret-key: miniostorage + type: minio + container: "my-s3-bucket" + enable-multicontainer: true \ No newline at end of file diff --git a/flytectl/go.mod b/flytectl/go.mod index f944444102..43025c7c76 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,6 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 + github.com/flyteorg/datacatalog v0.3.6 github.com/flyteorg/flyteidl v0.19.3 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 @@ -29,6 +30,7 @@ require ( github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/opencontainers/image-spec v1.0.1 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 + github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 @@ -36,7 +38,7 @@ require ( github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 - google.golang.org/grpc v1.35.0 + google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 6658e96614..46b9491b38 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -78,6 +78,8 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -102,6 +104,7 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Selvatico/go-mocket v1.0.7/go.mod h1:4gO2v+uQmsL+jzQgLANy3tyEFzaEzHlymVbZ3GP2Oes= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -113,6 +116,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -170,6 +174,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/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= @@ -267,6 +273,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -337,6 +344,9 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flyteorg/datacatalog v0.3.6 h1:eMA9FK1m7bmOp0LRPt3oT7N+Ki2k6R2IzsqmC69/O8Q= +github.com/flyteorg/datacatalog v0.3.6/go.mod h1:BFc3bTKlvQAGRN0aZDvCt8u1tOX39yN9bcI3R7C4hTY= +github.com/flyteorg/flyteidl v0.18.17/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= github.com/flyteorg/flyteidl v0.19.3 h1:Rba35Qi3eG/lExzWUnjQOgX+HpHHLWj+N/QBw9TlFBo= github.com/flyteorg/flyteidl v0.19.3/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= @@ -386,6 +396,8 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68Fp github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -497,6 +509,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= @@ -540,6 +553,62 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= +github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.8.1 h1:ySBX7Q87vOMqKU2bbmKbUvtYhauDFclYbNDYIE1/h6s= +github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.0.6 h1:b1105ZGEMFe7aCvrT1Cca3VoVb4ZFMaFJLJcg/3zD+8= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= +github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= +github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= +github.com/jackc/pgtype v1.7.0 h1:6f4kVsW01QftE38ufBYxKciO6gyioXSC0ABIRLcZrGs= +github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= +github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= +github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= +github.com/jackc/pgx/v4 v4.11.0 h1:J86tSWd3Y7nKjwT/43xZBvpi04keQWx8gNC2YkdJhZI= +github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= +github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -578,11 +647,17 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -597,10 +672,17 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -732,6 +814,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -780,6 +863,9 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -789,6 +875,9 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -890,6 +979,7 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPS github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -909,9 +999,12 @@ go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -919,12 +1012,15 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -990,6 +1086,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1044,7 +1141,9 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1059,6 +1158,7 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1141,6 +1241,7 @@ golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1149,6 +1250,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1193,6 +1295,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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +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= 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= @@ -1242,6 +1346,7 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1301,8 +1406,9 @@ google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1327,6 +1433,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= @@ -1336,6 +1443,7 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1352,6 +1460,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk= +gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw= +gorm.io/gorm v1.21.9 h1:INieZtn4P2Pw6xPJ8MzT0G4WUOsHq3RhfuDF1M6GW0E= +gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= From 29740e0b62160d92cb68a06cdd3655bcb24ca931 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 1 Jul 2021 21:07:44 +0530 Subject: [PATCH 090/356] Bumped up idl to use insecureVerify flag for remote and fixed docs (#125) * Bumped up idl to use insecureVerify flag for remote Signed-off-by: Prafulla Mahindrakar * Fixed the doc links Signed-off-by: Prafulla Mahindrakar * Added sphinx-tabs Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/sandbox/start.go | 1 + flytectl/doc-requirements.in | 1 + flytectl/doc-requirements.txt | 28 +++-- flytectl/docs/source/conf.py | 1 + .../source/gen/flytectl_register_examples.rst | 1 + .../source/gen/flytectl_register_files.rst | 17 ++- flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + .../docs/source/gen/flytectl_sandbox_exec.rst | 46 +++++++ .../source/gen/flytectl_sandbox_start.rst | 5 +- flytectl/docs/source/index.rst | 115 ++++++++++++++---- flytectl/docs/source/nouns.rst | 6 +- flytectl/docs/source/verbs.rst | 3 + flytectl/go.mod | 4 +- flytectl/go.sum | 115 +----------------- 14 files changed, 184 insertions(+), 160 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_sandbox_exec.rst diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 807cfe52fc..122b87f7cc 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -27,6 +27,7 @@ Mount your flytesnacks repository code inside sandbox :: bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks + Usage ` ) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 90287527fb..42d006319a 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -6,3 +6,4 @@ sphinx-material sphinx-code-include sphinx-copybutton sphinx_fontawesome +sphinx_tabs diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 2517816f12..cd582290d0 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # pip-compile doc-requirements.in @@ -20,7 +20,9 @@ chardet==4.0.0 css-html-js-minify==2.5.5 # via sphinx-material docutils==0.16 - # via sphinx + # via + # sphinx + # sphinx-tabs git+git://github.com/flyteorg/furo@main # via -r doc-requirements.in idna==2.10 @@ -39,6 +41,7 @@ pygments==2.9.0 # via # sphinx # sphinx-prompt + # sphinx-tabs pyparsing==2.4.7 # via packaging python-slugify[unidecode]==5.0.2 @@ -55,6 +58,16 @@ snowballstemmer==2.1.0 # via sphinx soupsieve==2.2.1 # via beautifulsoup4 +sphinx==3.5.4 + # via + # -r doc-requirements.in + # furo + # sphinx-code-include + # sphinx-copybutton + # sphinx-fontawesome + # sphinx-material + # sphinx-prompt + # sphinx-tabs sphinx-code-include==1.1.1 # via -r doc-requirements.in sphinx-copybutton==0.3.1 @@ -65,15 +78,8 @@ sphinx-material==0.0.32 # via -r doc-requirements.in sphinx-prompt==1.4.0 # via -r doc-requirements.in -sphinx==3.5.4 - # via - # -r doc-requirements.in - # furo - # sphinx-code-include - # sphinx-copybutton - # sphinx-fontawesome - # sphinx-material - # sphinx-prompt +sphinx-tabs==3.1.0 + # via -r doc-requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-devhelp==1.0.2 diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index b3c1bfbbab..3b8bfae9ab 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -43,6 +43,7 @@ "sphinx_copybutton", "sphinx_search.extension", "sphinx_fontawesome", + "sphinx_tabs.tabs", ] # build the templated autosummary files diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 24454a32e6..1a32690879 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -34,6 +34,7 @@ Options -h, --help help for examples -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + --sourceUploadPath string Location for source code in storage. -v, --version string version of the entity to be registered with flyte. (default "v1") Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 8f58aa349f..2e3207d832 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -15,7 +15,18 @@ If there are already registered entities with v1 version then the command will f :: bin/flytectl register file _pb_output/* -d development -p flytesnacks + +There is no difference between registration and fast registration, In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If Flytectl finds any source code in users's input then it will consider registration as fast registration. Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also archive create source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +:: + + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + +In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration +:: + bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 --SourceUploadPath="s3://dummy/fast" + Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. Use --archive flag. @@ -29,8 +40,7 @@ Using local tgz file. bin/flytectl register files _pb_output.tgz -d development -p flytesnacks --archive -If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in -the continueOnError flag. +If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in the continueOnError flag. :: @@ -69,7 +79,7 @@ Override Output location prefix during registration. :: bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" - + Usage @@ -88,6 +98,7 @@ Options -h, --help help for files -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + --sourceUploadPath string Location for source code in storage. -v, --version string version of the entity to be registered with flyte. (default "v1") Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index bb687e27d5..6c0e229781 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -43,6 +43,7 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_sandbox_exec` - Execute any command in sandbox * :doc:`flytectl_sandbox_start` - Start the flyte sandbox * :doc:`flytectl_sandbox_status` - Get the status of the sandbox environment. * :doc:`flytectl_sandbox_teardown` - Teardown will cleanup the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst new file mode 100644 index 0000000000..2822ad5c34 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -0,0 +1,46 @@ +.. _flytectl_sandbox_exec: + +flytectl sandbox exec +--------------------- + +Execute any command in sandbox + +Synopsis +~~~~~~~~ + + + +Execute command will Will run non-interactive commands and return immediately with the output. + +:: + bin/flytectl sandbox exec -- ls -al + +Usage + +:: + + flytectl sandbox exec [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for exec + --source string Path of your source code + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. + diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index a4d171c7b8..d96f6cab80 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -19,6 +19,7 @@ Mount your flytesnacks repository code inside sandbox :: bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks + Usage @@ -31,8 +32,8 @@ Options :: - --flytesnacks string Path of your flytesnacks repository - -h, --help help for start + -h, --help help for start + --source string Path of your source code Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 1113458744..4148e3eb3e 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -10,19 +10,32 @@ Install Flytectl is a Golang binary and can be installed on any platform supported by golang -Install flytectl with homebrew tap -.. prompt:: bash +.. tabs:: - brew install flyteorg/homebrew-tap/flytectl - # Upgrade flytectl - brew upgrade flytectl + .. tab:: OSX -Install flytectl with shell script + .. prompt:: bash $ -.. prompt:: bash + brew install flyteorg/homebrew-tap/flytectl - curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + *Upgrade* existing installation using the following command: + + .. prompt:: bash $ + + brew upgrade flytectl + + .. tab:: Other Operating systems + + .. prompt:: bash $ + + curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + +**Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: + +.. prompt:: bash $ + + flytectl version Configure ========= @@ -32,25 +45,73 @@ on command-line. The following configuration is useful to setup. Basic Configuration -------------------- -.. code-block:: yaml - - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///flyte.lyft.net - authType: Pkce - logger: - # Logger settings to control logger output. Useful to debug logger: - show-source: true - level: 1 - - -Place this in $HOME/.flyte directory with name config.yaml. -This file is searched in - -- $HOME/.flyte -- currDir from where you run flytectl -- /etc/flyte/config -- You can pass it commandline using --config +.. tabs:: Flytectl configuration + + .. tab:: Local Flyte Sandbox + + Automatically configured for you by ``flytectl sandbox`` command. + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + insecure: true + authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + storage: + connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://localhost:30084 + region: my-region-here + secret-key: miniostorage + container: my-s3-bucket + type: minio + + .. tab:: AWS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + storage: + kind: s3 + config: + auth_type: iam + region: # Example: us-east-2 + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket + + .. tab:: GCS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + storage: + kind: google + config: + json: "" + project_id: # TODO: replace with the GCP project ID + scopes: https://www.googleapis.com/auth/devstorage.read_write + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket + + .. tab:: Others + + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + + + Place this in $HOME/.flyte directory with name config.yaml. + This file is searched in + + * $HOME/.flyte + * currDir from where you run flytectl + * /etc/flyte/config + You can pass it commandline using --config aswell .. toctree:: diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 756ccc8b0b..bb1feb587a 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -28,12 +28,16 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_update_execution-queue-attribute gen/flytectl_update_plugin-override gen/flytectl_register_files + gen/flytectl_register_examples gen/flytectl_delete_execution gen/flytectl_delete_task-resource-attribute gen/flytectl_delete_cluster-resource-attribute gen/flytectl_delete_execution-cluster-label gen/flytectl_delete_execution-queue-attribute gen/flytectl_delete_plugin-override - gen/flytectl_version gen/flytectl_config_validate gen/flytectl_config_discover + gen/flytectl_sandbox_start + gen/flytectl_sandbox_status + gen/flytectl_sandbox_teardown + gen/flytectl_sandbox_exec diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index 8fb0ba88f2..e9185691cf 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -7,8 +7,11 @@ Flytectl verbs specify the actions to be performed on the resources like create/ :caption: Verbs gen/flytectl_create + gen/flytectl_completion gen/flytectl_get gen/flytectl_update gen/flytectl_delete gen/flytectl_register gen/flytectl_config + gen/flytectl_sandbox + gen/flytectl_version diff --git a/flytectl/go.mod b/flytectl/go.mod index 43025c7c76..67218d1ca6 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,8 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/datacatalog v0.3.6 - github.com/flyteorg/flyteidl v0.19.3 + github.com/flyteorg/flyteidl v0.19.8 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 @@ -30,7 +29,6 @@ require ( github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/opencontainers/image-spec v1.0.1 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 - github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 diff --git a/flytectl/go.sum b/flytectl/go.sum index 46b9491b38..9708005305 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -78,8 +78,6 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -104,7 +102,6 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Selvatico/go-mocket v1.0.7/go.mod h1:4gO2v+uQmsL+jzQgLANy3tyEFzaEzHlymVbZ3GP2Oes= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -116,7 +113,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -174,8 +170,6 @@ 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/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= @@ -273,7 +267,6 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -344,11 +337,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/datacatalog v0.3.6 h1:eMA9FK1m7bmOp0LRPt3oT7N+Ki2k6R2IzsqmC69/O8Q= -github.com/flyteorg/datacatalog v0.3.6/go.mod h1:BFc3bTKlvQAGRN0aZDvCt8u1tOX39yN9bcI3R7C4hTY= -github.com/flyteorg/flyteidl v0.18.17/go.mod h1:b5Fq4Z8a5b0mF6pEwTd48ufvikUGVkWSjZiMT0ZtqKI= -github.com/flyteorg/flyteidl v0.19.3 h1:Rba35Qi3eG/lExzWUnjQOgX+HpHHLWj+N/QBw9TlFBo= -github.com/flyteorg/flyteidl v0.19.3/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.8 h1:jWWIEnFMgJCZm/XK25Xts4+kQhoOrd5dWgLj/fLsbIg= +github.com/flyteorg/flyteidl v0.19.8/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= @@ -396,8 +386,6 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68Fp github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -509,7 +497,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.2/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= @@ -553,62 +540,6 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= -github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.8.1 h1:ySBX7Q87vOMqKU2bbmKbUvtYhauDFclYbNDYIE1/h6s= -github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.0.6 h1:b1105ZGEMFe7aCvrT1Cca3VoVb4ZFMaFJLJcg/3zD+8= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= -github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= -github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= -github.com/jackc/pgtype v1.7.0 h1:6f4kVsW01QftE38ufBYxKciO6gyioXSC0ABIRLcZrGs= -github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= -github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= -github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= -github.com/jackc/pgx/v4 v4.11.0 h1:J86tSWd3Y7nKjwT/43xZBvpi04keQWx8gNC2YkdJhZI= -github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= -github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -647,17 +578,11 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -672,17 +597,10 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -814,7 +732,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -863,9 +780,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -875,9 +789,6 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -979,7 +890,6 @@ github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPS github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -999,12 +909,9 @@ go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1012,15 +919,12 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1086,7 +990,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1141,9 +1044,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1158,7 +1059,6 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1241,7 +1141,6 @@ golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1250,7 +1149,6 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1295,8 +1193,6 @@ 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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -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= 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= @@ -1346,7 +1242,6 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1433,7 +1328,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= @@ -1443,7 +1337,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1460,10 +1353,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk= -gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw= -gorm.io/gorm v1.21.9 h1:INieZtn4P2Pw6xPJ8MzT0G4WUOsHq3RhfuDF1M6GW0E= -gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= From 2a25558b1d0760c3a7bbf680331793b2ad9b4696 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 1 Jul 2021 16:26:31 -0700 Subject: [PATCH 091/356] Absolute path for Source dir (#126) Signed-off-by: Ketan Umare --- flytectl/cmd/sandbox/start.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 122b87f7cc..6a78d639e4 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "os" + "path/filepath" "github.com/flyteorg/flytectl/pkg/docker" @@ -67,19 +68,25 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } if len(sandboxConfig.DefaultConfig.Source) > 0 { + source, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) + if err != nil { + return nil, err + } docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, + Source: source, Target: docker.FlyteSnackDir, }) } + fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) os.Setenv("KUBECONFIG", docker.Kubeconfig) os.Setenv("FLYTECTL_CONFIG", docker.FlytectlConfig) if err := docker.PullDockerImage(ctx, cli, docker.ImageName); err != nil { return nil, err } + fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() ID, err := docker.StartContainer(ctx, cli, docker.Volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) if err != nil { From 9deb2ecc8a321b0cb8930725349bbaf372502140 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Thu, 1 Jul 2021 20:46:22 -0700 Subject: [PATCH 092/356] Add deployment docs (#127) Signed-off-by: Ketan Umare --- flytectl/docs/source/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 4148e3eb3e..c3b2a58db1 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -122,6 +122,7 @@ Basic Configuration |book-reader| User Guide |chalkboard| Tutorials |project-diagram| Concepts + |rocket| Deployment |book| API Reference |hands-helping| Community From 6a1e06b796e55268c38abce1b8b1497f08682d29 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 2 Jul 2021 10:10:47 +0530 Subject: [PATCH 093/356] Node executions (#113) Signed-off-by: Prafulla Mahindrakar --- .../subcommand/execution/config_flags.go | 10 +- .../subcommand/execution/config_flags_test.go | 28 ++ .../subcommand/execution/execution_config.go | 8 +- flytectl/cmd/get/execution.go | 31 ++ flytectl/cmd/get/execution_test.go | 23 +- flytectl/cmd/get/node_execution.go | 202 +++++++++++ flytectl/cmd/get/node_execution_test.go | 322 ++++++++++++++++++ flytectl/go.mod | 1 + flytectl/go.sum | 2 + flytectl/pkg/ext/execution_fetcher.go | 33 ++ flytectl/pkg/ext/execution_fetcher_test.go | 29 ++ flytectl/pkg/ext/fetcher.go | 6 + .../ext/mocks/admin_fetcher_ext_interface.go | 82 +++++ 13 files changed, 768 insertions(+), 9 deletions(-) create mode 100644 flytectl/cmd/get/node_execution.go create mode 100644 flytectl/cmd/get/node_execution_test.go diff --git a/flytectl/cmd/config/subcommand/execution/config_flags.go b/flytectl/cmd/config/subcommand/execution/config_flags.go index 5fcc9b332c..467fbd7f6c 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags.go @@ -50,9 +50,11 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") - cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") - cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") - cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.field-selector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sort-by"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") + cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.BoolVar(&DefaultConfig.Details, fmt.Sprintf("%v%v", prefix, "details"), DefaultConfig.Details, "gets node execution details. Only applicable for single execution name i.e get execution name --details") + cmdFlags.StringVar(&DefaultConfig.NodeID, fmt.Sprintf("%v%v", prefix, "nodeId"), DefaultConfig.NodeID, "get task executions for given node name.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/execution/config_flags_test.go b/flytectl/cmd/config/subcommand/execution/config_flags_test.go index 7be80b6d67..7fbd9e51f7 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags_test.go @@ -155,4 +155,32 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_details", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("details", testValue) + if vBool, err := cmdFlags.GetBool("details"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Details) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_nodeId", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("nodeId", testValue) + if vString, err := cmdFlags.GetString("nodeId"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.NodeID) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/execution/execution_config.go b/flytectl/cmd/config/subcommand/execution/execution_config.go index b0737aee64..a149179908 100644 --- a/flytectl/cmd/config/subcommand/execution/execution_config.go +++ b/flytectl/cmd/config/subcommand/execution/execution_config.go @@ -4,14 +4,16 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" ) -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ Filter: filters.DefaultFilter, } ) -// Config +// Config stores the flags required by get execution type Config struct { - Filter filters.Filters `json:"filter" pflag:","` + Filter filters.Filters `json:"filter" pflag:","` + Details bool `json:"details" pflag:",gets node execution details. Only applicable for single execution name i.e get execution name --details"` + NodeID string `json:"nodeId" pflag:",get task executions for given node name."` } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index e7cd122c9c..f547789349 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -9,6 +9,7 @@ import ( "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" + "github.com/golang/protobuf/proto" ) @@ -50,6 +51,31 @@ Retrieves all the execution within project and domain in json format. bin/flytectl get execution -p flytesnacks -d development -o json + +Get more details for the execution using --details flag which shows node executions along with task executions on them. Default view is tree view and TABLE format is not supported on this view + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details + +Using yaml view for the details. In this view only node details are available. For task details pass --nodeId flag + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml + +Using --nodeId flag to get task executions on a specific node. Use the nodeId attribute from node details view + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 + +Task execution view is also available in yaml/json format. Below example shows yaml + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 -o yaml + Usage ` ) @@ -86,6 +112,11 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command } executions = append(executions, exec) logger.Infof(ctx, "Retrieved %v executions", len(executions)) + + if execution.DefaultConfig.Details || len(execution.DefaultConfig.NodeID) > 0 { + // Fetching Node execution details + return getExecutionDetails(ctx, config.GetConfig().Project, config.GetConfig().Domain, name, cmdCtx) + } return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) } diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 87e970231b..bda18d0acf 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -3,17 +3,20 @@ package get import ( "context" "errors" + "fmt" "io" "testing" - "github.com/stretchr/testify/mock" - "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) func TestListExecutionFunc(t *testing.T) { @@ -168,6 +171,22 @@ func TestGetExecutionFunc(t *testing.T) { err := getExecutionFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) + +} + +func TestGetExecutionFuncForDetails(t *testing.T) { + setup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockClient = u.MockClient + mockFetcherExt := u.FetcherExt + execution.DefaultConfig.Details = true + args := []string{dummyExec} + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch details")) + err = getExecutionFunc(ctx, args, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to fetch details"), err) } func TestGetExecutionFuncWithError(t *testing.T) { diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go new file mode 100644 index 0000000000..5d58e39b01 --- /dev/null +++ b/flytectl/cmd/get/node_execution.go @@ -0,0 +1,202 @@ +package get + +import ( + "context" + "fmt" + "sort" + "strconv" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" + + "github.com/disiqueira/gotree" + "github.com/golang/protobuf/proto" +) + +var nodeExecutionColumns = []printer.Column{ + {Header: "Name", JSONPath: "$.id.nodeID"}, + {Header: "Exec", JSONPath: "$.id.executionId.name"}, + {Header: "Duration", JSONPath: "$.closure.duration"}, + {Header: "StartedAt", JSONPath: "$.closure.startedAt"}, + {Header: "Phase", JSONPath: "$.closure.phase"}, +} + +var taskExecutionColumns = []printer.Column{ + {Header: "Name", JSONPath: "$.id.taskId.name"}, + {Header: "Node ID", JSONPath: "$.id.nodeExecutionId.nodeID"}, + {Header: "Execution ID", JSONPath: "$.closure.nodeExecutionId.executionId.name"}, + {Header: "Duration", JSONPath: "$.closure.duration"}, + {Header: "StartedAt", JSONPath: "$.closure.startedAt"}, + {Header: "Phase", JSONPath: "$.closure.phase"}, +} + +const ( + taskAttemptPrefix = "Attempt :" + taskExecPrefix = "Task - " + taskTypePrefix = "Task Type - " + taskReasonPrefix = "Reason - " + taskMetadataPrefix = "Metadata" + taskGeneratedNamePrefix = "Generated Name : " + taskPluginIDPrefix = "Plugin Identifier : " + taskExtResourcesPrefix = "External Resources" + taskExtResourcePrefix = "Ext Resource : " + taskExtResourceTokenPrefix = "Ext Resource Token : " //nolint + taskResourcePrefix = "Resource Pool Info" + taskLogsPrefix = "Logs :" + taskLogsNamePrefix = "Name :" + taskLogURIPrefix = "URI :" + hyphenPrefix = " - " +) + +func NodeExecutionToProtoMessages(l []*admin.NodeExecution) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + +func NodeTaskExecutionToProtoMessages(l []*admin.TaskExecution) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + +func getExecutionDetails(ctx context.Context, project, domain, name string, cmdCtx cmdCore.CommandContext) error { + adminPrinter := printer.Printer{} + + // Fetching Node execution details + nExecDetails, nodeExecToTaskExec, err := getNodeExecDetailsWithTasks(ctx, project, domain, name, cmdCtx) + if err != nil { + return err + } + + // o/p format of table is not supported on the details. TODO: Add tree format in printer + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + fmt.Println("TABLE format is not supported on detailed view and defaults to tree view. Choose either json/yaml") + if len(execution.DefaultConfig.NodeID) == 0 { + nodeExecTree := createNodeDetailsTreeView(nExecDetails, nodeExecToTaskExec) + if nodeExecTree != nil { + fmt.Println(nodeExecTree.Print()) + } + } else { + nodeTaskExecTree := createNodeTaskExecTreeView(nil, nodeExecToTaskExec[execution.DefaultConfig.NodeID]) + if nodeTaskExecTree != nil { + fmt.Println(nodeTaskExecTree.Print()) + } + } + return nil + } + + if len(execution.DefaultConfig.NodeID) == 0 { + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), nodeExecutionColumns, + NodeExecutionToProtoMessages(nExecDetails)...) + } + + taskExecList := nodeExecToTaskExec[execution.DefaultConfig.NodeID] + if taskExecList != nil { + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), taskExecutionColumns, + NodeTaskExecutionToProtoMessages(taskExecList.TaskExecutions)...) + } + return nil +} + +func getNodeExecDetailsWithTasks(ctx context.Context, project, domain, name string, cmdCtx cmdCore.CommandContext) ( + []*admin.NodeExecution, map[string]*admin.TaskExecutionList, error) { + // Fetching Node execution details + nExecDetails, err := cmdCtx.AdminFetcherExt().FetchNodeExecutionDetails(ctx, name, project, domain) + if err != nil { + return nil, nil, err + } + logger.Infof(ctx, "Retrieved %v node executions", len(nExecDetails.NodeExecutions)) + + // Mapping node execution id to task list + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + for _, nodeExec := range nExecDetails.NodeExecutions { + nodeExecToTaskExec[nodeExec.Id.NodeId], err = cmdCtx.AdminFetcherExt().FetchTaskExecutionsOnNode(ctx, + nodeExec.Id.NodeId, name, project, domain) + if err != nil { + return nil, nil, err + } + } + return nExecDetails.NodeExecutions, nodeExecToTaskExec, nil +} + +func createNodeTaskExecTreeView(rootView gotree.Tree, taskExecs *admin.TaskExecutionList) gotree.Tree { + if taskExecs == nil || len(taskExecs.TaskExecutions) == 0 { + return gotree.New("") + } + if rootView == nil { + rootView = gotree.New("") + } + // TODO: Replace this by filter to sort in the admin + sort.Slice(taskExecs.TaskExecutions[:], func(i, j int) bool { + return taskExecs.TaskExecutions[i].Id.RetryAttempt < taskExecs.TaskExecutions[j].Id.RetryAttempt + }) + for _, taskExec := range taskExecs.TaskExecutions { + attemptView := rootView.Add(taskAttemptPrefix + strconv.Itoa(int(taskExec.Id.RetryAttempt))) + attemptView.Add(taskExecPrefix + taskExec.Closure.Phase.String() + + hyphenPrefix + taskExec.Closure.StartedAt.AsTime().String() + + hyphenPrefix + taskExec.Closure.StartedAt.AsTime(). + Add(taskExec.Closure.Duration.AsDuration()).String()) + attemptView.Add(taskTypePrefix + taskExec.Closure.TaskType) + attemptView.Add(taskReasonPrefix + taskExec.Closure.Reason) + if taskExec.Closure.Metadata != nil { + metadata := attemptView.Add(taskMetadataPrefix) + metadata.Add(taskGeneratedNamePrefix + taskExec.Closure.Metadata.GeneratedName) + metadata.Add(taskPluginIDPrefix + taskExec.Closure.Metadata.PluginIdentifier) + extResourcesView := metadata.Add(taskExtResourcesPrefix) + for _, extResource := range taskExec.Closure.Metadata.ExternalResources { + extResourcesView.Add(taskExtResourcePrefix + extResource.ExternalId) + } + resourcePoolInfoView := metadata.Add(taskResourcePrefix) + for _, rsPool := range taskExec.Closure.Metadata.ResourcePoolInfo { + resourcePoolInfoView.Add(taskExtResourcePrefix + rsPool.Namespace) + resourcePoolInfoView.Add(taskExtResourceTokenPrefix + rsPool.AllocationToken) + } + } + + sort.Slice(taskExec.Closure.Logs[:], func(i, j int) bool { + return taskExec.Closure.Logs[i].Name < taskExec.Closure.Logs[j].Name + }) + + logsView := attemptView.Add(taskLogsPrefix) + for _, logData := range taskExec.Closure.Logs { + logsView.Add(taskLogsNamePrefix + logData.Name) + logsView.Add(taskLogURIPrefix + logData.Uri) + } + } + + return rootView +} + +func createNodeDetailsTreeView(nodeExecutions []*admin.NodeExecution, nodeExecToTaskExec map[string]*admin.TaskExecutionList) gotree.Tree { + nodeDetailsTreeView := gotree.New("") + if nodeExecutions == nil || nodeExecToTaskExec == nil { + return nodeDetailsTreeView + } + // TODO : Move to sorting using filters. + sort.Slice(nodeExecutions[:], func(i, j int) bool { + // TODO : Remove this after fixing the StartedAt and Duration field not being populated for start-node and end-node in Admin + if nodeExecutions[i].Closure.StartedAt == nil || nodeExecutions[j].Closure.StartedAt == nil { + return true + } + return nodeExecutions[i].Closure.StartedAt.Nanos < nodeExecutions[j].Closure.StartedAt.Nanos + }) + + for _, nodeExec := range nodeExecutions { + nExecView := nodeDetailsTreeView.Add(nodeExec.Id.NodeId + hyphenPrefix + nodeExec.Closure.Phase.String() + + hyphenPrefix + nodeExec.Closure.StartedAt.AsTime().String() + + hyphenPrefix + nodeExec.Closure.StartedAt.AsTime(). + Add(nodeExec.Closure.Duration.AsDuration()).String()) + taskExecs := nodeExecToTaskExec[nodeExec.Id.NodeId] + createNodeTaskExecTreeView(nExecView, taskExecs) + } + return nodeDetailsTreeView +} diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go new file mode 100644 index 0000000000..e01325240e --- /dev/null +++ b/flytectl/cmd/get/node_execution_test.go @@ -0,0 +1,322 @@ +package get + +import ( + "fmt" + "testing" + "time" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/event" + + "github.com/disiqueira/gotree" + "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + dummyProject = "dummyProject" + dummyDomain = "dummyDomain" + dummyExec = "dummyExec" +) + +func TestCreateNodeDetailsTreeView(t *testing.T) { + + t.Run("empty node execution", func(t *testing.T) { + var nodeExecutions []*admin.NodeExecution + var nodeExecToTaskExec map[string]*admin.TaskExecutionList + expectedRoot := gotree.New("") + treeRoot := createNodeDetailsTreeView(nodeExecutions, nodeExecToTaskExec) + assert.Equal(t, expectedRoot, treeRoot) + }) + + t.Run("successful simple node execution full view", func(t *testing.T) { + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("start-node", true) + taskExec11 := createDummyTaskExecutionForNode("start-node", "task11") + taskExec12 := createDummyTaskExecutionForNode("start-node", "task12") + + nodeExecToTaskExec["start-node"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec11, taskExec12}, + } + + nodeExec2 := createDummyNodeWithID("n0", false) + taskExec21 := createDummyTaskExecutionForNode("n0", "task21") + taskExec22 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec21, taskExec22}, + } + + nodeExec3 := createDummyNodeWithID("n1", false) + taskExec31 := createDummyTaskExecutionForNode("n1", "task31") + taskExec32 := createDummyTaskExecutionForNode("n1", "task32") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec31, taskExec32}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1, nodeExec2, nodeExec3} + + treeRoot := createNodeDetailsTreeView(nodeExecutions, nodeExecToTaskExec) + + assert.Equal(t, 3, len(treeRoot.Items())) + }) + + t.Run("empty task execution only view", func(t *testing.T) { + taskExecutionList := &admin.TaskExecutionList{} + treeRoot := createNodeTaskExecTreeView(nil, taskExecutionList) + assert.Equal(t, 0, len(treeRoot.Items())) + }) + + t.Run("successful task execution only view", func(t *testing.T) { + taskExec31 := createDummyTaskExecutionForNode("n1", "task31") + taskExec32 := createDummyTaskExecutionForNode("n1", "task32") + + taskExecutionList := &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec31, taskExec32}, + } + + treeRoot := createNodeTaskExecTreeView(nil, taskExecutionList) + assert.Equal(t, 2, len(treeRoot.Items())) + }) +} + +func createDummyNodeWithID(nodeID string, startedAtEmpty bool) *admin.NodeExecution { + // Remove this param startedAtEmpty and code once admin code is fixed + startedAt := timestamppb.Now() + if startedAtEmpty { + startedAt = nil + } + + nodeExecution := &admin.NodeExecution{ + Id: &core.NodeExecutionIdentifier{ + NodeId: nodeID, + ExecutionId: &core.WorkflowExecutionIdentifier{ + Project: dummyProject, + Domain: dummyDomain, + Name: dummyExec, + }, + }, + InputUri: nodeID + "inputUri", + Closure: &admin.NodeExecutionClosure{ + OutputResult: &admin.NodeExecutionClosure_OutputUri{ + OutputUri: nodeID + "outputUri", + }, + Phase: core.NodeExecution_SUCCEEDED, + StartedAt: startedAt, + Duration: &durationpb.Duration{Seconds: 100}, + CreatedAt: timestamppb.Now(), + UpdatedAt: timestamppb.Now(), + TargetMetadata: &admin.NodeExecutionClosure_WorkflowNodeMetadata{ + WorkflowNodeMetadata: &admin.WorkflowNodeMetadata{ + ExecutionId: &core.WorkflowExecutionIdentifier{ + Project: dummyProject, + Domain: dummyDomain, + Name: dummyExec, + }, + }, + }, + }, + } + return nodeExecution +} + +func createDummyTaskExecutionForNode(nodeID string, taskID string) *admin.TaskExecution { + taskLog1 := &core.TaskLog{ + Uri: nodeID + taskID + "logUri1", + Name: nodeID + taskID + "logName1", + MessageFormat: core.TaskLog_JSON, + Ttl: &durationpb.Duration{Seconds: 100}, + } + + taskLog2 := &core.TaskLog{ + Uri: nodeID + taskID + "logUri2", + Name: nodeID + taskID + "logName2", + MessageFormat: core.TaskLog_JSON, + Ttl: &durationpb.Duration{Seconds: 100}, + } + + taskLogs := []*core.TaskLog{taskLog1, taskLog2} + + extResourceInfo := &event.ExternalResourceInfo{ + ExternalId: nodeID + taskID + "externalId", + } + extResourceInfos := []*event.ExternalResourceInfo{extResourceInfo} + + resourcePoolInfo := &event.ResourcePoolInfo{ + AllocationToken: nodeID + taskID + "allocationToken", + Namespace: nodeID + taskID + "namespace", + } + resourcePoolInfos := []*event.ResourcePoolInfo{resourcePoolInfo} + + taskExec := &admin.TaskExecution{ + Id: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + Project: dummyProject, + Domain: dummyDomain, + Name: dummyExec, + ResourceType: core.ResourceType_TASK, + }, + }, + InputUri: nodeID + taskID + "inputUrlForTask", + Closure: &admin.TaskExecutionClosure{ + OutputResult: &admin.TaskExecutionClosure_OutputUri{ + OutputUri: nodeID + taskID + "outputUri-task", + }, + Phase: core.TaskExecution_SUCCEEDED, + Logs: taskLogs, + StartedAt: timestamppb.Now(), + Duration: &durationpb.Duration{Seconds: 100}, + CreatedAt: timestamppb.Now(), + UpdatedAt: timestamppb.New(time.Now()), + Reason: nodeID + taskID + "reason", + TaskType: nodeID + taskID + "taskType", + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: nodeID + taskID + "generatedName", + ExternalResources: extResourceInfos, + ResourcePoolInfo: resourcePoolInfos, + PluginIdentifier: nodeID + taskID + "pluginId", + }, + }, + } + return taskExec +} + +func TestGetExecutionDetails(t *testing.T) { + t.Run("successful get details default view", func(t *testing.T) { + setup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) + + err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) + assert.Nil(t, err) + }) + + t.Run("failure node details fetch", func(t *testing.T) { + setup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch details")) + err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to fetch details"), err) + }) + + t.Run("failure task exec fetch", func(t *testing.T) { + setup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch task exec details")) + err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to fetch task exec details"), err) + }) + + t.Run("successful get details non default view", func(t *testing.T) { + setup() + config.GetConfig().Output = "table" + execution.DefaultConfig.NodeID = "n0" + + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) + + err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) + assert.Nil(t, err) + }) + + t.Run("Table test successful cases", func(t *testing.T) { + tests := []struct { + outputFormat string + nodeID string + want error + }{ + {outputFormat: "table", nodeID: "", want: nil}, + {outputFormat: "table", nodeID: "n0", want: nil}, + {outputFormat: "yaml", nodeID: "", want: nil}, + {outputFormat: "yaml", nodeID: "n0", want: nil}, + {outputFormat: "yaml", nodeID: "n1", want: nil}, + } + + for _, tt := range tests { + setup() + config.GetConfig().Output = tt.outputFormat + execution.DefaultConfig.NodeID = tt.nodeID + + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) + + got := getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) + assert.Equal(t, tt.want, got) + } + }) +} diff --git a/flytectl/go.mod b/flytectl/go.mod index 67218d1ca6..e32bd02bf7 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -6,6 +6,7 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/containerd/containerd v1.5.2 // indirect + github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 9708005305..03fa6c149d 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -292,6 +292,8 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/disiqueira/gotree v1.0.0 h1:en5wk87n7/Jyk6gVME3cx3xN9KmUCstJ1IjHr4Se4To= +github.com/disiqueira/gotree v1.0.0/go.mod h1:7CwL+VWsWAU95DovkdRZAtA7YbtHwGk+tLV/kNi8niU= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= diff --git a/flytectl/pkg/ext/execution_fetcher.go b/flytectl/pkg/ext/execution_fetcher.go index 4e30a708bb..47535cc1e3 100644 --- a/flytectl/pkg/ext/execution_fetcher.go +++ b/flytectl/pkg/ext/execution_fetcher.go @@ -23,6 +23,39 @@ func (a *AdminFetcherExtClient) FetchExecution(ctx context.Context, name, projec return e, nil } +func (a *AdminFetcherExtClient) FetchNodeExecutionDetails(ctx context.Context, name, project, domain string) (*admin.NodeExecutionList, error) { + ne, err := a.AdminServiceClient().ListNodeExecutions(ctx, &admin.NodeExecutionListRequest{ + WorkflowExecutionId: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + return ne, nil +} + +func (a *AdminFetcherExtClient) FetchTaskExecutionsOnNode(ctx context.Context, nodeID, execName, project, domain string) (*admin.TaskExecutionList, error) { + te, err := a.AdminServiceClient().ListTaskExecutions(ctx, &admin.TaskExecutionListRequest{ + NodeExecutionId: &core.NodeExecutionIdentifier{ + NodeId: nodeID, + ExecutionId: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: execName, + }, + }, + Limit: 100, + }) + if err != nil { + return nil, err + } + return te, nil +} + func (a *AdminFetcherExtClient) ListExecution(ctx context.Context, project, domain string, filter filters.Filters) (*admin.ExecutionList, error) { transformFilters, err := filters.BuildResourceListRequestWithName(filter, project, domain, "") if err != nil { diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go index add301a6da..98da15871d 100644 --- a/flytectl/pkg/ext/execution_fetcher_test.go +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -8,6 +8,7 @@ import ( "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -66,3 +67,31 @@ func TestFetchExecutionError(t *testing.T) { _, err := adminFetcherExt.FetchExecution(ctx, "execName", "dummyProject", "domainValue") assert.Equal(t, fmt.Errorf("failed"), err) } + +func TestFetchNodeExecutionDetails(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnListNodeExecutionsMatch(mock.Anything, mock.Anything).Return(&admin.NodeExecutionList{}, nil) + _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue") + assert.Nil(t, err) +} + +func TestFetchNodeExecutionDetailsError(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnListNodeExecutionsMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue") + assert.Equal(t, fmt.Errorf("failed"), err) +} + +func TestFetchTaskExecOnNode(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnListTaskExecutionsMatch(mock.Anything, mock.Anything).Return(&admin.TaskExecutionList{}, nil) + _, err := adminFetcherExt.FetchTaskExecutionsOnNode(ctx, "nodeId", "execName", "dummyProject", "domainValue") + assert.Nil(t, err) +} + +func TestFetchTaskExecOnNodeError(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnListTaskExecutionsMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchTaskExecutionsOnNode(ctx, "nodeId", "execName", "dummyProject", "domainValue") + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 83a4753401..118e889e07 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -19,6 +19,12 @@ type AdminFetcherExtInterface interface { // FetchExecution fetches the execution based on name, project, domain FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) + // FetchNodeExecutionDetails fetches the node execution details based on execution name, project, domain + FetchNodeExecutionDetails(ctx context.Context, name, project, domain string) (*admin.NodeExecutionList, error) + + // FetchTaskExecutionsOnNode fetches task execution on a node , for give execution name, project, domain + FetchTaskExecutionsOnNode(ctx context.Context, nodeID, execName, project, domain string) (*admin.TaskExecutionList, error) + // ListExecution fetches the all versions of based on name, project, domain ListExecution(ctx context.Context, project, domain string, filter filters.Filters) (*admin.ExecutionList, error) diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 23b64e3696..6932ee5c1b 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -299,6 +299,47 @@ func (_m *AdminFetcherExtInterface) FetchLPVersion(ctx context.Context, name str return r0, r1 } +type AdminFetcherExtInterface_FetchNodeExecutionDetails struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchNodeExecutionDetails) Return(_a0 *admin.NodeExecutionList, _a1 error) *AdminFetcherExtInterface_FetchNodeExecutionDetails { + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { + c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetailsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionDetails { + c := _m.On("FetchNodeExecutionDetails", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} +} + +// FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain +func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string) (*admin.NodeExecutionList, error) { + ret := _m.Called(ctx, name, project, domain) + + var r0 *admin.NodeExecutionList + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.NodeExecutionList); ok { + r0 = rf(ctx, name, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.NodeExecutionList) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchProjectDomainAttributes struct { *mock.Call } @@ -340,6 +381,47 @@ func (_m *AdminFetcherExtInterface) FetchProjectDomainAttributes(ctx context.Con return r0, r1 } +type AdminFetcherExtInterface_FetchTaskExecutionsOnNode struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchTaskExecutionsOnNode) Return(_a0 *admin.TaskExecutionList, _a1 error) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNode(ctx context.Context, nodeId string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { + c := _m.On("FetchTaskExecutionsOnNode", ctx, nodeId, execName, project, domain) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNodeMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { + c := _m.On("FetchTaskExecutionsOnNode", matchers...) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} +} + +// FetchTaskExecutionsOnNode provides a mock function with given fields: ctx, nodeId, execName, project, domain +func (_m *AdminFetcherExtInterface) FetchTaskExecutionsOnNode(ctx context.Context, nodeId string, execName string, project string, domain string) (*admin.TaskExecutionList, error) { + ret := _m.Called(ctx, nodeId, execName, project, domain) + + var r0 *admin.TaskExecutionList + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.TaskExecutionList); ok { + r0 = rf(ctx, nodeId, execName, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.TaskExecutionList) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, nodeId, execName, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchTaskLatestVersion struct { *mock.Call } From cf69eafaa3c3cb5a4291d696bb8a37e7fce401c9 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Fri, 2 Jul 2021 13:56:56 -0700 Subject: [PATCH 094/356] Update documentation (#128) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- .../source/gen/flytectl_get_execution.rst | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 77249157ce..174ba88661 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -45,6 +45,31 @@ Retrieves all the execution within project and domain in json format. bin/flytectl get execution -p flytesnacks -d development -o json + +Get more details for the execution using --details flag which shows node executions along with task executions on them. Default view is tree view and TABLE format is not supported on this view + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details + +Using yaml view for the details. In this view only node details are available. For task details pass --nodeId flag + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml + +Using --nodeId flag to get task executions on a specific node. Use the nodeId attribute from node details view + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 + +Task execution view is also available in yaml/json format. Below example shows yaml + +:: + + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 -o yaml + Usage @@ -57,11 +82,13 @@ Options :: + --details gets node execution details. Only applicable for single execution name i.e get execution name --details --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.field-selector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort result by + --filter.sort-by string Specifies which field to sort results (default "created_at") -h, --help help for execution + --nodeId string get task executions for given node name. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From dafa5d7f2e9377b851593281dedbf3ac039a4c59 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 3 Jul 2021 06:07:22 +0530 Subject: [PATCH 095/356] Changing the default log level which is used by sandbox (#129) --- flytectl/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index b3710406ef..82b0ed8704 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -4,7 +4,7 @@ admin: insecure: true logger: show-source: true - level: 3 + level: 0 storage: connection: access-key: minio @@ -15,4 +15,4 @@ storage: secret-key: miniostorage type: minio container: "my-s3-bucket" - enable-multicontainer: true \ No newline at end of file + enable-multicontainer: true From a2ac19f64d6ea984b151c086002a834eab262ba4 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Sat, 3 Jul 2021 15:37:10 +0530 Subject: [PATCH 096/356] algolia search (#130) Signed-off-by: Samhita Alla --- flytectl/doc-requirements.in | 1 - flytectl/doc-requirements.txt | 8 +++----- flytectl/docs/source/conf.py | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 42d006319a..3982ec86e6 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -1,5 +1,4 @@ git+git://github.com/flyteorg/furo@main -readthedocs-sphinx-search sphinx sphinx-prompt sphinx-material diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index cd582290d0..aabe778a3d 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -13,7 +13,7 @@ beautifulsoup4==4.9.3 # furo # sphinx-code-include # sphinx-material -certifi==2020.12.5 +certifi==2021.5.30 # via requests chardet==4.0.0 # via requests @@ -48,8 +48,6 @@ python-slugify[unidecode]==5.0.2 # via sphinx-material pytz==2021.1 # via babel -readthedocs-sphinx-search==0.1.0 - # via -r doc-requirements.in requests==2.25.1 # via sphinx six==1.16.0 @@ -70,7 +68,7 @@ sphinx==3.5.4 # sphinx-tabs sphinx-code-include==1.1.1 # via -r doc-requirements.in -sphinx-copybutton==0.3.1 +sphinx-copybutton==0.3.3 # via -r doc-requirements.in sphinx-fontawesome==0.0.6 # via -r doc-requirements.in @@ -96,7 +94,7 @@ text-unidecode==1.3 # via python-slugify unidecode==1.2.0 # via python-slugify -urllib3==1.26.4 +urllib3==1.26.6 # via requests # The following packages are considered to be unsafe in a requirements file: diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 3b8bfae9ab..b429faea57 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -41,7 +41,6 @@ "sphinx.ext.coverage", "sphinx-prompt", "sphinx_copybutton", - "sphinx_search.extension", "sphinx_fontawesome", "sphinx_tabs.tabs", ] From a87e20be8469e1bdea0e2e690bd988c9cf8c082e Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Sun, 4 Jul 2021 22:08:16 -0700 Subject: [PATCH 097/356] Update Flyteidl version (#114) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytectl/go.mod | 2 +- flytectl/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index e32bd02bf7..67f26af2a7 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.19.8 + github.com/flyteorg/flyteidl v0.19.9 github.com/flyteorg/flytestdlib v0.3.24 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index 03fa6c149d..b5433777b6 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -341,6 +341,8 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v0.19.8 h1:jWWIEnFMgJCZm/XK25Xts4+kQhoOrd5dWgLj/fLsbIg= github.com/flyteorg/flyteidl v0.19.8/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.9 h1:1j4/YbV/G1m2hrK017F9K0JYZYxCCwf4qtEkiNnUiEw= +github.com/flyteorg/flyteidl v0.19.9/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= From b5d78aa97eb81b4e55f30f2061bcf65caa8740be Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 5 Jul 2021 13:15:34 +0530 Subject: [PATCH 098/356] #minor Documentation fix and refactoring in sandbox (#131) * Documentation fix Signed-off-by: Yuvraj --- flytectl/.github/PULL_REQUEST_TEMPLATE.md | 28 +++++++----- flytectl/cmd/sandbox/exec.go | 4 +- flytectl/cmd/sandbox/sandbox.go | 19 ++++++-- flytectl/cmd/sandbox/sandbox_test.go | 2 +- flytectl/cmd/sandbox/start.go | 12 ++--- flytectl/cmd/sandbox/start_test.go | 53 ++++++++++++++++++++--- flytectl/cmd/sandbox/teardown.go | 2 +- flytectl/pkg/docker/docker_util.go | 4 +- 8 files changed, 92 insertions(+), 32 deletions(-) diff --git a/flytectl/.github/PULL_REQUEST_TEMPLATE.md b/flytectl/.github/PULL_REQUEST_TEMPLATE.md index d2becf38b7..97321913f9 100644 --- a/flytectl/.github/PULL_REQUEST_TEMPLATE.md +++ b/flytectl/.github/PULL_REQUEST_TEMPLATE.md @@ -1,26 +1,32 @@ +## Read then delete + +- Make sure to use a concise title for the pull-request. +- Use #patch, #minor #majora or #none in the pull-request title to bump the corresponding version. Otherwise, the patch version + will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) + # TL;DR _Please replace this text with a description of what this PR accomplishes._ ## Type - - [ ] Bug Fix - - [ ] Feature - - [ ] Plugin +- [ ] Bug Fix +- [ ] Feature +- [ ] Plugin ## Are all requirements met? - - [ ] Code completed - - [ ] Smoke tested - - [ ] Unit tests added - - [ ] Code documentation added - - [ ] Any pending items have an associated Issue +- [ ] Code completed +- [ ] Smoke tested +- [ ] Unit tests added +- [ ] Code documentation added +- [ ] Any pending items have an associated Issue ## Complete description - _How did you fix the bug, make the feature etc. Link to any design docs etc_ +_How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/lyft/flyte/issues/ +https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ OR -_https://github.com/lyft/flyte/issues/_ +_https://github.com/flyteorg/flyte/issues/_ diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index 804d54b6c6..63a17e8884 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -9,9 +9,9 @@ import ( ) const ( - execShort = "Execute any command in sandbox" + execShort = "Execute non-interactive command inside the sandbox container" execLong = ` -Execute command will Will run non-interactive commands and return immediately with the output. +Execute command will run non-interactive command inside the sandbox container and return immediately with the output.By default flytectl exec in /root directory inside the sandbox container :: bin/flytectl sandbox exec -- ls -al diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 233f4f0eba..9be32bbba4 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -8,18 +8,31 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - sandboxShort = `Used for testing flyte sandbox.` + sandboxShort = `Used for sandbox interactions like start/teardown/status/exec.` sandboxLong = ` -Example Create sandbox cluster. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. + +Create sandbox cluster. :: bin/flytectl sandbox start -Example Remove sandbox cluster. +Remove sandbox cluster. :: bin/flytectl sandbox teardown + + +Check status of sandbox container. +:: + + bin/flytectl sandbox status + +Execute command inside sandbox container. +:: + + bin/flytectl sandbox exec -- pwd ` ) diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go index 640390c137..ee615c08ce 100644 --- a/flytectl/cmd/sandbox/sandbox_test.go +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -11,7 +11,7 @@ import ( func TestCreateSandboxCommand(t *testing.T) { sandboxCommand := CreateSandboxCommand() assert.Equal(t, sandboxCommand.Use, "sandbox") - assert.Equal(t, sandboxCommand.Short, "Used for testing flyte sandbox.") + assert.Equal(t, sandboxCommand.Short, "Used for sandbox interactions like start/teardown/status/exec.") fmt.Println(sandboxCommand.Commands()) assert.Equal(t, len(sandboxCommand.Commands()), 4) cmdNouns := sandboxCommand.Commands() diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 6a78d639e4..5853ee5060 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -17,17 +17,19 @@ import ( ) const ( - startShort = "Start the flyte sandbox" + startShort = "Start the flyte sandbox cluster" startLong = ` -Start will run the flyte sandbox cluster inside a docker container and setup the config that is required +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. + +Start sandbox cluster without any source code :: bin/flytectl sandbox start -Mount your flytesnacks repository code inside sandbox +Mount your source code repository inside sandbox :: - bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks + bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Usage ` @@ -75,7 +77,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu docker.Volumes = append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index a0bef27c8d..042860ed60 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -6,6 +6,7 @@ import ( "io" "io/ioutil" "os" + "path/filepath" "strings" "testing" @@ -56,7 +57,7 @@ func TestStartSandboxFunc(t *testing.T) { _, err := startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) - t.Run("Successfully run sandbox cluster with flytesnacks", func(t *testing.T) { + t.Run("Successfully run sandbox cluster with source code", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) @@ -65,7 +66,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -92,6 +93,44 @@ func TestStartSandboxFunc(t *testing.T) { _, err := startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) + t.Run("Successfully run sandbox cluster with abs path of source code", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = "../" + absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) + assert.Nil(t, err) + volumes := append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: absPath, + Target: docker.Source, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startSandbox(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) t.Run("Error in pulling image", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) @@ -101,7 +140,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -137,7 +176,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -181,7 +220,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -217,7 +256,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -253,7 +292,7 @@ func TestStartSandboxFunc(t *testing.T) { volumes := append(docker.Volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, - Target: docker.FlyteSnackDir, + Target: docker.Source, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 9d05a2581b..1c9e634351 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -15,7 +15,7 @@ import ( const ( teardownShort = "Teardown will cleanup the sandbox environment" teardownLong = ` -Teardown will remove docker container and all the flyte config +Teardown will remove sandbox cluster and all the flyte config created by sandbox start :: bin/flytectl sandbox teardown diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 03e220879f..c1b39bd182 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -30,7 +30,7 @@ var ( ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} - FlyteSnackDir = "/usr/src" + Source = "/root" K3sDir = "/etc/rancher/" Client Docker Volumes = []mount.Mount{ @@ -43,7 +43,7 @@ var ( ExecConfig = types.ExecConfig{ AttachStderr: true, Tty: true, - WorkingDir: FlyteSnackDir, + WorkingDir: Source, AttachStdout: true, Cmd: []string{}, } From 5c7133784a18ffbd3d67b4c9ef4e5320fa624f88 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 5 Jul 2021 16:58:39 +0530 Subject: [PATCH 099/356] Added separate release workflow for releasing the binary (#132) * Divide release workflow Signed-off-by: Yuvraj --- flytectl/.github/workflows/master.yml | 42 ++------------------------ flytectl/.github/workflows/release.yml | 23 ++++++++++++++ 2 files changed, 25 insertions(+), 40 deletions(-) create mode 100644 flytectl/.github/workflows/release.yml diff --git a/flytectl/.github/workflows/master.yml b/flytectl/.github/workflows/master.yml index 3e21b83bd7..320f92c4ce 100644 --- a/flytectl/.github/workflows/master.yml +++ b/flytectl/.github/workflows/master.yml @@ -1,4 +1,4 @@ -name: Master +name: Bump Version on: push: @@ -22,42 +22,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} WITH_V: true - DEFAULT_BUMP: patch - - goreleaser: - name: Release flytectl - runs-on: ubuntu-latest - needs: [ bump-version ] - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Run GoReleaser dry run - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} - - test: - name: Run tests and lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Unit Tests - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make test_unit_codecov - - name: Lint - uses: cedrickring/golang-action@1.5.2 - env: - GO111MODULE: "on" - with: - args: make install && make lint \ No newline at end of file + DEFAULT_BUMP: patch \ No newline at end of file diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml new file mode 100644 index 0000000000..1e4c78aa08 --- /dev/null +++ b/flytectl/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release Flytectl + +on: + push: + tags: + - 'v*' + +jobs: + releaser: + name: Release flytectl + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} From bb6225539e920fcb262ca44ba1d452e990c0e511 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 8 Jul 2021 16:45:44 -0700 Subject: [PATCH 100/356] Update documentation (#133) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl.rst | 2 +- flytectl/docs/source/gen/flytectl_sandbox.rst | 23 +++++++++++++++---- .../docs/source/gen/flytectl_sandbox_exec.rst | 6 ++--- .../source/gen/flytectl_sandbox_start.rst | 12 ++++++---- .../source/gen/flytectl_sandbox_status.rst | 2 +- .../source/gen/flytectl_sandbox_teardown.rst | 4 ++-- 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index a2317e1182..e11b06d619 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -31,7 +31,7 @@ SEE ALSO * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_version` - Used for fetching flyte version diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 6c0e229781..313bbf85b2 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -3,23 +3,36 @@ flytectl sandbox ---------------- -Used for testing flyte sandbox. +Used for sandbox interactions like start/teardown/status/exec. Synopsis ~~~~~~~~ -Example Create sandbox cluster. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. + +Create sandbox cluster. :: bin/flytectl sandbox start -Example Remove sandbox cluster. +Remove sandbox cluster. :: bin/flytectl sandbox teardown + + +Check status of sandbox container. +:: + + bin/flytectl sandbox status + +Execute command inside sandbox container. +:: + + bin/flytectl sandbox exec -- pwd Options @@ -43,8 +56,8 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_sandbox_exec` - Execute any command in sandbox -* :doc:`flytectl_sandbox_start` - Start the flyte sandbox +* :doc:`flytectl_sandbox_exec` - Execute non-interactive command inside the sandbox container +* :doc:`flytectl_sandbox_start` - Start the flyte sandbox cluster * :doc:`flytectl_sandbox_status` - Get the status of the sandbox environment. * :doc:`flytectl_sandbox_teardown` - Teardown will cleanup the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 2822ad5c34..9fbb77971c 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -3,14 +3,14 @@ flytectl sandbox exec --------------------- -Execute any command in sandbox +Execute non-interactive command inside the sandbox container Synopsis ~~~~~~~~ -Execute command will Will run non-interactive commands and return immediately with the output. +Execute command will run non-interactive command inside the sandbox container and return immediately with the output.By default flytectl exec in /root directory inside the sandbox container :: bin/flytectl sandbox exec -- ls -al @@ -42,5 +42,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index d96f6cab80..21b02b2161 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -3,22 +3,24 @@ flytectl sandbox start ---------------------- -Start the flyte sandbox +Start the flyte sandbox cluster Synopsis ~~~~~~~~ -Start will run the flyte sandbox cluster inside a docker container and setup the config that is required +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. + +Start sandbox cluster without any source code :: bin/flytectl sandbox start -Mount your flytesnacks repository code inside sandbox +Mount your source code repository inside sandbox :: - bin/flytectl sandbox start --sourcesPath=$HOME/flyteorg/flytesnacks + bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Usage @@ -48,5 +50,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 0f85f86437..6295dff615 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -44,5 +44,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 2b7f63cb25..bc41b259eb 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -10,7 +10,7 @@ Synopsis -Teardown will remove docker container and all the flyte config +Teardown will remove sandbox cluster and all the flyte config created by sandbox start :: bin/flytectl sandbox teardown @@ -43,5 +43,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for testing flyte sandbox. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. From dd369af3856f015c0098e9cfcbc26025e974f023 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Thu, 8 Jul 2021 19:51:29 -0700 Subject: [PATCH 101/356] Bind pflags to default variable fields && Remove short flags as they're not supported by pflags (#124) * * Bind pflags to default variable fields * Remove short flags as they're not supported by pflags Signed-off-by: Sean Lin * Add --default-var to config.go Signed-off-by: Sean Lin * * merge change from master branch * remove config_test as the generated test conflicts with it Signed-off-by: Sean Lin * Add config_test.go to commit Signed-off-by: Sean Lin * Update command help doc Signed-off-by: Sean Lin * Use camelCase for flags Signed-off-by: Sean Lin * Remove short flags from docs Signed-off-by: Sean Lin * Update docs Signed-off-by: Sean Lin --- flytectl/cmd/config/config.go | 2 +- flytectl/cmd/config/config_flags.go | 6 +-- .../attrdeleteconfig_flags.go | 11 +++- .../attrdeleteconfig_flags_test.go | 10 +--- .../attrfetchconfig_flags.go | 11 +++- .../attrfetchconfig_flags_test.go | 10 +--- .../attrupdateconfig_flags.go | 11 +++- .../attrupdateconfig_flags_test.go | 10 +--- .../clusterresourceattribute/delete_config.go | 2 +- .../clusterresourceattribute/fetch_config.go | 2 +- .../clusterresourceattribute/update_config.go | 2 +- .../subcommand/execution/config_flags.go | 4 +- .../subcommand/execution/config_flags_test.go | 12 ++--- .../attrdeleteconfig_flags.go | 11 +++- .../attrdeleteconfig_flags_test.go | 10 +--- .../attrfetchconfig_flags.go | 11 +++- .../attrfetchconfig_flags_test.go | 10 +--- .../attrupdateconfig_flags.go | 11 +++- .../attrupdateconfig_flags_test.go | 10 +--- .../executionclusterlabel/delete_config.go | 2 +- .../executionclusterlabel/fetch_config.go | 2 +- .../executionclusterlabel/update_config.go | 2 +- .../attrdeleteconfig_flags.go | 11 +++- .../attrdeleteconfig_flags_test.go | 10 +--- .../attrfetchconfig_flags.go | 11 +++- .../attrfetchconfig_flags_test.go | 10 +--- .../attrupdateconfig_flags.go | 11 +++- .../attrupdateconfig_flags_test.go | 10 +--- .../executionqueueattribute/delete_config.go | 2 +- .../executionqueueattribute/fetch_config.go | 2 +- .../executionqueueattribute/update_config.go | 2 +- .../subcommand/launchplan/config_flags.go | 15 +++--- .../launchplan/config_flags_test.go | 12 ++--- .../launchplan/launchplan_config.go | 2 +- .../plugin_override/attrdeleteconfig_flags.go | 11 +++- .../attrdeleteconfig_flags_test.go | 10 +--- .../plugin_override/attrfetchconfig_flags.go | 11 +++- .../attrfetchconfig_flags_test.go | 10 +--- .../plugin_override/attrupdateconfig_flags.go | 11 +++- .../attrupdateconfig_flags_test.go | 10 +--- .../plugin_override/delete_config.go | 2 +- .../plugin_override/fetch_config.go | 2 +- .../plugin_override/update_config.go | 2 +- .../config/subcommand/project/config_flags.go | 8 +-- .../subcommand/project/config_flags_test.go | 12 ++--- .../subcommand/project/project_config.go | 2 +- .../subcommand/register/filesconfig_flags.go | 49 ++++++++++++++--- .../config/subcommand/sandbox/config_flags.go | 37 +++++++++++++ .../subcommand/sandbox/sandbox_config.go | 2 +- .../config/subcommand/task/config_flags.go | 15 +++--- .../subcommand/task/config_flags_test.go | 12 ++--- .../cmd/config/subcommand/task/task_config.go | 2 +- .../attrdeleteconfig_flags.go | 11 +++- .../attrdeleteconfig_flags_test.go | 10 +--- .../attrfetchconfig_flags.go | 11 +++- .../attrfetchconfig_flags_test.go | 10 +--- .../attrupdateconfig_flags.go | 11 +++- .../attrupdateconfig_flags_test.go | 10 +--- .../taskresourceattribute/delete_config.go | 2 +- .../taskresourceattribute/fetch_config.go | 2 +- .../taskresourceattribute/update_config.go | 2 +- .../subcommand/workflow/config_flags.go | 4 +- .../subcommand/workflow/config_flags_test.go | 12 ++--- flytectl/cmd/create/execution.go | 2 +- flytectl/cmd/create/executionconfig_flags.go | 21 +++++--- .../cmd/create/executionconfig_flags_test.go | 52 +++++-------------- flytectl/cmd/get/execution.go | 4 +- flytectl/cmd/get/launch_plan.go | 6 +-- flytectl/cmd/get/project.go | 4 +- flytectl/cmd/get/task.go | 6 +-- flytectl/cmd/get/workflow.go | 6 +-- flytectl/cmd/register/files.go | 12 ++--- flytectl/cmd/update/named_entity.go | 2 +- .../cmd/update/namedentityconfig_flags.go | 17 ++++-- .../update/namedentityconfig_flags_test.go | 26 +--------- flytectl/cmd/update/project.go | 25 +++------ flytectl/cmd/update/project_test.go | 12 ++--- flytectl/cmd/update/projectconfig_flags.go | 13 ++++- .../cmd/update/projectconfig_flags_test.go | 18 +------ flytectl/cmd/update/update.go | 2 +- .../source/gen/flytectl_get_execution.rst | 18 +++---- .../source/gen/flytectl_get_launchplan.rst | 22 ++++---- .../docs/source/gen/flytectl_get_project.rst | 14 ++--- .../docs/source/gen/flytectl_get_task.rst | 22 ++++---- .../docs/source/gen/flytectl_get_workflow.rst | 20 +++---- .../source/gen/flytectl_register_examples.rst | 10 ++-- .../source/gen/flytectl_register_files.rst | 22 ++++---- .../source/gen/flytectl_update_launchplan.rst | 6 +-- .../source/gen/flytectl_update_project.rst | 21 ++------ .../docs/source/gen/flytectl_update_task.rst | 6 +-- .../source/gen/flytectl_update_workflow.rst | 6 +-- flytectl/pkg/adminutils/config.go | 6 +-- flytectl/pkg/adminutils/config_flags.go | 13 ++++- flytectl/pkg/adminutils/config_flags_test.go | 18 +------ flytectl/pkg/adminutils/config_test.go | 17 ------ flytectl/pkg/filters/type.go | 4 +- 96 files changed, 504 insertions(+), 502 deletions(-) delete mode 100644 flytectl/pkg/adminutils/config_test.go diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 6c212d1cf9..d038c316f5 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -9,7 +9,7 @@ import ( "github.com/flyteorg/flytectl/pkg/printer" ) -//go:generate pflags Config +//go:generate pflags Config --bind-default-var var ( defaultConfig = &Config{} diff --git a/flytectl/cmd/config/config_flags.go b/flytectl/cmd/config/config_flags.go index 3a1616b7e6..f219394ffb 100755 --- a/flytectl/cmd/config/config_flags.go +++ b/flytectl/cmd/config/config_flags.go @@ -50,8 +50,8 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") - cmdFlags.String(fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Output, "Specified the output type.") + cmdFlags.StringVar(&defaultConfig.Project, fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") + cmdFlags.StringVar(&defaultConfig.Domain, fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") + cmdFlags.StringVar(&defaultConfig.Output, fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Output, "Specified the output type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go index 2ee35a7887..447d2e0471 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go @@ -28,6 +28,15 @@ func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go index 798e81d2cf..63cb34732b 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go index 477e57689f..47dfb88623 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags.go @@ -28,6 +28,15 @@ func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go index 4d8ae3e0e6..dbcbb814fb 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrfetchconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go index 60a9af145a..7b19fc93f4 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go @@ -28,6 +28,15 @@ func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go index aa5d18dd07..9856912248 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go index 3b81cd0991..1112003923 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go @@ -1,6 +1,6 @@ package clusterresourceattribute -//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go index 9da6d481f8..88afae90ac 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/fetch_config.go @@ -1,6 +1,6 @@ package clusterresourceattribute -//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go index 2ff214af1f..fcbbe04d2a 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go @@ -1,6 +1,6 @@ package clusterresourceattribute -//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { diff --git a/flytectl/cmd/config/subcommand/execution/config_flags.go b/flytectl/cmd/config/subcommand/execution/config_flags.go index 467fbd7f6c..f9a96f5261 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags.go @@ -50,8 +50,8 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.field-selector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") - cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sort-by"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.fieldSelector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") cmdFlags.BoolVar(&DefaultConfig.Details, fmt.Sprintf("%v%v", prefix, "details"), DefaultConfig.Details, "gets node execution details. Only applicable for single execution name i.e get execution name --details") diff --git a/flytectl/cmd/config/subcommand/execution/config_flags_test.go b/flytectl/cmd/config/subcommand/execution/config_flags_test.go index 7fbd9e51f7..88cfd5fca0 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags_test.go @@ -99,13 +99,13 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) - t.Run("Test_filter.field-selector", func(t *testing.T) { + t.Run("Test_filter.fieldSelector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.field-selector", testValue) - if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + cmdFlags.Set("filter.fieldSelector", testValue) + if vString, err := cmdFlags.GetString("filter.fieldSelector"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { @@ -113,13 +113,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.sort-by", func(t *testing.T) { + t.Run("Test_filter.sortBy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.sort-by", testValue) - if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + cmdFlags.Set("filter.sortBy", testValue) + if vString, err := cmdFlags.GetString("filter.sortBy"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) } else { diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go index 3dc56c9837..bbaa014f79 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go @@ -28,6 +28,15 @@ func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go index 02ec1217d1..2c669643d9 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go index 0e1d0d060f..97bf9e8ff1 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags.go @@ -28,6 +28,15 @@ func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go index a99fd91933..495e5024d6 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrfetchconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go index f2f0d84852..bb592423db 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go @@ -28,6 +28,15 @@ func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go index ca7e09eb4d..fa011c6c1b 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go index 5a96d6fdfa..cbd1a09018 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go @@ -1,6 +1,6 @@ package executionclusterlabel -//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go index 8e7f878ede..68a27ea6fb 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/fetch_config.go @@ -1,6 +1,6 @@ package executionclusterlabel -//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go index abd5600553..ba3e9d3d88 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go @@ -1,6 +1,6 @@ package executionclusterlabel -//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go index 15852717de..d3ab937c61 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go @@ -28,6 +28,15 @@ func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go index d42fa0c9c7..46875fd457 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go index 0eed381d70..05a277f93a 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags.go @@ -28,6 +28,15 @@ func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go index 449b82faae..73e37ab447 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrfetchconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go index c858ca34c8..ffd725ff3e 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go @@ -28,6 +28,15 @@ func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go index dbe6642165..fafee300fb 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go index a6754eb4f4..48dedc581b 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go @@ -1,6 +1,6 @@ package executionqueueattribute -//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go index 4c5c154f2b..62a76d6ba1 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/fetch_config.go @@ -1,6 +1,6 @@ package executionqueueattribute -//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go index 11b319f1d1..8dd3e595a4 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go @@ -1,6 +1,6 @@ package executionqueueattribute -//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags.go b/flytectl/cmd/config/subcommand/launchplan/config_flags.go index db572d98ea..e41777eebc 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags.go @@ -50,13 +50,12 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") - cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the launchplan to be fetched.") - cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") - - cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") - cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") - cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") - cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.StringVar(&DefaultConfig.ExecFile, fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single launchplan.") + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the launchplan to be fetched.") + cmdFlags.BoolVar(&DefaultConfig.Latest, fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.fieldSelector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") + cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go index ec536464bc..d2ccb2715d 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go @@ -141,13 +141,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.field-selector", func(t *testing.T) { + t.Run("Test_filter.fieldSelector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.field-selector", testValue) - if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + cmdFlags.Set("filter.fieldSelector", testValue) + if vString, err := cmdFlags.GetString("filter.fieldSelector"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { @@ -155,13 +155,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.sort-by", func(t *testing.T) { + t.Run("Test_filter.sortBy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.sort-by", testValue) - if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + cmdFlags.Set("filter.sortBy", testValue) + if vString, err := cmdFlags.GetString("filter.sortBy"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) } else { diff --git a/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go index 5e245deb48..7c8245256a 100644 --- a/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go +++ b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" ) -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ Filter: filters.DefaultFilter, diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go index 52fd144b99..7003e5e1dd 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go @@ -28,6 +28,15 @@ func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go index 7a5d60873c..0129073516 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go index 1cf522b3ca..e7c79a92b4 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags.go @@ -28,6 +28,15 @@ func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go index e94f54e982..d5206f1d33 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrfetchconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go index 21c58dbb9d..1edf682879 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go @@ -28,6 +28,15 @@ func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go index 37ee0382c1..c23184f43b 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/plugin_override/delete_config.go b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go index beec54fd95..de00f5cf7f 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/delete_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go @@ -1,6 +1,6 @@ package pluginoverride -//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { diff --git a/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go b/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go index 9976d8b33f..e2283e7c80 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/fetch_config.go @@ -1,6 +1,6 @@ package pluginoverride -//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` diff --git a/flytectl/cmd/config/subcommand/plugin_override/update_config.go b/flytectl/cmd/config/subcommand/plugin_override/update_config.go index e2daefa8f3..aa0d9af0b2 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/update_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/update_config.go @@ -1,6 +1,6 @@ package pluginoverride -//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { diff --git a/flytectl/cmd/config/subcommand/project/config_flags.go b/flytectl/cmd/config/subcommand/project/config_flags.go index 3a3e9bb5df..ca18dca630 100755 --- a/flytectl/cmd/config/subcommand/project/config_flags.go +++ b/flytectl/cmd/config/subcommand/project/config_flags.go @@ -50,9 +50,9 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") - cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") - cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") - cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.fieldSelector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") + cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/project/config_flags_test.go b/flytectl/cmd/config/subcommand/project/config_flags_test.go index 50fcfad9d2..52668bcf14 100755 --- a/flytectl/cmd/config/subcommand/project/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/project/config_flags_test.go @@ -99,13 +99,13 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) - t.Run("Test_filter.field-selector", func(t *testing.T) { + t.Run("Test_filter.fieldSelector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.field-selector", testValue) - if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + cmdFlags.Set("filter.fieldSelector", testValue) + if vString, err := cmdFlags.GetString("filter.fieldSelector"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { @@ -113,13 +113,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.sort-by", func(t *testing.T) { + t.Run("Test_filter.sortBy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.sort-by", testValue) - if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + cmdFlags.Set("filter.sortBy", testValue) + if vString, err := cmdFlags.GetString("filter.sortBy"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) } else { diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index e5a7850595..8692a746cd 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -4,7 +4,7 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" ) -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ Filter: filters.DefaultFilter, diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index a28aead6e5..9ddea3a547 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -4,21 +4,58 @@ package register import ( + "encoding/json" + "reflect" + "fmt" "github.com/spf13/pflag" ) +// If v` is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (FilesConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (FilesConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in FilesConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.StringVarP(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), "v", DefaultFilesConfig.Version, "version of the entity to be registered with flyte.") - cmdFlags.BoolVarP(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), "", DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") - cmdFlags.BoolVarP(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), "a", DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") - cmdFlags.StringVarP(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), "i", DefaultFilesConfig.AssumableIamRole, " Custom assumable iam auth role to register launch plans with.") - cmdFlags.StringVarP(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), "k", DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") - cmdFlags.StringVarP(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), "l", DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") + cmdFlags.StringVar(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultFilesConfig.Version, "version of the entity to be registered with flyte.") + cmdFlags.BoolVar(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") + cmdFlags.BoolVar(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") + cmdFlags.StringVar(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), DefaultFilesConfig.AssumableIamRole, " custom assumable iam auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index ebecc0a5b9..b727f8a04d 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -4,11 +4,48 @@ package sandbox import ( + "encoding/json" + "reflect" + "fmt" "github.com/spf13/pflag" ) +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + // GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index afe85beddf..833a950495 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -1,6 +1,6 @@ package sandbox -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{} ) diff --git a/flytectl/cmd/config/subcommand/task/config_flags.go b/flytectl/cmd/config/subcommand/task/config_flags.go index 4c48a38e6c..3138439017 100755 --- a/flytectl/cmd/config/subcommand/task/config_flags.go +++ b/flytectl/cmd/config/subcommand/task/config_flags.go @@ -50,13 +50,12 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") - cmdFlags.StringVar(&(DefaultConfig.Version), fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the task to be fetched.") - cmdFlags.BoolVar(&(DefaultConfig.Latest), fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, "flag to indicate to fetch the latest version, version flag will be ignored in this case") - - cmdFlags.StringVar(&(DefaultConfig.Filter.FieldSelector), fmt.Sprintf("%v%v", prefix, "filter.field-selector"), *new(string), "Specifies the Field selector") - cmdFlags.StringVar((&DefaultConfig.Filter.SortBy), fmt.Sprintf("%v%v", prefix, "filter.sort-by"), *new(string), "Specifies which field to sort result by ") - cmdFlags.Int32Var((&DefaultConfig.Filter.Limit), fmt.Sprintf("%v%v", prefix, "filter.limit"), 100, "Specifies the limit") - cmdFlags.BoolVar((&DefaultConfig.Filter.Asc), fmt.Sprintf("%v%v", prefix, "filter.asc"), false, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.StringVar(&DefaultConfig.ExecFile, fmt.Sprintf("%v%v", prefix, "execFile"), DefaultConfig.ExecFile, "execution file name to be used for generating execution spec of a single task.") + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the task to be fetched.") + cmdFlags.BoolVar(&DefaultConfig.Latest, fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.fieldSelector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") + cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/task/config_flags_test.go b/flytectl/cmd/config/subcommand/task/config_flags_test.go index bea2ff142e..844d031a5a 100755 --- a/flytectl/cmd/config/subcommand/task/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/task/config_flags_test.go @@ -141,13 +141,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.field-selector", func(t *testing.T) { + t.Run("Test_filter.fieldSelector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.field-selector", testValue) - if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + cmdFlags.Set("filter.fieldSelector", testValue) + if vString, err := cmdFlags.GetString("filter.fieldSelector"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { @@ -155,13 +155,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.sort-by", func(t *testing.T) { + t.Run("Test_filter.sortBy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.sort-by", testValue) - if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + cmdFlags.Set("filter.sortBy", testValue) + if vString, err := cmdFlags.GetString("filter.sortBy"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) } else { diff --git a/flytectl/cmd/config/subcommand/task/task_config.go b/flytectl/cmd/config/subcommand/task/task_config.go index 241a1c1fab..1e0d6a2bec 100644 --- a/flytectl/cmd/config/subcommand/task/task_config.go +++ b/flytectl/cmd/config/subcommand/task/task_config.go @@ -2,7 +2,7 @@ package task import "github.com/flyteorg/flytectl/pkg/filters" -//go:generate pflags Config --default-var DefaultConfig +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ Filter: filters.DefaultFilter, diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go index b335257d99..d1128e5e9e 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go @@ -28,6 +28,15 @@ func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultDelConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go index 3c219496ae..f41f531f3f 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(val, result)) } -func testDecodeSlice_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultDelConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go index 761baa5c3a..0efc338768 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags.go @@ -28,6 +28,15 @@ func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultFetchConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go index 1b91152a97..038f8a893c 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrfetchconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(val, result)) } -func testDecodeSlice_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultFetchConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go index b94b102bc6..e57de741e7 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go @@ -28,6 +28,15 @@ func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,6 +50,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(DefaultUpdateConfig.AttrFile), fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go index 2672552de4..06f17f631c 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(val, result)) } -func testDecodeSlice_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_attrFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("attrFile"); err == nil { - assert.Equal(t, string(DefaultUpdateConfig.AttrFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go index 6c513cafe0..6d88a180a7 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go @@ -1,6 +1,6 @@ package taskresourceattribute -//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go index 6909229c30..1fe6de9937 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/fetch_config.go @@ -1,6 +1,6 @@ package taskresourceattribute -//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go index d9ea24ab77..2dd2451e9c 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go @@ -1,6 +1,6 @@ package taskresourceattribute -//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags.go b/flytectl/cmd/config/subcommand/workflow/config_flags.go index 5765379fe6..29bc7fca54 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags.go @@ -52,8 +52,8 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "version of the workflow to be fetched.") cmdFlags.BoolVar(&DefaultConfig.Latest, fmt.Sprintf("%v%v", prefix, "latest"), DefaultConfig.Latest, " flag to indicate to fetch the latest version, version flag will be ignored in this case") - cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.field-selector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") - cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sort-by"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") + cmdFlags.StringVar(&DefaultConfig.Filter.FieldSelector, fmt.Sprintf("%v%v", prefix, "filter.fieldSelector"), DefaultConfig.Filter.FieldSelector, "Specifies the Field selector") + cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") return cmdFlags diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go index 86998d7788..4011d8e4f3 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go @@ -127,13 +127,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.field-selector", func(t *testing.T) { + t.Run("Test_filter.fieldSelector", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.field-selector", testValue) - if vString, err := cmdFlags.GetString("filter.field-selector"); err == nil { + cmdFlags.Set("filter.fieldSelector", testValue) + if vString, err := cmdFlags.GetString("filter.fieldSelector"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.FieldSelector) } else { @@ -141,13 +141,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_filter.sort-by", func(t *testing.T) { + t.Run("Test_filter.sortBy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("filter.sort-by", testValue) - if vString, err := cmdFlags.GetString("filter.sort-by"); err == nil { + cmdFlags.Set("filter.sortBy", testValue) + if vString, err := cmdFlags.GetString("filter.sortBy"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Filter.SortBy) } else { diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index f765e786b2..4fdea5214d 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -127,7 +127,7 @@ Usage ` ) -//go:generate pflags ExecutionConfig --default-var executionConfig +//go:generate pflags ExecutionConfig --default-var executionConfig --bind-default-var // ExecutionConfig hold configuration for create execution flags and configuration of the actual task or workflow to be launched. type ExecutionConfig struct { diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 974c284b0b..5fb13bbbe8 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -28,6 +28,15 @@ func (ExecutionConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (ExecutionConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (ExecutionConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,11 +50,11 @@ func (ExecutionConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ExecutionConfig", pflag.ExitOnError) - cmdFlags.StringVar(&(executionConfig.ExecFile), fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") - cmdFlags.StringVar(&(executionConfig.TargetDomain), fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") - cmdFlags.StringVar(&(executionConfig.TargetProject), fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") - cmdFlags.StringVar(&(executionConfig.KubeServiceAcct), fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") - cmdFlags.StringVar(&(executionConfig.IamRoleARN), fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") - cmdFlags.StringVar(&(executionConfig.Relaunch), fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") + cmdFlags.StringVar(&executionConfig.ExecFile, fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") + cmdFlags.StringVar(&executionConfig.TargetDomain, fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") + cmdFlags.StringVar(&executionConfig.TargetProject, fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") + cmdFlags.StringVar(&executionConfig.KubeServiceAcct, fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") + cmdFlags.StringVar(&executionConfig.IamRoleARN, fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") + cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") return cmdFlags } diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index bf7ab9c47b..9e35676125 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_ExecutionConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_ExecutionConfig(val, result)) } -func testDecodeSlice_ExecutionConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_ExecutionConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_ExecutionConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestExecutionConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_execFile", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("execFile"); err == nil { - assert.Equal(t, string(executionConfig.ExecFile), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestExecutionConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_targetDomain", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("targetDomain"); err == nil { - assert.Equal(t, string(executionConfig.TargetDomain), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -144,14 +128,6 @@ func TestExecutionConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_targetProject", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("targetProject"); err == nil { - assert.Equal(t, string(executionConfig.TargetProject), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -166,14 +142,6 @@ func TestExecutionConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_kubeServiceAcct", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("kubeServiceAcct"); err == nil { - assert.Equal(t, string(executionConfig.KubeServiceAcct), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -188,21 +156,27 @@ func TestExecutionConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_iamRoleARN", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("iamRoleARN", testValue) if vString, err := cmdFlags.GetString("iamRoleARN"); err == nil { - assert.Equal(t, string(executionConfig.IamRoleARN), vString) + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.IamRoleARN) + } else { assert.FailNow(t, err.Error()) } }) + }) + t.Run("Test_relaunch", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("iamRoleARN", testValue) - if vString, err := cmdFlags.GetString("iamRoleARN"); err == nil { - testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.IamRoleARN) + cmdFlags.Set("relaunch", testValue) + if vString, err := cmdFlags.GetString("relaunch"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Relaunch) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index f547789349..2e8232ca7e 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -30,13 +30,13 @@ Retrieves execution by name within project and domain. Retrieves all the executions with filters. :: - bin/flytectl get execution -p flytesnacks -d development --filter.field-selector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" Retrieves all the execution with limit and sorting. :: - bin/flytectl get execution -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the execution within project and domain in yaml format diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 9edff6ab92..ec90a62fd2 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -43,18 +43,18 @@ Retrieves particular version of launchplan by name within project and domain. Retrieves all the launch plans with filters. :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.field-selector="name=core.basic.lp.go_greet" + bin/flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" Retrieves launch plans entity search across all versions with filters. :: - bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="version=v1" + bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" Retrieves all the launch plans with limit and sorting. :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the launchplan within project and domain in yaml format. diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 4d13950e1e..10148a1c07 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -31,12 +31,12 @@ Retrieves project by name Retrieves all the projects with filters. :: - bin/flytectl get project --filter.field-selector="project.name=flytesnacks" + bin/flytectl get project --filter.fieldSelector="project.name=flytesnacks" Retrieves all the projects with limit and sorting. :: - bin/flytectl get project --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the projects in yaml format diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index e25206a55f..49c586f433 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -43,17 +43,17 @@ Retrieves particular version of task by name within project and domain. Retrieves all the tasks with filters. :: - bin/flytectl get task -p flytesnacks -d development --filter.field-selector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + bin/flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" Retrieve a specific task with filters. :: - bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.field-selector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" Retrieves all the task with limit and sorting. :: - bin/flytectl get -p flytesnacks -d development task --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the tasks within project and domain in yaml format. :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 4174f96c1a..8fba30d2cd 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -44,17 +44,17 @@ Retrieves particular version of workflow by name within project and domain. Retrieves all the workflows with filters. :: - bin/flytectl get workflow -p flytesnacks -d development --filter.field-selector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + bin/flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" Retrieve specific workflow with filters. :: - bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="workflow.version=v1" + bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" Retrieves all the workflows with limit and sorting. :: - bin/flytectl get -p flytesnacks -d development workflow --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the workflow within project and domain in yaml format. diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index d758adce98..210bb1bba2 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -26,12 +26,12 @@ There is no difference between registration and fast registration, In fast regis SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 --SourceUploadPath="s3://dummy/fast" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. Use --archive flag. @@ -60,7 +60,7 @@ Using short format of continueOnError flag Overriding the default version v1 using version string. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 Change the o/p format has not effect on registration. The O/p is currently available only in table format. @@ -72,19 +72,19 @@ Override IamRole during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -i "arn:aws:iam::123456789:role/dummy" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -k "kubernetes-service-account" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" Override Output location prefix during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" Usage ` diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go index 5c3391d708..da5380554e 100644 --- a/flytectl/cmd/update/named_entity.go +++ b/flytectl/cmd/update/named_entity.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) -//go:generate pflags NamedEntityConfig --default-var namedEntityConfig +//go:generate pflags NamedEntityConfig --default-var namedEntityConfig --bind-default-var var ( namedEntityConfig = &NamedEntityConfig{} diff --git a/flytectl/cmd/update/namedentityconfig_flags.go b/flytectl/cmd/update/namedentityconfig_flags.go index 3d61711bec..e1bd681341 100755 --- a/flytectl/cmd/update/namedentityconfig_flags.go +++ b/flytectl/cmd/update/namedentityconfig_flags.go @@ -28,6 +28,15 @@ func (NamedEntityConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (NamedEntityConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (NamedEntityConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -39,10 +48,10 @@ func (NamedEntityConfig) mustMarshalJSON(v json.Marshaler) string { // GetPFlagSet will return strongly types pflags for all fields in NamedEntityConfig and its nested types. The format of the // flags is json-name.json-sub-name... etc. -func (n NamedEntityConfig) GetPFlagSet(prefix string) *pflag.FlagSet { +func (cfg NamedEntityConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("NamedEntityConfig", pflag.ExitOnError) - cmdFlags.BoolVar(&(namedEntityConfig.Activate), fmt.Sprintf("%v%v", prefix, "activate"), *new(bool), "Activates the named entity specified as argument.") - cmdFlags.BoolVar(&(namedEntityConfig.Archive), fmt.Sprintf("%v%v", prefix, "archive"), *new(bool), "Archives the named entity specified as argument.") - cmdFlags.StringVar(&(namedEntityConfig.Description), fmt.Sprintf("%v%v", prefix, "description"), namedEntityConfig.Description, "description of the namedentity.") + cmdFlags.BoolVar(&namedEntityConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), namedEntityConfig.Archive, "archive named entity.") + cmdFlags.BoolVar(&namedEntityConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), namedEntityConfig.Activate, "activate the named entity.") + cmdFlags.StringVar(&namedEntityConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), namedEntityConfig.Description, "description of the named entity.") return cmdFlags } diff --git a/flytectl/cmd/update/namedentityconfig_flags_test.go b/flytectl/cmd/update/namedentityconfig_flags_test.go index 1f9506481b..528f913d63 100755 --- a/flytectl/cmd/update/namedentityconfig_flags_test.go +++ b/flytectl/cmd/update/namedentityconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_NamedEntityConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_NamedEntityConfig(val, result)) } -func testDecodeSlice_NamedEntityConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_NamedEntityConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_NamedEntityConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestNamedEntityConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_archive", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("archive"); err == nil { - assert.Equal(t, bool(namedEntityConfig.Archive), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestNamedEntityConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_activate", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("activate"); err == nil { - assert.Equal(t, bool(namedEntityConfig.Activate), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -144,14 +128,6 @@ func TestNamedEntityConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_description", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vString, err := cmdFlags.GetString("description"); err == nil { - assert.Equal(t, string(namedEntityConfig.Description), vString) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 0a1f5415d7..86d7bb616a 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -11,7 +11,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -//go:generate pflags ProjectConfig +//go:generate pflags ProjectConfig --default-var DefaultProjectConfig --bind-default-var // Config hold configuration for project update flags. type ProjectConfig struct { @@ -34,40 +34,29 @@ Archives project named flytesnacks. bin/flytectl update project -p flytesnacks --archiveProject -Activates project named flytesnacks using short option -t. -:: - - bin/flytectl update project -p flytesnacks -t - -Archives project named flytesnacks using short option -a. - -:: - - bin/flytectl update project flytesnacks -a - Incorrect usage when passing both archive and activate. :: - bin/flytectl update project flytesnacks -a -t + bin/flytectl update project flytesnacks --archiveProject --activateProject Incorrect usage when passing unknown-project. :: - bin/flytectl update project unknown-project -a + bin/flytectl update project unknown-project --archiveProject Incorrect usage when passing valid project using -p option. :: - bin/flytectl update project unknown-project -a -p known-project + bin/flytectl update project unknown-project --archiveProject -p known-project Usage ` ) -var projectConfig = &ProjectConfig{} +var DefaultProjectConfig = &ProjectConfig{} func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { id := config.GetConfig().Project @@ -75,8 +64,8 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma fmt.Printf(clierrors.ErrProjectNotPassed) return nil } - archiveProject := projectConfig.ArchiveProject - activateProject := projectConfig.ActivateProject + archiveProject := DefaultProjectConfig.ArchiveProject + activateProject := DefaultProjectConfig.ActivateProject if activateProject == archiveProject { return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index e3eac5ff84..9db9f8cf46 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -37,7 +37,7 @@ func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProjec func TestActivateProjectFunc(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) @@ -48,7 +48,7 @@ func TestActivateProjectFunc(t *testing.T) { func TestActivateProjectFuncWithError(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) @@ -59,7 +59,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { func TestArchiveProjectFunc(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), true, &(DefaultProjectConfig.ActivateProject), false) projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ARCHIVED, @@ -74,7 +74,7 @@ func TestArchiveProjectFunc(t *testing.T) { func TestArchiveProjectFuncWithError(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(projectConfig.ArchiveProject), true, &(projectConfig.ActivateProject), false) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), true, &(DefaultProjectConfig.ActivateProject), false) projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ARCHIVED, @@ -90,7 +90,7 @@ func TestEmptyProjectInput(t *testing.T) { setup() updateProjectSetup() config.GetConfig().Project = "" - modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) @@ -101,7 +101,7 @@ func TestEmptyProjectInput(t *testing.T) { func TestInvalidInput(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), false) + modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), false) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) diff --git a/flytectl/cmd/update/projectconfig_flags.go b/flytectl/cmd/update/projectconfig_flags.go index f56579fe9f..2139fb0563 100755 --- a/flytectl/cmd/update/projectconfig_flags.go +++ b/flytectl/cmd/update/projectconfig_flags.go @@ -28,6 +28,15 @@ func (ProjectConfig) elemValueOrNil(v interface{}) interface{} { return v } +func (ProjectConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,7 +50,7 @@ func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) - cmdFlags.BoolVarP(&(projectConfig.ActivateProject), fmt.Sprintf("%v%v", prefix, "activateProject"), "t", *new(bool), "Activates the project specified as argument.") - cmdFlags.BoolVarP(&(projectConfig.ArchiveProject), fmt.Sprintf("%v%v", prefix, "archiveProject"), "a", *new(bool), "Archives the project specified as argument.") + cmdFlags.BoolVar(&DefaultProjectConfig.ActivateProject, fmt.Sprintf("%v%v", prefix, "activateProject"), DefaultProjectConfig.ActivateProject, "Activates the project specified as argument.") + cmdFlags.BoolVar(&DefaultProjectConfig.ArchiveProject, fmt.Sprintf("%v%v", prefix, "archiveProject"), DefaultProjectConfig.ArchiveProject, "Archives the project specified as argument.") return cmdFlags } diff --git a/flytectl/cmd/update/projectconfig_flags_test.go b/flytectl/cmd/update/projectconfig_flags_test.go index 4a13ad3aff..c6bc6b262c 100755 --- a/flytectl/cmd/update/projectconfig_flags_test.go +++ b/flytectl/cmd/update/projectconfig_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_ProjectConfig(t *testing.T, val, result interface{}) { assert.NoError(t, decode_ProjectConfig(val, result)) } -func testDecodeSlice_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_ProjectConfig(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestProjectConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_activateProject", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("activateProject"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestProjectConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_archiveProject", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vBool, err := cmdFlags.GetBool("archiveProject"); err == nil { - assert.Equal(t, bool(*new(bool)), vBool) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 34ab70c21c..8485f32043 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -35,7 +35,7 @@ func CreateUpdateCommand() *cobra.Command { updateResourcesFuncs := map[string]cmdCore.CommandEntry{ "launchplan": {CmdFunc: updateLPFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateLPShort, Long: updateLPLong}, - "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: DefaultProjectConfig, Short: projectShort, Long: projectLong}, "task": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateTaskShort, Long: updateTaskLong}, diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 174ba88661..e81e77ac7c 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -24,13 +24,13 @@ Retrieves execution by name within project and domain. Retrieves all the executions with filters. :: - bin/flytectl get execution -p flytesnacks -d development --filter.field-selector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" Retrieves all the execution with limit and sorting. :: - bin/flytectl get execution -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the execution within project and domain in yaml format @@ -82,13 +82,13 @@ Options :: - --details gets node execution details. Only applicable for single execution name i.e get execution name --details - --filter.asc Specifies the sorting order. By default flytectl sort result in descending order - --filter.field-selector string Specifies the Field selector - --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") - -h, --help help for execution - --nodeId string get task executions for given node name. + --details gets node execution details. Only applicable for single execution name i.e get execution name --details + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.fieldSelector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sortBy string Specifies which field to sort results (default "created_at") + -h, --help help for execution + --nodeId string get task executions for given node name. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index f50798c59c..51c936f264 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -37,18 +37,18 @@ Retrieves particular version of launchplan by name within project and domain. Retrieves all the launch plans with filters. :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.field-selector="name=core.basic.lp.go_greet" + bin/flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" Retrieves launch plans entity search across all versions with filters. :: - bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="version=v1" + bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" Retrieves all the launch plans with limit and sorting. :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the launchplan within project and domain in yaml format. @@ -99,14 +99,14 @@ Options :: - --execFile string execution file name to be used for generating execution spec of a single launchplan. - --filter.asc Specifies the sorting order. By default flytectl sort result in descending order - --filter.field-selector string Specifies the Field selector - --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort result by - -h, --help help for launchplan - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the launchplan to be fetched. + --execFile string execution file name to be used for generating execution spec of a single launchplan. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.fieldSelector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sortBy string Specifies which field to sort results (default "created_at") + -h, --help help for launchplan + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the launchplan to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 7aafa4e606..541f9e9a2d 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -24,12 +24,12 @@ Retrieves project by name Retrieves all the projects with filters. :: - bin/flytectl get project --filter.field-selector="project.name=flytesnacks" + bin/flytectl get project --filter.fieldSelector="project.name=flytesnacks" Retrieves all the projects with limit and sorting. :: - bin/flytectl get project --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the projects in yaml format @@ -55,11 +55,11 @@ Options :: - --filter.asc Specifies the sorting order. By default flytectl sort result in descending order - --filter.field-selector string Specifies the Field selector - --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort result by - -h, --help help for project + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.fieldSelector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sortBy string Specifies which field to sort results (default "created_at") + -h, --help help for project Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index c94f945b18..49148043bb 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -36,17 +36,17 @@ Retrieves particular version of task by name within project and domain. Retrieves all the tasks with filters. :: - bin/flytectl get task -p flytesnacks -d development --filter.field-selector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + bin/flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" Retrieve a specific task with filters. :: - bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.field-selector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" Retrieves all the task with limit and sorting. :: - bin/flytectl get -p flytesnacks -d development task --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the tasks within project and domain in yaml format. :: @@ -95,14 +95,14 @@ Options :: - --execFile string execution file name to be used for generating execution spec of a single task. - --filter.asc Specifies the sorting order. By default flytectl sort result in descending order - --filter.field-selector string Specifies the Field selector - --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort result by - -h, --help help for task - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the task to be fetched. + --execFile string execution file name to be used for generating execution spec of a single task. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.fieldSelector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sortBy string Specifies which field to sort results (default "created_at") + -h, --help help for task + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the task to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 63a55c3a4e..6c8ec19195 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -36,17 +36,17 @@ Retrieves particular version of workflow by name within project and domain. Retrieves all the workflows with filters. :: - bin/flytectl get workflow -p flytesnacks -d development --filter.field-selector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + bin/flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" Retrieve specific workflow with filters. :: - bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.field-selector="workflow.version=v1" + bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" Retrieves all the workflows with limit and sorting. :: - bin/flytectl get -p flytesnacks -d development workflow --filter.sort-by=created_at --filter.limit=1 --filter.asc + bin/flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc Retrieves all the workflow within project and domain in yaml format. @@ -84,13 +84,13 @@ Options :: - --filter.asc Specifies the sorting order. By default flytectl sort result in descending order - --filter.field-selector string Specifies the Field selector - --filter.limit int32 Specifies the limit (default 100) - --filter.sort-by string Specifies which field to sort results (default "created_at") - -h, --help help for workflow - --latest flag to indicate to fetch the latest version, version flag will be ignored in this case - --version string version of the workflow to be fetched. + --filter.asc Specifies the sorting order. By default flytectl sort result in descending order + --filter.fieldSelector string Specifies the Field selector + --filter.limit int32 Specifies the limit (default 100) + --filter.sortBy string Specifies which field to sort results (default "created_at") + -h, --help help for workflow + --latest flag to indicate to fetch the latest version, version flag will be ignored in this case + --version string version of the workflow to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 1a32690879..b1929fc1ea 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -28,14 +28,14 @@ Options :: - -a, --archive pass in archive file either an http link or local path. - -i, --assumableIamRole string Custom assumable iam auth role to register launch plans with. + --archive pass in archive file either an http link or local path. + --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. -h, --help help for examples - -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. - -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - -v, --version string version of the entity to be registered with flyte. (default "v1") + --version string version of the entity to be registered with flyte. (default "v1") Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 2e3207d832..55e8bab2bb 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -20,12 +20,12 @@ There is no difference between registration and fast registration, In fast regis SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 --SourceUploadPath="s3://dummy/fast" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. Use --archive flag. @@ -54,7 +54,7 @@ Using short format of continueOnError flag Overriding the default version v1 using version string. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks -v v2 + bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 Change the o/p format has not effect on registration. The O/p is currently available only in table format. @@ -66,19 +66,19 @@ Override IamRole during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -i "arn:aws:iam::123456789:role/dummy" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -k "kubernetes-service-account" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" Override Output location prefix during registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -v v2 -l "s3://dummy/prefix" + bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" Usage @@ -92,14 +92,14 @@ Options :: - -a, --archive pass in archive file either an http link or local path. - -i, --assumableIamRole string Custom assumable iam auth role to register launch plans with. + --archive pass in archive file either an http link or local path. + --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. -h, --help help for files - -k, --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. - -l, --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). + --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - -v, --version string version of the entity to be registered with flyte. (default "v1") + --version string version of the entity to be registered with flyte. (default "v1") Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 9c98daa2ef..0bc98036df 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -37,9 +37,9 @@ Options :: - --activate Activates the named entity specified as argument. - --archive Archives the named entity specified as argument. - --description string description of the namedentity. + --activate activate the named entity. + --archive archive named entity. + --description string description of the named entity. -h, --help help for launchplan Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index e7b4665448..437df1e0cd 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -22,34 +22,23 @@ Archives project named flytesnacks. bin/flytectl update project -p flytesnacks --archiveProject -Activates project named flytesnacks using short option -t. -:: - - bin/flytectl update project -p flytesnacks -t - -Archives project named flytesnacks using short option -a. - -:: - - bin/flytectl update project flytesnacks -a - Incorrect usage when passing both archive and activate. :: - bin/flytectl update project flytesnacks -a -t + bin/flytectl update project flytesnacks --archiveProject --activateProject Incorrect usage when passing unknown-project. :: - bin/flytectl update project unknown-project -a + bin/flytectl update project unknown-project --archiveProject Incorrect usage when passing valid project using -p option. :: - bin/flytectl update project unknown-project -a -p known-project + bin/flytectl update project unknown-project --archiveProject -p known-project Usage @@ -63,8 +52,8 @@ Options :: - -t, --activateProject Activates the project specified as argument. - -a, --archiveProject Archives the project specified as argument. + --activateProject Activates the project specified as argument. + --archiveProject Archives the project specified as argument. -h, --help help for project Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index 954071ee2a..f82ef9a7a1 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -37,9 +37,9 @@ Options :: - --activate Activates the named entity specified as argument. - --archive Archives the named entity specified as argument. - --description string description of the namedentity. + --activate activate the named entity. + --archive archive named entity. + --description string description of the named entity. -h, --help help for task Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 14f28a4082..b9d9abc384 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -37,9 +37,9 @@ Options :: - --activate Activates the named entity specified as argument. - --archive Archives the named entity specified as argument. - --description string description of the namedentity. + --activate activate the named entity. + --archive archive named entity. + --description string description of the named entity. -h, --help help for workflow Options inherited from parent commands diff --git a/flytectl/pkg/adminutils/config.go b/flytectl/pkg/adminutils/config.go index f47ae8276b..71f0a3f476 100644 --- a/flytectl/pkg/adminutils/config.go +++ b/flytectl/pkg/adminutils/config.go @@ -2,14 +2,14 @@ package adminutils import "github.com/flyteorg/flytestdlib/config" -//go:generate pflags Config +//go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( - defaultConfig = &Config{ + DefaultConfig = &Config{ MaxRecords: 500, BatchSize: 100, } - section = config.MustRegisterSection("adminutils", defaultConfig) + section = config.MustRegisterSection("adminutils", DefaultConfig) ) type Config struct { diff --git a/flytectl/pkg/adminutils/config_flags.go b/flytectl/pkg/adminutils/config_flags.go index 5a3c9a2c4d..f62caa371c 100755 --- a/flytectl/pkg/adminutils/config_flags.go +++ b/flytectl/pkg/adminutils/config_flags.go @@ -28,6 +28,15 @@ func (Config) elemValueOrNil(v interface{}) interface{} { return v } +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + func (Config) mustMarshalJSON(v json.Marshaler) string { raw, err := v.MarshalJSON() if err != nil { @@ -41,7 +50,7 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "maxRecords"), defaultConfig.MaxRecords, "Maximum number of records to retrieve.") - cmdFlags.Int(fmt.Sprintf("%v%v", prefix, "batchSize"), defaultConfig.BatchSize, "Maximum number of records to retrieve per call.") + cmdFlags.IntVar(&DefaultConfig.MaxRecords, fmt.Sprintf("%v%v", prefix, "maxRecords"), DefaultConfig.MaxRecords, "Maximum number of records to retrieve.") + cmdFlags.IntVar(&DefaultConfig.BatchSize, fmt.Sprintf("%v%v", prefix, "batchSize"), DefaultConfig.BatchSize, "Maximum number of records to retrieve per call.") return cmdFlags } diff --git a/flytectl/pkg/adminutils/config_flags_test.go b/flytectl/pkg/adminutils/config_flags_test.go index 1f7cf5ec73..de285339d1 100755 --- a/flytectl/pkg/adminutils/config_flags_test.go +++ b/flytectl/pkg/adminutils/config_flags_test.go @@ -84,7 +84,7 @@ func testDecodeJson_Config(t *testing.T, val, result interface{}) { assert.NoError(t, decode_Config(val, result)) } -func testDecodeSlice_Config(t *testing.T, vStringSlice, result interface{}) { +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { assert.NoError(t, decode_Config(vStringSlice, result)) } @@ -100,14 +100,6 @@ func TestConfig_SetFlags(t *testing.T) { assert.True(t, cmdFlags.HasFlags()) t.Run("Test_maxRecords", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("maxRecords"); err == nil { - assert.Equal(t, int(defaultConfig.MaxRecords), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" @@ -122,14 +114,6 @@ func TestConfig_SetFlags(t *testing.T) { }) }) t.Run("Test_batchSize", func(t *testing.T) { - t.Run("DefaultValue", func(t *testing.T) { - // Test that default value is set properly - if vInt, err := cmdFlags.GetInt("batchSize"); err == nil { - assert.Equal(t, int(defaultConfig.BatchSize), vInt) - } else { - assert.FailNow(t, err.Error()) - } - }) t.Run("Override", func(t *testing.T) { testValue := "1" diff --git a/flytectl/pkg/adminutils/config_test.go b/flytectl/pkg/adminutils/config_test.go deleted file mode 100644 index 5a8fd5134d..0000000000 --- a/flytectl/pkg/adminutils/config_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package adminutils - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetConfig(t *testing.T) { - defaultConfig = &Config{ - MaxRecords: 500, - BatchSize: 100, - } - c := GetConfig() - assert.Equal(t, defaultConfig.BatchSize, c.BatchSize) - assert.Equal(t, defaultConfig.MaxRecords, c.MaxRecords) -} diff --git a/flytectl/pkg/filters/type.go b/flytectl/pkg/filters/type.go index 5dbad76923..6dabc0904d 100644 --- a/flytectl/pkg/filters/type.go +++ b/flytectl/pkg/filters/type.go @@ -10,8 +10,8 @@ var ( ) type Filters struct { - FieldSelector string `json:"field-selector" pflag:",Specifies the Field selector"` - SortBy string `json:"sort-by" pflag:",Specifies which field to sort results "` + FieldSelector string `json:"fieldSelector" pflag:",Specifies the Field selector"` + SortBy string `json:"sortBy" pflag:",Specifies which field to sort results "` // TODO: Support paginated queries Limit int32 `json:"limit" pflag:",Specifies the limit"` Asc bool `json:"asc" pflag:",Specifies the sorting order. By default flytectl sort result in descending order"` From fb6eb2d3e3b0c2f45f1e49460394f9c7a034dcc9 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:09:41 -0700 Subject: [PATCH 102/356] Graphviz does not like hyphens #patch (#141) * Cluster names cannot have `-` in them. Signed-off-by: Ketan Umare * clusters with labels Signed-off-by: Ketan Umare --- flytectl/go.sum | 2 -- flytectl/pkg/visualize/graphviz.go | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flytectl/go.sum b/flytectl/go.sum index b5433777b6..802b4060f5 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -339,8 +339,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.19.8 h1:jWWIEnFMgJCZm/XK25Xts4+kQhoOrd5dWgLj/fLsbIg= -github.com/flyteorg/flyteidl v0.19.8/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flyteidl v0.19.9 h1:1j4/YbV/G1m2hrK017F9K0JYZYxCCwf4qtEkiNnUiEw= github.com/flyteorg/flyteidl v0.19.9/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= diff --git a/flytectl/pkg/visualize/graphviz.go b/flytectl/pkg/visualize/graphviz.go index 314c325148..08aa188716 100644 --- a/flytectl/pkg/visualize/graphviz.go +++ b/flytectl/pkg/visualize/graphviz.go @@ -229,8 +229,9 @@ func (gb *graphBuilder) constructNode(parentGraphName string, prefix string, gra } gb.nodeClusters[name] = parentGraphName case *core.Node_BranchNode: - branchSubGraphName := SubgraphPrefix + n.Metadata.Name - err := graph.AddSubGraph(parentGraphName, branchSubGraphName, nil) + sanitizedName := strings.ReplaceAll(n.Metadata.Name, "-", "_") + branchSubGraphName := SubgraphPrefix + sanitizedName + err := graph.AddSubGraph(parentGraphName, branchSubGraphName, map[string]string{LabelAttr: sanitizedName}) if err != nil { return nil, err } @@ -247,8 +248,9 @@ func (gb *graphBuilder) constructNode(parentGraphName string, prefix string, gra return nil, err } } else { - subGraphName := SubgraphPrefix + name - err := graph.AddSubGraph(parentGraphName, subGraphName, nil) + sanitizedName := strings.ReplaceAll(name, "-", "_") + subGraphName := SubgraphPrefix + sanitizedName + err := graph.AddSubGraph(parentGraphName, subGraphName, map[string]string{LabelAttr: sanitizedName}) if err != nil { return nil, err } From ab171cdefc9e096d4cd34e733d144d74c57b01d7 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Fri, 9 Jul 2021 21:05:21 -0700 Subject: [PATCH 103/356] Add pflag binding and fix loading of config (#135) --- flytectl/cmd/config/config.go | 9 +- flytectl/cmd/config/config_flags.go | 57 --------- flytectl/cmd/config/config_flags_test.go | 144 ----------------------- flytectl/cmd/root.go | 15 ++- flytectl/config.yaml | 1 + flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- 7 files changed, 23 insertions(+), 209 deletions(-) delete mode 100755 flytectl/cmd/config/config_flags.go delete mode 100755 flytectl/cmd/config/config_flags_test.go diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index d038c316f5..c20f2bc2ef 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -9,11 +9,12 @@ import ( "github.com/flyteorg/flytectl/pkg/printer" ) -//go:generate pflags Config --bind-default-var - var ( - defaultConfig = &Config{} - section = config.MustRegisterSection("root", defaultConfig) + defaultConfig = &Config{ + Output: printer.OutputFormatTABLE.String(), + } + + section = config.MustRegisterSection("root", defaultConfig) ) // Config hold configration for flytectl flag diff --git a/flytectl/cmd/config/config_flags.go b/flytectl/cmd/config/config_flags.go deleted file mode 100755 index f219394ffb..0000000000 --- a/flytectl/cmd/config/config_flags.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package config - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (Config) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (Config) mustJsonMarshal(v interface{}) string { - raw, err := json.Marshal(v) - if err != nil { - panic(err) - } - - return string(raw) -} - -func (Config) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&defaultConfig.Project, fmt.Sprintf("%v%v", prefix, "project"), defaultConfig.Project, "Specifies the project to work on.") - cmdFlags.StringVar(&defaultConfig.Domain, fmt.Sprintf("%v%v", prefix, "domain"), defaultConfig.Domain, "Specified the domain to work on.") - cmdFlags.StringVar(&defaultConfig.Output, fmt.Sprintf("%v%v", prefix, "output"), defaultConfig.Output, "Specified the output type.") - return cmdFlags -} diff --git a/flytectl/cmd/config/config_flags_test.go b/flytectl/cmd/config/config_flags_test.go deleted file mode 100755 index 88446ff3e3..0000000000 --- a/flytectl/cmd/config/config_flags_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package config - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" - "testing" - - "github.com/mitchellh/mapstructure" - "github.com/stretchr/testify/assert" -) - -var dereferencableKindsConfig = map[reflect.Kind]struct{}{ - reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, -} - -// Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsConfig[t] - return exists -} - -// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the -// object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { - unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() - if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { - - raw, err := json.Marshal(data) - if err != nil { - fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) - return data, nil - } - - res := reflect.New(to).Interface() - err = json.Unmarshal(raw, &res) - if err != nil { - fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) - return data, nil - } - - return res, nil - } - - return data, nil -} - -func decode_Config(input, result interface{}) error { - config := &mapstructure.DecoderConfig{ - TagName: "json", - WeaklyTypedInput: true, - Result: result, - DecodeHook: mapstructure.ComposeDecodeHookFunc( - mapstructure.StringToTimeDurationHookFunc(), - mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookConfig, - ), - } - - decoder, err := mapstructure.NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -func join_Config(arr interface{}, sep string) string { - listValue := reflect.ValueOf(arr) - strs := make([]string, 0, listValue.Len()) - for i := 0; i < listValue.Len(); i++ { - strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) - } - - return strings.Join(strs, sep) -} - -func testDecodeJson_Config(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_Config(val, result)) -} - -func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_Config(vStringSlice, result)) -} - -func TestConfig_GetPFlagSet(t *testing.T) { - val := Config{} - cmdFlags := val.GetPFlagSet("") - assert.True(t, cmdFlags.HasFlags()) -} - -func TestConfig_SetFlags(t *testing.T) { - actual := Config{} - cmdFlags := actual.GetPFlagSet("") - assert.True(t, cmdFlags.HasFlags()) - - t.Run("Test_project", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("project", testValue) - if vString, err := cmdFlags.GetString("project"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Project) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) - t.Run("Test_domain", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("domain", testValue) - if vString, err := cmdFlags.GetString("domain"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Domain) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) - t.Run("Test_output", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("output", testValue) - if vString, err := cmdFlags.GetString("output"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Output) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) -} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 70691d1751..9995b42774 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -47,6 +47,8 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.flyte/config.yaml)") + configAccessor.InitializePflags(rootCmd.PersistentFlags()) + // Due to https://github.com/flyteorg/flyte/issues/341, project flag will have to be specified as // --root.project, this adds a convenience on top to allow --project to be used rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") @@ -69,19 +71,30 @@ func newRootCmd() *cobra.Command { return rootCmd } -func initConfig(_ *cobra.Command, _ []string) error { +func initConfig(cmd *cobra.Command, _ []string) error { configFile := f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName) if len(os.Getenv("FLYTECTL_CONFIG")) > 0 { configFile = os.Getenv("FLYTECTL_CONFIG") } + if len(cfgFile) > 0 { configFile = cfgFile } + configAccessor = viper.NewAccessor(stdConfig.Options{ StrictMode: true, SearchPaths: []string{configFile}, }) + // persistent flags were initially bound to the root command so we must bind to the same command to avoid + // overriding those initial ones. We need to traverse up to the root command and initialize pflags for that. + rootCmd := cmd + for rootCmd.Parent() != nil { + rootCmd = rootCmd.Parent() + } + + configAccessor.InitializePflags(rootCmd.PersistentFlags()) + err := configAccessor.UpdateConfig(context.TODO()) if err != nil { return err diff --git a/flytectl/config.yaml b/flytectl/config.yaml index 82b0ed8704..6447502e59 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -2,6 +2,7 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 insecure: true + authType: Pkce logger: show-source: true level: 0 diff --git a/flytectl/go.mod b/flytectl/go.mod index 67f26af2a7..1c518389af 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v0.19.9 - github.com/flyteorg/flytestdlib v0.3.24 + github.com/flyteorg/flytestdlib v0.3.28 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-cmp v0.5.6 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 802b4060f5..ed5d175028 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -342,8 +342,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.19.9 h1:1j4/YbV/G1m2hrK017F9K0JYZYxCCwf4qtEkiNnUiEw= github.com/flyteorg/flyteidl v0.19.9/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.24 h1:Eu5TMKch9ihOavPKufgTBI677eVYjJpOAPPg9hfZIzU= -github.com/flyteorg/flytestdlib v0.3.24/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/flytestdlib v0.3.28 h1:bvyldApjlUy9ETxSFpYvLhYLJxxndnMZTf93rVG6a00= +github.com/flyteorg/flytestdlib v0.3.28/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From 81471f18cab1db220784dac932b6b11fa79bf04d Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 10 Jul 2021 09:37:26 +0530 Subject: [PATCH 104/356] #none fixed storage config in docs (#138) --- flytectl/docs/source/index.rst | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index c3b2a58db1..c9d94fa3d7 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -56,8 +56,8 @@ Basic Configuration admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 - insecure: true - authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + authType: Pkce # authType: Pkce # if using authentication or just drop this. storage: connection: access-key: minio @@ -76,12 +76,15 @@ Basic Configuration admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:/// - authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) storage: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 + type: stow + stow: + kind: s3 + config: + auth_type: iam + region: # Example: us-east-2 container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket .. tab:: GCS Configuration @@ -91,13 +94,16 @@ Basic Configuration admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:/// - authType: Pkce # if using authentication or just drop this. If insecure set insecure: True + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) storage: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write + type: stow + stow: + kind: s3 + config: + json: "" + project_id: # TODO: replace with the GCP project ID + scopes: https://www.googleapis.com/auth/devstorage.read_write container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket .. tab:: Others From 41e0a4006e4d930f0438044b5c8d2dd99bd03588 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sun, 11 Jul 2021 17:13:22 +0530 Subject: [PATCH 105/356] #none Fix DCO make target (#139) * Fix DCO make target Signed-off-by: Yuvraj * added github checkout depth to 2 Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 2 +- flytectl/docs/CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index efdceac3d7..48b9425a89 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: "0" + fetch-depth: "2" - uses: actions/cache@v2 with: path: | diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md index 1f93087df8..f170374b9e 100644 --- a/flytectl/docs/CONTRIBUTING.md +++ b/flytectl/docs/CONTRIBUTING.md @@ -20,6 +20,6 @@ Flyte ships commit hooks that allow you to auto-generate the DCO signoff line if it doesn't exist when you run `git commit`. Simply navigate to the flytectl project root and run ```bash -make dco +make setup-precommit ``` From 03be16bde5835604ae5a682ed909745df61c653f Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 12 Jul 2021 14:01:47 +0530 Subject: [PATCH 106/356] Added version flag in sandbox (#137) * Added version flag in the sandbox Signed-off-by: Yuvraj --- .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 14 +++ .../subcommand/sandbox/sandbox_config.go | 3 +- flytectl/cmd/sandbox/start.go | 76 +++++++++--- flytectl/cmd/sandbox/start_test.go | 108 +++++++++++++++--- flytectl/cmd/version/version.go | 39 +++---- flytectl/cmd/version/version_test.go | 29 ++--- flytectl/pkg/util/util.go | 32 +++++- flytectl/pkg/util/util_test.go | 34 ++++++ 9 files changed, 261 insertions(+), 75 deletions(-) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index b727f8a04d..7126d6a2e3 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -51,5 +51,6 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, " Path of your source code") + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 09d41aa631..f01337ec13 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -113,4 +113,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_version", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 833a950495..5d3bfa9184 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -7,5 +7,6 @@ var ( //Config type Config struct { - Source string `json:"source" pflag:", Path of your source code"` + Source string `json:"source" pflag:",Path of your source code"` + Version string `json:"version" pflag:",Version of flyte"` } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 5853ee5060..a1de9e2f6f 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -8,6 +8,9 @@ import ( "os" "path/filepath" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flytectl/pkg/docker" "github.com/docker/docker/api/types/mount" @@ -30,9 +33,22 @@ Mount your source code repository inside sandbox :: bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + +Run specific version of flyte, Only available after v0.14.0+ +:: + + bin/flytectl sandbox start --version=v0.14.0 Usage ` + GeneratedManifest = "/flyteorg/share/flyte_generated.yaml" + FlyteReleaseURL = "/flyteorg/flyte/releases/download/%v/flyte_sandbox_manifest.yaml" + FlyteMinimumVersionSupported = "v0.14.0" + GithubURL = "https://github.com" +) + +var ( + FlyteManifest = f.FilePathJoin(f.UserHomeDir(), ".flyte", "flyte_generated.yaml") ) type ExecResult struct { @@ -57,6 +73,10 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + return nil, err + } + if err := docker.SetupFlyteDir(); err != nil { return nil, err } @@ -65,25 +85,15 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return nil, err } - if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + if err := mountSourceCode(); err != nil { return nil, err } - if len(sandboxConfig.DefaultConfig.Source) > 0 { - source, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) - if err != nil { - return nil, err - } - docker.Volumes = append(docker.Volumes, mount.Mount{ - Type: mount.TypeBind, - Source: source, - Target: docker.Source, - }) + if err := mountFlyteManifest(sandboxConfig.DefaultConfig.Version); err != nil { + return nil, err } fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) - os.Setenv("KUBECONFIG", docker.Kubeconfig) - os.Setenv("FLYTECTL_CONFIG", docker.FlytectlConfig) if err := docker.PullDockerImage(ctx, cli, docker.ImageName); err != nil { return nil, err } @@ -111,3 +121,43 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return logReader, nil } + +func mountSourceCode() error { + if len(sandboxConfig.DefaultConfig.Source) > 0 { + source, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) + if err != nil { + return err + } + docker.Volumes = append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: source, + Target: docker.Source, + }) + } + return nil +} + +func mountFlyteManifest(version string) error { + if len(version) > 0 { + isGreater, err := util.IsVersionGreaterThan(version, FlyteMinimumVersionSupported) + if err != nil { + return err + } + if !isGreater { + return fmt.Errorf("version flag only support %s+ flyte version", FlyteMinimumVersionSupported) + } + response, err := util.GetRequest(GithubURL, fmt.Sprintf(FlyteReleaseURL, version)) + if err != nil { + return err + } + if err := util.WriteIntoFile(response, FlyteManifest); err != nil { + return err + } + docker.Volumes = append(docker.Volumes, mount.Mount{ + Type: mount.TypeBind, + Source: FlyteManifest, + Target: GeneratedManifest, + }) + } + return nil +} diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 042860ed60..3e06516936 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -63,7 +63,8 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, @@ -101,7 +102,8 @@ func TestStartSandboxFunc(t *testing.T) { sandboxConfig.DefaultConfig.Source = "../" absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) assert.Nil(t, err) - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: absPath, Target: docker.Source, @@ -131,13 +133,90 @@ func TestStartSandboxFunc(t *testing.T) { _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) + t.Run("Successfully run sandbox cluster with specific version", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Version = "v0.15.0" + sandboxConfig.DefaultConfig.Source = "" + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: FlyteManifest, + Target: GeneratedManifest, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Failed run sandbox cluster with wrong version", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Version = "v0.13.0" + sandboxConfig.DefaultConfig.Source = "" + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: FlyteManifest, + Target: GeneratedManifest, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err := startSandbox(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) t.Run("Error in pulling image", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, @@ -173,7 +252,8 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, @@ -216,19 +296,15 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) + sandboxConfig.DefaultConfig.Source = "" + sandboxConfig.DefaultConfig.Version = "" mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, Image: docker.ImageName, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ - Mounts: volumes, + Mounts: docker.Volumes, PortBindings: p2, Privileged: true, }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ @@ -247,13 +323,18 @@ func TestStartSandboxFunc(t *testing.T) { _, err := startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) + t.Run("Failed manifest", func(t *testing.T) { + err := mountFlyteManifest("v100.9.9") + assert.NotNil(t, err) + }) t.Run("Error in reading logs", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, @@ -289,7 +370,8 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := append(docker.Volumes, mount.Mount{ + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 4510c88aad..a48c9c6f90 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" stdlibversion "github.com/flyteorg/flytestdlib/version" - hversion "github.com/hashicorp/go-version" "github.com/spf13/cobra" ) @@ -23,13 +22,15 @@ Example version. bin/flytectl version ` - latestVersionMessage = "Installed flytectl version is the latest" - upgradeVersionMessage = "A newer version of flytectl is available [%v] Please upgrade using - https://docs.flyte.org/projects/flytectl/en/latest/index.html" flytectlAppName = "flytectl" controlPlanAppName = "controlPlane" - flytectlReleasePath = "/repos/flyteorg/flytectl/releases/latest" + GithubAPIURL = "https://api.github.com" + latestVersionMessage = "Installed flytectl version is the latest" + upgradeVersionMessage = "A newer version of flytectl is available [%v] Please upgrade using - https://docs.flyte.org/projects/flytectl/en/latest/index.html" ) +var flytectlReleasePath = "/repos/flyteorg/flytectl/releases/latest" + type versionOutput struct { // Specifies the Name of app App string `json:"App,omitempty"` @@ -54,13 +55,19 @@ func GetVersionCommand(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { latest, err := getLatestVersion(flytectlReleasePath) if err != nil { - return err + logger.Errorf(ctx, "Get latest version of flyte got failed", err) } - message, err := compareVersion(latest, stdlibversion.Version) + isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version) if err != nil { - return err + logger.Errorf(ctx, "Error while comparing the flytectl version", err) } + + message := latestVersionMessage + if isGreater { + message = fmt.Sprintf(upgradeVersionMessage, latest) + } + fmt.Println(message) // Print Flytectl if err := printVersion(versionOutput{ @@ -87,22 +94,6 @@ func printVersion(response versionOutput) error { return nil } -func compareVersion(latest, current string) (string, error) { - semanticVersion, err := hversion.NewVersion(latest) - if err != nil { - return "", err - } - currentVersion, err := hversion.NewVersion(current) - if err != nil { - return "", err - } - if currentVersion.LessThan(semanticVersion) { - return fmt.Sprintf(upgradeVersionMessage, latest), nil - } - - return latestVersionMessage, nil -} - func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) error { v, err := cmdCtx.AdminClient().GetVersion(ctx, &admin.GetVersionRequest{}) if err != nil || v == nil { @@ -122,7 +113,7 @@ func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) } func getLatestVersion(path string) (string, error) { - response, err := util.GetRequest("https://api.github.com", path) + response, err := util.GetRequest(GithubAPIURL, path) if err != nil { return "", err } diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 2366a3a856..08681819b0 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -90,24 +90,6 @@ func TestVersionUtilFunc(t *testing.T) { assert.NotNil(t, err) assert.Equal(t, len(tag), 0) }) - t.Run("Compare flytectl version when upgrade available", func(t *testing.T) { - message, err := compareVersion("v1.1.21", testVersion) - assert.Nil(t, err) - assert.Equal(t, fmt.Sprintf(upgradeVersionMessage, "v1.1.21"), message) - }) - t.Run("Compare flytectl version", func(t *testing.T) { - message, err := compareVersion(testVersion, testVersion) - assert.Nil(t, err) - assert.Equal(t, latestVersionMessage, message) - }) - t.Run("Error in compare flytectl version", func(t *testing.T) { - _, err := compareVersion("vvvvvvvv", testVersion) - assert.NotNil(t, err) - }) - t.Run("Error in compare flytectl version", func(t *testing.T) { - _, err := compareVersion(testVersion, "vvvvvvvv") - assert.NotNil(t, err) - }) t.Run("Error in getting control plan version", func(t *testing.T) { ctx := context.Background() mockClient := new(mocks.AdminServiceClient) @@ -117,4 +99,15 @@ func TestVersionUtilFunc(t *testing.T) { err := getControlPlaneVersion(ctx, cmdCtx) assert.NotNil(t, err) }) + t.Run("Failed in getting version", func(t *testing.T) { + ctx := context.Background() + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + flytectlReleasePath = "/release" + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + mockClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) + err := getVersion(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) + } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 6496f0fdd3..ee5a8e4184 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -5,6 +5,12 @@ import ( "fmt" "io/ioutil" "net/http" + + hversion "github.com/hashicorp/go-version" +) + +const ( + HTTPRequestErrorMessage = "something went wrong. Received status code [%v] while sending a request to [%s]" ) type githubversion struct { @@ -12,17 +18,19 @@ type githubversion struct { } func GetRequest(baseURL, url string) ([]byte, error) { - response, err := http.Get(fmt.Sprintf("%v%v", baseURL, url)) + response, err := http.Get(fmt.Sprintf("%s%s", baseURL, url)) if err != nil { return []byte(""), err } defer response.Body.Close() - - data, err := ioutil.ReadAll(response.Body) - if err != nil { - return []byte(""), err + if response.StatusCode == 200 { + data, err := ioutil.ReadAll(response.Body) + if err != nil { + return []byte(""), err + } + return data, nil } - return data, nil + return []byte(""), fmt.Errorf(HTTPRequestErrorMessage, response.StatusCode, fmt.Sprintf("%s%s", baseURL, url)) } func ParseGithubTag(data []byte) (string, error) { @@ -41,3 +49,15 @@ func WriteIntoFile(data []byte, file string) error { } return nil } + +func IsVersionGreaterThan(version1, version2 string) (bool, error) { + semanticVersion1, err := hversion.NewVersion(version1) + if err != nil { + return false, err + } + semanticVersion2, err := hversion.NewVersion(version2) + if err != nil { + return false, err + } + return semanticVersion2.LessThanOrEqual(semanticVersion1), nil +} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index f4e0792428..ca9cd0f34f 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -9,6 +9,7 @@ import ( const flytectlReleaseURL = "/repos/flyteorg/flytectl/releases/latest" const baseURL = "https://api.github.com" const wrongBaseURL = "htts://api.github.com" +const testVersion = "v0.1.20" func TestGetRequest(t *testing.T) { t.Run("Get request with 200", func(t *testing.T) { @@ -19,6 +20,10 @@ func TestGetRequest(t *testing.T) { _, err := GetRequest(wrongBaseURL, flytectlReleaseURL) assert.NotNil(t, err) }) + t.Run("Get request with 400", func(t *testing.T) { + _, err := GetRequest("https://github.com", "/flyteorg/flyte/releases/download/latest/flyte_eks_manifest.yaml") + assert.NotNil(t, err) + }) } func TestParseGithubTag(t *testing.T) { @@ -49,3 +54,32 @@ func TestWriteIntoFile(t *testing.T) { assert.NotNil(t, err) }) } + +func TestIsVersionGreaterThan(t *testing.T) { + t.Run("Compare flytectl version when upgrade available", func(t *testing.T) { + _, err := IsVersionGreaterThan("v1.1.21", testVersion) + assert.Nil(t, err) + }) + t.Run("Compare flytectl version greater then", func(t *testing.T) { + ok, err := IsVersionGreaterThan("v1.1.21", testVersion) + assert.Nil(t, err) + assert.Equal(t, true, ok) + }) + t.Run("Compare flytectl version smaller then", func(t *testing.T) { + ok, err := IsVersionGreaterThan("v0.1.19", testVersion) + assert.Nil(t, err) + assert.Equal(t, false, ok) + }) + t.Run("Compare flytectl version", func(t *testing.T) { + _, err := IsVersionGreaterThan(testVersion, testVersion) + assert.Nil(t, err) + }) + t.Run("Error in compare flytectl version", func(t *testing.T) { + _, err := IsVersionGreaterThan("vvvvvvvv", testVersion) + assert.NotNil(t, err) + }) + t.Run("Error in compare flytectl version", func(t *testing.T) { + _, err := IsVersionGreaterThan(testVersion, "vvvvvvvv") + assert.NotNil(t, err) + }) +} From a1442752b3408d924285f39636ef2c8453ce20d1 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 12 Jul 2021 16:55:57 +0530 Subject: [PATCH 107/356] Added `config init` command (#123) * Added setup config Signed-off-by: Yuvraj --- flytectl/cmd/completion_test.go | 26 ++++ .../config/subcommand/config/config_flags.go | 57 +++++++ .../subcommand/config/config_flags_test.go | 144 ++++++++++++++++++ .../config/subcommand/config/init_flags.go | 16 ++ flytectl/cmd/configuration/configuration.go | 108 +++++++++++++ .../cmd/configuration/configuration_test.go | 63 ++++++++ flytectl/cmd/root.go | 6 +- flytectl/cmd/root_test.go | 12 ++ flytectl/cmd/sandbox/start.go | 83 +++++----- flytectl/cmd/sandbox/start_test.go | 2 +- flytectl/cmd/sandbox/teardown.go | 4 +- flytectl/docs/source/nouns.rst | 1 + flytectl/go.mod | 2 + flytectl/go.sum | 10 ++ flytectl/pkg/configutil/configutil.go | 104 +++++++++++++ flytectl/pkg/configutil/configutil_test.go | 59 +++++++ flytectl/pkg/docker/docker_util.go | 59 ++----- flytectl/pkg/docker/docker_util_test.go | 48 +----- flytectl/pkg/util/util.go | 12 +- flytectl/pkg/util/util_test.go | 4 + 20 files changed, 692 insertions(+), 128 deletions(-) create mode 100644 flytectl/cmd/completion_test.go create mode 100755 flytectl/cmd/config/subcommand/config/config_flags.go create mode 100755 flytectl/cmd/config/subcommand/config/config_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/config/init_flags.go create mode 100644 flytectl/cmd/configuration/configuration.go create mode 100644 flytectl/cmd/configuration/configuration_test.go create mode 100644 flytectl/cmd/root_test.go create mode 100644 flytectl/pkg/configutil/configutil.go create mode 100644 flytectl/pkg/configutil/configutil_test.go diff --git a/flytectl/cmd/completion_test.go b/flytectl/cmd/completion_test.go new file mode 100644 index 0000000000..3fd8ae01b1 --- /dev/null +++ b/flytectl/cmd/completion_test.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "testing" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" +) + +func TestCompletionCmdIntegration(t *testing.T) { + rootCmd := &cobra.Command{ + Long: "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use: "flytectl", + DisableAutoGenTag: true, + } + + err := completionCmd.RunE(rootCmd, []string{"bash"}) + assert.Nil(t, err) + err = completionCmd.RunE(rootCmd, []string{"zsh"}) + assert.Nil(t, err) + err = completionCmd.RunE(rootCmd, []string{"fish"}) + assert.Nil(t, err) + err = completionCmd.RunE(rootCmd, []string{"powershell"}) + assert.Nil(t, err) +} diff --git a/flytectl/cmd/config/subcommand/config/config_flags.go b/flytectl/cmd/config/subcommand/config/config_flags.go new file mode 100755 index 0000000000..f22213b004 --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/config_flags.go @@ -0,0 +1,57 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultConfig.Host, fmt.Sprintf("%v%v", prefix, "host"), DefaultConfig.Host, "Endpoint of flyte admin") + cmdFlags.BoolVar(&DefaultConfig.Insecure, fmt.Sprintf("%v%v", prefix, "insecure"), DefaultConfig.Insecure, "Enable insecure mode") + cmdFlags.BoolVar(&DefaultConfig.Storage, fmt.Sprintf("%v%v", prefix, "storage"), DefaultConfig.Storage, "Enable storage provider config") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/config/config_flags_test.go b/flytectl/cmd/config/subcommand/config/config_flags_test.go new file mode 100755 index 0000000000..aaf191eb4e --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/config_flags_test.go @@ -0,0 +1,144 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_host", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("host", testValue) + if vString, err := cmdFlags.GetString("host"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Host) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_insecure", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("insecure", testValue) + if vBool, err := cmdFlags.GetBool("insecure"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Insecure) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_storage", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("storage", testValue) + if vBool, err := cmdFlags.GetBool("storage"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Storage) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go new file mode 100755 index 0000000000..029b92baf4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -0,0 +1,16 @@ +package config + +//go:generate pflags Config --default-var DefaultConfig --bind-default-var +var ( + DefaultConfig = &Config{ + Insecure: true, + Storage: false, + } +) + +//Configs +type Config struct { + Host string `json:"host" pflag:",Endpoint of flyte admin"` + Insecure bool `json:"insecure" pflag:",Enable insecure mode"` + Storage bool `json:"storage" pflag:",Enable storage provider config"` +} diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go new file mode 100644 index 0000000000..140b4333f5 --- /dev/null +++ b/flytectl/cmd/configuration/configuration.go @@ -0,0 +1,108 @@ +package configuration + +import ( + "context" + "fmt" + "io" + "os" + "strings" + + "github.com/flyteorg/flytestdlib/logger" + + "github.com/flyteorg/flytectl/pkg/configutil" + + initConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/config" + cmdcore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/flyteorg/flytestdlib/config/viper" + "github.com/manifoldco/promptui" + + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + initCmdShort = `Generates flytectl config file in the user's home directory.` + initCmdLong = `Creates a flytectl config file in flyte directory i.e ~/.flyte + +Generate sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html + +:: + + bin/flytectl configuration config + +Generate remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html + +:: + + bin/flytectl configuration config --host=flyte.myexample.com + +Generate flytectl config with a storage provider +:: + + bin/flytectl configuration config --host=flyte.myexample.com --storage +` +) + +var prompt = promptui.Select{ + Label: "Select Storage Provider", + Items: []string{"S3", "GCS"}, +} + +// CreateConfigCommand will return configuration command +func CreateConfigCommand() *cobra.Command { + configCmd := viper.GetConfigCommand() + + getResourcesFuncs := map[string]cmdcore.CommandEntry{ + "init": {CmdFunc: configInitFunc, Aliases: []string{""}, ProjectDomainNotRequired: true, + Short: initCmdShort, + Long: initCmdLong, PFlagProvider: initConfig.DefaultConfig}, + } + + cmdcore.AddCommands(configCmd, getResourcesFuncs) + return configCmd +} + +func configInitFunc(ctx context.Context, args []string, cmdCtx cmdcore.CommandContext) error { + return initFlytectlConfig(ctx, os.Stdin) +} + +func initFlytectlConfig(ctx context.Context, reader io.Reader) error { + + templateValues := configutil.ConfigTemplateSpec{ + Host: "dns:///localhost:30081", + Insecure: initConfig.DefaultConfig.Insecure, + } + templateStr := configutil.GetSandboxTemplate() + + if len(initConfig.DefaultConfig.Host) > 0 { + templateValues.Host = fmt.Sprintf("dns:///%v", initConfig.DefaultConfig.Host) + templateStr = configutil.AdminConfigTemplate + if initConfig.DefaultConfig.Storage { + templateStr = configutil.GetAWSCloudTemplate() + _, result, err := prompt.Run() + if err != nil { + return err + } + if strings.ToUpper(result) == "GCS" { + templateStr = configutil.GetGoogleCloudTemplate() + } + } + } + var _err error + if _, err := os.Stat(configutil.ConfigFile); os.IsNotExist(err) { + _err = configutil.SetupConfig(configutil.ConfigFile, templateStr, templateValues) + } else { + if cmdUtil.AskForConfirmation(fmt.Sprintf("This action will overwrite an existing config file at [%s]. Do you want to continue?", configutil.ConfigFile), reader) { + if err := os.Remove(configutil.ConfigFile); err != nil { + return err + } + _err = configutil.SetupConfig(configutil.ConfigFile, templateStr, templateValues) + } + } + + if len(initConfig.DefaultConfig.Host) > 0 { + logger.Infof(ctx, "Init flytectl config for remote cluster, Please update your storage config in %s. Learn more about the config here https://docs.flyte.org/projects/flytectl/en/latest/index.html#configure", configutil.ConfigFile) + } + return _err +} diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go new file mode 100644 index 0000000000..5e84f00505 --- /dev/null +++ b/flytectl/cmd/configuration/configuration_test.go @@ -0,0 +1,63 @@ +package configuration + +import ( + "context" + "fmt" + "io" + "os" + "sort" + "strings" + "testing" + + "github.com/flyteorg/flytectl/pkg/configutil" + + initConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/util" + + "github.com/stretchr/testify/assert" +) + +func TestCreateInitCommand(t *testing.T) { + configCmd := CreateConfigCommand() + assert.Equal(t, configCmd.Use, "config") + assert.Equal(t, configCmd.Short, "Runs various config commands, look at the help of this command to get a list of available commands..") + fmt.Println(configCmd.Commands()) + assert.Equal(t, len(configCmd.Commands()), 3) + cmdNouns := configCmd.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + + assert.Equal(t, cmdNouns[0].Use, "discover") + assert.Equal(t, cmdNouns[0].Short, "Searches for a config in one of the default search paths.") + assert.Equal(t, cmdNouns[1].Use, "init") + assert.Equal(t, cmdNouns[1].Short, initCmdShort) + assert.Equal(t, cmdNouns[2].Use, "validate") + assert.Equal(t, cmdNouns[2].Short, "Validates the loaded config.") + +} + +func TestSetupConfigFunc(t *testing.T) { + var yes = strings.NewReader("Yes") + var no = strings.NewReader("No") + mockOutStream := new(io.Writer) + ctx := context.Background() + _ = os.Remove(configutil.FlytectlConfig) + + _ = util.SetupFlyteDir() + + cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + err := configInitFunc(ctx, []string{}, cmdCtx) + initConfig.DefaultConfig.Host = "" + assert.Nil(t, err) + + assert.Nil(t, initFlytectlConfig(ctx, yes)) + assert.Nil(t, initFlytectlConfig(ctx, yes)) + assert.Nil(t, initFlytectlConfig(ctx, no)) + initConfig.DefaultConfig.Host = "test" + assert.Nil(t, initFlytectlConfig(ctx, no)) + initConfig.DefaultConfig.Storage = true + assert.NotNil(t, initFlytectlConfig(ctx, yes)) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 9995b42774..ee93bf0885 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "context" "fmt" + "os" "github.com/flyteorg/flytectl/cmd/sandbox" @@ -10,6 +11,7 @@ import ( f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/cmd/config" + configuration "github.com/flyteorg/flytectl/cmd/configuration" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/create" "github.com/flyteorg/flytectl/cmd/delete" @@ -54,13 +56,14 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats())) - rootCmd.AddCommand(viper.GetConfigCommand()) + rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(create.RemoteCreateCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) rootCmd.AddCommand(sandbox.CreateSandboxCommand()) + rootCmd.AddCommand(configuration.CreateConfigCommand()) rootCmd.AddCommand(completionCmd) // Added version command versioncmd := version.GetVersionCommand(rootCmd) @@ -73,6 +76,7 @@ func newRootCmd() *cobra.Command { func initConfig(cmd *cobra.Command, _ []string) error { configFile := f.FilePathJoin(f.UserHomeDir(), configFileDir, configFileName) + // TODO: Move flyteconfig env variable logic in flytestdlib if len(os.Getenv("FLYTECTL_CONFIG")) > 0 { configFile = os.Getenv("FLYTECTL_CONFIG") } diff --git a/flytectl/cmd/root_test.go b/flytectl/cmd/root_test.go new file mode 100644 index 0000000000..6941485d2c --- /dev/null +++ b/flytectl/cmd/root_test.go @@ -0,0 +1,12 @@ +package cmd + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRootCmdIntegration(t *testing.T) { + rootCmd := newRootCmd() + assert.NotNil(t, rootCmd) +} diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index a1de9e2f6f..c06b499818 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -8,12 +8,15 @@ import ( "os" "path/filepath" + "github.com/docker/docker/api/types/mount" + + "github.com/flyteorg/flytectl/pkg/configutil" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytectl/pkg/docker" - "github.com/docker/docker/api/types/mount" "github.com/enescakir/emoji" sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -73,24 +76,39 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { return nil, err } - if err := docker.SetupFlyteDir(); err != nil { + if err := util.SetupFlyteDir(); err != nil { return nil, err } - if err := docker.GetFlyteSandboxConfig(); err != nil { + templateValues := configutil.ConfigTemplateSpec{ + Host: "localhost:30081", + Insecure: true, + } + if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetSandboxTemplate(), templateValues); err != nil { return nil, err } - if err := mountSourceCode(); err != nil { + volumes := docker.Volumes + if vol, err := mountVolume(sandboxConfig.DefaultConfig.Source, docker.Source); err != nil { return nil, err + } else if vol != nil { + volumes = append(volumes, *vol) } - if err := mountFlyteManifest(sandboxConfig.DefaultConfig.Version); err != nil { - return nil, err + if len(sandboxConfig.DefaultConfig.Version) > 0 { + if err := downloadFlyteManifest(sandboxConfig.DefaultConfig.Version); err != nil { + return nil, err + } + vol, err := mountVolume(FlyteManifest, GeneratedManifest) + if err != nil { + return nil, err + } + volumes = append(volumes, *vol) } fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) @@ -100,7 +118,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() - ID, err := docker.StartContainer(ctx, cli, docker.Volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return nil, err @@ -122,42 +140,35 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return logReader, nil } -func mountSourceCode() error { - if len(sandboxConfig.DefaultConfig.Source) > 0 { - source, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) +func mountVolume(file, destination string) (*mount.Mount, error) { + if len(file) > 0 { + source, err := filepath.Abs(file) if err != nil { - return err + return nil, err } - docker.Volumes = append(docker.Volumes, mount.Mount{ + return &mount.Mount{ Type: mount.TypeBind, Source: source, - Target: docker.Source, - }) + Target: destination, + }, nil } - return nil + return nil, nil } -func mountFlyteManifest(version string) error { - if len(version) > 0 { - isGreater, err := util.IsVersionGreaterThan(version, FlyteMinimumVersionSupported) - if err != nil { - return err - } - if !isGreater { - return fmt.Errorf("version flag only support %s+ flyte version", FlyteMinimumVersionSupported) - } - response, err := util.GetRequest(GithubURL, fmt.Sprintf(FlyteReleaseURL, version)) - if err != nil { - return err - } - if err := util.WriteIntoFile(response, FlyteManifest); err != nil { - return err - } - docker.Volumes = append(docker.Volumes, mount.Mount{ - Type: mount.TypeBind, - Source: FlyteManifest, - Target: GeneratedManifest, - }) +func downloadFlyteManifest(version string) error { + isGreater, err := util.IsVersionGreaterThan(version, FlyteMinimumVersionSupported) + if err != nil { + return err + } + if !isGreater { + return fmt.Errorf("version flag only support %s+ flyte version", FlyteMinimumVersionSupported) + } + response, err := util.GetRequest(GithubURL, fmt.Sprintf(FlyteReleaseURL, version)) + if err != nil { + return err + } + if err := util.WriteIntoFile(response, FlyteManifest); err != nil { + return err } return nil } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 3e06516936..6c764ef47f 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -324,7 +324,7 @@ func TestStartSandboxFunc(t *testing.T) { assert.NotNil(t, err) }) t.Run("Failed manifest", func(t *testing.T) { - err := mountFlyteManifest("v100.9.9") + err := downloadFlyteManifest("v100.9.9") assert.NotNil(t, err) }) t.Run("Error in reading logs", func(t *testing.T) { diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 1c9e634351..544880b997 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/docker" "github.com/docker/docker/api/types" @@ -43,7 +45,7 @@ func tearDownSandbox(ctx context.Context, cli docker.Docker) error { return err } } - if err := docker.ConfigCleanup(); err != nil { + if err := configutil.ConfigCleanup(); err != nil { fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) } fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index bb1feb587a..f90ca068bf 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -36,6 +36,7 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_delete_execution-queue-attribute gen/flytectl_delete_plugin-override gen/flytectl_config_validate + gen/flytectl_config_init gen/flytectl_config_discover gen/flytectl_sandbox_start gen/flytectl_sandbox_status diff --git a/flytectl/go.mod b/flytectl/go.mod index 1c518389af..e864548a80 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -23,6 +23,7 @@ require ( github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 + github.com/manifoldco/promptui v0.8.0 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.4.1 github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect @@ -42,5 +43,6 @@ require ( gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible + k8s.io/kubernetes v1.13.0 sigs.k8s.io/yaml v1.2.0 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index ed5d175028..2367487525 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -158,8 +158,11 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= @@ -560,6 +563,8 @@ github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfE github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU= +github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= @@ -587,6 +592,8 @@ github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw= +github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= @@ -597,6 +604,8 @@ github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo= +github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= @@ -1400,6 +1409,7 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go new file mode 100644 index 0000000000..f6d715e7eb --- /dev/null +++ b/flytectl/pkg/configutil/configutil.go @@ -0,0 +1,104 @@ +package configutil + +import ( + "html/template" + "os" + + f "github.com/flyteorg/flytectl/pkg/filesystemutils" +) + +const ( + AdminConfigTemplate = `admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: {{.Host}} + authType: Pkce + insecure: {{.Insecure}} +logger: + show-source: true + level: 0` + StorageConfigTemplate = ` +storage: + connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://localhost:30084 + region: us-east-1 + secret-key: miniostorage + type: minio + container: "my-s3-bucket" + enable-multicontainer: true` + StorageS3ConfigTemplate = ` +storage: + type: stow + stow: + kind: s3 + config: + auth_type: iam + region: # Example: us-east-2 + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` + StorageGCSConfigTemplate = ` +storage: + type: stow + stow: + kind: s3 + config: + json: "" + project_id: # TODO: replace with the GCP project ID + scopes: https://www.googleapis.com/auth/devstorage.read_write + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` +) + +type ConfigTemplateSpec struct { + Host string + Insecure bool +} + +var ( + FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config-sandbox.yaml") + ConfigFile = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config.yaml") + Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") +) + +// GetSandboxTemplate return sandbox cluster config +func GetSandboxTemplate() string { + return AdminConfigTemplate + StorageConfigTemplate +} + +// GetAWSCloudTemplate return aws flyte config with storage config +func GetAWSCloudTemplate() string { + return AdminConfigTemplate + StorageS3ConfigTemplate +} + +// GetGoogleCloudTemplate return google flyte config with storage config +func GetGoogleCloudTemplate() string { + return AdminConfigTemplate + StorageGCSConfigTemplate +} + +// SetupConfig download the flyte sandbox config +func SetupConfig(filename, templateStr string, templateSpec ConfigTemplateSpec) error { + tmpl := template.New("config") + tmpl, err := tmpl.Parse(templateStr) + if err != nil { + return err + } + file, err := os.Create(filename) + if err != nil { + return err + } + defer file.Close() + return tmpl.Execute(file, templateSpec) +} + +// ConfigCleanup will remove the sandbox config from flyte dir +func ConfigCleanup() error { + err := os.Remove(FlytectlConfig) + if err != nil { + return err + } + err = os.RemoveAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s")) + if err != nil { + return err + } + return nil +} diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go new file mode 100644 index 0000000000..f65c8706e7 --- /dev/null +++ b/flytectl/pkg/configutil/configutil_test.go @@ -0,0 +1,59 @@ +package configutil + +import ( + "io/ioutil" + "os" + "testing" + + "github.com/flyteorg/flytectl/pkg/util" + + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/stretchr/testify/assert" +) + +func TestConfigCleanup(t *testing.T) { + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + _ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600) + _ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600) + + err = ConfigCleanup() + assert.Nil(t, err) + + _, err = os.Stat(FlytectlConfig) + check := os.IsNotExist(err) + assert.Equal(t, check, true) + + _, err = os.Stat(Kubeconfig) + check = os.IsNotExist(err) + assert.Equal(t, check, true) + _ = ConfigCleanup() +} + +func TestSetupFlytectlConfig(t *testing.T) { + templateValue := ConfigTemplateSpec{ + Host: "dns:///localhost:30081", + Insecure: true, + } + _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) + if os.IsNotExist(err) { + _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) + } + err = util.SetupFlyteDir() + assert.Nil(t, err) + err = SetupConfig("version.yaml", AdminConfigTemplate, templateValue) + assert.Nil(t, err) + _, err = os.Stat("version.yaml") + assert.Nil(t, err) + check := os.IsNotExist(err) + assert.Equal(t, check, false) + _ = ConfigCleanup() +} + +func TestAwsConfig(t *testing.T) { + assert.Equal(t, AdminConfigTemplate+StorageS3ConfigTemplate, GetAWSCloudTemplate()) + assert.Equal(t, AdminConfigTemplate+StorageGCSConfigTemplate, GetGoogleCloudTemplate()) + assert.Equal(t, AdminConfigTemplate+StorageConfigTemplate, GetSandboxTemplate()) +} diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index c1b39bd182..0b4ad0f2b1 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -8,24 +8,20 @@ import ( "os" "strings" - "github.com/flyteorg/flytectl/pkg/util" - - "github.com/docker/docker/client" - - "github.com/enescakir/emoji" - - cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/flyteorg/flytectl/pkg/configutil" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/client" "github.com/docker/go-connections/nat" + "github.com/enescakir/emoji" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") - FlytectlConfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "config-sandbox.yaml") SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" FlyteSandboxClusterName = "flyte-sandbox" @@ -51,37 +47,6 @@ var ( StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 ) -// SetupFlyteDir will create .flyte dir if not exist -func SetupFlyteDir() error { - if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755); err != nil { - return err - } - return nil -} - -// GetFlyteSandboxConfig download the flyte sandbox config -func GetFlyteSandboxConfig() error { - response, err := util.GetRequest("https://raw.githubusercontent.com", "/flyteorg/flytectl/master/config.yaml") - if err != nil { - return err - } - - return util.WriteIntoFile(response, FlytectlConfig) -} - -// ConfigCleanup will remove the sandbox config from flyte dir -func ConfigCleanup() error { - err := os.Remove(FlytectlConfig) - if err != nil { - return err - } - err = os.RemoveAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s")) - if err != nil { - return err - } - return nil -} - // GetSandbox will return sandbox container if it exist func GetSandbox(ctx context.Context, cli Docker) *types.Container { containers, _ := cli.ContainerList(ctx, types.ContainerListOptions{ @@ -125,6 +90,7 @@ func PullDockerImage(ctx context.Context, cli Docker, image string) error { if err != nil { return err } + _, err = io.Copy(os.Stdout, r) return err } @@ -155,12 +121,12 @@ func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, expo // WatchError will return channel for watching errors of a container func WatchError(ctx context.Context, cli Docker, id string) (<-chan container.ContainerWaitOKBody, <-chan error) { - return cli.ContainerWait(context.Background(), id, container.WaitConditionNotRunning) + return cli.ContainerWait(ctx, id, container.WaitConditionNotRunning) } // ReadLogs will return io scanner for reading the logs of a container func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error) { - reader, err := cli.ContainerLogs(context.Background(), id, types.ContainerLogsOptions{ + reader, err := cli.ContainerLogs(ctx, id, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, @@ -176,12 +142,19 @@ func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error func WaitForSandbox(reader *bufio.Scanner, message string) bool { for reader.Scan() { if strings.Contains(reader.Text(), message) { + kubeconfig := strings.Join([]string{ + "$KUBECONFIG", + f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), + Kubeconfig, + }, ":") + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, message, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") + fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") - fmt.Printf("export KUBECONFIG=%v \n", Kubeconfig) - fmt.Printf("export FLYTECTL_CONFIG=%v \n", FlytectlConfig) + fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) + fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) return true } fmt.Println(reader.Text()) diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 65004a2b0b..52f35e3297 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -4,24 +4,19 @@ import ( "bufio" "context" "fmt" - - "github.com/docker/docker/api/types/container" - - //"github.com/docker/go-connections/nat" - "io/ioutil" "os" "strings" "testing" + "github.com/docker/docker/api/types/container" "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/mock" "github.com/docker/docker/api/types" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - "github.com/stretchr/testify/assert" ) @@ -33,7 +28,7 @@ var ( func setupSandbox() { mockAdminClient := u.MockClient cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) - _ = SetupFlyteDir() + _ = util.SetupFlyteDir() container1 := types.Container{ ID: "FlyteSandboxClusterName", Names: []string{ @@ -43,43 +38,6 @@ func setupSandbox() { containers = append(containers, container1) } -func TestConfigCleanup(t *testing.T) { - _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) - if os.IsNotExist(err) { - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - } - _ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600) - _ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600) - - err = ConfigCleanup() - assert.Nil(t, err) - - _, err = os.Stat(FlytectlConfig) - check := os.IsNotExist(err) - assert.Equal(t, check, true) - - _, err = os.Stat(Kubeconfig) - check = os.IsNotExist(err) - assert.Equal(t, check, true) - _ = ConfigCleanup() -} - -func TestSetupFlytectlConfig(t *testing.T) { - _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) - if os.IsNotExist(err) { - _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) - } - err = SetupFlyteDir() - assert.Nil(t, err) - err = GetFlyteSandboxConfig() - assert.Nil(t, err) - _, err = os.Stat(FlytectlConfig) - assert.Nil(t, err) - check := os.IsNotExist(err) - assert.Equal(t, check, false) - _ = ConfigCleanup() -} - func TestGetSandbox(t *testing.T) { setupSandbox() t.Run("Successfully get sandbox container", func(t *testing.T) { diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index ee5a8e4184..fe972ed2d8 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -5,7 +5,9 @@ import ( "fmt" "io/ioutil" "net/http" + "os" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" hversion "github.com/hashicorp/go-version" ) @@ -43,13 +45,21 @@ func ParseGithubTag(data []byte) (string, error) { } func WriteIntoFile(data []byte, file string) error { - err := ioutil.WriteFile(file, data, 0600) + err := ioutil.WriteFile(file, data, os.ModePerm) if err != nil { return err } return nil } +// SetupFlyteDir will create .flyte dir if not exist +func SetupFlyteDir() error { + if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), os.ModePerm); err != nil { + return err + } + return nil +} + func IsVersionGreaterThan(version1, version2 string) (bool, error) { semanticVersion1, err := hversion.NewVersion(version1) if err != nil { diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index ca9cd0f34f..43bb8166c1 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -55,6 +55,10 @@ func TestWriteIntoFile(t *testing.T) { }) } +func TestSetupFlyteDir(t *testing.T) { + assert.Nil(t, SetupFlyteDir()) +} + func TestIsVersionGreaterThan(t *testing.T) { t.Run("Compare flytectl version when upgrade available", func(t *testing.T) { _, err := IsVersionGreaterThan("v1.1.21", testVersion) From c1d273cb98f1371b50a9886256cdeca04b863d09 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 12 Jul 2021 23:21:10 +0530 Subject: [PATCH 108/356] [WIP]Exclude generated file from unit test (#143) * Exclude generated file from unit test Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 2 +- flytectl/Makefile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 48b9425a89..25759ecc17 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -31,7 +31,7 @@ jobs: GO111MODULE: "on" CI_ENV: "true" with: - args: make install && make test_unit_codecov + args: make install && make test_unit_without_flag - name: Push CodeCov uses: codecov/codecov-action@v1.0.5 with: diff --git a/flytectl/Makefile b/flytectl/Makefile index 43c7aab1ca..601e502569 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -35,3 +35,9 @@ install-piptools: doc-requirements.txt: doc-requirements.in install-piptools $(call PIP_COMPILE,doc-requirements.in) +.PHONY: test_unit_without_flag +test_unit_without_flag: + go test ./... -race -coverprofile=coverage.temp.txt -covermode=atomic + cat coverage.temp.txt | grep -v "_flags.go" > coverage.txt + rm coverage.temp.txt + curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh From 5695606cf2a59e1e72b87285f5d616dd82aa2486 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 12 Jul 2021 11:54:09 -0700 Subject: [PATCH 109/356] Update documentation (#142) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- flytectl/docs/source/gen/flytectl.rst | 42 ++++++++- .../docs/source/gen/flytectl_completion.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_config.rst | 41 +++++++- .../source/gen/flytectl_config_discover.rst | 44 +++++++-- .../docs/source/gen/flytectl_config_init.rst | 94 +++++++++++++++++++ .../source/gen/flytectl_config_validate.rst | 44 +++++++-- flytectl/docs/source/gen/flytectl_create.rst | 40 +++++++- .../source/gen/flytectl_create_execution.rst | 40 +++++++- .../source/gen/flytectl_create_project.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_delete.rst | 40 +++++++- ...ectl_delete_cluster-resource-attribute.rst | 40 +++++++- ...lytectl_delete_execution-cluster-label.rst | 40 +++++++- ...tectl_delete_execution-queue-attribute.rst | 40 +++++++- .../source/gen/flytectl_delete_execution.rst | 40 +++++++- .../gen/flytectl_delete_plugin-override.rst | 40 +++++++- ...lytectl_delete_task-resource-attribute.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_get.rst | 40 +++++++- ...lytectl_get_cluster-resource-attribute.rst | 40 +++++++- .../flytectl_get_execution-cluster-label.rst | 40 +++++++- ...flytectl_get_execution-queue-attribute.rst | 40 +++++++- .../source/gen/flytectl_get_execution.rst | 40 +++++++- .../source/gen/flytectl_get_launchplan.rst | 40 +++++++- .../gen/flytectl_get_plugin-override.rst | 40 +++++++- .../docs/source/gen/flytectl_get_project.rst | 40 +++++++- .../flytectl_get_task-resource-attribute.rst | 40 +++++++- .../docs/source/gen/flytectl_get_task.rst | 40 +++++++- .../docs/source/gen/flytectl_get_workflow.rst | 40 +++++++- .../docs/source/gen/flytectl_register.rst | 40 +++++++- .../source/gen/flytectl_register_examples.rst | 40 +++++++- .../source/gen/flytectl_register_files.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_sandbox.rst | 40 +++++++- .../docs/source/gen/flytectl_sandbox_exec.rst | 45 +++++++-- .../source/gen/flytectl_sandbox_start.rst | 50 ++++++++-- .../source/gen/flytectl_sandbox_status.rst | 40 +++++++- .../source/gen/flytectl_sandbox_teardown.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_update.rst | 40 +++++++- ...ectl_update_cluster-resource-attribute.rst | 40 +++++++- ...lytectl_update_execution-cluster-label.rst | 40 +++++++- ...tectl_update_execution-queue-attribute.rst | 40 +++++++- .../source/gen/flytectl_update_launchplan.rst | 40 +++++++- .../gen/flytectl_update_plugin-override.rst | 40 +++++++- .../source/gen/flytectl_update_project.rst | 40 +++++++- ...lytectl_update_task-resource-attribute.rst | 40 +++++++- .../docs/source/gen/flytectl_update_task.rst | 40 +++++++- .../source/gen/flytectl_update_workflow.rst | 40 +++++++- flytectl/docs/source/gen/flytectl_version.rst | 40 +++++++- 46 files changed, 1731 insertions(+), 189 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_config_init.rst diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index e11b06d619..2c4a65ba70 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -16,11 +16,43 @@ Options :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -h, --help help for flytectl - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -h, --help help for flytectl + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index bedc92ff41..4b0ba9dc4b 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -65,10 +65,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 818b172c65..27a5a6badf 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -25,15 +25,48 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. +* :doc:`flytectl_config_init` - Generates flytectl config file in the user's home directory. * :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 690a450336..2071952bd5 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -27,12 +27,44 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst new file mode 100644 index 0000000000..c499bf06f5 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -0,0 +1,94 @@ +.. _flytectl_config_init: + +flytectl config init +-------------------- + +Generates flytectl config file in the user's home directory. + +Synopsis +~~~~~~~~ + + +Creates a flytectl config file in flyte directory i.e ~/.flyte + +Generate sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html + +:: + + bin/flytectl configuration config + +Generate remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html + +:: + + bin/flytectl configuration config --host=flyte.myexample.com + +Generate flytectl config with a storage provider +:: + + bin/flytectl configuration config --host=flyte.myexample.com --storage + + +:: + + flytectl config init [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for init + --host string Endpoint of flyte admin + --insecure Enable insecure mode (default true) + --storage Enable storage provider config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 447d666d25..5e6adb51fa 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -29,12 +29,44 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 4e09d5b6e4..ff986fee7d 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -28,10 +28,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 142fc4f60d..06a5188144 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -146,10 +146,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index cd5f345d39..83101f6b0d 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -52,10 +52,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 17edc03f9b..7cba6f6123 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -28,10 +28,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 226d2e4246..5b96780560 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -64,10 +64,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index a48e9ef376..54d6d04946 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -62,10 +62,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 64182f6389..bfd7e5fb11 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -66,10 +66,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 365bd014d1..8205564f83 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -71,10 +71,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index bb20597c78..d57acd3d43 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -67,10 +67,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 20ee8d9f6f..279090fa8b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -67,10 +67,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index f969fbd5e9..202a7ed989 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -28,10 +28,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index b79674a7c8..5bdcbe32b0 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -73,10 +73,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 57b27f7293..e2900c17bf 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -71,10 +71,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index e03a50f183..96ee6eec3e 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -75,10 +75,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index e81e77ac7c..ced38d4586 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -95,10 +95,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 51c936f264..ff7687f82a 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -113,10 +113,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 4943aa9e5d..ab39c075aa 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -95,10 +95,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 541f9e9a2d..57258c080e 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -66,10 +66,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 8689c6d030..ab0bb8e92d 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -77,10 +77,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 49148043bb..e4226e47ee 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -109,10 +109,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 6c8ec19195..b3e7ba4aa9 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -97,10 +97,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 27120f811e..39f0212527 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -28,10 +28,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index b1929fc1ea..d6c510092d 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -42,10 +42,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 55e8bab2bb..5ee4cea1aa 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -106,10 +106,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 313bbf85b2..5e54287f2c 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -47,10 +47,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 9fbb77971c..bc187d689f 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -26,18 +26,51 @@ Options :: - -h, --help help for exec - --source string Path of your source code + -h, --help help for exec + --source string Path of your source code + --version string Version of flyte Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 21b02b2161..b1901042ef 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -21,6 +21,11 @@ Mount your source code repository inside sandbox :: bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + +Run specific version of flyte, Only available after v0.14.0+ +:: + + bin/flytectl sandbox start --version=v0.14.0 Usage @@ -34,18 +39,51 @@ Options :: - -h, --help help for start - --source string Path of your source code + -h, --help help for start + --source string Path of your source code + --version string Version of flyte Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 6295dff615..368cbf01a8 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -36,10 +36,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index bc41b259eb..4961977271 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -35,10 +35,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 0493254ff5..789633015e 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -30,10 +30,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 9f72793199..c85c4ce194 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -69,10 +69,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 046ff1ea20..48d57e94c4 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -62,10 +62,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index a915e427c7..c848d08f85 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -73,10 +73,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 0bc98036df..a4be4bd225 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -47,10 +47,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index fa2114ae8e..16f2085ddd 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -75,10 +75,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 437df1e0cd..22c5c29677 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -61,10 +61,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index bfe1b96d5c..36561dd33e 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -75,10 +75,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index f82ef9a7a1..a0b6534663 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -47,10 +47,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index b9d9abc384..3b9b698fe1 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -47,10 +47,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 0e7165621b..216543e267 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -32,10 +32,42 @@ Options inherited from parent commands :: - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ From 50ee30745f58179db8396b81c6c695fe5ca2d576 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 13 Jul 2021 16:39:17 +0530 Subject: [PATCH 110/356] Bug fix in sandbox start when sandbox exist (#145) * fix sandbox start if sandbox exist Signed-off-by: Yuvraj --- flytectl/clierrors/errors.go | 2 ++ flytectl/cmd/sandbox/start.go | 27 ++++++++++++++++-- flytectl/cmd/sandbox/start_test.go | 38 +++++++++++++++++++++++++ flytectl/docs/source/index.rst | 2 +- flytectl/pkg/docker/docker_util.go | 5 +++- flytectl/pkg/docker/docker_util_test.go | 2 +- 6 files changed, 71 insertions(+), 5 deletions(-) diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index a93f3c7a19..f6869aa2b2 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -14,4 +14,6 @@ var ( ErrTaskNotPassed = "Task name not passed\n" // #nosec ErrFailedTaskUpdate = "Task %v failed to get updated to due to %v\n" + + ErrSandboxExists = "Sandbox Exist\n" ) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index c06b499818..28f142493a 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -7,6 +7,9 @@ import ( "io" "os" "path/filepath" + "strings" + + "github.com/flyteorg/flytectl/clierrors" "github.com/docker/docker/api/types/mount" @@ -70,7 +73,9 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if err != nil { return err } - docker.WaitForSandbox(reader, docker.SuccessMessage) + if reader != nil { + docker.WaitForSandbox(reader, docker.SuccessMessage) + } return nil } @@ -78,7 +83,11 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { - return nil, err + if err.Error() != clierrors.ErrSandboxExists { + return nil, err + } + printExistingSandboxMessage() + return nil, nil } if err := util.SetupFlyteDir(); err != nil { @@ -172,3 +181,17 @@ func downloadFlyteManifest(version string) error { } return nil } + +func printExistingSandboxMessage() { + kubeconfig := strings.Join([]string{ + "$KUBECONFIG", + f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), + docker.Kubeconfig, + }, ":") + + fmt.Printf("Existing details of your sandbox:") + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, docker.SuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") + fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) + fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) +} diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 6c764ef47f..73a7eee0a7 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -57,6 +57,44 @@ func TestStartSandboxFunc(t *testing.T) { _, err := startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) + t.Run("Successfully exit when sandbox cluster exist", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: docker.ImageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + reader, err := startSandbox(ctx, mockDocker, strings.NewReader("n")) + assert.Nil(t, err) + assert.Nil(t, reader) + }) t.Run("Successfully run sandbox cluster with source code", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index c9d94fa3d7..4915e0b963 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -23,7 +23,7 @@ golang .. prompt:: bash $ - brew upgrade flytectl + brew update && brew upgrade flytectl .. tab:: Other Operating systems diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 0b4ad0f2b1..7e317d4878 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -3,11 +3,14 @@ package docker import ( "bufio" "context" + "errors" "fmt" "io" "os" "strings" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/configutil" "github.com/docker/docker/api/types" @@ -69,7 +72,7 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { }) return err } - return nil + return errors.New(clierrors.ErrSandboxExists) } return nil } diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 52f35e3297..25e67bad43 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -80,7 +80,7 @@ func TestRemoveSandboxWithNoReply(t *testing.T) { mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) err := RemoveSandbox(context, mockDocker, strings.NewReader("n")) - assert.Nil(t, err) + assert.NotNil(t, err) }) t.Run("Successfully remove sandbox container with zero sandbox containers are running", func(t *testing.T) { From 002d176ae02e73b7377220bd5debdee752c71200 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 13 Jul 2021 21:24:44 +0530 Subject: [PATCH 111/356] Added node execution data to show inputs and outputs (#136) * Added node execution data to show inputs and outputs Signed-off-by: Prafulla Mahindrakar * Added closure class Signed-off-by: Prafulla Mahindrakar * Removed the old wrapper classes Signed-off-by: Prafulla Mahindrakar * Uncommented the task exec closure Signed-off-by: Prafulla Mahindrakar * Fixed unit tests for the closure classes Signed-off-by: Prafulla Mahindrakar * go mod tidy Signed-off-by: Prafulla Mahindrakar * Adding .gitattribute file to contain rule for .rst files Signed-off-by: Prafulla Mahindrakar * Adding gen path to .gitattr Signed-off-by: Prafulla Mahindrakar * Added comments to new structs Signed-off-by: Prafulla Mahindrakar --- flytectl/.gitattributes | 1 + .../subcommand/execution/config_flags.go | 2 +- .../subcommand/execution/config_flags_test.go | 6 +- .../subcommand/execution/execution_config.go | 2 +- flytectl/cmd/get/execution.go | 24 +- flytectl/cmd/get/execution_test.go | 327 +++++++++++++++++- flytectl/cmd/get/node_execution.go | 287 +++++++++------ flytectl/cmd/get/node_execution_test.go | 254 +++++++------- .../source/gen/flytectl_get_execution.rst | 12 +- flytectl/go.mod | 1 - flytectl/go.sum | 1 - flytectl/pkg/ext/execution_fetcher.go | 23 +- flytectl/pkg/ext/execution_fetcher_test.go | 18 +- flytectl/pkg/ext/fetcher.go | 7 +- .../ext/mocks/admin_fetcher_ext_interface.go | 73 +++- flytectl/pkg/printer/printer.go | 62 +++- 16 files changed, 788 insertions(+), 312 deletions(-) create mode 100644 flytectl/.gitattributes diff --git a/flytectl/.gitattributes b/flytectl/.gitattributes new file mode 100644 index 0000000000..53c12facc6 --- /dev/null +++ b/flytectl/.gitattributes @@ -0,0 +1 @@ +docs/**/**/*rst linguist-generated=true diff --git a/flytectl/cmd/config/subcommand/execution/config_flags.go b/flytectl/cmd/config/subcommand/execution/config_flags.go index f9a96f5261..7f07f23bf7 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags.go @@ -55,6 +55,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") cmdFlags.BoolVar(&DefaultConfig.Details, fmt.Sprintf("%v%v", prefix, "details"), DefaultConfig.Details, "gets node execution details. Only applicable for single execution name i.e get execution name --details") - cmdFlags.StringVar(&DefaultConfig.NodeID, fmt.Sprintf("%v%v", prefix, "nodeId"), DefaultConfig.NodeID, "get task executions for given node name.") + cmdFlags.StringVar(&DefaultConfig.NodeID, fmt.Sprintf("%v%v", prefix, "nodeID"), DefaultConfig.NodeID, "get task executions for given node name.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/execution/config_flags_test.go b/flytectl/cmd/config/subcommand/execution/config_flags_test.go index 88cfd5fca0..57fc69dd42 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags_test.go @@ -169,13 +169,13 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_nodeId", func(t *testing.T) { + t.Run("Test_nodeID", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("nodeId", testValue) - if vString, err := cmdFlags.GetString("nodeId"); err == nil { + cmdFlags.Set("nodeID", testValue) + if vString, err := cmdFlags.GetString("nodeID"); err == nil { testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.NodeID) } else { diff --git a/flytectl/cmd/config/subcommand/execution/execution_config.go b/flytectl/cmd/config/subcommand/execution/execution_config.go index a149179908..e7a203ea2b 100644 --- a/flytectl/cmd/config/subcommand/execution/execution_config.go +++ b/flytectl/cmd/config/subcommand/execution/execution_config.go @@ -15,5 +15,5 @@ var ( type Config struct { Filter filters.Filters `json:"filter" pflag:","` Details bool `json:"details" pflag:",gets node execution details. Only applicable for single execution name i.e get execution name --details"` - NodeID string `json:"nodeId" pflag:",get task executions for given node name."` + NodeID string `json:"nodeID" pflag:",get task executions for given node name."` } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 2e8232ca7e..e17d6759d7 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -2,6 +2,7 @@ package get import ( "context" + "fmt" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" @@ -58,23 +59,23 @@ Get more details for the execution using --details flag which shows node executi bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Using yaml view for the details. In this view only node details are available. For task details pass --nodeId flag +Using yaml view for the details. In this view only node details are available. For task details pass --nodeID flag :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml -Using --nodeId flag to get task executions on a specific node. Use the nodeId attribute from node details view +Using --nodeID flag to get task executions on a specific node. Use the nodeID attribute from node details view :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -Task execution view is also available in yaml/json format. Below example shows yaml +Task execution view is also available in yaml/json format. Below example shows yaml. This also contains inputs/outputs data for each node :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 -o yaml + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml Usage ` @@ -115,7 +116,18 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command if execution.DefaultConfig.Details || len(execution.DefaultConfig.NodeID) > 0 { // Fetching Node execution details - return getExecutionDetails(ctx, config.GetConfig().Project, config.GetConfig().Domain, name, cmdCtx) + nExecDetailsForView, err := getExecutionDetails(ctx, config.GetConfig().Project, config.GetConfig().Domain, name, execution.DefaultConfig.NodeID, cmdCtx) + if err != nil { + return err + } + // o/p format of table is not supported on the details. TODO: Add tree format in printer + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + fmt.Println("TABLE format is not supported on detailed view and defaults to tree view. Choose either json/yaml") + nodeExecTree := createNodeDetailsTreeView(nil, nExecDetailsForView) + fmt.Println(nodeExecTree.Print()) + return nil + } + return adminPrinter.PrintInterface(config.GetConfig().MustOutputFormat(), nodeExecutionColumns, nExecDetailsForView) } return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executions)...) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index bda18d0acf..6589e4df2d 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -19,11 +19,21 @@ import ( "github.com/stretchr/testify/mock" ) -func TestListExecutionFunc(t *testing.T) { - ctx := context.Background() +const ( + nodeID = "node-id" +) + +func getExecutionSetup() { config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue config.GetConfig().Output = output + execution.DefaultConfig.Details = false + execution.DefaultConfig.NodeID = "" +} + +func TestListExecutionFunc(t *testing.T) { + ctx := context.Background() + getExecutionSetup() var args []string mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) @@ -77,9 +87,7 @@ func TestListExecutionFunc(t *testing.T) { func TestListExecutionFuncWithError(t *testing.T) { ctx := context.Background() - config.GetConfig().Project = projectValue - config.GetConfig().Domain = domainValue - config.GetConfig().Output = output + getExecutionSetup() var args []string mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) @@ -129,9 +137,7 @@ func TestListExecutionFuncWithError(t *testing.T) { func TestGetExecutionFunc(t *testing.T) { ctx := context.Background() - config.GetConfig().Project = projectValue - config.GetConfig().Domain = domainValue - config.GetConfig().Output = output + getExecutionSetup() mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) @@ -176,6 +182,7 @@ func TestGetExecutionFunc(t *testing.T) { func TestGetExecutionFuncForDetails(t *testing.T) { setup() + getExecutionSetup() ctx := u.Ctx mockCmdCtx := u.CmdCtx mockClient = u.MockClient @@ -183,17 +190,313 @@ func TestGetExecutionFuncForDetails(t *testing.T) { execution.DefaultConfig.Details = true args := []string{dummyExec} mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch details")) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nil, fmt.Errorf("unable to fetch details")) err = getExecutionFunc(ctx, args, mockCmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to fetch details"), err) } +func TestGetExecutionFuncWithIOData(t *testing.T) { + t.Run("successful inputs outputs", func(t *testing.T) { + setup() + getExecutionSetup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockClient = u.MockClient + mockFetcherExt := u.FetcherExt + execution.DefaultConfig.NodeID = nodeID + args := []string{dummyExec} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 110, + }, + }, + }, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) + + err = getExecutionFunc(ctx, args, mockCmdCtx) + assert.Nil(t, err) + }) + t.Run("invalid inputs", func(t *testing.T) { + setup() + getExecutionSetup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockClient = u.MockClient + mockFetcherExt := u.FetcherExt + execution.DefaultConfig.NodeID = nodeID + args := []string{dummyExec} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Schema{}, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) + + err = getExecutionFunc(ctx, args, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unsupported literal scalar type *core.Scalar_Schema"), err) + }) + t.Run("invalid outputs", func(t *testing.T) { + setup() + getExecutionSetup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockClient = u.MockClient + mockFetcherExt := u.FetcherExt + execution.DefaultConfig.NodeID = nodeID + args := []string{dummyExec} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Schema{}, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) + + err = getExecutionFunc(ctx, args, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unsupported literal scalar type *core.Scalar_Schema"), err) + }) + t.Run("fetch data error from admin", func(t *testing.T) { + setup() + getExecutionSetup() + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockClient = u.MockClient + mockFetcherExt := u.FetcherExt + execution.DefaultConfig.NodeID = nodeID + args := []string{dummyExec} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("error in fetching data")) + + err = getExecutionFunc(ctx, args, mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error in fetching data"), err) + }) + t.Run("Table test successful cases", func(t *testing.T) { + tests := []struct { + outputFormat string + nodeID string + want error + }{ + {outputFormat: "table", nodeID: "", want: nil}, + {outputFormat: "table", nodeID: "n0", want: nil}, + {outputFormat: "yaml", nodeID: "", want: nil}, + {outputFormat: "yaml", nodeID: "n0", want: nil}, + {outputFormat: "yaml", nodeID: "n1", want: nil}, + } + + args := []string{dummyExec} + for _, tt := range tests { + setup() + config.GetConfig().Output = tt.outputFormat + execution.DefaultConfig.NodeID = tt.nodeID + + ctx := u.Ctx + mockCmdCtx := u.CmdCtx + mockFetcherExt := u.FetcherExt + nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + + nodeExec1 := createDummyNodeWithID("n0", false) + taskExec1 := createDummyTaskExecutionForNode("n0", "task21") + taskExec2 := createDummyTaskExecutionForNode("n0", "task22") + + nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + } + + nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 100, + }, + }, + }, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } + + mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) + got := getExecutionFunc(ctx, args, mockCmdCtx) + assert.Equal(t, tt.want, got) + } + }) +} + func TestGetExecutionFuncWithError(t *testing.T) { ctx := context.Background() - config.GetConfig().Project = projectValue - config.GetConfig().Domain = domainValue - config.GetConfig().Output = output + getExecutionSetup() mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 5d58e39b01..6db868ed88 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -1,37 +1,28 @@ package get import ( + "bytes" "context" - "fmt" "sort" "strconv" + "strings" - "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/disiqueira/gotree" - "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/jsonpb" ) var nodeExecutionColumns = []printer.Column{ {Header: "Name", JSONPath: "$.id.nodeID"}, {Header: "Exec", JSONPath: "$.id.executionId.name"}, - {Header: "Duration", JSONPath: "$.closure.duration"}, - {Header: "StartedAt", JSONPath: "$.closure.startedAt"}, - {Header: "Phase", JSONPath: "$.closure.phase"}, -} - -var taskExecutionColumns = []printer.Column{ - {Header: "Name", JSONPath: "$.id.taskId.name"}, - {Header: "Node ID", JSONPath: "$.id.nodeExecutionId.nodeID"}, - {Header: "Execution ID", JSONPath: "$.closure.nodeExecutionId.executionId.name"}, - {Header: "Duration", JSONPath: "$.closure.duration"}, - {Header: "StartedAt", JSONPath: "$.closure.startedAt"}, - {Header: "Phase", JSONPath: "$.closure.phase"}, + {Header: "EndedAt", JSONPath: "$.endedAt"}, + {Header: "StartedAt", JSONPath: "$.startedAt"}, + {Header: "Phase", JSONPath: "$.phase"}, } const ( @@ -52,151 +43,229 @@ const ( hyphenPrefix = " - " ) -func NodeExecutionToProtoMessages(l []*admin.NodeExecution) []proto.Message { - messages := make([]proto.Message, 0, len(l)) - for _, m := range l { - messages = append(messages, m) +// TaskExecution wrapper around admin.TaskExecution +type TaskExecution struct { + *admin.TaskExecution +} + +// MarshalJSON overridden method to json marshalling to use jsonpb +func (in *TaskExecution) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + marshaller := jsonpb.Marshaler{} + if err := marshaller.Marshal(&buf, in.TaskExecution); err != nil { + return nil, err } - return messages + return buf.Bytes(), nil +} + +// UnmarshalJSON overridden method to json unmarshalling to use jsonpb +func (in *TaskExecution) UnmarshalJSON(b []byte) error { + in.TaskExecution = &admin.TaskExecution{} + return jsonpb.Unmarshal(bytes.NewReader(b), in.TaskExecution) } -func NodeTaskExecutionToProtoMessages(l []*admin.TaskExecution) []proto.Message { - messages := make([]proto.Message, 0, len(l)) - for _, m := range l { - messages = append(messages, m) +type NodeExecution struct { + *admin.NodeExecution +} + +// MarshalJSON overridden method to json marshalling to use jsonpb +func (in *NodeExecution) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + marshaller := jsonpb.Marshaler{} + if err := marshaller.Marshal(&buf, in.NodeExecution); err != nil { + return nil, err } - return messages + return buf.Bytes(), nil +} + +// UnmarshalJSON overridden method to json unmarshalling to use jsonpb +func (in *NodeExecution) UnmarshalJSON(b []byte) error { + *in = NodeExecution{} + return jsonpb.Unmarshal(bytes.NewReader(b), in) } -func getExecutionDetails(ctx context.Context, project, domain, name string, cmdCtx cmdCore.CommandContext) error { - adminPrinter := printer.Printer{} +// NodeExecutionClosure forms a wrapper around admin.NodeExecution and also fetches the childnodes , task execs +// and input/output on the node executions from the admin api's. +type NodeExecutionClosure struct { + NodeExec *NodeExecution `json:"node_exec,omitempty"` + ChildNodes []*NodeExecutionClosure `json:"child_nodes,omitempty"` + TaskExecutions []*TaskExecutionClosure `json:"task_execs,omitempty"` + // Inputs for the node + Inputs map[string]interface{} `json:"inputs,omitempty"` + // Outputs for the node + Outputs map[string]interface{} `json:"outputs,omitempty"` +} +// TaskExecutionClosure wrapper around TaskExecution +type TaskExecutionClosure struct { + *TaskExecution +} + +func getExecutionDetails(ctx context.Context, project, domain, execName, nodeName string, cmdCtx cmdCore.CommandContext) ([]*NodeExecutionClosure, error) { // Fetching Node execution details - nExecDetails, nodeExecToTaskExec, err := getNodeExecDetailsWithTasks(ctx, project, domain, name, cmdCtx) + nodeExecDetailsMap := map[string]*NodeExecutionClosure{} + nExecDetails, err := getNodeExecDetailsInt(ctx, project, domain, execName, nodeName, "", nodeExecDetailsMap, cmdCtx) if err != nil { - return err + return nil, err } - // o/p format of table is not supported on the details. TODO: Add tree format in printer - if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { - fmt.Println("TABLE format is not supported on detailed view and defaults to tree view. Choose either json/yaml") - if len(execution.DefaultConfig.NodeID) == 0 { - nodeExecTree := createNodeDetailsTreeView(nExecDetails, nodeExecToTaskExec) - if nodeExecTree != nil { - fmt.Println(nodeExecTree.Print()) - } - } else { - nodeTaskExecTree := createNodeTaskExecTreeView(nil, nodeExecToTaskExec[execution.DefaultConfig.NodeID]) - if nodeTaskExecTree != nil { - fmt.Println(nodeTaskExecTree.Print()) - } + var nExecDetailsForView []*NodeExecutionClosure + // Get the execution details only for the nodeId passed + if len(nodeName) > 0 { + // Fetch the last one which contains the nodeId details as previous ones are used to reach the nodeId + if nodeExecDetailsMap[nodeName] != nil { + nExecDetailsForView = append(nExecDetailsForView, nodeExecDetailsMap[nodeName]) } - return nil + } else { + nExecDetailsForView = nExecDetails } - if len(execution.DefaultConfig.NodeID) == 0 { - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), nodeExecutionColumns, - NodeExecutionToProtoMessages(nExecDetails)...) - } + sort.Slice(nExecDetailsForView[:], func(i, j int) bool { + return nExecDetailsForView[i].NodeExec.Closure.CreatedAt.AsTime().Before(nExecDetailsForView[j].NodeExec.Closure.CreatedAt.AsTime()) + }) - taskExecList := nodeExecToTaskExec[execution.DefaultConfig.NodeID] - if taskExecList != nil { - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), taskExecutionColumns, - NodeTaskExecutionToProtoMessages(taskExecList.TaskExecutions)...) - } - return nil + return nExecDetailsForView, nil } -func getNodeExecDetailsWithTasks(ctx context.Context, project, domain, name string, cmdCtx cmdCore.CommandContext) ( - []*admin.NodeExecution, map[string]*admin.TaskExecutionList, error) { - // Fetching Node execution details - nExecDetails, err := cmdCtx.AdminFetcherExt().FetchNodeExecutionDetails(ctx, name, project, domain) +func getNodeExecDetailsInt(ctx context.Context, project, domain, execName, nodeName, uniqueParentID string, + nodeExecDetailsMap map[string]*NodeExecutionClosure, cmdCtx cmdCore.CommandContext) ([]*NodeExecutionClosure, error) { + + nExecDetails, err := cmdCtx.AdminFetcherExt().FetchNodeExecutionDetails(ctx, execName, project, domain, uniqueParentID) if err != nil { - return nil, nil, err + return nil, err } - logger.Infof(ctx, "Retrieved %v node executions", len(nExecDetails.NodeExecutions)) - // Mapping node execution id to task list - nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + var nodeExecClosures []*NodeExecutionClosure for _, nodeExec := range nExecDetails.NodeExecutions { - nodeExecToTaskExec[nodeExec.Id.NodeId], err = cmdCtx.AdminFetcherExt().FetchTaskExecutionsOnNode(ctx, - nodeExec.Id.NodeId, name, project, domain) - if err != nil { - return nil, nil, err + nodeExecClosure := &NodeExecutionClosure{ + NodeExec: &NodeExecution{nodeExec}, + } + nodeExecClosures = append(nodeExecClosures, nodeExecClosure) + + // Check if this is parent node. If yes do recursive call to get child nodes. + if nodeExec.Metadata != nil && nodeExec.Metadata.IsParentNode { + nodeExecClosure.ChildNodes, err = getNodeExecDetailsInt(ctx, project, domain, execName, nodeName, nodeExec.Id.NodeId, nodeExecDetailsMap, cmdCtx) + if err != nil { + return nil, err + } + } else { + // Bug in admin https://github.com/flyteorg/flyte/issues/1221 + if strings.HasSuffix(nodeExec.Id.NodeId, "start-node") { + continue + } + taskExecList, err := cmdCtx.AdminFetcherExt().FetchTaskExecutionsOnNode(ctx, + nodeExec.Id.NodeId, execName, project, domain) + if err != nil { + return nil, err + } + for _, taskExec := range taskExecList.TaskExecutions { + taskExecClosure := &TaskExecutionClosure{ + TaskExecution: &TaskExecution{taskExec}, + } + nodeExecClosure.TaskExecutions = append(nodeExecClosure.TaskExecutions, taskExecClosure) + } + // Fetch the node inputs and outputs + nExecDataResp, err := cmdCtx.AdminFetcherExt().FetchNodeExecutionData(ctx, nodeExec.Id.NodeId, execName, project, domain) + if err != nil { + return nil, err + } + // Extract the inputs from the literal map + nodeExecClosure.Inputs, err = extractLiteralMap(nExecDataResp.FullInputs) + if err != nil { + return nil, err + } + // Extract the outputs from the literal map + nodeExecClosure.Outputs, err = extractLiteralMap(nExecDataResp.FullOutputs) + if err != nil { + return nil, err + } + } + nodeExecDetailsMap[nodeExec.Id.NodeId] = nodeExecClosure + // Found the node + if len(nodeName) > 0 && nodeName == nodeExec.Id.NodeId { + return nodeExecClosures, err } } - return nExecDetails.NodeExecutions, nodeExecToTaskExec, nil + return nodeExecClosures, nil } -func createNodeTaskExecTreeView(rootView gotree.Tree, taskExecs *admin.TaskExecutionList) gotree.Tree { - if taskExecs == nil || len(taskExecs.TaskExecutions) == 0 { - return gotree.New("") +func createNodeTaskExecTreeView(rootView gotree.Tree, taskExecClosures []*TaskExecutionClosure) { + if len(taskExecClosures) == 0 { + return } if rootView == nil { rootView = gotree.New("") } // TODO: Replace this by filter to sort in the admin - sort.Slice(taskExecs.TaskExecutions[:], func(i, j int) bool { - return taskExecs.TaskExecutions[i].Id.RetryAttempt < taskExecs.TaskExecutions[j].Id.RetryAttempt + sort.Slice(taskExecClosures[:], func(i, j int) bool { + return taskExecClosures[i].Id.RetryAttempt < taskExecClosures[j].Id.RetryAttempt }) - for _, taskExec := range taskExecs.TaskExecutions { - attemptView := rootView.Add(taskAttemptPrefix + strconv.Itoa(int(taskExec.Id.RetryAttempt))) - attemptView.Add(taskExecPrefix + taskExec.Closure.Phase.String() + - hyphenPrefix + taskExec.Closure.StartedAt.AsTime().String() + - hyphenPrefix + taskExec.Closure.StartedAt.AsTime(). - Add(taskExec.Closure.Duration.AsDuration()).String()) - attemptView.Add(taskTypePrefix + taskExec.Closure.TaskType) - attemptView.Add(taskReasonPrefix + taskExec.Closure.Reason) - if taskExec.Closure.Metadata != nil { + for _, taskExecClosure := range taskExecClosures { + attemptView := rootView.Add(taskAttemptPrefix + strconv.Itoa(int(taskExecClosure.Id.RetryAttempt))) + attemptView.Add(taskExecPrefix + taskExecClosure.Closure.Phase.String() + + hyphenPrefix + taskExecClosure.Closure.CreatedAt.AsTime().String() + + hyphenPrefix + taskExecClosure.Closure.UpdatedAt.AsTime().String()) + attemptView.Add(taskTypePrefix + taskExecClosure.Closure.TaskType) + attemptView.Add(taskReasonPrefix + taskExecClosure.Closure.Reason) + if taskExecClosure.Closure.Metadata != nil { metadata := attemptView.Add(taskMetadataPrefix) - metadata.Add(taskGeneratedNamePrefix + taskExec.Closure.Metadata.GeneratedName) - metadata.Add(taskPluginIDPrefix + taskExec.Closure.Metadata.PluginIdentifier) + metadata.Add(taskGeneratedNamePrefix + taskExecClosure.Closure.Metadata.GeneratedName) + metadata.Add(taskPluginIDPrefix + taskExecClosure.Closure.Metadata.PluginIdentifier) extResourcesView := metadata.Add(taskExtResourcesPrefix) - for _, extResource := range taskExec.Closure.Metadata.ExternalResources { + for _, extResource := range taskExecClosure.Closure.Metadata.ExternalResources { extResourcesView.Add(taskExtResourcePrefix + extResource.ExternalId) } resourcePoolInfoView := metadata.Add(taskResourcePrefix) - for _, rsPool := range taskExec.Closure.Metadata.ResourcePoolInfo { + for _, rsPool := range taskExecClosure.Closure.Metadata.ResourcePoolInfo { resourcePoolInfoView.Add(taskExtResourcePrefix + rsPool.Namespace) resourcePoolInfoView.Add(taskExtResourceTokenPrefix + rsPool.AllocationToken) } } - sort.Slice(taskExec.Closure.Logs[:], func(i, j int) bool { - return taskExec.Closure.Logs[i].Name < taskExec.Closure.Logs[j].Name + sort.Slice(taskExecClosure.Closure.Logs[:], func(i, j int) bool { + return taskExecClosure.Closure.Logs[i].Name < taskExecClosure.Closure.Logs[j].Name }) logsView := attemptView.Add(taskLogsPrefix) - for _, logData := range taskExec.Closure.Logs { + for _, logData := range taskExecClosure.Closure.Logs { logsView.Add(taskLogsNamePrefix + logData.Name) logsView.Add(taskLogURIPrefix + logData.Uri) } } - - return rootView } -func createNodeDetailsTreeView(nodeExecutions []*admin.NodeExecution, nodeExecToTaskExec map[string]*admin.TaskExecutionList) gotree.Tree { - nodeDetailsTreeView := gotree.New("") - if nodeExecutions == nil || nodeExecToTaskExec == nil { - return nodeDetailsTreeView +func createNodeDetailsTreeView(rootView gotree.Tree, nodeExecutionClosures []*NodeExecutionClosure) gotree.Tree { + if rootView == nil { + rootView = gotree.New("") + } + if len(nodeExecutionClosures) == 0 { + return rootView } // TODO : Move to sorting using filters. - sort.Slice(nodeExecutions[:], func(i, j int) bool { - // TODO : Remove this after fixing the StartedAt and Duration field not being populated for start-node and end-node in Admin - if nodeExecutions[i].Closure.StartedAt == nil || nodeExecutions[j].Closure.StartedAt == nil { - return true - } - return nodeExecutions[i].Closure.StartedAt.Nanos < nodeExecutions[j].Closure.StartedAt.Nanos + sort.Slice(nodeExecutionClosures[:], func(i, j int) bool { + return nodeExecutionClosures[i].NodeExec.Closure.CreatedAt.AsTime().Before(nodeExecutionClosures[j].NodeExec.Closure.CreatedAt.AsTime()) }) - for _, nodeExec := range nodeExecutions { - nExecView := nodeDetailsTreeView.Add(nodeExec.Id.NodeId + hyphenPrefix + nodeExec.Closure.Phase.String() + - hyphenPrefix + nodeExec.Closure.StartedAt.AsTime().String() + - hyphenPrefix + nodeExec.Closure.StartedAt.AsTime(). - Add(nodeExec.Closure.Duration.AsDuration()).String()) - taskExecs := nodeExecToTaskExec[nodeExec.Id.NodeId] - createNodeTaskExecTreeView(nExecView, taskExecs) + for _, nodeExecWrapper := range nodeExecutionClosures { + nExecView := rootView.Add(nodeExecWrapper.NodeExec.Id.NodeId + hyphenPrefix + nodeExecWrapper.NodeExec.Closure.Phase.String() + + hyphenPrefix + nodeExecWrapper.NodeExec.Closure.CreatedAt.AsTime().String() + + hyphenPrefix + nodeExecWrapper.NodeExec.Closure.UpdatedAt.AsTime().String()) + if len(nodeExecWrapper.ChildNodes) > 0 { + createNodeDetailsTreeView(nExecView, nodeExecWrapper.ChildNodes) + } + createNodeTaskExecTreeView(nExecView, nodeExecWrapper.TaskExecutions) + } + return rootView +} + +func extractLiteralMap(literalMap *core.LiteralMap) (map[string]interface{}, error) { + m := make(map[string]interface{}) + for key, literalVal := range literalMap.Literals { + extractedLiteralVal, err := coreutils.ExtractFromLiteral(literalVal) + if err != nil { + return nil, err + } + m[key] = extractedLiteralVal } - return nodeDetailsTreeView + return m, nil } diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index e01325240e..ca58d26568 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -5,8 +5,6 @@ import ( "testing" "time" - "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -14,6 +12,7 @@ import ( "github.com/disiqueira/gotree" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -27,73 +26,40 @@ const ( func TestCreateNodeDetailsTreeView(t *testing.T) { t.Run("empty node execution", func(t *testing.T) { - var nodeExecutions []*admin.NodeExecution - var nodeExecToTaskExec map[string]*admin.TaskExecutionList expectedRoot := gotree.New("") - treeRoot := createNodeDetailsTreeView(nodeExecutions, nodeExecToTaskExec) + treeRoot := createNodeDetailsTreeView(nil, nil) assert.Equal(t, expectedRoot, treeRoot) }) t.Run("successful simple node execution full view", func(t *testing.T) { - nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} - nodeExec1 := createDummyNodeWithID("start-node", true) + nodeExec1 := createDummyNodeWithID("start-node", false) + nodeExec1Closure := NodeExecutionClosure{NodeExec: &NodeExecution{nodeExec1}} taskExec11 := createDummyTaskExecutionForNode("start-node", "task11") + taskExec11Closure := TaskExecutionClosure{&TaskExecution{taskExec11}} taskExec12 := createDummyTaskExecutionForNode("start-node", "task12") + taskExec12Closure := TaskExecutionClosure{&TaskExecution{taskExec12}} - nodeExecToTaskExec["start-node"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec11, taskExec12}, - } + nodeExec1Closure.TaskExecutions = []*TaskExecutionClosure{&taskExec11Closure, &taskExec12Closure} nodeExec2 := createDummyNodeWithID("n0", false) + nodeExec2Closure := NodeExecutionClosure{NodeExec: &NodeExecution{nodeExec2}} taskExec21 := createDummyTaskExecutionForNode("n0", "task21") + taskExec21Closure := TaskExecutionClosure{&TaskExecution{taskExec21}} taskExec22 := createDummyTaskExecutionForNode("n0", "task22") + taskExec22Closure := TaskExecutionClosure{&TaskExecution{taskExec22}} - nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec21, taskExec22}, - } - - nodeExec3 := createDummyNodeWithID("n1", false) - taskExec31 := createDummyTaskExecutionForNode("n1", "task31") - taskExec32 := createDummyTaskExecutionForNode("n1", "task32") - - nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec31, taskExec32}, - } - - nodeExecutions := []*admin.NodeExecution{nodeExec1, nodeExec2, nodeExec3} - - treeRoot := createNodeDetailsTreeView(nodeExecutions, nodeExecToTaskExec) - - assert.Equal(t, 3, len(treeRoot.Items())) - }) - - t.Run("empty task execution only view", func(t *testing.T) { - taskExecutionList := &admin.TaskExecutionList{} - treeRoot := createNodeTaskExecTreeView(nil, taskExecutionList) - assert.Equal(t, 0, len(treeRoot.Items())) - }) + nodeExec2Closure.TaskExecutions = []*TaskExecutionClosure{&taskExec21Closure, &taskExec22Closure} - t.Run("successful task execution only view", func(t *testing.T) { - taskExec31 := createDummyTaskExecutionForNode("n1", "task31") - taskExec32 := createDummyTaskExecutionForNode("n1", "task32") + wrapperNodeExecutions := []*NodeExecutionClosure{&nodeExec1Closure, &nodeExec2Closure} - taskExecutionList := &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec31, taskExec32}, - } + treeRoot := createNodeDetailsTreeView(nil, wrapperNodeExecutions) - treeRoot := createNodeTaskExecTreeView(nil, taskExecutionList) assert.Equal(t, 2, len(treeRoot.Items())) }) } -func createDummyNodeWithID(nodeID string, startedAtEmpty bool) *admin.NodeExecution { - // Remove this param startedAtEmpty and code once admin code is fixed - startedAt := timestamppb.Now() - if startedAtEmpty { - startedAt = nil - } - +func createDummyNodeWithID(nodeID string, isParentNode bool) *admin.NodeExecution { nodeExecution := &admin.NodeExecution{ Id: &core.NodeExecutionIdentifier{ NodeId: nodeID, @@ -104,12 +70,15 @@ func createDummyNodeWithID(nodeID string, startedAtEmpty bool) *admin.NodeExecut }, }, InputUri: nodeID + "inputUri", + Metadata: &admin.NodeExecutionMetaData{ + IsParentNode: isParentNode, + }, Closure: &admin.NodeExecutionClosure{ OutputResult: &admin.NodeExecutionClosure_OutputUri{ OutputUri: nodeID + "outputUri", }, Phase: core.NodeExecution_SUCCEEDED, - StartedAt: startedAt, + StartedAt: timestamppb.Now(), Duration: &durationpb.Duration{Seconds: 100}, CreatedAt: timestamppb.Now(), UpdatedAt: timestamppb.Now(), @@ -194,67 +163,132 @@ func TestGetExecutionDetails(t *testing.T) { ctx := u.Ctx mockCmdCtx := u.CmdCtx mockFetcherExt := u.FetcherExt - nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} + nodeExecStart := createDummyNodeWithID("start-node", false) + nodeExecN2 := createDummyNodeWithID("n2", true) nodeExec1 := createDummyNodeWithID("n0", false) taskExec1 := createDummyTaskExecutionForNode("n0", "task21") taskExec2 := createDummyTaskExecutionForNode("n0", "task22") - nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, - } - - nodeExecutions := []*admin.NodeExecution{nodeExec1} + nodeExecutions := []*admin.NodeExecution{nodeExecStart, nodeExecN2, nodeExec1} nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 100, + }, + }, + }, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } - err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) - assert.Nil(t, err) - }) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "n2").Return(&admin.NodeExecutionList{}, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) - t.Run("failure node details fetch", func(t *testing.T) { - setup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch details")) - err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to fetch details"), err) + nodeExecWrappers, err := getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, "", mockCmdCtx) + assert.Nil(t, err) + assert.NotNil(t, nodeExecWrappers) }) - t.Run("failure task exec fetch", func(t *testing.T) { + t.Run("successful get details default view for node-id", func(t *testing.T) { setup() ctx := u.Ctx mockCmdCtx := u.CmdCtx mockFetcherExt := u.FetcherExt - nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} nodeExec1 := createDummyNodeWithID("n0", false) taskExec1 := createDummyTaskExecutionForNode("n0", "task21") taskExec2 := createDummyTaskExecutionForNode("n0", "task22") - nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, - } - nodeExecutions := []*admin.NodeExecution{nodeExec1} nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch task exec details")) - err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to fetch task exec details"), err) + inputs := map[string]*core.Literal{ + "val1": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 100, + }, + }, + }, + }, + }, + }, + } + outputs := map[string]*core.Literal{ + "o2": &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 120, + }, + }, + }, + }, + }, + }, + } + dataResp := &admin.NodeExecutionGetDataResponse{ + FullOutputs: &core.LiteralMap{ + Literals: inputs, + }, + FullInputs: &core.LiteralMap{ + Literals: outputs, + }, + } + + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ + TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, + }, nil) + mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) + + nodeExecWrappers, err := getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, "n0", mockCmdCtx) + assert.Nil(t, err) + assert.NotNil(t, nodeExecWrappers) }) - t.Run("successful get details non default view", func(t *testing.T) { + t.Run("failure task exec fetch", func(t *testing.T) { setup() - config.GetConfig().Output = "table" - execution.DefaultConfig.NodeID = "n0" - ctx := u.Ctx mockCmdCtx := u.CmdCtx mockFetcherExt := u.FetcherExt @@ -271,52 +305,10 @@ func TestGetExecutionDetails(t *testing.T) { nodeExecutions := []*admin.NodeExecution{nodeExec1} nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) - - err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) - assert.Nil(t, err) - }) - - t.Run("Table test successful cases", func(t *testing.T) { - tests := []struct { - outputFormat string - nodeID string - want error - }{ - {outputFormat: "table", nodeID: "", want: nil}, - {outputFormat: "table", nodeID: "n0", want: nil}, - {outputFormat: "yaml", nodeID: "", want: nil}, - {outputFormat: "yaml", nodeID: "n0", want: nil}, - {outputFormat: "yaml", nodeID: "n1", want: nil}, - } - - for _, tt := range tests { - setup() - config.GetConfig().Output = tt.outputFormat - execution.DefaultConfig.NodeID = tt.nodeID - - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt - nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} - - nodeExec1 := createDummyNodeWithID("n0", false) - taskExec1 := createDummyTaskExecutionForNode("n0", "task21") - taskExec2 := createDummyTaskExecutionForNode("n0", "task22") - - nodeExecToTaskExec["n0"] = &admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, - } - - nodeExecutions := []*admin.NodeExecution{nodeExec1} - nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nodeExecToTaskExec["n0"], nil) - - got := getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, mockCmdCtx) - assert.Equal(t, tt.want, got) - } + mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) + mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch task exec details")) + _, err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, "", mockCmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to fetch task exec details"), err) }) } diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index ced38d4586..73c266b461 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -52,23 +52,23 @@ Get more details for the execution using --details flag which shows node executi bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Using yaml view for the details. In this view only node details are available. For task details pass --nodeId flag +Using yaml view for the details. In this view only node details are available. For task details pass --nodeID flag :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml -Using --nodeId flag to get task executions on a specific node. Use the nodeId attribute from node details view +Using --nodeID flag to get task executions on a specific node. Use the nodeID attribute from node details view :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -Task execution view is also available in yaml/json format. Below example shows yaml +Task execution view is also available in yaml/json format. Below example shows yaml. This also contains inputs/outputs data for each node :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodId n0 -o yaml + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml Usage @@ -88,7 +88,7 @@ Options --filter.limit int32 Specifies the limit (default 100) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for execution - --nodeId string get task executions for given node name. + --nodeID string get task executions for given node name. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/go.mod b/flytectl/go.mod index e864548a80..089c496cfd 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -43,6 +43,5 @@ require ( gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible - k8s.io/kubernetes v1.13.0 sigs.k8s.io/yaml v1.2.0 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 2367487525..6cecb15014 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1409,7 +1409,6 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/flytectl/pkg/ext/execution_fetcher.go b/flytectl/pkg/ext/execution_fetcher.go index 47535cc1e3..24251b39f6 100644 --- a/flytectl/pkg/ext/execution_fetcher.go +++ b/flytectl/pkg/ext/execution_fetcher.go @@ -4,7 +4,6 @@ import ( "context" "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) @@ -23,14 +22,32 @@ func (a *AdminFetcherExtClient) FetchExecution(ctx context.Context, name, projec return e, nil } -func (a *AdminFetcherExtClient) FetchNodeExecutionDetails(ctx context.Context, name, project, domain string) (*admin.NodeExecutionList, error) { +func (a *AdminFetcherExtClient) FetchNodeExecutionData(ctx context.Context, nodeID, execName, project, domain string) (*admin.NodeExecutionGetDataResponse, error) { + ne, err := a.AdminServiceClient().GetNodeExecutionData(ctx, &admin.NodeExecutionGetDataRequest{ + Id: &core.NodeExecutionIdentifier{ + NodeId: nodeID, + ExecutionId: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: execName, + }, + }, + }) + if err != nil { + return nil, err + } + return ne, nil +} + +func (a *AdminFetcherExtClient) FetchNodeExecutionDetails(ctx context.Context, name, project, domain, uniqueParentID string) (*admin.NodeExecutionList, error) { ne, err := a.AdminServiceClient().ListNodeExecutions(ctx, &admin.NodeExecutionListRequest{ WorkflowExecutionId: &core.WorkflowExecutionIdentifier{ Project: project, Domain: domain, Name: name, }, - Limit: 100, + UniqueParentId: uniqueParentID, + Limit: 100, }) if err != nil { return nil, err diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go index 98da15871d..a415660f5c 100644 --- a/flytectl/pkg/ext/execution_fetcher_test.go +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -71,14 +71,14 @@ func TestFetchExecutionError(t *testing.T) { func TestFetchNodeExecutionDetails(t *testing.T) { getExecutionFetcherSetup() adminClient.OnListNodeExecutionsMatch(mock.Anything, mock.Anything).Return(&admin.NodeExecutionList{}, nil) - _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue") + _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue", "") assert.Nil(t, err) } func TestFetchNodeExecutionDetailsError(t *testing.T) { getExecutionFetcherSetup() adminClient.OnListNodeExecutionsMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue") + _, err := adminFetcherExt.FetchNodeExecutionDetails(ctx, "execName", "dummyProject", "domainValue", "") assert.Equal(t, fmt.Errorf("failed"), err) } @@ -95,3 +95,17 @@ func TestFetchTaskExecOnNodeError(t *testing.T) { _, err := adminFetcherExt.FetchTaskExecutionsOnNode(ctx, "nodeId", "execName", "dummyProject", "domainValue") assert.Equal(t, fmt.Errorf("failed"), err) } + +func TestFetchNodeData(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnGetNodeExecutionDataMatch(mock.Anything, mock.Anything).Return(&admin.NodeExecutionGetDataResponse{}, nil) + _, err := adminFetcherExt.FetchNodeExecutionData(ctx, "nodeId", "execName", "dummyProject", "domainValue") + assert.Nil(t, err) +} + +func TestFetchNodeDataError(t *testing.T) { + getExecutionFetcherSetup() + adminClient.OnGetNodeExecutionDataMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchNodeExecutionData(ctx, "nodeId", "execName", "dummyProject", "domainValue") + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 118e889e07..2b8b96f793 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -19,8 +19,11 @@ type AdminFetcherExtInterface interface { // FetchExecution fetches the execution based on name, project, domain FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) - // FetchNodeExecutionDetails fetches the node execution details based on execution name, project, domain - FetchNodeExecutionDetails(ctx context.Context, name, project, domain string) (*admin.NodeExecutionList, error) + // FetchNodeExecutionDetails fetches the node execution details based on execution name, project, domain, uniqueParentId + FetchNodeExecutionDetails(ctx context.Context, name, project, domain, uniqueParentID string) (*admin.NodeExecutionList, error) + + // FetchNodeExecutionData fetches the node execution data based on nodeId, execution name, project, domain + FetchNodeExecutionData(ctx context.Context, nodeID, execName, project, domain string) (*admin.NodeExecutionGetDataResponse, error) // FetchTaskExecutionsOnNode fetches task execution on a node , for give execution name, project, domain FetchTaskExecutionsOnNode(ctx context.Context, nodeID, execName, project, domain string) (*admin.TaskExecutionList, error) diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 6932ee5c1b..f41cb66dda 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -299,6 +299,47 @@ func (_m *AdminFetcherExtInterface) FetchLPVersion(ctx context.Context, name str return r0, r1 } +type AdminFetcherExtInterface_FetchNodeExecutionData struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchNodeExecutionData) Return(_a0 *admin.NodeExecutionGetDataResponse, _a1 error) *AdminFetcherExtInterface_FetchNodeExecutionData { + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionData(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchNodeExecutionData { + c := _m.On("FetchNodeExecutionData", ctx, nodeID, execName, project, domain) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDataMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionData { + c := _m.On("FetchNodeExecutionData", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} +} + +// FetchNodeExecutionData provides a mock function with given fields: ctx, nodeID, execName, project, domain +func (_m *AdminFetcherExtInterface) FetchNodeExecutionData(ctx context.Context, nodeID string, execName string, project string, domain string) (*admin.NodeExecutionGetDataResponse, error) { + ret := _m.Called(ctx, nodeID, execName, project, domain) + + var r0 *admin.NodeExecutionGetDataResponse + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.NodeExecutionGetDataResponse); ok { + r0 = rf(ctx, nodeID, execName, project, domain) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.NodeExecutionGetDataResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, nodeID, execName, project, domain) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchNodeExecutionDetails struct { *mock.Call } @@ -307,8 +348,8 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionDetails) Return(_a0 *admin.N return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentId string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { + c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentId) return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} } @@ -317,13 +358,13 @@ func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetailsMatch(matchers .. return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} } -// FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain -func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string) (*admin.NodeExecutionList, error) { - ret := _m.Called(ctx, name, project, domain) +// FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain, uniqueParentId +func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentId string) (*admin.NodeExecutionList, error) { + ret := _m.Called(ctx, name, project, domain, uniqueParentId) var r0 *admin.NodeExecutionList - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *admin.NodeExecutionList); ok { - r0 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.NodeExecutionList); ok { + r0 = rf(ctx, name, project, domain, uniqueParentId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.NodeExecutionList) @@ -331,8 +372,8 @@ func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Contex } var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain) + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, name, project, domain, uniqueParentId) } else { r1 = ret.Error(1) } @@ -389,8 +430,8 @@ func (_m AdminFetcherExtInterface_FetchTaskExecutionsOnNode) Return(_a0 *admin.T return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNode(ctx context.Context, nodeId string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { - c := _m.On("FetchTaskExecutionsOnNode", ctx, nodeId, execName, project, domain) +func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNode(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { + c := _m.On("FetchTaskExecutionsOnNode", ctx, nodeID, execName, project, domain) return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} } @@ -399,13 +440,13 @@ func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNodeMatch(matchers .. return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} } -// FetchTaskExecutionsOnNode provides a mock function with given fields: ctx, nodeId, execName, project, domain -func (_m *AdminFetcherExtInterface) FetchTaskExecutionsOnNode(ctx context.Context, nodeId string, execName string, project string, domain string) (*admin.TaskExecutionList, error) { - ret := _m.Called(ctx, nodeId, execName, project, domain) +// FetchTaskExecutionsOnNode provides a mock function with given fields: ctx, nodeID, execName, project, domain +func (_m *AdminFetcherExtInterface) FetchTaskExecutionsOnNode(ctx context.Context, nodeID string, execName string, project string, domain string) (*admin.TaskExecutionList, error) { + ret := _m.Called(ctx, nodeID, execName, project, domain) var r0 *admin.TaskExecutionList if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.TaskExecutionList); ok { - r0 = rf(ctx, nodeId, execName, project, domain) + r0 = rf(ctx, nodeID, execName, project, domain) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.TaskExecutionList) @@ -414,7 +455,7 @@ func (_m *AdminFetcherExtInterface) FetchTaskExecutionsOnNode(ctx context.Contex var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { - r1 = rf(ctx, nodeId, execName, project, domain) + r1 = rf(ctx, nodeID, execName, project, domain) } else { r1 = ret.Error(1) } diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 208b063195..2afcff5403 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -124,6 +124,46 @@ func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error { return nil } +func (p Printer) PrintInterface(format OutputFormat, columns []Column, v interface{}) error { + jsonRows, err := json.Marshal(v) + if err != nil { + return err + } + // Factory Method for all printer + switch format { + case OutputFormatJSON, OutputFormatYAML: + return printJSONYaml(format, v) + default: // Print table + return p.JSONToTable(jsonRows, columns) + } +} + +// printJSONYaml internal function for printing +func printJSONYaml(format OutputFormat, v interface{}) error { + if format != OutputFormatJSON && format != OutputFormatYAML { + return fmt.Errorf("this function should be called only for json/yaml printing") + } + buf := new(bytes.Buffer) + encoder := json.NewEncoder(buf) + encoder.SetIndent(empty, tab) + + err := encoder.Encode(v) + if err != nil { + return err + } + + if format == OutputFormatJSON { + fmt.Println(buf.String()) + } else { + v, err := yaml.JSONToYAML(buf.Bytes()) + if err != nil { + return err + } + fmt.Println(string(v)) + } + return nil +} + func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto.Message) error { printableMessages := make([]*PrintableProto, 0, len(messages)) @@ -134,27 +174,13 @@ func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto. // Factory Method for all printer switch format { case OutputFormatJSON, OutputFormatYAML: // Print protobuf to json - buf := new(bytes.Buffer) - encoder := json.NewEncoder(buf) - encoder.SetIndent(empty, tab) - var err error + var v interface{} if len(printableMessages) == 1 { - err = encoder.Encode(printableMessages[0]) + v = printableMessages[0] } else { - err = encoder.Encode(printableMessages) - } - if err != nil { - return err - } - if format == OutputFormatJSON { - fmt.Println(buf.String()) - } else { - v, err := yaml.JSONToYAML(buf.Bytes()) - if err != nil { - return err - } - fmt.Println(string(v)) + v = printableMessages } + return printJSONYaml(format, v) case OutputFormatDOT, OutputFormatDOTURL: var workflows []*admin.Workflow for _, m := range messages { From 9b05df0ed7b2cba2f2dacf8d3e30a0523862a6ae Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Tue, 13 Jul 2021 09:59:10 -0700 Subject: [PATCH 112/356] Adding support for workflow execution config (#144) Signed-off-by: Sean Lin --- .../attrdeleteconfig_flags.go | 55 +++++++ .../attrdeleteconfig_flags_test.go | 116 +++++++++++++++ .../attrfetchconfig_flags.go | 55 +++++++ .../attrfetchconfig_flags_test.go | 116 +++++++++++++++ .../attrupdateconfig_flags.go | 55 +++++++ .../attrupdateconfig_flags_test.go | 116 +++++++++++++++ .../workflowexecutionconfig/delete_config.go | 10 ++ .../workflowexecutionconfig/fetch_config.go | 9 ++ .../workflowexecutionconfig/file_config.go | 47 ++++++ .../file_config_test.go | 46 ++++++ .../workflowexecutionconfig/update_config.go | 10 ++ flytectl/cmd/delete/delete.go | 4 + flytectl/cmd/delete/delete_test.go | 10 +- .../matchable_workflow_execution_config.go | 79 ++++++++++ ...atchable_workflow_execution_config_test.go | 135 +++++++++++++++++ ...ject_domain_workflow_execution_config.yaml | 3 + ...id_workflow_workflow_execution_config.yaml | 4 + flytectl/cmd/get/get.go | 4 + flytectl/cmd/get/get_test.go | 10 +- .../matchable_workflow_execution_config.go | 100 +++++++++++++ ...atchable_workflow_execution_config_test.go | 138 ++++++++++++++++++ .../matchable_workflow_execution_config.go | 77 ++++++++++ ...atchable_workflow_execution_config_test.go | 95 ++++++++++++ ...ject_domain_workflow_execution_config.yaml | 3 + ...id_workflow_workflow_execution_config.yaml | 4 + flytectl/cmd/update/update.go | 3 + flytectl/cmd/update/update_test.go | 10 +- ...tectl_delete_workflow-execution-config.rst | 74 ++++++++++ ...flytectl_get_workflow-execution-config.rst | 94 ++++++++++++ ...tectl_update_workflow-execution-config.rst | 77 ++++++++++ flytectl/docs/source/nouns.rst | 3 + 31 files changed, 1547 insertions(+), 15 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go create mode 100644 flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go create mode 100644 flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go create mode 100644 flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go create mode 100644 flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go create mode 100644 flytectl/cmd/delete/matchable_workflow_execution_config.go create mode 100644 flytectl/cmd/delete/matchable_workflow_execution_config_test.go create mode 100644 flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml create mode 100644 flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml create mode 100644 flytectl/cmd/get/matchable_workflow_execution_config.go create mode 100644 flytectl/cmd/get/matchable_workflow_execution_config_test.go create mode 100644 flytectl/cmd/update/matchable_workflow_execution_config.go create mode 100644 flytectl/cmd/update/matchable_workflow_execution_config_test.go create mode 100644 flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml create mode 100644 flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml create mode 100644 flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst create mode 100644 flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst create mode 100644 flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go new file mode 100755 index 0000000000..a7a7395cce --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go new file mode 100755 index 0000000000..5aa3b6ec94 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(val, result)) +} + +func testDecodeRaw_AttrDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrDeleteConfig(vStringSlice, result)) +} + +func TestAttrDeleteConfig_GetPFlagSet(t *testing.T) { + val := AttrDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrDeleteConfig_SetFlags(t *testing.T) { + actual := AttrDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go new file mode 100755 index 0000000000..6196b75ed7 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrFetchConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrFetchConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrFetchConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go new file mode 100755 index 0000000000..7f85109efe --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrFetchConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrFetchConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrFetchConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrFetchConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrFetchConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrFetchConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrFetchConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrFetchConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrFetchConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(val, result)) +} + +func testDecodeRaw_AttrFetchConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrFetchConfig(vStringSlice, result)) +} + +func TestAttrFetchConfig_GetPFlagSet(t *testing.T) { + val := AttrFetchConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrFetchConfig_SetFlags(t *testing.T) { + actual := AttrFetchConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go new file mode 100755 index 0000000000..d13942d393 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (AttrUpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (AttrUpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in AttrUpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go new file mode 100755 index 0000000000..f9d64c9101 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package workflowexecutionconfig + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsAttrUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementAttrUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsAttrUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookAttrUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementAttrUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_AttrUpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookAttrUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_AttrUpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_AttrUpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(val, result)) +} + +func testDecodeRaw_AttrUpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_AttrUpdateConfig(vStringSlice, result)) +} + +func TestAttrUpdateConfig_GetPFlagSet(t *testing.T) { + val := AttrUpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestAttrUpdateConfig_SetFlags(t *testing.T) { + actual := AttrUpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_attrFile", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("attrFile", testValue) + if vString, err := cmdFlags.GetString("attrFile"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vString), &actual.AttrFile) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go new file mode 100644 index 0000000000..3604c0971e --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go @@ -0,0 +1,10 @@ +package workflowexecutionconfig + +//go:generate pflags AttrDeleteConfig --default-var DefaultDelConfig --bind-default-var + +// AttrDeleteConfig Matchable resource attributes configuration passed from command line +type AttrDeleteConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` +} + +var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go new file mode 100644 index 0000000000..8c2b918cb4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go @@ -0,0 +1,9 @@ +package workflowexecutionconfig + +//go:generate pflags AttrFetchConfig --default-var DefaultFetchConfig --bind-default-var + +type AttrFetchConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` +} + +var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go new file mode 100644 index 0000000000..9dc6b01ed5 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go @@ -0,0 +1,47 @@ +package workflowexecutionconfig + +import ( + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +// FileConfig shadow Config for WorkflowExecutionConfig. +// The shadow Config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. +// As the same structure is being used for both ProjectDomainAttribute/Workflowattribute +type FileConfig struct { + Project string `json:"project"` + Domain string `json:"domain"` + Workflow string `json:"workflow,omitempty"` + *admin.WorkflowExecutionConfig +} + +// Decorate decorator over WorkflowExecutionConfig. +func (t FileConfig) Decorate() *admin.MatchingAttributes { + return &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: t.WorkflowExecutionConfig, + }, + } +} + +// UnDecorate to uncover WorkflowExecutionConfig. +func (t *FileConfig) UnDecorate(matchingAttribute *admin.MatchingAttributes) { + if matchingAttribute == nil { + return + } + t.WorkflowExecutionConfig = matchingAttribute.GetWorkflowExecutionConfig() +} + +// GetProject from the WorkflowExecutionConfig +func (t FileConfig) GetProject() string { + return t.Project +} + +// GetDomain from the WorkflowExecutionConfig +func (t FileConfig) GetDomain() string { + return t.Domain +} + +// GetWorkflow from the WorkflowExecutionConfig +func (t FileConfig) GetWorkflow() string { + return t.Workflow +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go new file mode 100644 index 0000000000..b6b8cfd840 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go @@ -0,0 +1,46 @@ +package workflowexecutionconfig + +import ( + "testing" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" +) + +func TestFileConfig(t *testing.T) { + workflowExecutionConfigFileConfig := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ + MaxParallelism: 5, + }, + } + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: workflowExecutionConfigFileConfig.WorkflowExecutionConfig, + }, + } + t.Run("decorate", func(t *testing.T) { + assert.Equal(t, matchingAttr, workflowExecutionConfigFileConfig.Decorate()) + }) + + t.Run("decorate", func(t *testing.T) { + workflowExecutionConfigFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + } + workflowExecutionConfigFileConfigNew.UnDecorate(matchingAttr) + assert.Equal(t, workflowExecutionConfigFileConfig, workflowExecutionConfigFileConfigNew) + }) + t.Run("get project domain workflow", func(t *testing.T) { + workflowExecutionConfigFileConfigNew := FileConfig{ + Project: "dummyProject", + Domain: "dummyDomain", + Workflow: "workflow", + } + assert.Equal(t, "dummyProject", workflowExecutionConfigFileConfigNew.GetProject()) + assert.Equal(t, "dummyDomain", workflowExecutionConfigFileConfigNew.GetDomain()) + assert.Equal(t, "workflow", workflowExecutionConfigFileConfigNew.GetWorkflow()) + }) +} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go new file mode 100644 index 0000000000..591d354ae4 --- /dev/null +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go @@ -0,0 +1,10 @@ +package workflowexecutionconfig + +//go:generate pflags AttrUpdateConfig --default-var DefaultUpdateConfig --bind-default-var + +// AttrUpdateConfig Matchable resource attributes configuration passed from command line +type AttrUpdateConfig struct { + AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` +} + +var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 94ce8e801f..00685feccd 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -6,6 +6,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -47,6 +48,9 @@ func RemoteDeleteCommand() *cobra.Command { "plugin-override": {CmdFunc: deletePluginOverride, Aliases: []string{"plugin-overrides"}, Short: pluginOverrideShort, Long: pluginOverrideLong, PFlagProvider: pluginoverride.DefaultDelConfig, ProjectDomainNotRequired: true}, + "workflow-execution-config": {CmdFunc: deleteWorkflowExecutionConfig, Aliases: []string{"workflow-execution-config"}, + Short: workflowExecutionConfigShort, + Long: workflowExecutionConfigLong, PFlagProvider: workflowexecutionconfig.DefaultDelConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) return deleteCmd diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index e26a1d7a9d..70af741071 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -32,16 +32,16 @@ func TestDeleteCommand(t *testing.T) { assert.Equal(t, deleteCommand.Use, "delete") assert.Equal(t, deleteCommand.Short, deleteCmdShort) assert.Equal(t, deleteCommand.Long, deleteCmdLong) - assert.Equal(t, len(deleteCommand.Commands()), 6) + assert.Equal(t, len(deleteCommand.Commands()), 7) cmdNouns := deleteCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", "execution-queue-attribute", "plugin-override", "task-resource-attribute"} - aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-cluster-labels"}, {"execution-queue-attributes"}, {"plugin-overrides"}, {"task-resource-attributes"}} - shortArray := []string{clusterResourceAttributesShort, execCmdShort, executionClusterLabelShort, executionQueueAttributesShort, pluginOverrideShort, taskResourceAttributesShort} - longArray := []string{clusterResourceAttributesLong, execCmdLong, executionClusterLabelLong, executionQueueAttributesLong, pluginOverrideLong, taskResourceAttributesLong} + useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", "execution-queue-attribute", "plugin-override", "task-resource-attribute", "workflow-execution-config"} + aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-cluster-labels"}, {"execution-queue-attributes"}, {"plugin-overrides"}, {"task-resource-attributes"}, {"workflow-execution-config"}} + shortArray := []string{clusterResourceAttributesShort, execCmdShort, executionClusterLabelShort, executionQueueAttributesShort, pluginOverrideShort, taskResourceAttributesShort, workflowExecutionConfigShort} + longArray := []string{clusterResourceAttributesLong, execCmdLong, executionClusterLabelLong, executionQueueAttributesLong, pluginOverrideLong, taskResourceAttributesLong, workflowExecutionConfigLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go new file mode 100644 index 0000000000..c65a3976ed --- /dev/null +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -0,0 +1,79 @@ +package delete + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + workflowExecutionConfigShort = "Deletes matchable resources of workflow execution config" + workflowExecutionConfigLong = ` +Deletes workflow execution config for given project and domain combination or additionally with workflow name. + +Deletes workflow execution config label for project and domain +Here the command delete workflow execution config for project flytectldemo and development domain. +:: + + flytectl delete workflow-execution-config -p flytectldemo -d development + + +Deletes workflow execution config using config file which was used for creating it. +Here the command deletes workflow execution config from the config file wec.yaml +Max_parallelism is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of wec.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete workflow-execution-config --attrFile wec.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +Deletes workflow execution config for a workflow +Here the command deletes workflow execution config for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage +` +) + +func deleteWorkflowExecutionConfig(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var pwdGetter sconfig.ProjectDomainWorkflowGetter + pwdGetter = sconfig.PDWGetterCommandLine{Config: config.GetConfig(), Args: args} + delConfig := workflowexecutionconfig.DefaultDelConfig + + // Get the project domain workflowName from the config file or commandline params + if len(delConfig.AttrFile) > 0 { + // Initialize FileConfig which will be used if delConfig.AttrFile is non empty + // And Reads from the workflow execution config file + pwdGetter = &workflowexecutionconfig.FileConfig{} + if err := sconfig.ReadConfigFromFile(pwdGetter, delConfig.AttrFile); err != nil { + return err + } + } + // Use the pwdGetter to initialize the project domain and workflow + project := pwdGetter.GetProject() + domain := pwdGetter.GetDomain() + workflowName := pwdGetter.GetWorkflow() + + // Deletes the matchable attributes using the WorkflowExecutionConfigFileConfig + if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG); err != nil { + return err + } + + return nil +} diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go new file mode 100644 index 0000000000..bb706f5e67 --- /dev/null +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -0,0 +1,135 @@ +package delete + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + + "github.com/flyteorg/flytectl/cmd/config" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func deleteWorkflowExecutionConfigSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + workflowexecutionconfig.DefaultDelConfig = &workflowexecutionconfig.AttrDeleteConfig{} + args = []string{} +} + +func TestDeleteWorkflowExecutionConfig(t *testing.T) { + t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = "" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("failed project domain attribute deletion", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("successful project domain attribute deletion file", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("successful workflow attribute deletion", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("failed workflow attribute deletion", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = "" + args := []string{"workflow1"} + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("successful workflow attribute deletion file", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.Nil(t, err) + u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("workflow attribute deletion non existent file", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = testDataNonExistentFile + // No args implying project domain attribute deletion + u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.NotNil(t, err) + u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) + t.Run("attribute deletion invalid file", func(t *testing.T) { + setup() + deleteWorkflowExecutionConfigSetup() + // Empty attribute file + workflowexecutionconfig.DefaultDelConfig.AttrFile = testDataInvalidAttrFile + // No args implying project domain attribute deletion + err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, + fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), + err) + u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + }) +} diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml new file mode 100644 index 0000000000..c13e67fcd2 --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml @@ -0,0 +1,3 @@ +domain: development +project: flytectldemo +max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml b/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml new file mode 100644 index 0000000000..c2b0879f1e --- /dev/null +++ b/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml @@ -0,0 +1,4 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 6b3b077794..e6b750e2f5 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -11,6 +11,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/task" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -62,6 +63,9 @@ func CreateGetCommand() *cobra.Command { "plugin-override": {CmdFunc: getPluginOverridesFunc, Aliases: []string{"plugin-overrides"}, Short: pluginOverrideShort, Long: pluginOverrideLong, PFlagProvider: pluginoverride.DefaultFetchConfig}, + "workflow-execution-config": {CmdFunc: getWorkflowExecutionConfigFunc, Aliases: []string{"workflow-execution-config"}, + Short: workflowExecutionConfigShort, + Long: workflowExecutionConfigLong, PFlagProvider: workflowexecutionconfig.DefaultFetchConfig}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index 5b513ccd47..c6bce31c54 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -42,20 +42,20 @@ func TestCreateGetCommand(t *testing.T) { assert.Equal(t, getCommand.Use, "get") assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) - assert.Equal(t, len(getCommand.Commands()), 10) + assert.Equal(t, len(getCommand.Commands()), 11) cmdNouns := getCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", - "execution-queue-attribute", "launchplan", "plugin-override", "project", "task", "task-resource-attribute", "workflow"} + "execution-queue-attribute", "launchplan", "plugin-override", "project", "task", "task-resource-attribute", "workflow", "workflow-execution-config"} aliases := [][]string{{"cluster-resource-attributes"}, {"executions"}, {"execution-cluster-labels"}, - {"execution-queue-attributes"}, {"launchplans"}, {"plugin-overrides"}, {"projects"}, {"tasks"}, {"task-resource-attributes"}, {"workflows"}} + {"execution-queue-attributes"}, {"launchplans"}, {"plugin-overrides"}, {"projects"}, {"tasks"}, {"task-resource-attributes"}, {"workflows"}, {"workflow-execution-config"}} shortArray := []string{clusterResourceAttributesShort, executionShort, executionClusterLabelShort, executionQueueAttributesShort, launchPlanShort, - pluginOverrideShort, projectShort, taskShort, taskResourceAttributesShort, workflowShort} + pluginOverrideShort, projectShort, taskShort, taskResourceAttributesShort, workflowShort, workflowExecutionConfigShort} longArray := []string{clusterResourceAttributesLong, executionLong, executionClusterLabelLong, executionQueueAttributesLong, launchPlanLong, - pluginOverrideLong, projectLong, taskLong, taskResourceAttributesLong, workflowLong} + pluginOverrideLong, projectLong, taskLong, taskResourceAttributesLong, workflowLong, workflowExecutionConfigLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go new file mode 100644 index 0000000000..1afbc4324f --- /dev/null +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -0,0 +1,100 @@ +package get + +import ( + "context" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + + "github.com/flyteorg/flytectl/cmd/config" + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +) + +const ( + workflowExecutionConfigShort = "Gets matchable resources of workflow execution config" + workflowExecutionConfigLong = ` +Retrieves workflow execution config for given project and domain combination or additionally with workflow name. + +Retrieves workflow execution config for project and domain +Here the command get workflow execution config for project flytectldemo and development domain. + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "max_parallelism": 5 + } + +Retrieves workflow execution config for project and domain and workflow +Here the command get workflow execution config for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "workflow": "core.control_flow.run_merge_sort.merge_sort" + "max_parallelism": 5 + } + +Writing the workflow execution config to a file. If there are no workflow execution config, command would return an error. +Here the command gets workflow execution config and writes the config file to wec.yaml +eg: content of wec.yaml + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development --attrFile wec.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +Usage +` +) + +func getWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + var project string + var domain string + var workflowName string + + // Get the project domain workflow name parameters from the command line. Project and domain are mandatory for this command + project = config.GetConfig().Project + domain = config.GetConfig().Domain + if len(args) == 1 { + workflowName = args[0] + } + // Construct a shadow config for WorkflowExecutionConfig. The shadow config is not using ProjectDomainAttribute/Workflowattribute directly inorder to simplify the inputs. + workflowExecutionConfigFileConfig := workflowexecutionconfig.FileConfig{Project: project, Domain: domain, Workflow: workflowName} + // Get the workflow execution config from the command line config + fileName := workflowexecutionconfig.DefaultFetchConfig.AttrFile + + // Updates the workflowExecutionConfigFileConfig with the fetched matchable attribute + if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), + &workflowExecutionConfigFileConfig, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG); err != nil { + return err + } + + // Write the config to the file which can be used for update + if err := sconfig.DumpTaskResourceAttr(workflowExecutionConfigFileConfig, fileName); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go new file mode 100644 index 0000000000..c3c97829a6 --- /dev/null +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -0,0 +1,138 @@ +package get + +import ( + "fmt" + "os" + "testing" + + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func getWorkflowExecutionConfigSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + workflowexecutionconfig.DefaultFetchConfig = &workflowexecutionconfig.AttrFetchConfig{} + // Clean up the temp directory. + _ = os.Remove(testDataTempFile) +} + +func TestGetWorkflowExecutionConfig(t *testing.T) { + executionClusterLabel := &admin.WorkflowExecutionConfig{ + MaxParallelism: 5, + } + projectDomainResp := &admin.ProjectDomainAttributesGetResponse{ + Attributes: &admin.ProjectDomainAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: executionClusterLabel, + }, + }, + }, + } + workflowResp := &admin.WorkflowAttributesGetResponse{ + Attributes: &admin.WorkflowAttributes{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Workflow: "workflow", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: executionClusterLabel, + }, + }, + }, + } + t.Run("successful get project domain attribute", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","max_parallelism":5}`) + }) + t.Run("successful get project domain attribute and write to file", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultFetchConfig.AttrFile = testDataTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, `wrote the config to file temp-output-file`) + }) + t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(projectDomainResp, nil) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, ``) + }) + t.Run("failed get project domain attribute", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + // No args implying project domain attribute deletion + u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, ``) + }) + t.Run("successful get workflow attribute", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(workflowResp, nil) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","max_parallelism":5}`) + }) + t.Run("failed get workflow attribute", func(t *testing.T) { + var args []string + setup() + getWorkflowExecutionConfigSetup() + args = []string{"workflow"} + u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) + err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to fetch response"), err) + u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go new file mode 100644 index 0000000000..7f6fa1b705 --- /dev/null +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -0,0 +1,77 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + + sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" +) + +const ( + workflowExecutionConfigShort = "Updates matchable resources of workflow execution config" + workflowExecutionConfigLong = ` +Updates workflow execution config for given project and domain combination or additionally with workflow name. + +Updating the workflow execution config is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination execution config. +Would be preferable to do get and generate an config file if there is an existing execution config already set and then update it to have new values +Refer to get workflow-execution-config section on how to generate this file +Here the command updates takes the input for workflow execution config from the config file wec.yaml +eg: content of wec.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +:: + + flytectl update workflow-execution-config --attrFile wec.yaml + +Updating workflow execution config for project and domain and workflow combination. This will take precedence over any other +execution config defined at project domain level. +Update the workflow execution config for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + max_parallelism: 5 + +:: + + flytectl update workflow-execution-config --attrFile wec.yaml + +Usage + +` +) + +func updateWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + updateConfig := workflowexecutionconfig.DefaultUpdateConfig + if len(updateConfig.AttrFile) == 0 { + return fmt.Errorf("attrFile is mandatory while calling update for workflow execution config") + } + + workflowExecutionConfigFileConfig := workflowexecutionconfig.FileConfig{} + if err := sconfig.ReadConfigFromFile(&workflowExecutionConfigFileConfig, updateConfig.AttrFile); err != nil { + return err + } + + // Get project domain workflow name from the read file. + project := workflowExecutionConfigFileConfig.Project + domain := workflowExecutionConfigFileConfig.Domain + workflowName := workflowExecutionConfigFileConfig.Workflow + + // Updates the admin matchable attribute from workflowExecutionConfigFileConfig + if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), + workflowExecutionConfigFileConfig); err != nil { + return err + } + return nil +} diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go new file mode 100644 index 0000000000..f4a2934c7f --- /dev/null +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -0,0 +1,95 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + + u "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func updateWorkflowExecutionConfigSetup() { + ctx = u.Ctx + cmdCtx = u.CmdCtx + mockClient = u.MockClient + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} +} + +func TestWorkflowExecutionConfigs(t *testing.T) { + t.Run("no input file for update", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for workflow execution config"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update project domain attribute", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(nil) + err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update project domain attribute", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("successful update workflow attribute", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ``) + }) + t.Run("failed update workflow attribute", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" + // No args implying project domain attribute deletion + u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) + err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed to update attributes"), err) + tearDownAndVerify(t, ``) + }) + t.Run("non existent file", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataNonExistentFile + err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) + tearDownAndVerify(t, ``) + }) + t.Run("invalid update file", func(t *testing.T) { + setup() + updateWorkflowExecutionConfigSetup() + workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile + err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) + tearDownAndVerify(t, ``) + }) +} diff --git a/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml b/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml new file mode 100644 index 0000000000..c13e67fcd2 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml @@ -0,0 +1,3 @@ +domain: development +project: flytectldemo +max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml b/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml new file mode 100644 index 0000000000..c2b0879f1e --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml @@ -0,0 +1,4 @@ +domain: development +project: flytectldemo +workflow: core.control_flow.run_merge_sort.merge_sort +max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 8485f32043..efd2f0a48d 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -6,6 +6,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -51,6 +52,8 @@ func CreateUpdateCommand() *cobra.Command { Short: executionClusterLabelShort, Long: executionClusterLabelLong, ProjectDomainNotRequired: true}, "plugin-override": {CmdFunc: updatePluginOverridesFunc, Aliases: []string{}, PFlagProvider: pluginoverride.DefaultUpdateConfig, Short: pluginOverrideShort, Long: pluginOverrideLong, ProjectDomainNotRequired: true}, + "workflow-execution-config": {CmdFunc: updateWorkflowExecutionConfigFunc, Aliases: []string{}, PFlagProvider: workflowexecutionconfig.DefaultUpdateConfig, + Short: workflowExecutionConfigShort, Long: workflowExecutionConfigLong, ProjectDomainNotRequired: true}, } cmdCore.AddCommands(updateCmd, updateResourcesFuncs) return updateCmd diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 3afcd4ae70..eecfbff0d6 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -32,19 +32,19 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 9) + assert.Equal(t, len(updateCommand.Commands()), 10) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) useArray := []string{"cluster-resource-attribute", "execution-cluster-label", "execution-queue-attribute", "launchplan", - "plugin-override", "project", "task", "task-resource-attribute", "workflow"} - aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}} + "plugin-override", "project", "task", "task-resource-attribute", "workflow", "workflow-execution-config"} + aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}} shortArray := []string{clusterResourceAttributesShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, - pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort} + pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort, workflowExecutionConfigShort} longArray := []string{clusterResourceAttributesLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, - pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong} + pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong, workflowExecutionConfigLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst new file mode 100644 index 0000000000..dcd19ba965 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -0,0 +1,74 @@ +.. _flytectl_delete_workflow-execution-config: + +flytectl delete workflow-execution-config +----------------------------------------- + +Deletes matchable resources of workflow execution config + +Synopsis +~~~~~~~~ + + + +Deletes workflow execution config for given project and domain combination or additionally with workflow name. + +Deletes workflow execution config label for project and domain +Here the command delete workflow execution config for project flytectldemo and development domain. +:: + + flytectl delete workflow-execution-config -p flytectldemo -d development + + +Deletes workflow execution config using config file which was used for creating it. +Here the command deletes workflow execution config from the config file wec.yaml +Max_parallelism is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete +eg: content of wec.yaml which will use the project domain and workflow name for deleting the resource + +:: + + flytectl delete workflow-execution-config --attrFile wec.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +Deletes workflow execution config for a workflow +Here the command deletes workflow execution config for a workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl delete workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +Usage + + +:: + + flytectl delete workflow-execution-config [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for delete attribute for the resource type. + -h, --help help for workflow-execution-config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst new file mode 100644 index 0000000000..be693c93c9 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -0,0 +1,94 @@ +.. _flytectl_get_workflow-execution-config: + +flytectl get workflow-execution-config +-------------------------------------- + +Gets matchable resources of workflow execution config + +Synopsis +~~~~~~~~ + + + +Retrieves workflow execution config for given project and domain combination or additionally with workflow name. + +Retrieves workflow execution config for project and domain +Here the command get workflow execution config for project flytectldemo and development domain. + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "max_parallelism": 5 + } + +Retrieves workflow execution config for project and domain and workflow +Here the command get workflow execution config for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + +eg : output from the command + +.. code-block:: json + + { + "project": "flytectldemo", + "domain": "development", + "workflow": "core.control_flow.run_merge_sort.merge_sort" + "max_parallelism": 5 + } + +Writing the workflow execution config to a file. If there are no workflow execution config, command would return an error. +Here the command gets workflow execution config and writes the config file to wec.yaml +eg: content of wec.yaml + +:: + + flytectl get workflow-execution-config -p flytectldemo -d development --attrFile wec.yaml + + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +Usage + + +:: + + flytectl get workflow-execution-config [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for generating attribute for the resource type. + -h, --help help for workflow-execution-config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst new file mode 100644 index 0000000000..dc2b8e4057 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -0,0 +1,77 @@ +.. _flytectl_update_workflow-execution-config: + +flytectl update workflow-execution-config +----------------------------------------- + +Updates matchable resources of workflow execution config + +Synopsis +~~~~~~~~ + + + +Updates workflow execution config for given project and domain combination or additionally with workflow name. + +Updating the workflow execution config is only available from a generated file. See the get section for generating this file. +Also this will completely overwrite any existing custom project and domain and workflow combination execution config. +Would be preferable to do get and generate an config file if there is an existing execution config already set and then update it to have new values +Refer to get workflow-execution-config section on how to generate this file +Here the command updates takes the input for workflow execution config from the config file wec.yaml +eg: content of wec.yaml + +.. code-block:: yaml + + domain: development + project: flytectldemo + max_parallelism: 5 + +:: + + flytectl update workflow-execution-config --attrFile wec.yaml + +Updating workflow execution config for project and domain and workflow combination. This will take precedence over any other +execution config defined at project domain level. +Update the workflow execution config for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain + +.. code-block:: yaml + + domain: development + project: flytectldemo + workflow: core.control_flow.run_merge_sort.merge_sort + max_parallelism: 5 + +:: + + flytectl update workflow-execution-config --attrFile wec.yaml + +Usage + + + +:: + + flytectl update workflow-execution-config [flags] + +Options +~~~~~~~ + +:: + + --attrFile string attribute file name to be used for updating attribute for the resource type. + -h, --help help for workflow-execution-config + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index f90ca068bf..12d6444a10 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -18,6 +18,7 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_get_execution-queue-attribute gen/flytectl_get_plugin-override gen/flytectl_get_launchplan + gen/flytectl_get_workflow-execution-config gen/flytectl_update_launchplan gen/flytectl_update_workflow gen/flytectl_update_project @@ -27,6 +28,7 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_update_execution-cluster-label gen/flytectl_update_execution-queue-attribute gen/flytectl_update_plugin-override + gen/flytectl_update_workflow-execution-config gen/flytectl_register_files gen/flytectl_register_examples gen/flytectl_delete_execution @@ -35,6 +37,7 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_delete_execution-cluster-label gen/flytectl_delete_execution-queue-attribute gen/flytectl_delete_plugin-override + gen/flytectl_delete_workflow-execution-config gen/flytectl_config_validate gen/flytectl_config_init gen/flytectl_config_discover From 5392ada020180dea34f631cef1d9fe4bf657865c Mon Sep 17 00:00:00 2001 From: brucearctor <5032356+brucearctor@users.noreply.github.com> Date: Fri, 16 Jul 2021 11:39:02 -0700 Subject: [PATCH 113/356] fix gcp parameters... s3 -> google (#147) * fix gcp parameters... s3 -> google Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com> * change s3 to google for gcs docs Signed-off-by: Bruce Arctor <5032356+brucearctor@users.noreply.github.com> --- flytectl/docs/source/index.rst | 2 +- flytectl/pkg/configutil/configutil.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 4915e0b963..06602489e0 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -99,7 +99,7 @@ Basic Configuration storage: type: stow stow: - kind: s3 + kind: google config: json: "" project_id: # TODO: replace with the GCP project ID diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index f6d715e7eb..44420887a3 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -41,7 +41,7 @@ storage: storage: type: stow stow: - kind: s3 + kind: google config: json: "" project_id: # TODO: replace with the GCP project ID From 0510aaa69dfc440bdaf7e55b0f4e3bfc5c9658c5 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Sat, 17 Jul 2021 08:32:34 -0700 Subject: [PATCH 114/356] Update documentation (#146) Signed-off-by: Flyte-Bot Co-authored-by: kumare3 --- flytectl/docs/source/gen/flytectl_delete.rst | 1 + ...tectl_delete_workflow-execution-config.rst | 32 +++++++++++++++++++ flytectl/docs/source/gen/flytectl_get.rst | 1 + ...flytectl_get_workflow-execution-config.rst | 32 +++++++++++++++++++ flytectl/docs/source/gen/flytectl_update.rst | 1 + ...tectl_update_workflow-execution-config.rst | 32 +++++++++++++++++++ 6 files changed, 99 insertions(+) diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 7cba6f6123..c09e621e10 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -75,4 +75,5 @@ SEE ALSO * :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes * :doc:`flytectl_delete_plugin-override` - Deletes matchable resources of plugin overrides * :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes +* :doc:`flytectl_delete_workflow-execution-config` - Deletes matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index dcd19ba965..3af2b6770e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -62,10 +62,42 @@ Options inherited from parent commands :: + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 202a7ed989..255ee9d809 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -79,4 +79,5 @@ SEE ALSO * :doc:`flytectl_get_task` - Gets task resources * :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes * :doc:`flytectl_get_workflow` - Gets workflow resources +* :doc:`flytectl_get_workflow-execution-config` - Gets matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index be693c93c9..8a024786f2 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -82,10 +82,42 @@ Options inherited from parent commands :: + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 789633015e..1c1d80ebe5 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -80,4 +80,5 @@ SEE ALSO * :doc:`flytectl_update_task` - Updates task metadata * :doc:`flytectl_update_task-resource-attribute` - Updates matchable resources of task attributes * :doc:`flytectl_update_workflow` - Updates workflow metadata +* :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index dc2b8e4057..b83fd90320 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -65,10 +65,42 @@ Options inherited from parent commands :: + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ From 2d65956564a45700fc45c5b8eb6ad80d1bfe28ce Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Tue, 20 Jul 2021 22:00:50 -0700 Subject: [PATCH 115/356] Add ability to recover executions (#149) --- flytectl/cmd/create/execution.go | 11 +++++++ flytectl/cmd/create/execution_test.go | 33 ++++++++++++++++++- flytectl/cmd/create/execution_util.go | 24 ++++++++++++-- flytectl/cmd/create/execution_util_test.go | 33 ++++++++++++++++--- flytectl/cmd/create/executionconfig_flags.go | 1 + .../cmd/create/executionconfig_flags_test.go | 14 ++++++++ flytectl/docs/source/conf.py | 7 ++++ .../source/gen/flytectl_create_execution.rst | 8 +++++ flytectl/go.mod | 2 +- flytectl/go.sum | 4 +-- 10 files changed, 127 insertions(+), 10 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 4fdea5214d..5722808888 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -78,6 +78,13 @@ Also an execution can be relaunched by passing in current execution id. flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development +An execution can be recovered, that is recreated from the last known failure point for a previously-run workflow execution. +See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. + +:: + + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development + Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. As usual the spec file should be generated first and then run the execution using the spec file. @@ -138,6 +145,7 @@ type ExecutionConfig struct { KubeServiceAcct string `json:"kubeServiceAcct" pflag:",kubernetes service account AuthRole for launching execution."` IamRoleARN string `json:"iamRoleARN" pflag:",iam role ARN AuthRole for launching execution."` Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."` + Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."` // Non plfag section is read from the execution config generated by get task/launchplan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` @@ -151,6 +159,7 @@ const ( Task ExecutionType = iota Workflow Relaunch + Recover ) type ExecutionParams struct { @@ -174,6 +183,8 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C switch execParams.execType { case Relaunch: return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx) + case Recover: + return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx) case Task: if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { return err diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 00544c4f55..65df850ae5 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -183,6 +183,7 @@ func TestCreateLaunchPlanExecutionFunc(t *testing.T) { func TestCreateRelaunchExecutionFunc(t *testing.T) { setup() createExecutionSetup() + defer func() { executionConfig.Relaunch = "" }() relaunchExecResponse := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -206,6 +207,36 @@ func TestCreateRelaunchExecutionFunc(t *testing.T) { tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) } +func TestCreateRecoverExecutionFunc(t *testing.T) { + setup() + createExecutionSetup() + defer func() { executionConfig.Recover = "" }() + + originalExecutionName := "abc123" + recoverExecResponse := &admin.ExecutionCreateResponse{ + Id: &core.WorkflowExecutionIdentifier{ + Project: "flytesnacks", + Domain: "development", + Name: "f652ea3596e7f4d80a0e", + }, + } + + executionConfig.Recover = originalExecutionName + recoverRequest := &admin.ExecutionRecoverRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: originalExecutionName, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + } + mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(recoverExecResponse, nil) + err = createExecutionCommand(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "RecoverExecution", ctx, recoverRequest) + tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + executionConfig.Relaunch = "" +} + func TestCreateExecutionFuncInvalid(t *testing.T) { setup() createExecutionSetup() @@ -213,7 +244,7 @@ func TestCreateExecutionFuncInvalid(t *testing.T) { executionConfig.ExecFile = "" err = createExecutionCommand(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("executionConfig or relaunch can't be empty. Run the flytectl get task/launchplan to generate the config"), err) + assert.Equal(t, fmt.Errorf("executionConfig, relaunch and recover can't be empty. Run the flytectl get task/launchplan to generate the config"), err) executionConfig.ExecFile = "Invalid-file" err = createExecutionCommand(ctx, args, cmdCtx) assert.NotNil(t, err) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 4442301327..639a50c295 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -107,6 +107,22 @@ func relaunchExecution(ctx context.Context, executionName string, project string return nil } +func recoverExecution(ctx context.Context, executionName string, project string, domain string, + cmdCtx cmdCore.CommandContext) error { + recoveredExec, err := cmdCtx.AdminClient().RecoverExecution(ctx, &admin.ExecutionRecoverRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: executionName, + Project: project, + Domain: domain, + }, + }) + if err != nil { + return err + } + fmt.Printf("execution identifier %v\n", recoveredExec.Id) + return nil +} + func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securityContext *core.SecurityContext, authRole *admin.AuthRole) *admin.ExecutionCreateRequest { @@ -164,14 +180,18 @@ func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain st func readConfigAndValidate(project string, domain string) (ExecutionParams, error) { executionParams := ExecutionParams{} - if executionConfig.ExecFile == "" && executionConfig.Relaunch == "" { - return executionParams, fmt.Errorf("executionConfig or relaunch can't be empty." + + if executionConfig.ExecFile == "" && executionConfig.Relaunch == "" && executionConfig.Recover == "" { + return executionParams, fmt.Errorf("executionConfig, relaunch and recover can't be empty." + " Run the flytectl get task/launchplan to generate the config") } if executionConfig.Relaunch != "" { resolveOverrides(executionConfig, project, domain) return ExecutionParams{name: executionConfig.Relaunch, execType: Relaunch}, nil } + if len(executionConfig.Recover) > 0 { + resolveOverrides(executionConfig, project, domain) + return ExecutionParams{name: executionConfig.Recover, execType: Recover}, nil + } var readExecutionConfig *ExecutionConfig var err error if readExecutionConfig, err = readExecConfigFromFile(executionConfig.ExecFile); err != nil { diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index db3a084225..9d6bf63d41 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -13,8 +13,9 @@ import ( ) var ( - relaunchExecResponse *admin.ExecutionCreateResponse - relaunchRequest *admin.ExecutionRelaunchRequest + executionCreateResponse *admin.ExecutionCreateResponse + relaunchRequest *admin.ExecutionRelaunchRequest + recoverRequest *admin.ExecutionRecoverRequest ) // This function needs to be called after testutils.Steup() @@ -22,7 +23,7 @@ func createExecutionUtilSetup() { ctx = testutils.Ctx cmdCtx = testutils.CmdCtx mockClient = testutils.MockClient - relaunchExecResponse = &admin.ExecutionCreateResponse{ + executionCreateResponse = &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", Domain: "development", @@ -36,12 +37,19 @@ func createExecutionUtilSetup() { Domain: config.GetConfig().Domain, }, } + recoverRequest = &admin.ExecutionRecoverRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Name: "execName", + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + } } func TestCreateExecutionForRelaunch(t *testing.T) { setup() createExecutionUtilSetup() - mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) + mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(executionCreateResponse, nil) err = relaunchExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) assert.Nil(t, err) } @@ -54,3 +62,20 @@ func TestCreateExecutionForRelaunchNotFound(t *testing.T) { assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } + +func TestCreateExecutionForRecovery(t *testing.T) { + setup() + createExecutionUtilSetup() + mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(executionCreateResponse, nil) + err = recoverExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + assert.Nil(t, err) +} + +func TestCreateExecutionForRecoveryNotFound(t *testing.T) { + setup() + createExecutionUtilSetup() + mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(nil, errors.New("unknown execution")) + err = recoverExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, err, errors.New("unknown execution")) +} diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 5fb13bbbe8..a8d6f541c2 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -56,5 +56,6 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&executionConfig.KubeServiceAcct, fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.IamRoleARN, fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") + cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Relaunch, "execution id to be recreated from the last known failure point.") return cmdFlags } diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index 9e35676125..681816f22c 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -183,4 +183,18 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_recover", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("recover", testValue) + if vString, err := cmdFlags.GetString("recover"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Recover) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index b429faea57..0e6329ab99 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -35,6 +35,7 @@ extensions = [ "sphinx.ext.autosummary", "sphinx.ext.autosectionlabel", + "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.viewcode", "sphinx.ext.doctest", @@ -181,3 +182,9 @@ "Miscellaneous", ), ] + +# -- Options for intersphinx ------------------------------------------------- +# intersphinx configuration +intersphinx_mapping = { + "flyteidl": ("https://docs.flyte.org/projects/flyteidl/en/latest", None), +} diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 06a5188144..200f96547e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -76,6 +76,13 @@ Also an execution can be relaunched by passing in current execution id. flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development +An execution can be recovered, that is recreated from the last known failure point for a previously-run workflow execution. +See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. + +:: + + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development + Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. As usual the spec file should be generated first and then run the execution using the spec file. @@ -137,6 +144,7 @@ Options -h, --help help for execution --iamRoleARN string iam role ARN AuthRole for launching execution. --kubeServiceAcct string kubernetes service account AuthRole for launching execution. + --recover string execution id to be recreated from the last known failure point. --relaunch string execution id to be relaunched. --targetDomain string project where execution needs to be created.If not specified configured domain would be used. --targetProject string project where execution needs to be created.If not specified configured project would be used. diff --git a/flytectl/go.mod b/flytectl/go.mod index 089c496cfd..60b3e041ac 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.19.9 + github.com/flyteorg/flyteidl v0.19.14 github.com/flyteorg/flytestdlib v0.3.28 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index 6cecb15014..8eae97b092 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -342,8 +342,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.19.9 h1:1j4/YbV/G1m2hrK017F9K0JYZYxCCwf4qtEkiNnUiEw= -github.com/flyteorg/flyteidl v0.19.9/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.14 h1:OLg2eT9uYllcfMMjEZJoXQ+2WXcrNbUxD+yaCrz2AlI= +github.com/flyteorg/flyteidl v0.19.14/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.28 h1:bvyldApjlUy9ETxSFpYvLhYLJxxndnMZTf93rVG6a00= github.com/flyteorg/flytestdlib v0.3.28/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From a66e66995a65772b143e80affe0b561f8553dc9d Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 22 Jul 2021 13:17:47 +0530 Subject: [PATCH 116/356] Fix config init command fails if no flyte dir doesn't exist (#150) * Added setup flytedir before config init Signed-off-by: Yuvraj --- flytectl/cmd/configuration/configuration.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 140b4333f5..e47ff2ff81 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -9,6 +9,8 @@ import ( "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flytectl/pkg/configutil" initConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/config" @@ -69,6 +71,10 @@ func configInitFunc(ctx context.Context, args []string, cmdCtx cmdcore.CommandCo func initFlytectlConfig(ctx context.Context, reader io.Reader) error { + if err := util.SetupFlyteDir(); err != nil { + return err + } + templateValues := configutil.ConfigTemplateSpec{ Host: "dns:///localhost:30081", Insecure: initConfig.DefaultConfig.Insecure, @@ -87,6 +93,8 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { if strings.ToUpper(result) == "GCS" { templateStr = configutil.GetGoogleCloudTemplate() } + } else { + logger.Infof(ctx, "Init flytectl config for remote cluster, Please update your storage config in %s. Learn more about the config here https://docs.flyte.org/projects/flytectl/en/latest/index.html#configure", configutil.ConfigFile) } } var _err error @@ -100,9 +108,9 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { _err = configutil.SetupConfig(configutil.ConfigFile, templateStr, templateValues) } } - - if len(initConfig.DefaultConfig.Host) > 0 { - logger.Infof(ctx, "Init flytectl config for remote cluster, Please update your storage config in %s. Learn more about the config here https://docs.flyte.org/projects/flytectl/en/latest/index.html#configure", configutil.ConfigFile) + if _err != nil { + return _err } - return _err + fmt.Printf("Init flytectl config file at [%s]", configutil.ConfigFile) + return nil } From 5da69f57d84d398d847857533d4294c9df57afbd Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 22 Jul 2021 16:42:05 +0530 Subject: [PATCH 117/356] #none add go mod tidy in flyteidl release workflow (#151) Signed-off-by: Yuvraj --- .../{release-automation.yml => update-flyte-component.yml} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename flytectl/.github/workflows/{release-automation.yml => update-flyte-component.yml} (83%) diff --git a/flytectl/.github/workflows/release-automation.yml b/flytectl/.github/workflows/update-flyte-component.yml similarity index 83% rename from flytectl/.github/workflows/release-automation.yml rename to flytectl/.github/workflows/update-flyte-component.yml index 0c16bd1c00..7893e4fb8b 100644 --- a/flytectl/.github/workflows/release-automation.yml +++ b/flytectl/.github/workflows/update-flyte-component.yml @@ -1,10 +1,10 @@ -name: Update flyteidl version +name: Update Flyte component on: workflow_dispatch: jobs: update-flyte-releases: - name: Update Flyteidl version + name: Update Flyte component runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,7 +23,10 @@ jobs: - name: Update Flyte component run: | FLYTEIDL_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteidl/releases/latest" | jq -r .tag_name) + FLYTESTDLIB_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flytestdlib/releases/latest" | jq -r .tag_name) go get -u github.com/flyteorg/flyteidl@$FLYTEIDL_VERSION + go get -u github.com/flyteorg/flytestdlib@$FLYTESTDLIB_VERSION + go mod tidy - name: Create Pull Request id: cpr uses: peter-evans/create-pull-request@v3 From 3d86194a7aa8e395529c6652104eda500f67ed92 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 22 Jul 2021 17:18:22 +0530 Subject: [PATCH 118/356] Update code of conduct (#148) * code-of-conduct Signed-off-by: Samhita Alla * boilerplate Signed-off-by: Samhita Alla --- flytectl/CODE_OF_CONDUCT.md | 2 +- .../flyte/code_of_conduct/CODE_OF_CONDUCT.md | 2 ++ .../boilerplate/flyte/code_of_conduct/README.rst | 2 ++ .../boilerplate/flyte/code_of_conduct/update.sh | 12 ++++++++++++ .../boilerplate/flyte/golang_test_targets/goimports | 2 +- .../pull_request_template/pull_request_template.md | 13 ++++++++----- flytectl/boilerplate/update.cfg | 2 +- flytectl/pull_request_template.md | 13 ++++++++----- 8 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 flytectl/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md create mode 100644 flytectl/boilerplate/flyte/code_of_conduct/README.rst create mode 100755 flytectl/boilerplate/flyte/code_of_conduct/update.sh diff --git a/flytectl/CODE_OF_CONDUCT.md b/flytectl/CODE_OF_CONDUCT.md index 4c3a38cc48..e12139d691 100644 --- a/flytectl/CODE_OF_CONDUCT.md +++ b/flytectl/CODE_OF_CONDUCT.md @@ -1,2 +1,2 @@ -This project is governed by [Lyft's code of conduct](https://github.com/lyft/code-of-conduct). +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). All contributors and participants agree to abide by its terms. diff --git a/flytectl/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md b/flytectl/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..e12139d691 --- /dev/null +++ b/flytectl/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). +All contributors and participants agree to abide by its terms. diff --git a/flytectl/boilerplate/flyte/code_of_conduct/README.rst b/flytectl/boilerplate/flyte/code_of_conduct/README.rst new file mode 100644 index 0000000000..0c9f2f1ec5 --- /dev/null +++ b/flytectl/boilerplate/flyte/code_of_conduct/README.rst @@ -0,0 +1,2 @@ +CODE OF CONDUCT +~~~~~~~~~~~~~~~ diff --git a/flytectl/boilerplate/flyte/code_of_conduct/update.sh b/flytectl/boilerplate/flyte/code_of_conduct/update.sh new file mode 100755 index 0000000000..42f6158460 --- /dev/null +++ b/flytectl/boilerplate/flyte/code_of_conduct/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/CODE_OF_CONDUCT.md ${DIR}/../../../CODE_OF_CONDUCT.md diff --git a/flytectl/boilerplate/flyte/golang_test_targets/goimports b/flytectl/boilerplate/flyte/golang_test_targets/goimports index ba0d6d8718..af1829036c 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/goimports +++ b/flytectl/boilerplate/flyte/golang_test_targets/goimports @@ -5,4 +5,4 @@ # # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst -goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") +goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -path "./boilerplate/*") diff --git a/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md b/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md +++ b/flytectl/boilerplate/flyte/pull_request_template/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg index 45cc5569cf..f64279bc22 100644 --- a/flytectl/boilerplate/update.cfg +++ b/flytectl/boilerplate/update.cfg @@ -4,4 +4,4 @@ flyte/golang_support_tools flyte/pull_request_template flyte/welcome_bot flyte/precommit - +flyte/code_of_conduct diff --git a/flytectl/pull_request_template.md b/flytectl/pull_request_template.md index d7699558be..9cdab99b46 100644 --- a/flytectl/pull_request_template.md +++ b/flytectl/pull_request_template.md @@ -1,8 +1,9 @@ -## Read then delete +## _Read then delete this section_ -- Make sure to use a concise title for the pull-request. -- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version -will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump) +_- Make sure to use a concise title for the pull-request._ + +_- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version +will be bumped. [More details](https://github.com/marketplace/actions/github-tag-bump)_ # TL;DR _Please replace this text with a description of what this PR accomplishes._ @@ -24,7 +25,9 @@ _Please replace this text with a description of what this PR accomplishes._ _How did you fix the bug, make the feature etc. Link to any design docs etc_ ## Tracking Issue -https://github.com/flyteorg/flyte/issues/ +_Remove the '*fixes*' keyword if there will be multiple PRs to fix the linked issue_ + +fixes https://github.com/flyteorg/flyte/issues/ ## Follow-up issue _NA_ From 2a9a827bacec806f33043b86c2e20d32b46a3c64 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Mon, 26 Jul 2021 14:05:02 -0400 Subject: [PATCH 119/356] update doc requirements with sphinx v4 (#153) Signed-off-by: cosmicBboy --- flytectl/doc-requirements.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index aabe778a3d..76f9d60edf 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with python 3.8 +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile doc-requirements.in @@ -15,7 +15,7 @@ beautifulsoup4==4.9.3 # sphinx-material certifi==2021.5.30 # via requests -chardet==4.0.0 +charset-normalizer==2.0.3 # via requests css-html-js-minify==2.5.5 # via sphinx-material @@ -25,7 +25,7 @@ docutils==0.16 # sphinx-tabs git+git://github.com/flyteorg/furo@main # via -r doc-requirements.in -idna==2.10 +idna==3.2 # via requests imagesize==1.2.0 # via sphinx @@ -35,7 +35,7 @@ lxml==4.6.3 # via sphinx-material markupsafe==2.0.1 # via jinja2 -packaging==20.9 +packaging==21.0 # via sphinx pygments==2.9.0 # via @@ -48,7 +48,7 @@ python-slugify[unidecode]==5.0.2 # via sphinx-material pytz==2021.1 # via babel -requests==2.25.1 +requests==2.26.0 # via sphinx six==1.16.0 # via sphinx-code-include @@ -56,7 +56,7 @@ snowballstemmer==2.1.0 # via sphinx soupsieve==2.2.1 # via beautifulsoup4 -sphinx==3.5.4 +sphinx==4.1.2 # via # -r doc-requirements.in # furo @@ -68,11 +68,11 @@ sphinx==3.5.4 # sphinx-tabs sphinx-code-include==1.1.1 # via -r doc-requirements.in -sphinx-copybutton==0.3.3 +sphinx-copybutton==0.4.0 # via -r doc-requirements.in sphinx-fontawesome==0.0.6 # via -r doc-requirements.in -sphinx-material==0.0.32 +sphinx-material==0.0.34 # via -r doc-requirements.in sphinx-prompt==1.4.0 # via -r doc-requirements.in From 2fd5e5682cc35952441181c439e41dea3d19e278 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 27 Jul 2021 11:42:32 -0700 Subject: [PATCH 120/356] Update Flyteidl version (#134) --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 60b3e041ac..00186a8e76 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v0.19.14 - github.com/flyteorg/flytestdlib v0.3.28 + github.com/flyteorg/flytestdlib v0.3.30 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-cmp v0.5.6 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 8eae97b092..15ee968a20 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,8 +345,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.19.14 h1:OLg2eT9uYllcfMMjEZJoXQ+2WXcrNbUxD+yaCrz2AlI= github.com/flyteorg/flyteidl v0.19.14/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.28 h1:bvyldApjlUy9ETxSFpYvLhYLJxxndnMZTf93rVG6a00= -github.com/flyteorg/flytestdlib v0.3.28/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= +github.com/flyteorg/flytestdlib v0.3.30 h1:cBsphk2PGyhSM6BFJBR1whO9DZ907NjUeWQLsBrm0/g= +github.com/flyteorg/flytestdlib v0.3.30/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From eaeb998c618eda9ed5dce990df35b35bddbf38d6 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Wed, 4 Aug 2021 20:31:51 -0700 Subject: [PATCH 121/356] Render descriptions in flytectl (#154) --- flytectl/cmd/get/execution_util.go | 65 ++++++++++---- flytectl/cmd/get/launch_plan.go | 31 ++++++- flytectl/cmd/get/launch_plan_test.go | 121 ++++++++++++++++++++------- flytectl/cmd/get/task.go | 25 +++++- flytectl/cmd/get/task_test.go | 59 ++++++++++--- flytectl/cmd/get/workflow.go | 23 +++++ flytectl/cmd/testutils/test_utils.go | 9 +- flytectl/go.mod | 1 + flytectl/pkg/printer/printer.go | 65 +++++++++++++- flytectl/pkg/printer/printer_test.go | 54 ++++++++++++ 10 files changed, 384 insertions(+), 69 deletions(-) diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 2d70450af3..65b72175a5 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -6,25 +6,25 @@ import ( "io/ioutil" "os" + "gopkg.in/yaml.v3" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - - "sigs.k8s.io/yaml" ) -// ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. +// ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. Only works with go-yaml. // TODO : replace this with a cleaner design type ExecutionConfig struct { - TargetDomain string `json:"targetDomain"` - TargetProject string `json:"targetProject"` - KubeServiceAcct string `json:"kubeServiceAcct"` - IamRoleARN string `json:"iamRoleARN"` - Workflow string `json:"workflow,omitempty"` - Task string `json:"task,omitempty"` - Version string `json:"version"` - Inputs map[string]interface{} `json:"inputs"` + IamRoleARN string `yaml:"iamRoleARN"` + Inputs map[string]yaml.Node `yaml:"inputs"` + KubeServiceAcct string `yaml:"kubeServiceAcct"` + TargetDomain string `yaml:"targetDomain"` + TargetProject string `yaml:"targetProject"` + Task string `yaml:"task,omitempty"` + Version string `yaml:"version"` + Workflow string `yaml:"workflow,omitempty"` } func WriteExecConfigToFile(executionConfig ExecutionConfig, fileName string) error { @@ -78,16 +78,27 @@ func TaskInputs(task *admin.Task) map[string]*core.Variable { return task.Closure.CompiledTask.Template.Interface.Inputs.Variables } -func ParamMapForTask(task *admin.Task) (map[string]interface{}, error) { +func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { taskInputs := TaskInputs(task) - paramMap := make(map[string]interface{}, len(taskInputs)) + paramMap := make(map[string]yaml.Node, len(taskInputs)) for k, v := range taskInputs { varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Type) if err != nil { fmt.Println("error creating default value for literal type ", v.Type) return nil, err } - if paramMap[k], err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { + var nativeLiteral interface{} + if nativeLiteral, err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { + return nil, err + } + + if k == v.Description { + // a: # a isn't very helpful + paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") + } else { + paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Description) + } + if err != nil { return nil, err } } @@ -105,24 +116,42 @@ func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter { return lp.Spec.DefaultInputs.Parameters } -func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]interface{}, error) { +func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { workflowParams := WorkflowParams(lp) - paramMap := make(map[string]interface{}, len(workflowParams)) + paramMap := make(map[string]yaml.Node, len(workflowParams)) for k, v := range workflowParams { varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Var.Type) if err != nil { fmt.Println("error creating default value for literal type ", v.Var.Type) return nil, err } - if paramMap[k], err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { + var nativeLiteral interface{} + if nativeLiteral, err = coreutils.ExtractFromLiteral(varTypeValue); err != nil { return nil, err } // Override if there is a default value if paramsDefault, ok := v.Behavior.(*core.Parameter_Default); ok { - if paramMap[k], err = coreutils.ExtractFromLiteral(paramsDefault.Default); err != nil { + if nativeLiteral, err = coreutils.ExtractFromLiteral(paramsDefault.Default); err != nil { return nil, err } } + if k == v.Var.Description { + // a: # a isn't very helpful + paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") + } else { + paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Var.Description) + } + + if err != nil { + return nil, err + } } return paramMap, nil } + +func getCommentedYamlNode(input interface{}, comment string) (yaml.Node, error) { + var node yaml.Node + err := node.Encode(input) + node.LineComment = comment + return node, err +} diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index ec90a62fd2..34bf10cf1a 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -104,6 +104,8 @@ var launchplanColumns = []printer.Column{ {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, {Header: "State", JSONPath: "$.spec.state"}, {Header: "Schedule", JSONPath: "$.spec.entityMetadata.schedule"}, + {Header: "Inputs", JSONPath: "$.closure.expectedInputs.parameters." + printer.DefaultFormattedDescriptionsKey + ".var.description"}, + {Header: "Outputs", JSONPath: "$.closure.expectedOutputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, } // Column structure for get all launchplans @@ -122,6 +124,21 @@ func LaunchplanToProtoMessages(l []*admin.LaunchPlan) []proto.Message { return messages } +func LaunchplanToTableProtoMessages(l []*admin.LaunchPlan) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + m := proto.Clone(m).(*admin.LaunchPlan) + if m.Closure.ExpectedInputs != nil { + printer.FormatParameterDescriptions(m.Closure.ExpectedInputs.Parameters) + } + if m.Closure.ExpectedOutputs != nil { + printer.FormatVariableDescriptions(m.Closure.ExpectedOutputs.Variables) + } + messages = append(messages, m) + } + return messages +} + func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { launchPlanPrinter := printer.Printer{} var launchPlans []*admin.LaunchPlan @@ -134,8 +151,13 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman return err } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) - err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, - LaunchplanToProtoMessages(launchPlans)...) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, + LaunchplanToTableProtoMessages(launchPlans)...) + } else { + err = launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplanColumns, + LaunchplanToProtoMessages(launchPlans)...) + } if err != nil { return err } @@ -148,8 +170,13 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman } logger.Debugf(ctx, "Retrieved %v launch plans", len(launchPlans)) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplansColumns, + LaunchplanToTableProtoMessages(launchPlans)...) + } return launchPlanPrinter.Print(config.GetConfig().MustOutputFormat(), launchplansColumns, LaunchplanToProtoMessages(launchPlans)...) + } // FetchLPForName fetches the launchplan give it name. diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 9757a35c1d..6e3e104390 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -7,6 +7,7 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" @@ -48,6 +49,7 @@ func getLaunchPlanSetup() { }, }, }, + Description: "short desc", }, }, "numbers_count": { @@ -57,6 +59,7 @@ func getLaunchPlanSetup() { Simple: core.SimpleType_INTEGER, }, }, + Description: "long description will be truncated in table", }, }, "run_local_at_count": { @@ -66,6 +69,7 @@ func getLaunchPlanSetup() { Simple: core.SimpleType_INTEGER, }, }, + Description: "run_local_at_count", }, Behavior: &core.Parameter_Default{ Default: &core.Literal{ @@ -258,21 +262,24 @@ func TestGetLaunchPlanFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -294,21 +301,24 @@ func TestGetLaunchPlanFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -337,21 +347,24 @@ func TestGetLaunchPlanFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -373,21 +386,24 @@ func TestGetLaunchPlanFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -429,21 +445,24 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -465,21 +484,24 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -520,21 +542,24 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -556,21 +581,24 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -595,7 +623,7 @@ func TestGetLaunchPlans(t *testing.T) { argsLp = []string{} err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}}}},"numbers_count": {"var": {"type": {"simple": "INTEGER"}}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"}},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlansWithExecFile(t *testing.T) { @@ -624,21 +652,24 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -660,21 +691,24 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "short desc" } }, "numbers_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "long description will be truncated in table" } }, "run_local_at_count": { "var": { "type": { "simple": "INTEGER" - } + }, + "description": "run_local_at_count" }, "default": { "scalar": { @@ -690,3 +724,28 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { } }`) } + +func TestGetLaunchPlanTableFunc(t *testing.T) { + setup() + getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) + mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) + mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) + config.GetConfig().Output = "table" + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) + tearDownAndVerify(t, ` +--------- ------------- ------ ------- ---------- --------------------------- --------- +| VERSION | NAME | TYPE | STATE | SCHEDULE | INPUTS | OUTPUTS | +--------- ------------- ------ ------- ---------- --------------------------- --------- +| v2 | launchplan1 | | | | numbers: short desc | | +| | | | | | numbers_count: long de... | | +| | | | | | run_local_at_count | | +--------- ------------- ------ ------- ---------- --------------------------- --------- +| v1 | launchplan1 | | | | numbers: short desc | | +| | | | | | numbers_count: long de... | | +| | | | | | run_local_at_count | | +--------- ------------- ------ ------- ---------- --------------------------- --------- +2 rows`) +} diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 49c586f433..9f9a7b9861 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -10,7 +10,6 @@ import ( "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" - "github.com/golang/protobuf/proto" ) @@ -98,6 +97,8 @@ var taskColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, + {Header: "Inputs", JSONPath: "$.closure.compiledTask.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledTask.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, {Header: "Discoverable", JSONPath: "$.closure.compiledTask.template.metadata.discoverable"}, {Header: "Discovery Version", JSONPath: "$.closure.compiledTask.template.metadata.discoveryVersion"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, @@ -111,6 +112,21 @@ func TaskToProtoMessages(l []*admin.Task) []proto.Message { return messages } +func TaskToTableProtoMessages(l []*admin.Task) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + m := proto.Clone(m).(*admin.Task) + if m.Closure.CompiledTask.Template.Interface.Inputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Inputs.Variables) + } + if m.Closure.CompiledTask.Template.Interface.Outputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Outputs.Variables) + } + messages = append(messages, m) + } + return messages +} + func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { taskPrinter := printer.Printer{} var tasks []*admin.Task @@ -123,13 +139,20 @@ func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte return err } logger.Debugf(ctx, "Retrieved Task", tasks) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToTableProtoMessages(tasks)...) + } return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) + } tasks, err = cmdCtx.AdminFetcherExt().FetchAllVerOfTask(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, taskConfig.DefaultConfig.Filter) if err != nil { return err } logger.Debugf(ctx, "Retrieved %v Task", len(tasks)) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToTableProtoMessages(tasks)...) + } return taskPrinter.Print(config.GetConfig().MustOutputFormat(), taskColumns, TaskToProtoMessages(tasks)...) } diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index b72545487d..744c56b29e 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,6 +5,8 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/config" + taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" "github.com/flyteorg/flytectl/pkg/filters" @@ -50,6 +52,7 @@ func getTaskSetup() { }, }, }, + Description: "var description", } variableMap := map[string]*core.Variable{ "sorted_list1": &sortedListLiteralType, @@ -257,14 +260,16 @@ func TestGetTaskFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" }, "sorted_list2": { "type": { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" } } } @@ -290,14 +295,16 @@ func TestGetTaskFunc(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" }, "sorted_list2": { "type": { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" } } } @@ -310,6 +317,28 @@ func TestGetTaskFunc(t *testing.T) { ]`) } +func TestGetTaskTableFunc(t *testing.T) { + setup() + getTaskSetup() + mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) + mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + config.GetConfig().Output = "table" + err = getTaskFunc(ctx, argsTask, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) + tearDownAndVerify(t, ` +--------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- +| VERSION | NAME | TYPE | INPUTS | OUTPUTS | DISCOVERABLE | DISCOVERY VERSION | CREATED AT | +--------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- +| v2 | task1 | | sorted_list1: var desc... | | | | 1970-01-01T00:00:01Z | +| | | | sorted_list2: var desc... | | | | | +--------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- +| v1 | task1 | | sorted_list1: var desc... | | | | 1970-01-01T00:00:00Z | +| | | | sorted_list2: var desc... | | | | | +--------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- +2 rows`) +} + func TestGetTaskFuncLatest(t *testing.T) { setup() getTaskSetup() @@ -336,14 +365,16 @@ func TestGetTaskFuncLatest(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" }, "sorted_list2": { "type": { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" } } } @@ -382,14 +413,16 @@ func TestGetTaskWithVersion(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" }, "sorted_list2": { "type": { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" } } } @@ -408,7 +441,7 @@ func TestGetTasks(t *testing.T) { mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetTasksFilters(t *testing.T) { @@ -420,7 +453,7 @@ func TestGetTasksFilters(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}}},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}}}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) + tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) } func TestGetTaskWithExecFile(t *testing.T) { @@ -451,14 +484,16 @@ func TestGetTaskWithExecFile(t *testing.T) { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" }, "sorted_list2": { "type": { "collectionType": { "simple": "INTEGER" } - } + }, + "description": "var description" } } } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 8fba30d2cd..704f7a0519 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -87,6 +87,8 @@ Usage var workflowColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Inputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, } @@ -98,6 +100,21 @@ func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { return messages } +func WorkflowToTableProtoMessages(l []*admin.Workflow) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + m := proto.Clone(m).(*admin.Workflow) + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables) + } + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs.Variables) + } + messages = append(messages, m) + } + return messages +} + func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} var workflows []*admin.Workflow @@ -108,6 +125,9 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return err } logger.Debugf(ctx, "Retrieved %v workflow", len(workflows)) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToTableProtoMessages(workflows)...) + } return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) } @@ -117,6 +137,9 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) + if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToTableProtoMessages(workflows)...) + } return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) } diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index f386341f32..c04be45a52 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -6,6 +6,7 @@ import ( "io" "log" "os" + "regexp" "strings" "testing" @@ -68,10 +69,12 @@ func TearDownAndVerify(t *testing.T, expectedLog string) { os.Stderr = stderr var buf bytes.Buffer if _, err := io.Copy(&buf, reader); err == nil { - assert.Equal(t, santizeString(expectedLog), santizeString(buf.String())) + assert.Equal(t, sanitizeString(expectedLog), sanitizeString(buf.String())) } } -func santizeString(str string) string { - return strings.Trim(strings.ReplaceAll(strings.ReplaceAll(str, "\n", ""), "\t", ""), " \t") +func sanitizeString(str string) string { + // Not the most comprehensive ANSI pattern, but this should capture common color operations such as \x1b[107;0m and \x1b[0m. Expand if needed (insert regex 2 problems joke here). + ansiRegex := regexp.MustCompile("\u001B\\[[\\d+\\;]*\\d+m") + return ansiRegex.ReplaceAllString(strings.Trim(strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(str, "\n", ""), "\t", ""), "", ""), " \t"), "") } diff --git a/flytectl/go.mod b/flytectl/go.mod index 00186a8e76..438cc0c3b4 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -42,6 +42,7 @@ require ( google.golang.org/protobuf v1.25.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect gotest.tools v2.2.0+incompatible sigs.k8s.io/yaml v1.2.0 ) diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 2afcff5403..75d67208eb 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -6,6 +6,10 @@ import ( "fmt" "net/url" "os" + "sort" + "strings" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/pkg/visualize" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -51,8 +55,10 @@ type Column struct { type Printer struct{} const ( - empty = "" - tab = "\t" + empty = "" + tab = "\t" + DefaultFormattedDescriptionsKey = "_formatted_descriptions" + defaultLineWidth = 25 ) // Projects the columns in one row of data from the given JSON using the []Column map @@ -164,6 +170,61 @@ func printJSONYaml(format OutputFormat, v interface{}) error { return nil } +func FormatVariableDescriptions(variableMap map[string]*core.Variable) { + keys := make([]string, 0, len(variableMap)) + // sort the keys for testing and consistency with other output formats + for k := range variableMap { + keys = append(keys, k) + } + sort.Strings(keys) + + var descriptions []string + for _, k := range keys { + v := variableMap[k] + // a: a isn't very helpful + if k != v.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Description))) + } else { + descriptions = append(descriptions, getTruncatedLine(k)) + } + + } + variableMap[DefaultFormattedDescriptionsKey] = &core.Variable{Description: strings.Join(descriptions, "\n")} +} + +func FormatParameterDescriptions(parameterMap map[string]*core.Parameter) { + keys := make([]string, 0, len(parameterMap)) + // sort the keys for testing and consistency with other output formats + for k := range parameterMap { + keys = append(keys, k) + } + sort.Strings(keys) + + var descriptions []string + for _, k := range keys { + v := parameterMap[k] + if v.Var == nil { + continue + } + // a: a isn't very helpful + if k != v.Var.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Var.Description))) + } else { + descriptions = append(descriptions, getTruncatedLine(k)) + } + } + parameterMap[DefaultFormattedDescriptionsKey] = &core.Parameter{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}} +} + +func getTruncatedLine(line string) string { + // TODO: maybe add width to function signature later + width := defaultLineWidth + if len(line) > width { + return line[:width-3] + "..." + } + return line +} + func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto.Message) error { printableMessages := make([]*PrintableProto, 0, len(messages)) diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index faa11a1978..6d5441b9af 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -253,3 +253,57 @@ func TestPrint(t *testing.T) { assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("no template found in the sub workflow template:<> "), errors.Unwrap(err)) } + +func TestGetTruncatedLine(t *testing.T) { + testStrings := map[string]string{ + "foo": "foo", + "": "", + "short description": "short description", + "1234567890123456789012345": "1234567890123456789012345", + "12345678901234567890123456": "1234567890123456789012...", + "long description probably needs truncate": "long description proba...", + } + for k, v := range testStrings { + assert.Equal(t, v, getTruncatedLine(k)) + } +} + +func TestFormatVariableDescriptions(t *testing.T) { + fooVar := &core.Variable{ + Description: "foo", + } + barVar := &core.Variable{ + Description: "bar", + } + variableMap := map[string]*core.Variable{ + "var1": fooVar, + "var2": barVar, + "foo": fooVar, + "bar": barVar, + } + FormatVariableDescriptions(variableMap) + assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", variableMap[DefaultFormattedDescriptionsKey].Description) +} + +func TestFormatParameterDescriptions(t *testing.T) { + fooParam := &core.Parameter{ + Var: &core.Variable{ + Description: "foo", + }, + } + barParam := &core.Parameter{ + Var: &core.Variable{ + Description: "bar", + }, + } + emptyParam := &core.Parameter{} + paramMap := map[string]*core.Parameter{ + "var1": fooParam, + "var2": barParam, + "foo": fooParam, + "bar": barParam, + "empty": emptyParam, + } + FormatParameterDescriptions(paramMap) + assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", paramMap[DefaultFormattedDescriptionsKey].Var.Description) +} From f2d8560a613475459e0537c29af6ebe3c4fb9223 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Thu, 5 Aug 2021 20:50:41 -0700 Subject: [PATCH 122/356] Reset default filter in the task_test so that the unit tests can be run individually (#155) Signed-off-by: Sean Lin --- flytectl/cmd/get/task_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 744c56b29e..293d506831 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -174,6 +174,7 @@ func getTaskSetup() { taskConfig.DefaultConfig.Latest = false taskConfig.DefaultConfig.ExecFile = "" taskConfig.DefaultConfig.Version = "" + taskConfig.DefaultConfig.Filter = filters.DefaultFilter } func TestGetTaskFuncWithError(t *testing.T) { @@ -238,6 +239,7 @@ func TestGetTaskFuncWithError(t *testing.T) { func TestGetTaskFunc(t *testing.T) { setup() getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) @@ -320,6 +322,7 @@ func TestGetTaskFunc(t *testing.T) { func TestGetTaskTableFunc(t *testing.T) { setup() getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) config.GetConfig().Output = "table" @@ -342,6 +345,7 @@ func TestGetTaskTableFunc(t *testing.T) { func TestGetTaskFuncLatest(t *testing.T) { setup() getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) @@ -389,6 +393,7 @@ func TestGetTaskFuncLatest(t *testing.T) { func TestGetTaskWithVersion(t *testing.T) { setup() getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) @@ -437,6 +442,7 @@ func TestGetTaskWithVersion(t *testing.T) { func TestGetTasks(t *testing.T) { setup() getTaskSetup() + taskConfig.DefaultConfig.Filter = filters.Filters{} mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) From 3e4323a5e896e8c68ee8dc903004f16db436acff Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Fri, 6 Aug 2021 10:43:13 -0700 Subject: [PATCH 123/356] Add additional nil check (#156) Signed-off-by: Sean Lin --- flytectl/cmd/get/launch_plan.go | 12 +++++++----- flytectl/cmd/get/task.go | 16 +++++++++++----- flytectl/cmd/get/workflow.go | 18 +++++++++++++----- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 34bf10cf1a..f146740bd7 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -128,11 +128,13 @@ func LaunchplanToTableProtoMessages(l []*admin.LaunchPlan) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { m := proto.Clone(m).(*admin.LaunchPlan) - if m.Closure.ExpectedInputs != nil { - printer.FormatParameterDescriptions(m.Closure.ExpectedInputs.Parameters) - } - if m.Closure.ExpectedOutputs != nil { - printer.FormatVariableDescriptions(m.Closure.ExpectedOutputs.Variables) + if m.Closure != nil { + if m.Closure.ExpectedInputs != nil { + printer.FormatParameterDescriptions(m.Closure.ExpectedInputs.Parameters) + } + if m.Closure.ExpectedOutputs != nil { + printer.FormatVariableDescriptions(m.Closure.ExpectedOutputs.Variables) + } } messages = append(messages, m) } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 9f9a7b9861..a9f0859d58 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -116,11 +116,17 @@ func TaskToTableProtoMessages(l []*admin.Task) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { m := proto.Clone(m).(*admin.Task) - if m.Closure.CompiledTask.Template.Interface.Inputs != nil { - printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Inputs.Variables) - } - if m.Closure.CompiledTask.Template.Interface.Outputs != nil { - printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Outputs.Variables) + if m.Closure != nil && m.Closure.CompiledTask != nil { + if m.Closure.CompiledTask.Template != nil { + if m.Closure.CompiledTask.Template.Interface != nil { + if m.Closure.CompiledTask.Template.Interface.Inputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Inputs.Variables) + } + if m.Closure.CompiledTask.Template.Interface.Outputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Outputs.Variables) + } + } + } } messages = append(messages, m) } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 704f7a0519..28c4372628 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -104,11 +104,19 @@ func WorkflowToTableProtoMessages(l []*admin.Workflow) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { m := proto.Clone(m).(*admin.Workflow) - if m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil { - printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables) - } - if m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs != nil { - printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs.Variables) + if m.Closure != nil && m.Closure.CompiledWorkflow != nil { + if m.Closure.CompiledWorkflow.Primary != nil { + if m.Closure.CompiledWorkflow.Primary.Template != nil { + if m.Closure.CompiledWorkflow.Primary.Template.Interface != nil { + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables) + } + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs != nil { + printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs.Variables) + } + } + } + } } messages = append(messages, m) } From 2fae848b6044356c7523553912271486dacab192 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Sun, 8 Aug 2021 22:53:14 -0700 Subject: [PATCH 124/356] Remove input output columns for list workflows (#157) Signed-off-by: Sean Lin --- flytectl/cmd/get/launch_plan_test.go | 4 +- flytectl/cmd/get/task_test.go | 2 +- flytectl/cmd/get/workflow.go | 34 +++++---- flytectl/cmd/get/workflow_test.go | 104 +++++++++++++++++++++++++-- 4 files changed, 125 insertions(+), 19 deletions(-) diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 6e3e104390..e6a7cbec01 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,6 +5,8 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/cmd/config" @@ -731,7 +733,7 @@ func TestGetLaunchPlanTableFunc(t *testing.T) { mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) - config.GetConfig().Output = "table" + config.GetConfig().Output = printer.OutputFormatTABLE.String() err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 293d506831..0133c20f46 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -319,7 +319,7 @@ func TestGetTaskFunc(t *testing.T) { ]`) } -func TestGetTaskTableFunc(t *testing.T) { +func TestGetTaskFuncWithTable(t *testing.T) { setup() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 28c4372628..519a6d1e1a 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -92,6 +92,12 @@ var workflowColumns = []printer.Column{ {Header: "Created At", JSONPath: "$.closure.createdAt"}, } +var listWorkflowColumns = []printer.Column{ + {Header: "Version", JSONPath: "$.id.version"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Created At", JSONPath: "$.closure.createdAt"}, +} + func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { @@ -129,14 +135,19 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC var err error if len(args) > 0 { name := args[0] - if workflows, err = FetchWorkflowForName(ctx, cmdCtx.AdminFetcherExt(), name, config.GetConfig().Project, config.GetConfig().Domain); err != nil { + var isList bool + if workflows, isList, err = FetchWorkflowForName(ctx, cmdCtx.AdminFetcherExt(), name, config.GetConfig().Project, config.GetConfig().Domain); err != nil { return err } + columns := workflowColumns + if isList { + columns = listWorkflowColumns + } logger.Debugf(ctx, "Retrieved %v workflow", len(workflows)) if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToTableProtoMessages(workflows)...) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), columns, WorkflowToTableProtoMessages(workflows)...) } - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), columns, WorkflowToProtoMessages(workflows)...) } workflows, err = cmdCtx.AdminFetcherExt().FetchAllVerOfWorkflow(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, workflowconfig.DefaultConfig.Filter) @@ -146,32 +157,31 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToTableProtoMessages(workflows)...) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), listWorkflowColumns, WorkflowToTableProtoMessages(workflows)...) } - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), workflowColumns, WorkflowToProtoMessages(workflows)...) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), listWorkflowColumns, WorkflowToProtoMessages(workflows)...) } // FetchWorkflowForName fetches the workflow give it name. func FetchWorkflowForName(ctx context.Context, fetcher ext.AdminFetcherExtInterface, name, project, - domain string) ([]*admin.Workflow, error) { - var workflows []*admin.Workflow + domain string) (workflows []*admin.Workflow, isList bool, err error) { var workflow *admin.Workflow - var err error if workflowconfig.DefaultConfig.Latest { if workflow, err = fetcher.FetchWorkflowLatestVersion(ctx, name, project, domain, workflowconfig.DefaultConfig.Filter); err != nil { - return nil, err + return nil, false, err } workflows = append(workflows, workflow) } else if workflowconfig.DefaultConfig.Version != "" { if workflow, err = fetcher.FetchWorkflowVersion(ctx, name, workflowconfig.DefaultConfig.Version, project, domain); err != nil { - return nil, err + return nil, false, err } workflows = append(workflows, workflow) } else { workflows, err = fetcher.FetchAllVerOfWorkflow(ctx, name, project, domain, workflowconfig.DefaultConfig.Filter) if err != nil { - return nil, err + return nil, false, err } + isList = true } - return workflows, nil + return workflows, isList, nil } diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index a3e47e8332..46ad846cdd 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,6 +4,12 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flytectl/pkg/printer" + + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -17,6 +23,9 @@ import ( var ( resourceListRequestWorkflow *admin.ResourceListRequest workflowListResponse *admin.WorkflowList + argsWf []string + workflow1 *admin.Workflow + workflows []*admin.Workflow ) func getWorkflowSetup() { @@ -30,11 +39,52 @@ func getWorkflowSetup() { }, } - workflow1 := &admin.Workflow{ + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var1", + }, + "var2": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var2 long descriptions probably needs truncate", + }, + } + workflow1 = &admin.Workflow{ Id: &core.Identifier{ Project: projectValue, Domain: domainValue, Name: "workflow1", + Version: "v1", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Primary: &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, }, } workflow2 := &admin.Workflow{ @@ -42,14 +92,20 @@ func getWorkflowSetup() { Project: projectValue, Domain: domainValue, Name: "workflow2", + Version: "v2", + }, + Closure: &admin.WorkflowClosure{ + CreatedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, }, } - workflows := []*admin.Workflow{workflow1, workflow2} + workflows = []*admin.Workflow{workflow1, workflow2} workflowListResponse = &admin.WorkflowList{ Workflows: workflows, } + argsWf = []string{"workflow1"} workflow.DefaultConfig.Latest = false workflow.DefaultConfig.Version = "" + workflow.DefaultConfig.Filter = filters.DefaultFilter } func TestGetWorkflowFuncWithError(t *testing.T) { @@ -59,7 +115,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { mockFetcher := new(mocks.AdminFetcherExtInterface) workflow.DefaultConfig.Latest = true mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) - _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -70,7 +126,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { workflow.DefaultConfig.Version = "v1" mockFetcher.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) - _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -80,7 +136,7 @@ func TestGetWorkflowFuncWithError(t *testing.T) { mockFetcher := new(mocks.AdminFetcherExtInterface) mockFetcher.OnFetchAllVerOfWorkflowMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) - _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) @@ -96,3 +152,41 @@ func TestGetWorkflowFuncWithError(t *testing.T) { }) } + +func TestGetWorkflowFuncLatestWithTable(t *testing.T) { + setup() + getWorkflowSetup() + workflow.DefaultConfig.Latest = true + workflow.DefaultConfig.Filter = filters.Filters{} + config.GetConfig().Output = printer.OutputFormatTABLE.String() + u.FetcherExt.OnFetchWorkflowLatestVersionMatch(ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflow1, nil) + err = getWorkflowFunc(ctx, argsWf, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ` + --------- ----------- --------------------------- --------- ---------------------- +| VERSION | NAME | INPUTS | OUTPUTS | CREATED AT | + --------- ----------- --------------------------- --------- ---------------------- +| v1 | workflow1 | var1 | | 1970-01-01T00:00:00Z | +| | | var2: var2 long descri... | | | + --------- ----------- --------------------------- --------- ---------------------- +1 rows`) +} + +func TestListWorkflowFuncWithTable(t *testing.T) { + setup() + getWorkflowSetup() + workflow.DefaultConfig.Filter = filters.Filters{} + config.GetConfig().Output = printer.OutputFormatTABLE.String() + u.FetcherExt.OnFetchAllVerOfWorkflowMatch(ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflows, nil) + err = getWorkflowFunc(ctx, argsWf, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, ` + --------- ----------- ---------------------- +| VERSION | NAME | CREATED AT | + --------- ----------- ---------------------- +| v1 | workflow1 | 1970-01-01T00:00:00Z | + --------- ----------- ---------------------- +| v2 | workflow2 | 1970-01-01T00:00:00Z | + --------- ----------- ---------------------- +2 rows`) +} From 89cb3742c63b0046a987b1bfe4b423c945d462cb Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 18 Aug 2021 18:34:59 +0530 Subject: [PATCH 125/356] Add upgrade command with some refactor (#152) * Added k8s check in sandbox * Added upgrade command Signed-off-by: Yuvraj --- flytectl/.github/workflows/sandbox.yaml | 7 +- flytectl/cmd/root.go | 9 +- flytectl/cmd/sandbox/exec.go | 4 +- flytectl/cmd/sandbox/start.go | 182 +++++++++++----- flytectl/cmd/sandbox/start_test.go | 188 ++++++++++++++-- flytectl/cmd/sandbox/teardown_test.go | 5 + flytectl/cmd/upgrade/upgrade.go | 138 ++++++++++++ flytectl/cmd/upgrade/upgrade_test.go | 200 ++++++++++++++++++ flytectl/cmd/version/version.go | 47 ++-- flytectl/cmd/version/version_test.go | 21 +- flytectl/docs/source/nouns.rst | 1 + flytectl/docs/source/verbs.rst | 1 + flytectl/go.mod | 18 +- flytectl/go.sum | 63 +++++- flytectl/pkg/configutil/configutil_test.go | 4 - flytectl/pkg/docker/docker_util.go | 22 +- flytectl/pkg/docker/docker_util_test.go | 19 +- flytectl/pkg/k8s/k8s.go | 33 +++ flytectl/pkg/k8s/k8s_test.go | 65 ++++++ flytectl/pkg/util/githubutil/githubutil.go | 156 ++++++++++++++ .../pkg/util/githubutil/githubutil_test.go | 127 +++++++++++ .../pkg/util/platformutil/platformutil.go | 26 +++ .../util/platformutil/platformutil_test.go | 39 ++++ flytectl/pkg/util/util.go | 67 +++--- flytectl/pkg/util/util_test.go | 64 +++--- 25 files changed, 1284 insertions(+), 222 deletions(-) create mode 100644 flytectl/cmd/upgrade/upgrade.go create mode 100644 flytectl/cmd/upgrade/upgrade_test.go create mode 100644 flytectl/pkg/k8s/k8s.go create mode 100644 flytectl/pkg/k8s/k8s_test.go create mode 100644 flytectl/pkg/util/githubutil/githubutil.go create mode 100644 flytectl/pkg/util/githubutil/githubutil_test.go create mode 100644 flytectl/pkg/util/platformutil/platformutil.go create mode 100644 flytectl/pkg/util/platformutil/platformutil_test.go diff --git a/flytectl/.github/workflows/sandbox.yaml b/flytectl/.github/workflows/sandbox.yaml index 35c10cee19..62ba9f783b 100644 --- a/flytectl/.github/workflows/sandbox.yaml +++ b/flytectl/.github/workflows/sandbox.yaml @@ -20,9 +20,14 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - name: Build Flytectl binary run: make compile + - name: Setup env + run: | + mkdir -p ~/.flyte/k3s && touch ~/.flyte/k3s/k3s.yaml && chmod 666 ~/.flyte/k3s/k3s.yaml - name: Create a sandbox cluster run: bin/flytectl sandbox start + - name: Setup flytectl config + run: bin/flytectl config init - name: Register cookbook - run: bin/flytectl register examples -d development -p flytesnacks || true + run: bin/flytectl register examples -d development -p flytesnacks - name: Teardown Sandbox cluster run: bin/flytectl sandbox teardown diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index ee93bf0885..5da86063ce 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -18,6 +18,7 @@ import ( "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flytectl/cmd/register" "github.com/flyteorg/flytectl/cmd/update" + "github.com/flyteorg/flytectl/cmd/upgrade" "github.com/flyteorg/flytectl/cmd/version" "github.com/flyteorg/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flytestdlib/config" @@ -66,8 +67,12 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(configuration.CreateConfigCommand()) rootCmd.AddCommand(completionCmd) // Added version command - versioncmd := version.GetVersionCommand(rootCmd) - cmdCore.AddCommands(rootCmd, versioncmd) + versionCmd := version.GetVersionCommand(rootCmd) + cmdCore.AddCommands(rootCmd, versionCmd) + + // Added upgrade command + upgradeCmd := upgrade.SelfUpgrade(rootCmd) + cmdCore.AddCommands(rootCmd, upgradeCmd) config.GetConfig() diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index 63a17e8884..bc42048a86 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -25,12 +25,12 @@ func sandboxClusterExec(ctx context.Context, args []string, cmdCtx cmdCore.Comma return err } if len(args) > 0 { - return Execute(ctx, cli, args) + return execute(ctx, cli, args) } return fmt.Errorf("missing argument. Please check usage examples by running flytectl sandbox exec --help") } -func Execute(ctx context.Context, cli docker.Docker, args []string) error { +func execute(ctx context.Context, cli docker.Docker, args []string) error { c := docker.GetSandbox(ctx, cli) if c != nil { exec, err := docker.ExecCommend(ctx, cli, c.ID, args) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 28f142493a..b97c3c1dd2 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -7,22 +7,29 @@ import ( "io" "os" "path/filepath" - "strings" + "time" - "github.com/flyteorg/flytectl/clierrors" - - "github.com/docker/docker/api/types/mount" + "github.com/avast/retry-go" + "github.com/olekukonko/tablewriter" + corev1api "k8s.io/api/core/v1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/util/githubutil" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flytestdlib/logger" - "github.com/flyteorg/flytectl/pkg/docker" + "github.com/docker/docker/api/types/mount" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/k8s" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/enescakir/emoji" sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/flyteorg/flytectl/pkg/util" ) const ( @@ -47,14 +54,16 @@ Run specific version of flyte, Only available after v0.14.0+ Usage ` - GeneratedManifest = "/flyteorg/share/flyte_generated.yaml" - FlyteReleaseURL = "/flyteorg/flyte/releases/download/%v/flyte_sandbox_manifest.yaml" - FlyteMinimumVersionSupported = "v0.14.0" - GithubURL = "https://github.com" + k8sEndpoint = "https://127.0.0.1:30086" + flyteMinimumVersionSupported = "v0.14.0" + generatedManifest = "/flyteorg/share/flyte_generated.yaml" + flyteNamespace = "flyte" + diskPressureTaint = "node.kubernetes.io/disk-pressure" + taintEffect = "NoSchedule" ) var ( - FlyteManifest = f.FilePathJoin(f.UserHomeDir(), ".flyte", "flyte_generated.yaml") + flyteManifest = f.FilePathJoin(f.UserHomeDir(), ".flyte", "flyte_generated.yaml") ) type ExecResult struct { @@ -76,6 +85,24 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if reader != nil { docker.WaitForSandbox(reader, docker.SuccessMessage) } + + var k8sClient k8s.K8s + err = retry.Do( + func() error { + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + return err + }, + retry.Attempts(10), + ) + if err != nil { + return err + } + + if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { + return err + } + + util.PrintSandboxMessage() return nil } @@ -86,7 +113,8 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu if err.Error() != clierrors.ErrSandboxExists { return nil, err } - printExistingSandboxMessage() + fmt.Printf("Existing details of your sandbox:") + util.PrintSandboxMessage() return nil, nil } @@ -110,14 +138,24 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } if len(sandboxConfig.DefaultConfig.Version) > 0 { - if err := downloadFlyteManifest(sandboxConfig.DefaultConfig.Version); err != nil { + isGreater, err := util.IsVersionGreaterThan(sandboxConfig.DefaultConfig.Version, flyteMinimumVersionSupported) + if err != nil { return nil, err } - vol, err := mountVolume(FlyteManifest, GeneratedManifest) - if err != nil { + if !isGreater { + logger.Infof(ctx, "version flag only supported after with flyte %s+ release", flyteMinimumVersionSupported) + return nil, fmt.Errorf("version flag only supported after with flyte %s+ release", flyteMinimumVersionSupported) + } + if err := githubutil.GetFlyteManifest(sandboxConfig.DefaultConfig.Version, flyteManifest); err != nil { return nil, err } - volumes = append(volumes, *vol) + + if vol, err := mountVolume(flyteManifest, generatedManifest); err != nil { + return nil, err + } else if vol != nil { + volumes = append(volumes, *vol) + } + } fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) @@ -133,18 +171,10 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return nil, err } - _, errCh := docker.WatchError(ctx, cli, ID) logReader, err := docker.ReadLogs(ctx, cli, ID) if err != nil { return nil, err } - go func() { - err := <-errCh - if err != nil { - fmt.Printf("err: %v", err) - os.Exit(1) - } - }() return logReader, nil } @@ -164,34 +194,86 @@ func mountVolume(file, destination string) (*mount.Mount, error) { return nil, nil } -func downloadFlyteManifest(version string) error { - isGreater, err := util.IsVersionGreaterThan(version, FlyteMinimumVersionSupported) - if err != nil { - return err +func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { + var data = os.Stdout + table := tablewriter.NewWriter(data) + table.SetHeader([]string{"Service", "Status", "Namespace"}) + table.SetRowLine(true) + + for { + isTaint, err := isNodeTainted(ctx, appsClient) + if err != nil { + return err + } + if isTaint { + return fmt.Errorf("docker sandbox doesn't have sufficient memory available. Please run docker system prune -a --volumes") + } + + pods, err := getFlyteDeployment(ctx, appsClient) + if err != nil { + return err + } + table.ClearRows() + table.SetAutoWrapText(false) + table.SetAutoFormatHeaders(true) + + // Clear os.Stdout + _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") + + var total, ready int + total = len(pods.Items) + ready = 0 + if total != 0 { + for _, v := range pods.Items { + if isPodReady(v) { + ready++ + } + if len(v.Status.Conditions) > 0 { + table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) + } + } + table.Render() + if total == ready { + break + } + } + + time.Sleep(40 * time.Second) } - if !isGreater { - return fmt.Errorf("version flag only support %s+ flyte version", FlyteMinimumVersionSupported) + + return nil +} + +func isPodReady(v corev1api.Pod) bool { + if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { + return true } - response, err := util.GetRequest(GithubURL, fmt.Sprintf(FlyteReleaseURL, version)) + return false +} + +func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { + pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) if err != nil { - return err - } - if err := util.WriteIntoFile(response, FlyteManifest); err != nil { - return err + return nil, err } - return nil + return pods, nil } -func printExistingSandboxMessage() { - kubeconfig := strings.Join([]string{ - "$KUBECONFIG", - f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), - docker.Kubeconfig, - }, ":") - - fmt.Printf("Existing details of your sandbox:") - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, docker.SuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) - fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") - fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) - fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) +func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { + nodes, err := client.Nodes().List(ctx, v1.ListOptions{}) + if err != nil { + return false, err + } + match := 0 + for _, node := range nodes.Items { + for _, c := range node.Spec.Taints { + if c.Key == diskPressureTaint && c.Effect == taintEffect { + match++ + } + } + } + if match > 0 { + return true, nil + } + return false, nil } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 73a7eee0a7..f2b43ff8da 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -10,22 +10,76 @@ import ( "strings" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + "github.com/flyteorg/flytectl/pkg/k8s" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + testclient "k8s.io/client-go/kubernetes/fake" ) +var content = ` +apiVersion: v1 +clusters: +- cluster: + server: https://localhost:8080 + extensions: + - name: client.authentication.k8s.io/exec + extension: + audience: foo + other: bar + name: foo-cluster +contexts: +- context: + cluster: foo-cluster + user: foo-user + namespace: bar + name: foo-context +current-context: foo-context +kind: Config +users: +- name: foo-user + user: + exec: + apiVersion: client.authentication.k8s.io/v1alpha1 + args: + - arg-1 + - arg-2 + command: foo-command + provideClusterInfo: true +` + +var fakeNode = &corev1.Node{ + Spec: corev1.NodeSpec{ + Taints: []corev1.Taint{}, + }, +} + +var fakePod = corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + Conditions: []corev1.PodCondition{}, + }, +} + func TestStartSandboxFunc(t *testing.T) { p1, p2, _ := docker.GetSandboxPorts() + assert.Nil(t, util.SetupFlyteDir()) + assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) + assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) + + fakePod.SetName("flyte") + fakePod.SetName("flyte") t.Run("Successfully run sandbox cluster", func(t *testing.T) { ctx := context.Background() @@ -181,8 +235,8 @@ func TestStartSandboxFunc(t *testing.T) { volumes := docker.Volumes volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, - Source: FlyteManifest, - Target: GeneratedManifest, + Source: flyteManifest, + Target: generatedManifest, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -214,13 +268,13 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.13.0" + sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" volumes := docker.Volumes volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, - Source: FlyteManifest, - Target: GeneratedManifest, + Source: flyteManifest, + Target: generatedManifest, }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -252,6 +306,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := docker.Volumes volumes = append(volumes, mount.Mount{ @@ -361,10 +416,6 @@ func TestStartSandboxFunc(t *testing.T) { _, err := startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) - t.Run("Failed manifest", func(t *testing.T) { - err := downloadFlyteManifest("v100.9.9") - assert.NotNil(t, err) - }) t.Run("Error in reading logs", func(t *testing.T) { ctx := context.Background() errCh := make(chan error) @@ -445,6 +496,17 @@ func TestStartSandboxFunc(t *testing.T) { cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) mockDocker := &mocks.Docker{} errCh := make(chan error) + client := testclient.NewSimpleClientset() + k8s.Client = client + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -472,7 +534,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" - err := startSandboxCluster(ctx, []string{}, cmdCtx) + err = startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) t.Run("Error in running sandbox cluster command", func(t *testing.T) { @@ -512,3 +574,103 @@ func TestStartSandboxFunc(t *testing.T) { assert.NotNil(t, err) }) } + +func TestMonitorFlyteDeployment(t *testing.T) { + t.Run("Monitor k8s deployment fail because of storage", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = append(fakeNode.Spec.Taints, corev1.Taint{ + Effect: "NoSchedule", + Key: "node.kubernetes.io/disk-pressure", + }) + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = watchFlyteDeployment(ctx, client.CoreV1()) + assert.NotNil(t, err) + + }) + + t.Run("Monitor k8s deployment success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = []corev1.Taint{} + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = watchFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + + }) + +} + +func TestGetFlyteDeploymentCount(t *testing.T) { + + ctx := context.Background() + client := testclient.NewSimpleClientset() + c, err := getFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, 0, len(c.Items)) +} + +func TestGetNodeTaintStatus(t *testing.T) { + t.Run("Check node taint with success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, false, c) + }) + t.Run("Check node taint with fail", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + node, err := client.CoreV1().Nodes().Get(ctx, "master", v1.GetOptions{}) + if err != nil { + t.Error(err) + } + node.Spec.Taints = append(node.Spec.Taints, corev1.Taint{ + Effect: taintEffect, + Key: diskPressureTaint, + }) + _, err = client.CoreV1().Nodes().Update(ctx, node, v1.UpdateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, true, c) + }) +} diff --git a/flytectl/cmd/sandbox/teardown_test.go b/flytectl/cmd/sandbox/teardown_test.go index 01511d926e..224c905ae1 100644 --- a/flytectl/cmd/sandbox/teardown_test.go +++ b/flytectl/cmd/sandbox/teardown_test.go @@ -6,6 +6,9 @@ import ( "io" "testing" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/util" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/docker/docker/api/types" @@ -47,6 +50,8 @@ func TestTearDownFunc(t *testing.T) { } func TestTearDownClusterFunc(t *testing.T) { + _ = util.SetupFlyteDir() + _ = util.WriteIntoFile([]byte("data"), configutil.FlytectlConfig) mockOutStream := new(io.Writer) ctx := context.Background() cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go new file mode 100644 index 0000000000..84f79a915f --- /dev/null +++ b/flytectl/cmd/upgrade/upgrade.go @@ -0,0 +1,138 @@ +package upgrade + +import ( + "context" + "errors" + "fmt" + "os" + "runtime" + "strings" + + "github.com/flyteorg/flytectl/pkg/util" + stdlibversion "github.com/flyteorg/flytestdlib/version" + + "github.com/flyteorg/flytectl/pkg/util/githubutil" + + "github.com/flyteorg/flytestdlib/logger" + "github.com/mouuff/go-rocket-update/pkg/updater" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/spf13/cobra" +) + +type Goos string + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + upgradeCmdShort = `Used for upgrade/rollback flyte version` + upgradeCmdLong = ` +Upgrade flytectl +:: + + bin/flytectl upgrade + +Rollback flytectl binary +:: + + bin/flytectl upgrade rollback + +Note: Upgrade is not available on windows +` + rollBackSubCommand = "rollback" +) + +var ( + goos = platformutil.Platform(runtime.GOOS) +) + +// SelfUpgrade will return self upgrade command +func SelfUpgrade(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { + getResourcesFuncs := map[string]cmdCore.CommandEntry{ + "upgrade": {CmdFunc: selfUpgrade, Aliases: []string{"upgrade"}, ProjectDomainNotRequired: true, + Short: upgradeCmdShort, + Long: upgradeCmdLong}, + } + return getResourcesFuncs +} + +func selfUpgrade(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + // Check if it's a rollback + if len(args) == 1 { + if args[0] == rollBackSubCommand && !isRollBackSupported(goos) { + return nil + } + ext, err := githubutil.FlytectlReleaseConfig.GetExecutable() + if err != nil { + return err + } + backupBinary := fmt.Sprintf("%s.old", ext) + if _, err := os.Stat(backupBinary); err != nil { + return errors.New("flytectl backup doesn't exist. Rollback is not possible") + } + return githubutil.FlytectlReleaseConfig.Rollback() + } + + if isSupported, err := isUpgradeSupported(goos); err != nil { + return err + } else if !isSupported { + return nil + } + + if message, err := upgrade(githubutil.FlytectlReleaseConfig); err != nil { + return err + } else if len(message) > 0 { + logger.Info(ctx, message) + } + return nil +} + +func upgrade(u *updater.Updater) (string, error) { + updateStatus, err := u.Update() + if err != nil { + return "", err + } + + if updateStatus == updater.Updated { + latestVersion, err := u.GetLatestVersion() + if err != nil { + return "", err + } + return fmt.Sprintf("Successfully updated to version %s", latestVersion), nil + } + return "", u.Rollback() +} + +func isUpgradeSupported(goos platformutil.Platform) (bool, error) { + latest, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() + if err != nil { + return false, err + } + + if isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version); err != nil { + return false, err + } else if !isGreater { + fmt.Println("You have already latest version of flytectl") + return false, nil + } + + message, err := githubutil.GetUpgradeMessage(latest, goos) + if err != nil { + return false, err + } + if goos.String() == platformutil.Windows.String() || strings.Contains(message, "brew") { + if len(message) > 0 { + fmt.Println(message) + } + return false, nil + } + return true, nil +} + +func isRollBackSupported(goos platformutil.Platform) bool { + if goos.String() == platformutil.Windows.String() { + fmt.Printf("Flytectl rollback is not available on %s \n", goos.String()) + return false + } + return true +} diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go new file mode 100644 index 0000000000..e1996fb24d --- /dev/null +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -0,0 +1,200 @@ +package upgrade + +import ( + "io" + "sort" + "testing" + + "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flytectl/pkg/util/githubutil" + + "github.com/flyteorg/flytectl/pkg/util/platformutil" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + stdlibversion "github.com/flyteorg/flytestdlib/version" + + "context" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" +) + +var ( + version = "v0.2.20" + tempExt = "flyte.ext" +) + +func TestUpgradeCommand(t *testing.T) { + rootCmd := &cobra.Command{ + Long: "flytectl is CLI tool written in go to interact with flyteadmin service", + Short: "flyetcl CLI tool", + Use: "flytectl", + DisableAutoGenTag: true, + } + upgradeCmd := SelfUpgrade(rootCmd) + cmdCore.AddCommands(rootCmd, upgradeCmd) + assert.Equal(t, len(rootCmd.Commands()), 1) + cmdNouns := rootCmd.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + + assert.Equal(t, cmdNouns[0].Use, "upgrade") + assert.Equal(t, cmdNouns[0].Short, upgradeCmdShort) + assert.Equal(t, cmdNouns[0].Long, upgradeCmdLong) +} + +// +func TestUpgrade(t *testing.T) { + _ = util.WriteIntoFile([]byte("data"), tempExt) + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + t.Run("Successful upgrade", func(t *testing.T) { + message, err := upgrade(githubutil.FlytectlReleaseConfig) + assert.Nil(t, err) + assert.Equal(t, 39, len(message)) + }) +} + +func TestCheckGoosForRollback(t *testing.T) { + stdlibversion.Version = version + linux := platformutil.Linux + windows := platformutil.Windows + darwin := platformutil.Darwin + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + t.Run("checkGOOSForRollback on linux", func(t *testing.T) { + assert.Equal(t, true, isRollBackSupported(linux)) + assert.Equal(t, false, isRollBackSupported(windows)) + assert.Equal(t, true, isRollBackSupported(darwin)) + }) +} + +func TestIsUpgradeable(t *testing.T) { + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + linux := platformutil.Linux + windows := platformutil.Windows + darwin := platformutil.Darwin + t.Run("IsUpgradeable on linux", func(t *testing.T) { + check, err := isUpgradeSupported(linux) + assert.Nil(t, err) + assert.Equal(t, true, check) + }) + t.Run("IsUpgradeable on darwin", func(t *testing.T) { + check, err := isUpgradeSupported(darwin) + assert.Nil(t, err) + assert.Equal(t, true, check) + }) + t.Run("IsUpgradeable on darwin using brew", func(t *testing.T) { + check, err := isUpgradeSupported(darwin) + assert.Nil(t, err) + assert.Equal(t, true, check) + }) + t.Run("isUpgradeSupported failed", func(t *testing.T) { + stdlibversion.Version = "v" + check, err := isUpgradeSupported(linux) + assert.NotNil(t, err) + assert.Equal(t, false, check) + stdlibversion.Version = version + }) + t.Run("isUpgradeSupported windows", func(t *testing.T) { + check, err := isUpgradeSupported(windows) + assert.Nil(t, err) + assert.Equal(t, false, check) + }) +} + +func TestSelfUpgrade(t *testing.T) { + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + goos = platformutil.Linux + t.Run("Successful upgrade", func(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = version + + assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + }) +} + +func TestSelfUpgradeError(t *testing.T) { + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + goos = platformutil.Linux + t.Run("Successful upgrade", func(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = "v" + + assert.NotNil(t, selfUpgrade(ctx, args, cmdCtx)) + }) + +} + +func TestSelfUpgradeRollback(t *testing.T) { + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + goos = platformutil.Linux + t.Run("Successful rollback", func(t *testing.T) { + ctx := context.Background() + var args = []string{rollBackSubCommand} + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = version + assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + }) + + t.Run("Successful rollback failed", func(t *testing.T) { + ctx := context.Background() + var args = []string{rollBackSubCommand} + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = "v100.0.0" + assert.NotNil(t, selfUpgrade(ctx, args, cmdCtx)) + }) + + t.Run("Successful rollback for windows", func(t *testing.T) { + ctx := context.Background() + var args = []string{rollBackSubCommand} + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = version + goos = platformutil.Windows + assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + }) + + t.Run("Successful rollback for windows", func(t *testing.T) { + ctx := context.Background() + var args = []string{rollBackSubCommand} + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = version + githubutil.FlytectlReleaseConfig.OverrideExecutable = "/" + assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + }) + +} diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index a48c9c6f90..14a6d0bc4c 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -4,9 +4,13 @@ import ( "context" "encoding/json" "fmt" + "runtime" + + "github.com/flyteorg/flytectl/pkg/util/githubutil" + + "github.com/flyteorg/flytectl/pkg/util/platformutil" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" stdlibversion "github.com/flyteorg/flytestdlib/version" @@ -22,15 +26,10 @@ Example version. bin/flytectl version ` - flytectlAppName = "flytectl" - controlPlanAppName = "controlPlane" - GithubAPIURL = "https://api.github.com" - latestVersionMessage = "Installed flytectl version is the latest" - upgradeVersionMessage = "A newer version of flytectl is available [%v] Please upgrade using - https://docs.flyte.org/projects/flytectl/en/latest/index.html" + flytectlAppName = "flytectl" + controlPlanAppName = "controlPlane" ) -var flytectlReleasePath = "/repos/flyteorg/flytectl/releases/latest" - type versionOutput struct { // Specifies the Name of app App string `json:"App,omitempty"` @@ -53,22 +52,20 @@ func GetVersionCommand(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { } func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - latest, err := getLatestVersion(flytectlReleasePath) - if err != nil { - logger.Errorf(ctx, "Get latest version of flyte got failed", err) - } - - isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version) + goos := platformutil.Platform(runtime.GOOS) + version, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() if err != nil { - logger.Errorf(ctx, "Error while comparing the flytectl version", err) + logger.Error(ctx, "Not able to get latest version because %v", err) + } else { + message, err := githubutil.GetUpgradeMessage(version, goos) + if err != nil { + logger.Error(ctx, "Not able to detect new version because %v", err) + } + if len(message) > 0 { + fmt.Println(message) + } } - message := latestVersionMessage - if isGreater { - message = fmt.Sprintf(upgradeVersionMessage, latest) - } - - fmt.Println(message) // Print Flytectl if err := printVersion(versionOutput{ Build: stdlibversion.Build, @@ -111,11 +108,3 @@ func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) } return nil } - -func getLatestVersion(path string) (string, error) { - response, err := util.GetRequest(GithubAPIURL, path) - if err != nil { - return "", err - } - return util.ParseGithubTag(response) -} diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 08681819b0..cd9065258f 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -66,6 +66,21 @@ func TestVersionCommandFunc(t *testing.T) { mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) } +func TestVersionCommandFuncError(t *testing.T) { + ctx := context.Background() + var args []string + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + stdlibversion.Build = "" + stdlibversion.BuildTime = "" + stdlibversion.Version = "v" + mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) + err := getVersion(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) +} + func TestVersionCommandFuncErr(t *testing.T) { ctx := context.Background() var args []string @@ -85,11 +100,6 @@ func TestVersionUtilFunc(t *testing.T) { stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = testVersion - t.Run("Get latest release with wrong url", func(t *testing.T) { - tag, err := getLatestVersion("h://api.github.com/repos/flyteorg/flytectreleases/latest") - assert.NotNil(t, err) - assert.Equal(t, len(tag), 0) - }) t.Run("Error in getting control plan version", func(t *testing.T) { ctx := context.Background() mockClient := new(mocks.AdminServiceClient) @@ -103,7 +113,6 @@ func TestVersionUtilFunc(t *testing.T) { ctx := context.Background() mockClient := new(mocks.AdminServiceClient) mockOutStream := new(io.Writer) - flytectlReleasePath = "/release" cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) mockClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) err := getVersion(ctx, []string{}, cmdCtx) diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 12d6444a10..0afad1c0c0 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -45,3 +45,4 @@ Flytectl noun specify the resource on which the action needs to be performed eg: gen/flytectl_sandbox_status gen/flytectl_sandbox_teardown gen/flytectl_sandbox_exec + gen/flytectl_upgrade diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index e9185691cf..eab243c410 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -15,3 +15,4 @@ Flytectl verbs specify the actions to be performed on the resources like create/ gen/flytectl_config gen/flytectl_sandbox gen/flytectl_version + gen/flytectl_upgrade diff --git a/flytectl/go.mod b/flytectl/go.mod index 438cc0c3b4..d9bdf0a8ef 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -4,6 +4,7 @@ go 1.13 require ( github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/containerd/containerd v1.5.2 // indirect github.com/disiqueira/gotree v1.0.0 @@ -14,35 +15,42 @@ require ( github.com/flyteorg/flytestdlib v0.3.30 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 - github.com/google/go-cmp v0.5.6 // indirect github.com/google/go-github v17.0.0+incompatible + github.com/google/go-github/v37 v37.0.0 github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 github.com/gorilla/mux v1.8.0 // indirect github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 - github.com/kr/text v0.2.0 // indirect github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/manifoldco/promptui v0.8.0 - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.13 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/mapstructure v1.4.1 github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/mouuff/go-rocket-update v1.5.1 + github.com/olekukonko/tablewriter v0.0.5 github.com/opencontainers/image-spec v1.0.1 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 + github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 + golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.25.0 - gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect gotest.tools v2.2.0+incompatible + k8s.io/api v0.21.3 + k8s.io/apimachinery v0.21.3 + k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 15ee968a20..4633260946 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -122,6 +122,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= +github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -337,6 +339,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y 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/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= @@ -448,9 +451,13 @@ github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-github/v37 v37.0.0 h1:rCspN8/6kB1BAJWZfuafvHhyfIo5fkAulaP/3bOQ/tM= +github.com/google/go-github/v37 v37.0.0/go.mod h1:LM7in3NmXDrX58GbEHy7FtNLbI2JijX93RnMKvWG3m4= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -478,6 +485,7 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -540,6 +548,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -557,6 +566,7 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= @@ -567,6 +577,8 @@ github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWcU6aoHJlHWPe4qFjVKzkMGRal78f5jRRU= github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -612,11 +624,13 @@ github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= @@ -644,12 +658,16 @@ github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/f github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mouuff/go-rocket-update v1.5.1 h1:qGgUu/MP+aVQ63laEguRNimmNTPKs29xz0lZW6QRFaQ= +github.com/mouuff/go-rocket-update v1.5.1/go.mod h1:CnOyUYCxAJyC1g1mebSGC7gJysLTlX+RpxKgD1B0zLs= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -669,11 +687,14 @@ github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -681,12 +702,14 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -788,6 +811,8 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -940,8 +965,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= @@ -1024,6 +1051,7 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1122,10 +1150,16 @@ golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/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-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 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= @@ -1139,8 +1173,9 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/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-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1339,6 +1374,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= @@ -1349,6 +1385,7 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -1382,20 +1419,24 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ= +k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6 h1:R5p3SlhaABYShQSO6LpPsYHjV05Q+79eBUR0Ut/f4tk= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= +k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6 h1:nJZOfolnsVtDtbGJNCxzOtKUAu7zvXjB8+pMo9UNxZo= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/client-go v0.21.3 h1:J9nxZTOmvkInRDCzcSNQmPJbDYN/PjlxXT9Mos3HcLg= +k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= @@ -1406,10 +1447,14 @@ k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1418,6 +1463,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyz sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index f65c8706e7..6908f06144 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -5,8 +5,6 @@ import ( "os" "testing" - "github.com/flyteorg/flytectl/pkg/util" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/stretchr/testify/assert" ) @@ -41,8 +39,6 @@ func TestSetupFlytectlConfig(t *testing.T) { if os.IsNotExist(err) { _ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755) } - err = util.SetupFlyteDir() - assert.Nil(t, err) err = SetupConfig("version.yaml", AdminConfigTemplate, templateValue) assert.Nil(t, err) _, err = os.Stat("version.yaml") diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 7e317d4878..3e1d55e46c 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -11,8 +11,6 @@ import ( "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/configutil" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" @@ -25,7 +23,7 @@ import ( var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") - SuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" + SuccessMessage = "Deploying Flyte..." ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} @@ -122,11 +120,6 @@ func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, expo return resp.ID, nil } -// WatchError will return channel for watching errors of a container -func WatchError(ctx context.Context, cli Docker, id string) (<-chan container.ContainerWaitOKBody, <-chan error) { - return cli.ContainerWait(ctx, id, container.WaitConditionNotRunning) -} - // ReadLogs will return io scanner for reading the logs of a container func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error) { reader, err := cli.ContainerLogs(ctx, id, types.ContainerLogsOptions{ @@ -145,19 +138,6 @@ func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error func WaitForSandbox(reader *bufio.Scanner, message string) bool { for reader.Scan() { if strings.Contains(reader.Text(), message) { - kubeconfig := strings.Join([]string{ - "$KUBECONFIG", - f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), - Kubeconfig, - }, ":") - - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, message, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) - fmt.Printf("Please visit https://github.com/flyteorg/flytesnacks for more example %v \n", emoji.Rocket) - fmt.Printf("Register all flytesnacks example by running 'flytectl register examples -d development -p flytesnacks' \n") - - fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") - fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) - fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) return true } fmt.Println(reader.Text()) diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 25e67bad43..5aa2b34896 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -8,9 +8,10 @@ import ( "strings" "testing" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/docker/docker/api/types/container" "github.com/flyteorg/flytectl/pkg/docker/mocks" - "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/mock" "github.com/docker/docker/api/types" @@ -28,7 +29,10 @@ var ( func setupSandbox() { mockAdminClient := u.MockClient cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) - _ = util.SetupFlyteDir() + err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), os.ModePerm) + if err != nil { + fmt.Println(err) + } container1 := types.Container{ ID: "FlyteSandboxClusterName", Names: []string{ @@ -198,17 +202,6 @@ func TestStartContainer(t *testing.T) { }) } -func TestWatchError(t *testing.T) { - setupSandbox() - mockDocker := &mocks.Docker{} - context := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker.OnContainerWaitMatch(context, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := WatchError(context, mockDocker, "test") - assert.NotNil(t, err) -} - func TestReadLogs(t *testing.T) { setupSandbox() diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go new file mode 100644 index 0000000000..f17082dbe0 --- /dev/null +++ b/flytectl/pkg/k8s/k8s.go @@ -0,0 +1,33 @@ +package k8s + +import ( + "os" + + "github.com/pkg/errors" + "k8s.io/client-go/kubernetes" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/clientcmd" +) + +type K8s interface { + CoreV1() corev1.CoreV1Interface +} + +var Client K8s + +// GetK8sClient return the k8s client from sandbox kubeconfig +func GetK8sClient(cfg, master string) (K8s, error) { + kubeConfigPath := os.ExpandEnv(cfg) + kubecfg, err := clientcmd.BuildConfigFromFlags(master, kubeConfigPath) + if err != nil { + return nil, errors.Wrapf(err, "Error building kubeconfig") + } + if Client == nil { + kubeClient, err := kubernetes.NewForConfig(kubecfg) + if err != nil { + return nil, errors.Wrapf(err, "Error building kubernetes clientset") + } + return kubeClient, nil + } + return Client, nil +} diff --git a/flytectl/pkg/k8s/k8s_test.go b/flytectl/pkg/k8s/k8s_test.go new file mode 100644 index 0000000000..0cf3db31bb --- /dev/null +++ b/flytectl/pkg/k8s/k8s_test.go @@ -0,0 +1,65 @@ +package k8s + +import ( + "io/ioutil" + "os" + "testing" + + "github.com/stretchr/testify/assert" + testclient "k8s.io/client-go/kubernetes/fake" +) + +func TestGetK8sClient(t *testing.T) { + content := ` +apiVersion: v1 +clusters: +- cluster: + server: https://localhost:8080 + extensions: + - name: client.authentication.k8s.io/exec + extension: + audience: foo + other: bar + name: foo-cluster +contexts: +- context: + cluster: foo-cluster + user: foo-user + namespace: bar + name: foo-context +current-context: foo-context +kind: Config +users: +- name: foo-user + user: + exec: + apiVersion: client.authentication.k8s.io/v1alpha1 + args: + - arg-1 + - arg-2 + command: foo-command + provideClusterInfo: true +` + tmpfile, err := ioutil.TempFile("", "kubeconfig") + if err != nil { + t.Error(err) + } + defer os.Remove(tmpfile.Name()) + if err := ioutil.WriteFile(tmpfile.Name(), []byte(content), os.ModePerm); err != nil { + t.Error(err) + } + t.Run("Create client from config", func(t *testing.T) { + client := testclient.NewSimpleClientset() + Client = client + c, err := GetK8sClient(tmpfile.Name(), "https://localhost:8080") + assert.Nil(t, err) + assert.NotNil(t, c) + }) + t.Run("Create client from config", func(t *testing.T) { + Client = nil + client, err := GetK8sClient(tmpfile.Name(), "https://localhost:8080") + assert.Nil(t, err) + assert.NotNil(t, client) + }) + +} diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/util/githubutil/githubutil.go new file mode 100644 index 0000000000..c3ed9b8b52 --- /dev/null +++ b/flytectl/pkg/util/githubutil/githubutil.go @@ -0,0 +1,156 @@ +package githubutil + +import ( + "context" + "path/filepath" + "runtime" + "strings" + + "github.com/flyteorg/flytectl/pkg/util/platformutil" + stdlibversion "github.com/flyteorg/flytestdlib/version" + "github.com/mouuff/go-rocket-update/pkg/provider" + "github.com/mouuff/go-rocket-update/pkg/updater" + + "github.com/flyteorg/flytectl/pkg/util" + + "fmt" + "io/ioutil" + + "github.com/google/go-github/v37/github" +) + +const ( + owner = "flyteorg" + flyte = "flyte" + sandboxManifest = "flyte_sandbox_manifest.yaml" + flytectl = "flytectl" + flytectlRepository = "github.com/flyteorg/flytectl" + commonMessage = "\n A new release of flytectl is available: %s → %s \n" + brewMessage = "To upgrade, run: brew update && brew upgrade flytectl \n" + linuxMessage = "To upgrade, run: flytectl upgrade \n" + darwinMessage = "To upgrade, run: flytectl upgrade \n" + releaseURL = "https://github.com/flyteorg/flytectl/releases/tag/%s \n" + brewInstallDirectory = "/Cellar/flytectl" +) + +// FlytectlReleaseConfig represent the updater config for flytectl binary +var FlytectlReleaseConfig = &updater.Updater{ + Provider: &provider.Github{ + RepositoryURL: flytectlRepository, + ArchiveName: getFlytectlAssetName(), + }, + ExecutableName: flytectl, + Version: stdlibversion.Version, +} + +var ( + arch = platformutil.Arch(runtime.GOARCH) +) + +// GetLatestVersion returns the latest version of provided repository +func GetLatestVersion(repository string) (*github.RepositoryRelease, error) { + client := github.NewClient(nil) + release, _, err := client.Repositories.GetLatestRelease(context.Background(), owner, repository) + if err != nil { + return nil, err + } + return release, err +} + +func getFlytectlAssetName() string { + if arch == platformutil.ArchAmd64 { + arch = platformutil.ArchX86 + } else if arch == platformutil.ArchX86 { + arch = platformutil.Archi386 + } + return fmt.Sprintf("flytectl_%s_%s.tar.gz", strings.Title(runtime.GOOS), arch.String()) +} + +// CheckVersionExist returns the provided version release if version exist in repository +func CheckVersionExist(version, repository string) (*github.RepositoryRelease, error) { + client := github.NewClient(nil) + release, _, err := client.Repositories.GetReleaseByTag(context.Background(), owner, repository, version) + if err != nil { + return nil, err + } + return release, err +} + +// GetAssetsFromRelease returns the asset from github release +func GetAssetsFromRelease(version, assets, repository string) (*github.ReleaseAsset, error) { + release, err := CheckVersionExist(version, repository) + if err != nil { + return nil, err + } + for _, v := range release.Assets { + if v.GetName() == assets { + return v, nil + } + } + return nil, fmt.Errorf("assest is not found in %s[%s] release", repository, version) +} + +// GetFlyteManifest will write the flyte manifest in a file +func GetFlyteManifest(version string, target string) error { + asset, err := GetAssetsFromRelease(version, sandboxManifest, flyte) + if err != nil { + return err + } + response, err := util.SendRequest("GET", asset.GetBrowserDownloadURL(), nil) + if err != nil { + return err + } + defer response.Body.Close() + data, err := ioutil.ReadAll(response.Body) + if err != nil { + return err + } + if err := util.WriteIntoFile(data, target); err != nil { + return err + } + return nil + +} + +// GetUpgradeMessage return the upgrade message +func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error) { + isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version) + if err != nil { + return "", err + } + message := fmt.Sprintf(commonMessage, stdlibversion.Version, latest) + if isGreater { + symlink, err := CheckBrewInstall(goos) + if err != nil { + return "", err + } + if len(symlink) > 0 { + message += brewMessage + } else if goos == platformutil.Darwin { + message += darwinMessage + } else if goos == platformutil.Linux { + message += linuxMessage + } + message += fmt.Sprintf(releaseURL, latest) + } + + return message, nil +} + +// CheckBrewInstall returns the path of symlink if flytectl is installed from brew +func CheckBrewInstall(goos platformutil.Platform) (string, error) { + if goos.String() == platformutil.Darwin.String() { + executable, err := FlytectlReleaseConfig.GetExecutable() + if err != nil { + return executable, err + } + if symlink, err := filepath.EvalSymlinks(executable); err != nil { + return symlink, err + } else if len(symlink) > 0 { + if strings.Contains(symlink, brewInstallDirectory) { + return symlink, nil + } + } + } + return "", nil +} diff --git a/flytectl/pkg/util/githubutil/githubutil_test.go b/flytectl/pkg/util/githubutil/githubutil_test.go new file mode 100644 index 0000000000..05566121b9 --- /dev/null +++ b/flytectl/pkg/util/githubutil/githubutil_test.go @@ -0,0 +1,127 @@ +package githubutil + +import ( + "fmt" + "runtime" + "strings" + "testing" + + stdlibversion "github.com/flyteorg/flytestdlib/version" + + "github.com/flyteorg/flytectl/pkg/util/platformutil" + + "github.com/stretchr/testify/assert" +) + +func TestGetLatestVersion(t *testing.T) { + t.Run("Get latest release with wrong url", func(t *testing.T) { + _, err := GetLatestVersion("fl") + assert.NotNil(t, err) + }) + t.Run("Get latest release", func(t *testing.T) { + _, err := GetLatestVersion("flytectl") + assert.Nil(t, err) + }) +} + +func TestGetLatestRelease(t *testing.T) { + release, err := GetLatestVersion("flyte") + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) +} + +func TestCheckVersionExist(t *testing.T) { + t.Run("Invalid Tag", func(t *testing.T) { + _, err := CheckVersionExist("v100.0.0", "flyte") + assert.NotNil(t, err) + }) + t.Run("Valid Tag", func(t *testing.T) { + release, err := CheckVersionExist("v0.15.0", "flyte") + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) + }) +} + +func TestGetAssetsFromRelease(t *testing.T) { + t.Run("Successful get assets", func(t *testing.T) { + assets, err := GetAssetsFromRelease("v0.15.0", sandboxManifest, flyte) + assert.Nil(t, err) + assert.NotNil(t, assets) + assert.Equal(t, sandboxManifest, *assets.Name) + }) + + t.Run("Failed get assets with wrong name", func(t *testing.T) { + assets, err := GetAssetsFromRelease("v0.15.0", "test", flyte) + assert.NotNil(t, err) + assert.Nil(t, assets) + }) + t.Run("Successful get assets with wrong version", func(t *testing.T) { + assets, err := GetAssetsFromRelease("v100.15.0", "test", flyte) + assert.NotNil(t, err) + assert.Nil(t, assets) + }) +} + +func TestGetFlyteManifest(t *testing.T) { + t.Run("Successful get manifest", func(t *testing.T) { + err := GetFlyteManifest("v0.15.0", "test.yaml") + assert.Nil(t, err) + }) + t.Run("Failed get manifest with wrong name", func(t *testing.T) { + err := GetFlyteManifest("v100.15.0", "test.yaml") + assert.NotNil(t, err) + }) + t.Run("Failed get manifest with wrong name", func(t *testing.T) { + err := GetFlyteManifest("v0.12.0", "test.yaml") + assert.NotNil(t, err) + }) +} + +func TestGetAssetsName(t *testing.T) { + t.Run("Get Assets name", func(t *testing.T) { + expected := fmt.Sprintf("flytectl_%s_386.tar.gz", strings.Title(runtime.GOOS)) + arch = platformutil.Arch386 + assert.Equal(t, expected, getFlytectlAssetName()) + }) +} + +func TestCheckBrewInstall(t *testing.T) { + symlink, err := CheckBrewInstall(platformutil.Darwin) + assert.Nil(t, err) + assert.Equal(t, len(symlink), 0) + symlink, err = CheckBrewInstall(platformutil.Linux) + assert.Nil(t, err) + assert.Equal(t, 0, len(symlink)) +} + +func TestGetUpgradeMessage(t *testing.T) { + var darwin = platformutil.Darwin + var linux = platformutil.Linux + var windows = platformutil.Linux + + var version = "v0.2.20" + stdlibversion.Version = "v0.2.10" + message, err := GetUpgradeMessage(version, darwin) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) + + version = "v0.2.09" + message, err = GetUpgradeMessage(version, darwin) + assert.Nil(t, err) + assert.Equal(t, 63, len(message)) + + version = "v" + message, err = GetUpgradeMessage(version, darwin) + assert.NotNil(t, err) + assert.Equal(t, 0, len(message)) + + version = "v0.2.20" + message, err = GetUpgradeMessage(version, windows) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) + + version = "v0.2.20" + message, err = GetUpgradeMessage(version, linux) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) +} diff --git a/flytectl/pkg/util/platformutil/platformutil.go b/flytectl/pkg/util/platformutil/platformutil.go new file mode 100644 index 0000000000..064a6d8e14 --- /dev/null +++ b/flytectl/pkg/util/platformutil/platformutil.go @@ -0,0 +1,26 @@ +package platformutil + +type Arch string + +const ( + ArchAmd64 Arch = "amd64" + ArchX86 Arch = "x86_64" + Arch386 Arch = "386" + Archi386 Arch = "i386" +) + +func (a Arch) String() string { + return string(a) +} + +type Platform string + +const ( + Windows Platform = "windows" + Linux Platform = "linux" + Darwin Platform = "darwin" +) + +func (p Platform) String() string { + return string(p) +} diff --git a/flytectl/pkg/util/platformutil/platformutil_test.go b/flytectl/pkg/util/platformutil/platformutil_test.go new file mode 100644 index 0000000000..8c7ee7f81d --- /dev/null +++ b/flytectl/pkg/util/platformutil/platformutil_test.go @@ -0,0 +1,39 @@ +package platformutil + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestArch(t *testing.T) { + var amd64 = ArchAmd64 + assert.NotNil(t, amd64) + assert.Equal(t, "amd64", amd64.String()) + + var arch386 = Arch386 + assert.NotNil(t, arch386) + assert.Equal(t, "386", arch386.String()) + + var i386 = Archi386 + assert.NotNil(t, i386) + assert.Equal(t, "i386", i386.String()) + + var x8664 = ArchX86 + assert.NotNil(t, x8664) + assert.Equal(t, "x86_64", x8664.String()) +} + +func TestGoosEnum(t *testing.T) { + var linux = Linux + assert.NotNil(t, linux) + assert.Equal(t, "linux", linux.String()) + + var windows = Windows + assert.NotNil(t, windows) + assert.Equal(t, "windows", windows.String()) + + var darwin = Darwin + assert.NotNil(t, darwin) + assert.Equal(t, "darwin", darwin.String()) +} diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index fe972ed2d8..99a2408458 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -1,49 +1,27 @@ package util import ( - "encoding/json" "fmt" + "io" "io/ioutil" "net/http" "os" + "strings" + "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/docker" f "github.com/flyteorg/flytectl/pkg/filesystemutils" hversion "github.com/hashicorp/go-version" ) const ( - HTTPRequestErrorMessage = "something went wrong. Received status code [%v] while sending a request to [%s]" + progressSuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" ) -type githubversion struct { - TagName string `json:"tag_name"` -} - -func GetRequest(baseURL, url string) ([]byte, error) { - response, err := http.Get(fmt.Sprintf("%s%s", baseURL, url)) - if err != nil { - return []byte(""), err - } - defer response.Body.Close() - if response.StatusCode == 200 { - data, err := ioutil.ReadAll(response.Body) - if err != nil { - return []byte(""), err - } - return data, nil - } - return []byte(""), fmt.Errorf(HTTPRequestErrorMessage, response.StatusCode, fmt.Sprintf("%s%s", baseURL, url)) -} - -func ParseGithubTag(data []byte) (string, error) { - var result = githubversion{} - err := json.Unmarshal(data, &result) - if err != nil { - return "", err - } - return result.TagName, nil -} +var Ext string +// WriteIntoFile will write content in a file func WriteIntoFile(data []byte, file string) error { err := ioutil.WriteFile(file, data, os.ModePerm) if err != nil { @@ -60,6 +38,7 @@ func SetupFlyteDir() error { return nil } +// IsVersionGreaterThan check version if it's greater then other func IsVersionGreaterThan(version1, version2 string) (bool, error) { semanticVersion1, err := hversion.NewVersion(version1) if err != nil { @@ -71,3 +50,31 @@ func IsVersionGreaterThan(version1, version2 string) (bool, error) { } return semanticVersion2.LessThanOrEqual(semanticVersion1), nil } + +// PrintSandboxMessage will print sandbox success message +func PrintSandboxMessage() { + kubeconfig := strings.Join([]string{ + "$KUBECONFIG", + f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), + docker.Kubeconfig, + }, ":") + + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, progressSuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") + fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) + fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) +} + +// SendRequest will create request and return the response +func SendRequest(method, url string, option io.Reader) (*http.Response, error) { + client := &http.Client{} + req, _ := http.NewRequest(method, url, option) + response, err := client.Do(req) + if err != nil { + return nil, err + } + if response.StatusCode != 200 { + return nil, fmt.Errorf("someting goes wrong while sending request to %s. Got status code %v", url, response.StatusCode) + } + return response, nil +} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 43bb8166c1..bbb84b3e33 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -6,52 +6,16 @@ import ( "github.com/stretchr/testify/assert" ) -const flytectlReleaseURL = "/repos/flyteorg/flytectl/releases/latest" -const baseURL = "https://api.github.com" -const wrongBaseURL = "htts://api.github.com" const testVersion = "v0.1.20" -func TestGetRequest(t *testing.T) { - t.Run("Get request with 200", func(t *testing.T) { - _, err := GetRequest(baseURL, flytectlReleaseURL) - assert.Nil(t, err) - }) - t.Run("Get request with 200", func(t *testing.T) { - _, err := GetRequest(wrongBaseURL, flytectlReleaseURL) - assert.NotNil(t, err) - }) - t.Run("Get request with 400", func(t *testing.T) { - _, err := GetRequest("https://github.com", "/flyteorg/flyte/releases/download/latest/flyte_eks_manifest.yaml") - assert.NotNil(t, err) - }) -} - -func TestParseGithubTag(t *testing.T) { - t.Run("Parse Github tag with success", func(t *testing.T) { - data, err := GetRequest(baseURL, flytectlReleaseURL) - assert.Nil(t, err) - tag, err := ParseGithubTag(data) - assert.Nil(t, err) - assert.Contains(t, tag, "v") - }) - t.Run("Get request with 200", func(t *testing.T) { - _, err := ParseGithubTag([]byte("string")) - assert.NotNil(t, err) - }) -} - func TestWriteIntoFile(t *testing.T) { t.Run("Successfully write into a file", func(t *testing.T) { - data, err := GetRequest(baseURL, flytectlReleaseURL) - assert.Nil(t, err) - err = WriteIntoFile(data, "version.yaml") + err := WriteIntoFile([]byte(""), "version.yaml") assert.Nil(t, err) }) t.Run("Error in writing file", func(t *testing.T) { - data, err := GetRequest(baseURL, flytectlReleaseURL) + err := WriteIntoFile([]byte(""), "version.yaml") assert.Nil(t, err) - err = WriteIntoFile(data, "/githubtest/version.yaml") - assert.NotNil(t, err) }) } @@ -87,3 +51,27 @@ func TestIsVersionGreaterThan(t *testing.T) { assert.NotNil(t, err) }) } + +func TestPrintSandboxMessage(t *testing.T) { + t.Run("Print Sandbox Message", func(t *testing.T) { + PrintSandboxMessage() + }) +} + +func TestSendRequest(t *testing.T) { + t.Run("Successful get request", func(t *testing.T) { + response, err := SendRequest("GET", "https://github.com", nil) + assert.Nil(t, err) + assert.NotNil(t, response) + }) + t.Run("Successful get request failed", func(t *testing.T) { + response, err := SendRequest("GET", "htp://github.com", nil) + assert.NotNil(t, err) + assert.Nil(t, response) + }) + t.Run("Successful get request failed", func(t *testing.T) { + response, err := SendRequest("GET", "https://github.com/evalsocket/flyte/archive/refs/tags/source-code.zip", nil) + assert.NotNil(t, err) + assert.Nil(t, response) + }) +} From c98c23c20abfa6f33b374a8e9868de8f076bd98a Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 18 Aug 2021 06:17:50 -0700 Subject: [PATCH 126/356] Update Flyteidl version (#160) --- flytectl/go.mod | 6 +++--- flytectl/go.sum | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index d9bdf0a8ef..337544ee91 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,8 +11,8 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.19.14 - github.com/flyteorg/flytestdlib v0.3.30 + github.com/flyteorg/flyteidl v0.19.24 + github.com/flyteorg/flytestdlib v0.3.33 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible @@ -47,7 +47,7 @@ require ( google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.25.0 gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gotest.tools v2.2.0+incompatible k8s.io/api v0.21.3 k8s.io/apimachinery v0.21.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index 4633260946..85a4f86cb4 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,11 +345,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.19.14 h1:OLg2eT9uYllcfMMjEZJoXQ+2WXcrNbUxD+yaCrz2AlI= -github.com/flyteorg/flyteidl v0.19.14/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.19.24 h1:aiBKTFNKZpIvOfcI051I33LnhQl54N3dhkaubucOg+E= +github.com/flyteorg/flyteidl v0.19.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.30 h1:cBsphk2PGyhSM6BFJBR1whO9DZ907NjUeWQLsBrm0/g= -github.com/flyteorg/flytestdlib v0.3.30/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= +github.com/flyteorg/flytestdlib v0.3.33 h1:+oCx3zXUIldL7CWmNMD7PMFPXvGqaPgYkSKn9wB6qvY= +github.com/flyteorg/flytestdlib v0.3.33/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From 5e453441eff4d07ce4a879064de3937592b9d8e1 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 18 Aug 2021 06:56:59 -0700 Subject: [PATCH 127/356] Update documentation (#159) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl.rst | 5 +- .../docs/source/gen/flytectl_completion.rst | 4 +- flytectl/docs/source/gen/flytectl_config.rst | 4 +- .../source/gen/flytectl_config_discover.rst | 4 +- .../docs/source/gen/flytectl_config_init.rst | 4 +- .../source/gen/flytectl_config_validate.rst | 4 +- flytectl/docs/source/gen/flytectl_create.rst | 4 +- .../source/gen/flytectl_create_execution.rst | 4 +- .../source/gen/flytectl_create_project.rst | 4 +- flytectl/docs/source/gen/flytectl_delete.rst | 4 +- ...ectl_delete_cluster-resource-attribute.rst | 4 +- ...lytectl_delete_execution-cluster-label.rst | 4 +- ...tectl_delete_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_delete_execution.rst | 4 +- .../gen/flytectl_delete_plugin-override.rst | 4 +- ...lytectl_delete_task-resource-attribute.rst | 4 +- ...tectl_delete_workflow-execution-config.rst | 4 +- flytectl/docs/source/gen/flytectl_get.rst | 4 +- ...lytectl_get_cluster-resource-attribute.rst | 4 +- .../flytectl_get_execution-cluster-label.rst | 4 +- ...flytectl_get_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_get_execution.rst | 4 +- .../source/gen/flytectl_get_launchplan.rst | 4 +- .../gen/flytectl_get_plugin-override.rst | 4 +- .../docs/source/gen/flytectl_get_project.rst | 4 +- .../flytectl_get_task-resource-attribute.rst | 4 +- .../docs/source/gen/flytectl_get_task.rst | 4 +- ...flytectl_get_workflow-execution-config.rst | 4 +- .../docs/source/gen/flytectl_get_workflow.rst | 4 +- .../docs/source/gen/flytectl_register.rst | 4 +- .../source/gen/flytectl_register_examples.rst | 4 +- .../source/gen/flytectl_register_files.rst | 4 +- flytectl/docs/source/gen/flytectl_sandbox.rst | 4 +- .../docs/source/gen/flytectl_sandbox_exec.rst | 4 +- .../source/gen/flytectl_sandbox_start.rst | 4 +- .../source/gen/flytectl_sandbox_status.rst | 4 +- .../source/gen/flytectl_sandbox_teardown.rst | 4 +- flytectl/docs/source/gen/flytectl_update.rst | 4 +- ...ectl_update_cluster-resource-attribute.rst | 4 +- ...lytectl_update_execution-cluster-label.rst | 4 +- ...tectl_update_execution-queue-attribute.rst | 4 +- .../source/gen/flytectl_update_launchplan.rst | 4 +- .../gen/flytectl_update_plugin-override.rst | 4 +- .../source/gen/flytectl_update_project.rst | 4 +- ...lytectl_update_task-resource-attribute.rst | 4 +- .../docs/source/gen/flytectl_update_task.rst | 4 +- ...tectl_update_workflow-execution-config.rst | 4 +- .../source/gen/flytectl_update_workflow.rst | 4 +- flytectl/docs/source/gen/flytectl_upgrade.rst | 85 +++++++++++++++++++ flytectl/docs/source/gen/flytectl_version.rst | 4 +- 50 files changed, 233 insertions(+), 49 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_upgrade.rst diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 2c4a65ba70..d56aa0fca5 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -48,10 +48,12 @@ Options --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO @@ -65,5 +67,6 @@ SEE ALSO * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. * :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`flytectl_upgrade` - Used for upgrade/rollback flyte version * :doc:`flytectl_version` - Used for fetching flyte version diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 4b0ba9dc4b..24271d7b12 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -96,10 +96,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 27a5a6badf..e835ee9fe9 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -56,10 +56,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 2071952bd5..8550321470 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -60,10 +60,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index c499bf06f5..30b4eb404f 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -81,10 +81,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 5e6adb51fa..51a3a7e443 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -62,10 +62,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index ff986fee7d..de2f4a89d4 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -59,10 +59,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 200f96547e..022e22dff5 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -185,10 +185,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 83101f6b0d..f5b287a2fa 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -83,10 +83,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index c09e621e10..0af8199dca 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -59,10 +59,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 5b96780560..770ea699ca 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -95,10 +95,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 54d6d04946..918da73e88 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -93,10 +93,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index bfd7e5fb11..7c1e2eb8f6 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -97,10 +97,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 8205564f83..6f5f2d8e5f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -102,10 +102,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index d57acd3d43..c04b0e1fe3 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -98,10 +98,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 279090fa8b..f0ff59cfbc 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -98,10 +98,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 3af2b6770e..ffb2333bd1 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -93,10 +93,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 255ee9d809..6ccba90bd7 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -59,10 +59,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 5bdcbe32b0..2be6c9c3a9 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -104,10 +104,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index e2900c17bf..513359e3ce 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -102,10 +102,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 96ee6eec3e..28c96777db 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -106,10 +106,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 73c266b461..555febfb23 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -126,10 +126,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index ff7687f82a..4c73065fe5 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -144,10 +144,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index ab39c075aa..c30c99e2db 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -126,10 +126,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 57258c080e..ffebba44d6 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -97,10 +97,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index ab0bb8e92d..2385235773 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -108,10 +108,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index e4226e47ee..38db5a9318 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -140,10 +140,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 8a024786f2..1554f40e6a 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -113,10 +113,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index b3e7ba4aa9..031274ae61 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -128,10 +128,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 39f0212527..e21ebd27c5 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -59,10 +59,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index d6c510092d..a9b5943d56 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -73,10 +73,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 5ee4cea1aa..83447baa09 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -137,10 +137,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 5e54287f2c..3b77cb201e 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -78,10 +78,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index bc187d689f..2f8b53cc81 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -66,10 +66,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index b1901042ef..ed340e35d3 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -79,10 +79,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 368cbf01a8..017b0e0b0f 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -67,10 +67,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 4961977271..b48d24452f 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -66,10 +66,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 1c1d80ebe5..3336ec4509 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -61,10 +61,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index c85c4ce194..b3a5886a32 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -100,10 +100,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 48d57e94c4..043be798c5 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -93,10 +93,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index c848d08f85..66539e7561 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -104,10 +104,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index a4be4bd225..ae54382190 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -78,10 +78,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 16f2085ddd..1ee6a87f8d 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -106,10 +106,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 22c5c29677..dccc3a9efc 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -92,10 +92,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 36561dd33e..bd02a91ad5 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -106,10 +106,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index a0b6534663..ee60852b58 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -78,10 +78,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index b83fd90320..ed6856f395 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -96,10 +96,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 3b9b698fe1..204e00b614 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -78,10 +78,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst new file mode 100644 index 0000000000..e102c6b901 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -0,0 +1,85 @@ +.. _flytectl_upgrade: + +flytectl upgrade +---------------- + +Used for upgrade/rollback flyte version + +Synopsis +~~~~~~~~ + + + +Upgrade flytectl +:: + + bin/flytectl upgrade + +Rollback flytectl binary +:: + + bin/flytectl upgrade rollback + +Note: Upgrade is not available on windows + + +:: + + flytectl upgrade [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for upgrade + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool + diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 216543e267..43a1516515 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -63,10 +63,12 @@ Options inherited from parent commands --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO From 3a48b4a546af8ced7ad9b5dca442525e5d7b421b Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 19 Aug 2021 15:24:45 +0530 Subject: [PATCH 128/356] Bug fix in sandbix start (#161) * Added version compare check and bug fix in sandbox start Signed-off-by: Yuvraj --- flytectl/.github/config.yml | 1 + flytectl/.github/workflows/sandbox.yaml | 3 --- flytectl/boilerplate/flyte/welcome_bot/config.yml | 1 + flytectl/cmd/sandbox/start.go | 4 ++-- flytectl/cmd/upgrade/upgrade.go | 2 ++ flytectl/pkg/util/util.go | 8 ++++++-- flytectl/pkg/util/util_test.go | 5 +++++ 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/flytectl/.github/config.yml b/flytectl/.github/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/flytectl/.github/config.yml +++ b/flytectl/.github/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). diff --git a/flytectl/.github/workflows/sandbox.yaml b/flytectl/.github/workflows/sandbox.yaml index 62ba9f783b..cb72047995 100644 --- a/flytectl/.github/workflows/sandbox.yaml +++ b/flytectl/.github/workflows/sandbox.yaml @@ -20,9 +20,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - name: Build Flytectl binary run: make compile - - name: Setup env - run: | - mkdir -p ~/.flyte/k3s && touch ~/.flyte/k3s/k3s.yaml && chmod 666 ~/.flyte/k3s/k3s.yaml - name: Create a sandbox cluster run: bin/flytectl sandbox start - name: Setup flytectl config diff --git a/flytectl/boilerplate/flyte/welcome_bot/config.yml b/flytectl/boilerplate/flyte/welcome_bot/config.yml index f99bcd78f1..7afe6111f5 100644 --- a/flytectl/boilerplate/flyte/welcome_bot/config.yml +++ b/flytectl/boilerplate/flyte/welcome_bot/config.yml @@ -3,6 +3,7 @@ newPRWelcomeComment: > Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: + - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index b97c3c1dd2..c5559988fe 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -47,7 +47,7 @@ Mount your source code repository inside sandbox bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte, Only available after v0.14.0+ +Run specific version of flyte, Only available after v0.13.0+ :: bin/flytectl sandbox start --version=v0.14.0 @@ -55,7 +55,7 @@ Run specific version of flyte, Only available after v0.14.0+ Usage ` k8sEndpoint = "https://127.0.0.1:30086" - flyteMinimumVersionSupported = "v0.14.0" + flyteMinimumVersionSupported = "v0.13.0" generatedManifest = "/flyteorg/share/flyte_generated.yaml" flyteNamespace = "flyte" diskPressureTaint = "node.kubernetes.io/disk-pressure" diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 84f79a915f..54686a1f76 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -32,6 +32,8 @@ Upgrade flytectl bin/flytectl upgrade +Note: Please use upgrade with sudo, Without sudo it will cause permission issue + Rollback flytectl binary :: diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 99a2408458..416ad58c7f 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -32,7 +32,11 @@ func WriteIntoFile(data []byte, file string) error { // SetupFlyteDir will create .flyte dir if not exist func SetupFlyteDir() error { - if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), os.ModePerm); err != nil { + if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm); err != nil { + return err + } + // Created a empty file with right permission + if err := ioutil.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { return err } return nil @@ -48,7 +52,7 @@ func IsVersionGreaterThan(version1, version2 string) (bool, error) { if err != nil { return false, err } - return semanticVersion2.LessThanOrEqual(semanticVersion1), nil + return semanticVersion1.GreaterThan(semanticVersion2), nil } // PrintSandboxMessage will print sandbox success message diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index bbb84b3e33..c123683e86 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -33,6 +33,11 @@ func TestIsVersionGreaterThan(t *testing.T) { assert.Nil(t, err) assert.Equal(t, true, ok) }) + t.Run("Compare flytectl version greater then for equal value", func(t *testing.T) { + ok, err := IsVersionGreaterThan(testVersion, testVersion) + assert.Nil(t, err) + assert.Equal(t, false, ok) + }) t.Run("Compare flytectl version smaller then", func(t *testing.T) { ok, err := IsVersionGreaterThan("v0.1.19", testVersion) assert.Nil(t, err) From ce15cf05671039adf69789bc4b0548705ad0ec4c Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Fri, 20 Aug 2021 22:14:20 -0500 Subject: [PATCH 129/356] add --dryRun flag to flytectl subcommands (#163) --- .../attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../clusterresourceattribute/delete_config.go | 1 + .../clusterresourceattribute/update_config.go | 1 + .../subcommand/execution/delete_config.go | 10 ++ .../execution/execdeleteconfig_flags.go | 55 +++++++++ .../execution/execdeleteconfig_flags_test.go | 116 ++++++++++++++++++ .../attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../executionclusterlabel/delete_config.go | 1 + .../executionclusterlabel/update_config.go | 1 + .../attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../executionqueueattribute/delete_config.go | 1 + .../executionqueueattribute/update_config.go | 1 + .../plugin_override/attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../plugin_override/attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../plugin_override/delete_config.go | 1 + .../plugin_override/update_config.go | 1 + .../subcommand/register/files_config.go | 1 + .../subcommand/register/filesconfig_flags.go | 3 +- .../register/filesconfig_flags_test.go | 14 +++ .../attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../taskresourceattribute/delete_config.go | 1 + .../taskresourceattribute/update_config.go | 1 + .../attrdeleteconfig_flags.go | 1 + .../attrdeleteconfig_flags_test.go | 14 +++ .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 +++ .../workflowexecutionconfig/delete_config.go | 1 + .../workflowexecutionconfig/update_config.go | 1 + flytectl/cmd/create/execution.go | 14 ++- flytectl/cmd/create/execution_util.go | 10 ++ flytectl/cmd/create/executionconfig_flags.go | 3 +- .../cmd/create/executionconfig_flags_test.go | 14 +++ flytectl/cmd/create/project.go | 28 +++-- flytectl/cmd/create/projectconfig_flags.go | 1 + .../cmd/create/projectconfig_flags_test.go | 14 +++ flytectl/cmd/delete/delete.go | 3 +- flytectl/cmd/delete/execution.go | 25 ++-- .../cmd/delete/matchable_attribute_util.go | 22 ++-- .../matchable_cluster_resource_attribute.go | 2 +- .../matchable_execution_cluster_label.go | 2 +- .../matchable_execution_queue_attribute.go | 2 +- .../cmd/delete/matchable_plugin_override.go | 2 +- .../matchable_task_resource_attribute.go | 2 +- .../matchable_workflow_execution_config.go | 2 +- flytectl/cmd/register/register_util.go | 75 ++++++----- .../cmd/update/matchable_attribute_util.go | 22 ++-- .../matchable_cluster_resource_attribute.go | 2 +- .../matchable_execution_cluster_label.go | 2 +- .../matchable_execution_queue_attribute.go | 2 +- .../cmd/update/matchable_plugin_override.go | 2 +- .../matchable_task_resource_attribute.go | 2 +- .../matchable_workflow_execution_config.go | 2 +- flytectl/cmd/update/named_entity.go | 35 ++++-- .../cmd/update/namedentityconfig_flags.go | 1 + .../update/namedentityconfig_flags_test.go | 14 +++ flytectl/cmd/update/project.go | 20 +-- flytectl/cmd/update/projectconfig_flags.go | 1 + .../cmd/update/projectconfig_flags_test.go | 14 +++ 72 files changed, 627 insertions(+), 104 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/execution/delete_config.go create mode 100755 flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags_test.go diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go index 447d2e0471..80c5873993 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go index 63cb34732b..fcf1f72f0c 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go index 7b19fc93f4..4f05b3a8a8 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go index 9856912248..29c9328801 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go index 1112003923..e3dab991bf 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/delete_config.go @@ -5,6 +5,7 @@ package clusterresourceattribute // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go index fcbbe04d2a..3727fbdb2a 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go @@ -5,6 +5,7 @@ package clusterresourceattribute // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/execution/delete_config.go b/flytectl/cmd/config/subcommand/execution/delete_config.go new file mode 100644 index 0000000000..f5581f2bdf --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/delete_config.go @@ -0,0 +1,10 @@ +package execution + +//go:generate pflags ExecDeleteConfig --default-var DefaultExecDeleteConfig --bind-default-var + +var DefaultExecDeleteConfig = &ExecDeleteConfig{} + +// ExecutionDeleteConfig stores the flags required by delete execution +type ExecDeleteConfig struct { + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` +} diff --git a/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags.go new file mode 100755 index 0000000000..b882734811 --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ExecDeleteConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ExecDeleteConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (ExecDeleteConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ExecDeleteConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ExecDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ExecDeleteConfig", pflag.ExitOnError) + cmdFlags.BoolVar(&DefaultExecDeleteConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultExecDeleteConfig.DryRun, "execute command without making any modifications.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags_test.go new file mode 100755 index 0000000000..c4d58d13f8 --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/execdeleteconfig_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsExecDeleteConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementExecDeleteConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsExecDeleteConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookExecDeleteConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementExecDeleteConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_ExecDeleteConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookExecDeleteConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_ExecDeleteConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_ExecDeleteConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ExecDeleteConfig(val, result)) +} + +func testDecodeRaw_ExecDeleteConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ExecDeleteConfig(vStringSlice, result)) +} + +func TestExecDeleteConfig_GetPFlagSet(t *testing.T) { + val := ExecDeleteConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestExecDeleteConfig_SetFlags(t *testing.T) { + actual := ExecDeleteConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_ExecDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go index bbaa014f79..593582469a 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go index 2c669643d9..573e5937b3 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go index bb592423db..8b1beee0bf 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go index fa011c6c1b..4712ba314e 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go index cbd1a09018..b0388ed0d5 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/delete_config.go @@ -5,6 +5,7 @@ package executionclusterlabel // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go index ba3e9d3d88..62d853a7cc 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go @@ -5,6 +5,7 @@ package executionclusterlabel // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go index d3ab937c61..a174e908c0 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go index 46875fd457..a2ca3c8004 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go index ffd725ff3e..cff8301fb7 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go index fafee300fb..ff19cfa42f 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go index 48dedc581b..c66a5d72e8 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/delete_config.go @@ -5,6 +5,7 @@ package executionqueueattribute // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go index 8dd3e595a4..7826602ab6 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go @@ -5,6 +5,7 @@ package executionqueueattribute // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go index 7003e5e1dd..f2bdb90859 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go index 0129073516..006cfa064b 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go index 1edf682879..8642031b92 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go index c23184f43b..84628be5e7 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/plugin_override/delete_config.go b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go index de00f5cf7f..5ae0f08b9d 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/delete_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/delete_config.go @@ -5,6 +5,7 @@ package pluginoverride // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/plugin_override/update_config.go b/flytectl/cmd/config/subcommand/plugin_override/update_config.go index aa0d9af0b2..8e99970d4b 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/update_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/update_config.go @@ -5,6 +5,7 @@ package pluginoverride // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index b43232e6c1..c489dd38ed 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -18,4 +18,5 @@ type FilesConfig struct { K8ServiceAccount string `json:"k8ServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` SourceUploadPath string `json:"sourceUploadPath" pflag:", Location for source code in storage."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index 9ddea3a547..cd19e456cc 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -12,7 +12,7 @@ import ( "github.com/spf13/pflag" ) -// If v` is a pointer, it will get its element value or the zero value of the element type. +// If v is a pointer, it will get its element value or the zero value of the element type. // If v is not a pointer, it will return it as is. func (FilesConfig) elemValueOrNil(v interface{}) interface{} { if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { @@ -57,5 +57,6 @@ func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") + cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 9b2340ca5d..951cfbaecc 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -197,4 +197,18 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go index d1128e5e9e..2989a37b03 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go index f41f531f3f..d4211ad7cf 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go index e57de741e7..1a0e3e3a86 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go index 06f17f631c..2a141e049b 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go index 6d88a180a7..6938c2032b 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/delete_config.go @@ -5,6 +5,7 @@ package taskresourceattribute // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go index 2dd2451e9c..084c65d6d4 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go @@ -5,6 +5,7 @@ package taskresourceattribute // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go index a7a7395cce..566789244a 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags.go @@ -51,5 +51,6 @@ func (AttrDeleteConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrDeleteConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrDeleteConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultDelConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultDelConfig.AttrFile, "attribute file name to be used for delete attribute for the resource type.") + cmdFlags.BoolVar(&DefaultDelConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultDelConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go index 5aa3b6ec94..8a6b1b94f4 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrdeleteconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrDeleteConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrDeleteConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go index d13942d393..571daa90d5 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go @@ -51,5 +51,6 @@ func (AttrUpdateConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go index f9d64c9101..5707cccbc8 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go index 3604c0971e..2ee094ab9e 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/delete_config.go @@ -5,6 +5,7 @@ package workflowexecutionconfig // AttrDeleteConfig Matchable resource attributes configuration passed from command line type AttrDeleteConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for delete attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultDelConfig = &AttrDeleteConfig{} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go index 591d354ae4..7fd6a1de64 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go @@ -5,6 +5,7 @@ package workflowexecutionconfig // AttrUpdateConfig Matchable resource attributes configuration passed from command line type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 5722808888..1c78c6c8d8 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -7,6 +7,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" ) const ( @@ -146,6 +147,7 @@ type ExecutionConfig struct { IamRoleARN string `json:"iamRoleARN" pflag:",iam role ARN AuthRole for launching execution."` Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."` Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` // Non plfag section is read from the execution config generated by get task/launchplan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` @@ -196,10 +198,14 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C default: return fmt.Errorf("invalid execution type %v", execParams.execType) } - exec, _err := cmdCtx.AdminClient().CreateExecution(ctx, executionRequest) - if _err != nil { - return _err + if executionConfig.DryRun { + logger.Debugf(ctx, "skipping CreateExecution request (DryRun)") + } else { + exec, _err := cmdCtx.AdminClient().CreateExecution(ctx, executionRequest) + if _err != nil { + return _err + } + fmt.Printf("execution identifier %v\n", exec.Id) } - fmt.Printf("execution identifier %v\n", exec.Id) return nil } diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 639a50c295..0f90c7ccfe 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -10,6 +10,7 @@ import ( cmdGet "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" "github.com/google/uuid" "sigs.k8s.io/yaml" ) @@ -93,6 +94,10 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project func relaunchExecution(ctx context.Context, executionName string, project string, domain string, cmdCtx cmdCore.CommandContext) error { + if executionConfig.DryRun { + logger.Debugf(ctx, "skipping RelaunchExecution request (DryRun)") + return nil + } relaunchedExec, err := cmdCtx.AdminClient().RelaunchExecution(ctx, &admin.ExecutionRelaunchRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: executionName, @@ -109,6 +114,10 @@ func relaunchExecution(ctx context.Context, executionName string, project string func recoverExecution(ctx context.Context, executionName string, project string, domain string, cmdCtx cmdCore.CommandContext) error { + if executionConfig.DryRun { + logger.Debugf(ctx, "skipping RecoverExecution request (DryRun)") + return nil + } recoveredExec, err := cmdCtx.AdminClient().RecoverExecution(ctx, &admin.ExecutionRecoverRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: executionName, @@ -157,6 +166,7 @@ func readExecConfigFromFile(fileName string) (*ExecutionConfig, error) { } func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain string) { + toBeOverridden.DryRun = executionConfig.DryRun if executionConfig.KubeServiceAcct != "" { toBeOverridden.KubeServiceAcct = executionConfig.KubeServiceAcct } diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index a8d6f541c2..fbfb378627 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -56,6 +56,7 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&executionConfig.KubeServiceAcct, fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.IamRoleARN, fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") - cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Relaunch, "execution id to be recreated from the last known failure point.") + cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Recover, "execution id to be recreated from the last known failure point.") + cmdFlags.BoolVar(&executionConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), executionConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index 681816f22c..4ad41018ad 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -197,4 +197,18 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index e7550c6b5f..06c039c529 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -9,6 +9,7 @@ import ( "gopkg.in/yaml.v2" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytestdlib/logger" ) const ( @@ -45,6 +46,7 @@ type ProjectConfig struct { File string `json:"file" pflag:",file for the project definition."` Description string `json:"description" pflag:",description for the project specified as argument."` Labels map[string]string `json:"labels" pflag:",labels for the project specified as argument."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } var ( @@ -77,18 +79,22 @@ func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.Co if project.Name == "" { return fmt.Errorf("project name is required flag") } - _, err := cmdCtx.AdminClient().RegisterProject(ctx, &admin.ProjectRegisterRequest{ - Project: &admin.Project{ - Id: project.ID, - Name: project.Name, - Description: project.Description, - Labels: &admin.Labels{ - Values: project.Labels, + if projectConfig.DryRun { + logger.Debugf(ctx, "skipping RegisterProject request (DryRun)") + } else { + _, err := cmdCtx.AdminClient().RegisterProject(ctx, &admin.ProjectRegisterRequest{ + Project: &admin.Project{ + Id: project.ID, + Name: project.Name, + Description: project.Description, + Labels: &admin.Labels{ + Values: project.Labels, + }, }, - }, - }) - if err != nil { - return err + }) + if err != nil { + return err + } } fmt.Println("project Created successfully") return nil diff --git a/flytectl/cmd/create/projectconfig_flags.go b/flytectl/cmd/create/projectconfig_flags.go index 55a3eb8eed..b9e0c0607c 100755 --- a/flytectl/cmd/create/projectconfig_flags.go +++ b/flytectl/cmd/create/projectconfig_flags.go @@ -55,5 +55,6 @@ func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&projectConfig.File, fmt.Sprintf("%v%v", prefix, "file"), projectConfig.File, "file for the project definition.") cmdFlags.StringVar(&projectConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), projectConfig.Description, "description for the project specified as argument.") cmdFlags.StringToStringVar(&projectConfig.Labels, fmt.Sprintf("%v%v", prefix, "labels"), projectConfig.Labels, "labels for the project specified as argument.") + cmdFlags.BoolVar(&projectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), projectConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/create/projectconfig_flags_test.go b/flytectl/cmd/create/projectconfig_flags_test.go index 8d90bc5cd7..e05f201be8 100755 --- a/flytectl/cmd/create/projectconfig_flags_test.go +++ b/flytectl/cmd/create/projectconfig_flags_test.go @@ -169,4 +169,18 @@ func TestProjectConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 00685feccd..9a489abb65 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -2,6 +2,7 @@ package delete import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" @@ -32,7 +33,7 @@ func RemoteDeleteCommand() *cobra.Command { } terminateResourcesFuncs := map[string]cmdcore.CommandEntry{ "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, - Long: execCmdLong}, + Long: execCmdLong, PFlagProvider: execution.DefaultExecDeleteConfig}, "task-resource-attribute": {CmdFunc: deleteTaskResourceAttributes, Aliases: []string{"task-resource-attributes"}, Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, PFlagProvider: taskresourceattribute.DefaultDelConfig, ProjectDomainNotRequired: true}, diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index d92871d45b..4b41181852 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -4,6 +4,7 @@ import ( "context" "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -64,16 +65,20 @@ func terminateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.C for i := 0; i < len(args); i++ { name := args[i] logger.Infof(ctx, "Terminating execution of %v execution ", name) - _, err := cmdCtx.AdminClient().TerminateExecution(ctx, &admin.ExecutionTerminateRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: name, - }, - }) - if err != nil { - logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) - return err + if execution.DefaultExecDeleteConfig.DryRun { + logger.Infof(ctx, "skipping TerminateExecution request (dryRun)") + } else { + _, err := cmdCtx.AdminClient().TerminateExecution(ctx, &admin.ExecutionTerminateRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: name, + }, + }) + if err != nil { + logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) + return err + } } logger.Infof(ctx, "Terminated execution of %v execution ", name) } diff --git a/flytectl/cmd/delete/matchable_attribute_util.go b/flytectl/cmd/delete/matchable_attribute_util.go index 6621ae85d8..cfdd90f250 100644 --- a/flytectl/cmd/delete/matchable_attribute_util.go +++ b/flytectl/cmd/delete/matchable_attribute_util.go @@ -9,19 +9,27 @@ import ( ) func deleteMatchableAttr(ctx context.Context, project, domain, workflowName string, - deleter ext.AdminDeleterExtInterface, rsType admin.MatchableResource) error { + deleter ext.AdminDeleterExtInterface, rsType admin.MatchableResource, dryRun bool) error { if len(workflowName) > 0 { // Delete the workflow attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here - err := deleter.DeleteWorkflowAttributes(ctx, project, domain, workflowName, rsType) - if err != nil { - return err + if dryRun { + logger.Infof(ctx, "skipping DeleteWorkflowAttributes request (dryRun)") + } else { + err := deleter.DeleteWorkflowAttributes(ctx, project, domain, workflowName, rsType) + if err != nil { + return err + } } logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v and workflow %v", project, domain, workflowName) } else { // Delete the project domain attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here - err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) - if err != nil { - return err + if dryRun { + logger.Infof(ctx, "skipping DeleteProjectDomainAttributes request (dryRun)") + } else { + err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) + if err != nil { + return err + } } logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v", project, domain) } diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index e6b41941c0..c6f71fec35 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -72,7 +72,7 @@ func deleteClusterResourceAttributes(ctx context.Context, args []string, cmdCtx // Deletes the matchable attributes using the taskResourceAttrFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_CLUSTER_RESOURCE); err != nil { + admin.MatchableResource_CLUSTER_RESOURCE, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index 65ab8f7405..4149b5e18b 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -70,7 +70,7 @@ func deleteExecutionClusterLabel(ctx context.Context, args []string, cmdCtx cmdC // Deletes the matchable attributes using the ExecClusterLabelFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_EXECUTION_CLUSTER_LABEL); err != nil { + admin.MatchableResource_EXECUTION_CLUSTER_LABEL, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index 392157a03f..6bc5a47aae 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -74,7 +74,7 @@ func deleteExecutionQueueAttributes(ctx context.Context, args []string, cmdCtx c // Deletes the matchable attributes using the AttrFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_EXECUTION_QUEUE); err != nil { + admin.MatchableResource_EXECUTION_QUEUE, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index 09353a83f8..edbe826a82 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -75,7 +75,7 @@ func deletePluginOverride(ctx context.Context, args []string, cmdCtx cmdCore.Com // Deletes the matchable attributes using the AttrFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_PLUGIN_OVERRIDE); err != nil { + admin.MatchableResource_PLUGIN_OVERRIDE, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 3f1a719ca7..01af86bb6d 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -75,7 +75,7 @@ func deleteTaskResourceAttributes(ctx context.Context, args []string, cmdCtx cmd // Deletes the matchable attributes using the taskResourceAttrFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_TASK_RESOURCE); err != nil { + admin.MatchableResource_TASK_RESOURCE, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index c65a3976ed..fb9d6d5c6b 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -71,7 +71,7 @@ func deleteWorkflowExecutionConfig(ctx context.Context, args []string, cmdCtx cm // Deletes the matchable attributes using the WorkflowExecutionConfigFileConfig if err := deleteMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminDeleterExt(), - admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG); err != nil { + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG, delConfig.DryRun); err != nil { return err } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 14dfa4be62..07f62d6246 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -107,42 +107,57 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) - _, err := cmdCtx.AdminClient().CreateLaunchPlan(ctx, &admin.LaunchPlanCreateRequest{ - Id: &core.Identifier{ - ResourceType: core.ResourceType_LAUNCH_PLAN, - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: launchPlan.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, - }, - Spec: launchPlan.Spec, - }) + if rconfig.DefaultFilesConfig.DryRun { + logger.Debugf(ctx, "skipping CreateLaunchPlan request (DryRun)") + return nil + } + _, err := cmdCtx.AdminClient().CreateLaunchPlan(ctx, + &admin.LaunchPlanCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_LAUNCH_PLAN, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: launchPlan.Id.Name, + Version: rconfig.DefaultFilesConfig.Version, + }, + Spec: launchPlan.Spec, + }) return err case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) - _, err := cmdCtx.AdminClient().CreateWorkflow(ctx, &admin.WorkflowCreateRequest{ - Id: &core.Identifier{ - ResourceType: core.ResourceType_WORKFLOW, - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: workflowSpec.Template.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, - }, - Spec: workflowSpec, - }) + if rconfig.DefaultFilesConfig.DryRun { + logger.Debugf(ctx, "skipping CreateWorkflow request (DryRun)") + return nil + } + _, err := cmdCtx.AdminClient().CreateWorkflow(ctx, + &admin.WorkflowCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_WORKFLOW, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: workflowSpec.Template.Id.Name, + Version: rconfig.DefaultFilesConfig.Version, + }, + Spec: workflowSpec, + }) return err case *admin.TaskSpec: taskSpec := message.(*admin.TaskSpec) - _, err := cmdCtx.AdminClient().CreateTask(ctx, &admin.TaskCreateRequest{ - Id: &core.Identifier{ - ResourceType: core.ResourceType_TASK, - Project: config.GetConfig().Project, - Domain: config.GetConfig().Domain, - Name: taskSpec.Template.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, - }, - Spec: taskSpec, - }) + if rconfig.DefaultFilesConfig.DryRun { + logger.Debugf(ctx, "skipping CreateTask request (DryRun)") + return nil + } + _, err := cmdCtx.AdminClient().CreateTask(ctx, + &admin.TaskCreateRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: taskSpec.Template.Id.Name, + Version: rconfig.DefaultFilesConfig.Version, + }, + Spec: taskSpec, + }) return err default: return fmt.Errorf("Failed registering unknown entity %v", v) diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go index 8717789574..41ff4fa388 100644 --- a/flytectl/cmd/update/matchable_attribute_util.go +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -9,20 +9,28 @@ import ( ) func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workflowName string, - updater ext.AdminUpdaterExtInterface, mcDecorator sconfig.MatchableAttributeDecorator) error { + updater ext.AdminUpdaterExtInterface, mcDecorator sconfig.MatchableAttributeDecorator, dryRun bool) error { matchingAttr := mcDecorator.Decorate() if len(workflowName) > 0 { // Update the workflow attribute using the admin. - err := updater.UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) - if err != nil { - return err + if dryRun { + logger.Infof(ctx, "skipping UpdateWorkflowAttributes request (dryRun)") + } else { + err := updater.UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) + if err != nil { + return err + } } logger.Debugf(ctx, "Updated attributes from %v project and domain %v and workflow %v", project, domain, workflowName) } else { // Update the project domain attribute using the admin. - err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) - if err != nil { - return err + if dryRun { + logger.Infof(ctx, "skipping UpdateProjectDomainAttributes request (dryRun)") + } else { + err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) + if err != nil { + return err + } } logger.Debugf(ctx, "Updated attributes from %v project and domain %v", project, domain) } diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index c41b74f23c..4938245a3b 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -73,7 +73,7 @@ func updateClusterResourceAttributesFunc(ctx context.Context, args []string, cmd // Updates the admin matchable attribute from taskResourceAttrFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - clustrResourceAttrFileConfig); err != nil { + clustrResourceAttrFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index 0a3eb6965c..e9c6c62e5a 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -66,7 +66,7 @@ func updateExecutionClusterLabelFunc(ctx context.Context, args []string, cmdCtx // Updates the admin matchable attribute from executionClusterLabelFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - executionClusterLabelFileConfig); err != nil { + executionClusterLabelFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index f48bfa2d3b..6c09f9d7b0 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -77,7 +77,7 @@ func updateExecutionQueueAttributesFunc(ctx context.Context, args []string, cmdC // Updates the admin matchable attribute from executionQueueAttrFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - executionQueueAttrFileConfig); err != nil { + executionQueueAttrFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index ceeaca0d96..065f2d7070 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -79,7 +79,7 @@ func updatePluginOverridesFunc(ctx context.Context, args []string, cmdCtx cmdCor // Updates the admin matchable attribute from pluginOverrideFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - pluginOverrideFileConfig); err != nil { + pluginOverrideFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 1719dc9c40..bebd96929b 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -79,7 +79,7 @@ func updateTaskResourceAttributesFunc(ctx context.Context, args []string, cmdCtx // Updates the admin matchable attribute from taskResourceAttrFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - taskResourceAttrFileConfig); err != nil { + taskResourceAttrFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 7f6fa1b705..07b684ec5b 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -70,7 +70,7 @@ func updateWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCt // Updates the admin matchable attribute from workflowExecutionConfigFileConfig if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - workflowExecutionConfigFileConfig); err != nil { + workflowExecutionConfigFileConfig, updateConfig.DryRun); err != nil { return err } return nil diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go index da5380554e..25d537f380 100644 --- a/flytectl/cmd/update/named_entity.go +++ b/flytectl/cmd/update/named_entity.go @@ -8,6 +8,7 @@ import ( cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" ) //go:generate pflags NamedEntityConfig --default-var namedEntityConfig --bind-default-var @@ -20,6 +21,7 @@ type NamedEntityConfig struct { Archive bool `json:"archive" pflag:",archive named entity."` Activate bool `json:"activate" pflag:",activate the named entity."` Description string `json:"description" pflag:",description of the named entity."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error { @@ -34,17 +36,24 @@ func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, p } else if archiveProject { nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED } - _, err := cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ - ResourceType: rsType, - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: name, - }, - Metadata: &admin.NamedEntityMetadata{ - Description: n.Description, - State: nameEntityState, - }, - }) - return err + if namedEntityConfig.DryRun { + logger.Infof(ctx, "skipping UpdateNamedEntity request (dryRun)") + } else { + _, err := cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ + ResourceType: rsType, + Id: &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + }, + Metadata: &admin.NamedEntityMetadata{ + Description: n.Description, + State: nameEntityState, + }, + }) + if err != nil { + return err + } + } + return nil } diff --git a/flytectl/cmd/update/namedentityconfig_flags.go b/flytectl/cmd/update/namedentityconfig_flags.go index e1bd681341..8d3b7a96b8 100755 --- a/flytectl/cmd/update/namedentityconfig_flags.go +++ b/flytectl/cmd/update/namedentityconfig_flags.go @@ -53,5 +53,6 @@ func (cfg NamedEntityConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&namedEntityConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), namedEntityConfig.Archive, "archive named entity.") cmdFlags.BoolVar(&namedEntityConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), namedEntityConfig.Activate, "activate the named entity.") cmdFlags.StringVar(&namedEntityConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), namedEntityConfig.Description, "description of the named entity.") + cmdFlags.BoolVar(&namedEntityConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), namedEntityConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/update/namedentityconfig_flags_test.go b/flytectl/cmd/update/namedentityconfig_flags_test.go index 528f913d63..9c85b8be20 100755 --- a/flytectl/cmd/update/namedentityconfig_flags_test.go +++ b/flytectl/cmd/update/namedentityconfig_flags_test.go @@ -141,4 +141,18 @@ func TestNamedEntityConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_NamedEntityConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 86d7bb616a..abc54a6d36 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -9,6 +9,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytestdlib/logger" ) //go:generate pflags ProjectConfig --default-var DefaultProjectConfig --bind-default-var @@ -17,6 +18,7 @@ import ( type ProjectConfig struct { ActivateProject bool `json:"activateProject" pflag:",Activates the project specified as argument."` ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } const ( @@ -73,13 +75,17 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma if archiveProject { projectState = admin.Project_ARCHIVED } - _, err := cmdCtx.AdminClient().UpdateProject(ctx, &admin.Project{ - Id: id, - State: projectState, - }) - if err != nil { - fmt.Printf(clierrors.ErrFailedProjectUpdate, id, projectState, err) - return err + if DefaultProjectConfig.DryRun { + logger.Infof(ctx, "skipping UpdateProject request (dryRun)") + } else { + _, err := cmdCtx.AdminClient().UpdateProject(ctx, &admin.Project{ + Id: id, + State: projectState, + }) + if err != nil { + fmt.Printf(clierrors.ErrFailedProjectUpdate, id, projectState, err) + return err + } } fmt.Printf("Project %v updated to %v state\n", id, projectState) return nil diff --git a/flytectl/cmd/update/projectconfig_flags.go b/flytectl/cmd/update/projectconfig_flags.go index 2139fb0563..9c700f5e7c 100755 --- a/flytectl/cmd/update/projectconfig_flags.go +++ b/flytectl/cmd/update/projectconfig_flags.go @@ -52,5 +52,6 @@ func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) cmdFlags.BoolVar(&DefaultProjectConfig.ActivateProject, fmt.Sprintf("%v%v", prefix, "activateProject"), DefaultProjectConfig.ActivateProject, "Activates the project specified as argument.") cmdFlags.BoolVar(&DefaultProjectConfig.ArchiveProject, fmt.Sprintf("%v%v", prefix, "archiveProject"), DefaultProjectConfig.ArchiveProject, "Archives the project specified as argument.") + cmdFlags.BoolVar(&DefaultProjectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultProjectConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/update/projectconfig_flags_test.go b/flytectl/cmd/update/projectconfig_flags_test.go index c6bc6b262c..cfcf48b4c4 100755 --- a/flytectl/cmd/update/projectconfig_flags_test.go +++ b/flytectl/cmd/update/projectconfig_flags_test.go @@ -127,4 +127,18 @@ func TestProjectConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } From c6644401ab092a5035e3ec767143093cd76f8f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Ali=C3=A8s?= Date: Sat, 21 Aug 2021 22:33:51 +0200 Subject: [PATCH 130/356] Update upgrade.go (#164) Signed-off-by: Arnaud Alies --- flytectl/cmd/upgrade/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 54686a1f76..d32d587252 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -102,7 +102,7 @@ func upgrade(u *updater.Updater) (string, error) { } return fmt.Sprintf("Successfully updated to version %s", latestVersion), nil } - return "", u.Rollback() + return "", nil } func isUpgradeSupported(goos platformutil.Platform) (bool, error) { From e3c8cafab84b0bc6c98d780eeab73ab34601bcd6 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Sun, 22 Aug 2021 21:35:58 -0700 Subject: [PATCH 131/356] Update documentation (#162) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- flytectl/docs/source/gen/flytectl_create_execution.rst | 1 + flytectl/docs/source/gen/flytectl_create_project.rst | 1 + .../source/gen/flytectl_delete_cluster-resource-attribute.rst | 1 + .../source/gen/flytectl_delete_execution-cluster-label.rst | 1 + .../source/gen/flytectl_delete_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_delete_execution.rst | 3 ++- flytectl/docs/source/gen/flytectl_delete_plugin-override.rst | 1 + .../source/gen/flytectl_delete_task-resource-attribute.rst | 1 + .../source/gen/flytectl_delete_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_register_examples.rst | 1 + flytectl/docs/source/gen/flytectl_register_files.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_start.rst | 2 +- .../source/gen/flytectl_update_cluster-resource-attribute.rst | 1 + .../source/gen/flytectl_update_execution-cluster-label.rst | 1 + .../source/gen/flytectl_update_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_update_launchplan.rst | 1 + flytectl/docs/source/gen/flytectl_update_plugin-override.rst | 1 + flytectl/docs/source/gen/flytectl_update_project.rst | 1 + .../source/gen/flytectl_update_task-resource-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_update_task.rst | 1 + .../source/gen/flytectl_update_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_update_workflow.rst | 1 + flytectl/docs/source/gen/flytectl_upgrade.rst | 2 ++ 23 files changed, 25 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 022e22dff5..7cac61bbd2 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -140,6 +140,7 @@ Options :: + --dryRun execute command without making any modifications. --execFile string file for the execution params.If not specified defaults to <_name>.execution_spec.yaml -h, --help help for execution --iamRoleARN string iam role ARN AuthRole for launching execution. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index f5b287a2fa..f1e8a47194 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -41,6 +41,7 @@ Options :: --description string description for the project specified as argument. + --dryRun execute command without making any modifications. --file string file for the project definition. -h, --help help for project --id string id for the project specified as argument. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 770ea699ca..5e80a706d1 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -57,6 +57,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for cluster-resource-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 918da73e88..488a732b58 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -55,6 +55,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for execution-cluster-label Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 7c1e2eb8f6..671eed2879 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -59,6 +59,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for execution-queue-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 6f5f2d8e5f..11ebaa66fd 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -64,7 +64,8 @@ Options :: - -h, --help help for execution + --dryRun execute command without making any modifications. + -h, --help help for execution Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index c04b0e1fe3..2328ff9e12 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -60,6 +60,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for plugin-override Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index f0ff59cfbc..544712992f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -60,6 +60,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for task-resource-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index ffb2333bd1..a97fcc811c 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -55,6 +55,7 @@ Options :: --attrFile string attribute file name to be used for delete attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for workflow-execution-config Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index a9b5943d56..f21135aa5b 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -31,6 +31,7 @@ Options --archive pass in archive file either an http link or local path. --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. + --dryRun execute command without making any modifications. -h, --help help for examples --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 83447baa09..962d7cfaae 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -95,6 +95,7 @@ Options --archive pass in archive file either an http link or local path. --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. + --dryRun execute command without making any modifications. -h, --help help for files --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index ed340e35d3..00de94c676 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -22,7 +22,7 @@ Mount your source code repository inside sandbox bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte, Only available after v0.14.0+ +Run specific version of flyte, Only available after v0.13.0+ :: bin/flytectl sandbox start --version=v0.14.0 diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index b3a5886a32..9f1ca738f9 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -62,6 +62,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for cluster-resource-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 043be798c5..4fca7a3a9f 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -55,6 +55,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for execution-cluster-label Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 66539e7561..ae9db9b656 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -66,6 +66,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for execution-queue-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index ae54382190..5ad0814622 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -40,6 +40,7 @@ Options --activate activate the named entity. --archive archive named entity. --description string description of the named entity. + --dryRun execute command without making any modifications. -h, --help help for launchplan Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 1ee6a87f8d..3056208c60 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -68,6 +68,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for plugin-override Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index dccc3a9efc..abbaaca825 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -54,6 +54,7 @@ Options --activateProject Activates the project specified as argument. --archiveProject Archives the project specified as argument. + --dryRun execute command without making any modifications. -h, --help help for project Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index bd02a91ad5..182c3cdf3f 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -68,6 +68,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for task-resource-attribute Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task.rst index ee60852b58..786d17ff96 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task.rst @@ -40,6 +40,7 @@ Options --activate activate the named entity. --archive archive named entity. --description string description of the named entity. + --dryRun execute command without making any modifications. -h, --help help for task Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index ed6856f395..cf66feece0 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -58,6 +58,7 @@ Options :: --attrFile string attribute file name to be used for updating attribute for the resource type. + --dryRun execute command without making any modifications. -h, --help help for workflow-execution-config Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow.rst index 204e00b614..c717ba53e1 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow.rst @@ -40,6 +40,7 @@ Options --activate activate the named entity. --archive archive named entity. --description string description of the named entity. + --dryRun execute command without making any modifications. -h, --help help for workflow Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index e102c6b901..63379360f4 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -15,6 +15,8 @@ Upgrade flytectl bin/flytectl upgrade +Note: Please use upgrade with sudo, Without sudo it will cause permission issue + Rollback flytectl binary :: From 6618d9ea471e0ccad6e40b49dbf73d2d98554f39 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 23 Aug 2021 10:37:20 +0530 Subject: [PATCH 132/356] bind sandbox port to host system (#165) Signed-off-by: Yuvraj --- flytectl/pkg/docker/docker_util.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 3e1d55e46c..de19ce15a0 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -78,10 +78,10 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { // GetSandboxPorts will return sandbox ports func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ - "127.0.0.1:30086:30086", - "127.0.0.1:30081:30081", - "127.0.0.1:30082:30082", - "127.0.0.1:30084:30084", + "0.0.0.0:30086:30086", + "0.0.0.0:30081:30081", + "0.0.0.0:30082:30082", + "0.0.0.0:30084:30084", }) } From 3b266d7bf7600220c9a568eca24a91384937dc46 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Fri, 27 Aug 2021 15:22:50 -0700 Subject: [PATCH 133/356] youtube video embedding for flytectl with walkthrough (#166) Signed-off-by: Ketan Umare --- flytectl/doc-requirements.in | 1 + flytectl/doc-requirements.txt | 13 ++++++++----- flytectl/docs/source/conf.py | 1 + flytectl/docs/source/index.rst | 5 +++++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 3982ec86e6..e0751192d5 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -6,3 +6,4 @@ sphinx-code-include sphinx-copybutton sphinx_fontawesome sphinx_tabs +sphinxcontrib-yt diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 76f9d60edf..671f3d786e 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with python 3.9 +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # pip-compile doc-requirements.in @@ -15,7 +15,7 @@ beautifulsoup4==4.9.3 # sphinx-material certifi==2021.5.30 # via requests -charset-normalizer==2.0.3 +charset-normalizer==2.0.4 # via requests css-html-js-minify==2.5.5 # via sphinx-material @@ -37,7 +37,7 @@ markupsafe==2.0.1 # via jinja2 packaging==21.0 # via sphinx -pygments==2.9.0 +pygments==2.10.0 # via # sphinx # sphinx-prompt @@ -66,6 +66,7 @@ sphinx==4.1.2 # sphinx-material # sphinx-prompt # sphinx-tabs + # sphinxcontrib-yt sphinx-code-include==1.1.1 # via -r doc-requirements.in sphinx-copybutton==0.4.0 @@ -74,9 +75,9 @@ sphinx-fontawesome==0.0.6 # via -r doc-requirements.in sphinx-material==0.0.34 # via -r doc-requirements.in -sphinx-prompt==1.4.0 +sphinx-prompt==1.5.0 # via -r doc-requirements.in -sphinx-tabs==3.1.0 +sphinx-tabs==3.2.0 # via -r doc-requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -90,6 +91,8 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx +sphinxcontrib-yt==0.2.2 + # via -r doc-requirements.in text-unidecode==1.3 # via python-slugify unidecode==1.2.0 diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 0e6329ab99..053bbdf1e3 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -44,6 +44,7 @@ "sphinx_copybutton", "sphinx_fontawesome", "sphinx_tabs.tabs", + "sphinxcontrib.yt", ] # build the templated autosummary files diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 06602489e0..4ce8926c87 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -4,6 +4,11 @@ ``Flytectl`` Reference ########################################## +Overview +========= + +.. youtube:: qUKf07uUiTU + Install ======= From 1cf79c197f055802b493db2899392e596f33027e Mon Sep 17 00:00:00 2001 From: SandraGH5 <80421934+SandraGH5@users.noreply.github.com> Date: Tue, 31 Aug 2021 07:48:46 -0700 Subject: [PATCH 134/356] Point Tutorial Youtube video to the correct one (#167) Update current video to a shorter version specifically edited to be embedded in the docs. --- flytectl/docs/source/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 4ce8926c87..bac2ce0607 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -6,8 +6,9 @@ Overview ========= +This video will take you on a tour of Flytectl - how to install and configure it, as well as how to use the Verbs and Nouns sections on the left hand side menu. Detailed information can be found in the sections below the video. -.. youtube:: qUKf07uUiTU +.. youtube:: cV8ezYnBANE Install From 70c47ed0eed9a9da1b4c842e32511c1dbb1037e6 Mon Sep 17 00:00:00 2001 From: Viktor Gerdin Date: Wed, 1 Sep 2021 00:29:20 +0200 Subject: [PATCH 135/356] fix panic when get with table output for resource w/o expected output (#168) `flytectl get task/workflow/launchplan -o table` panics if resource has no expected output. We encountered `FormatVariableDescriptions at pkg/printer/printer.go:173` to panic when using the get commands on a resource without expected output. This happened with both explicit table output as well as default. Replicated on lastest master, workflow demo-1.no-output has no expected output: ``` $ go run ./main.go get launchplans -p demo-1 -d production --latest demo-1.no-output panic: assignment to entry in nil map goroutine 1 [running]: github.com/flyteorg/flytectl/pkg/printer.FormatVariableDescriptions(0x0) /workspace/flyteorg/flytectl/pkg/printer/printer.go:202 +0x307 github.com/flyteorg/flytectl/cmd/get.LaunchplanToTableProtoMessages({0xc000a30938, 0x1, 0x7ffeefbff977}) /workspace/flyteorg/flytectl/cmd/get/launch_plan.go:136 +0xee github.com/flyteorg/flytectl/cmd/get.getLaunchPlanFunc({0x2dfbf98, 0xc0000580b8}, {0xc0002fb8c0, 0x1, 0x11519b4}, {{0x2e55850, 0xc000a30120}, {0x2e472c0, 0xc0009a3110}, {0x2ddff60, ...}, ...}) /workspace/flyteorg/flytectl/cmd/get/launch_plan.go:158 +0x307 github.com/flyteorg/flytectl/cmd/core.generateCommandFunc.func1(0xc000481680, {0xc0002fb8c0, 0x1, 0x6}) /workspace/flyteorg/flytectl/cmd/core/cmd.go:69 +0x47d github.com/spf13/cobra.(*Command).execute(0xc000481680, {0xc0002fb860, 0x6, 0x6}) /workspace/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x60e github.com/spf13/cobra.(*Command).ExecuteC(0xc000480000) /workspace/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x3ad github.com/spf13/cobra.(*Command).Execute(...) /workspace/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 github.com/flyteorg/flytectl/cmd.ExecuteCmd() /workspace/flyteorg/flytectl/cmd/root.go:135 +0x1e main.main() /workspace/flyteorg/flytectl/main.go:12 +0x1d exit status 2 ``` Simple fix: nil checks exists for container but not on the map itself prior to calling, and nil input causes the panic. Added nil check on map parameter prior to calling in all places found. Signed-off-by: Viktor Gerdin --- flytectl/cmd/get/launch_plan.go | 2 +- flytectl/cmd/get/task.go | 4 ++-- flytectl/cmd/get/workflow.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index f146740bd7..c5b7e7e581 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -132,7 +132,7 @@ func LaunchplanToTableProtoMessages(l []*admin.LaunchPlan) []proto.Message { if m.Closure.ExpectedInputs != nil { printer.FormatParameterDescriptions(m.Closure.ExpectedInputs.Parameters) } - if m.Closure.ExpectedOutputs != nil { + if m.Closure.ExpectedOutputs != nil && m.Closure.ExpectedOutputs.Variables != nil { printer.FormatVariableDescriptions(m.Closure.ExpectedOutputs.Variables) } } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index a9f0859d58..63b490ae82 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -119,10 +119,10 @@ func TaskToTableProtoMessages(l []*admin.Task) []proto.Message { if m.Closure != nil && m.Closure.CompiledTask != nil { if m.Closure.CompiledTask.Template != nil { if m.Closure.CompiledTask.Template.Interface != nil { - if m.Closure.CompiledTask.Template.Interface.Inputs != nil { + if m.Closure.CompiledTask.Template.Interface.Inputs != nil && m.Closure.CompiledTask.Template.Interface.Inputs.Variables != nil { printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Inputs.Variables) } - if m.Closure.CompiledTask.Template.Interface.Outputs != nil { + if m.Closure.CompiledTask.Template.Interface.Outputs != nil && m.Closure.CompiledTask.Template.Interface.Outputs.Variables != nil { printer.FormatVariableDescriptions(m.Closure.CompiledTask.Template.Interface.Outputs.Variables) } } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 519a6d1e1a..2670b7f10d 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -114,10 +114,10 @@ func WorkflowToTableProtoMessages(l []*admin.Workflow) []proto.Message { if m.Closure.CompiledWorkflow.Primary != nil { if m.Closure.CompiledWorkflow.Primary.Template != nil { if m.Closure.CompiledWorkflow.Primary.Template.Interface != nil { - if m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil { + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil && m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables != nil { printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables) } - if m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs != nil { + if m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs != nil && m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs.Variables != nil { printer.FormatVariableDescriptions(m.Closure.CompiledWorkflow.Primary.Template.Interface.Outputs.Variables) } } From ac2f7c8708ebc9657ad798f6f7b14c577ef8deb8 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 1 Sep 2021 21:22:05 +0530 Subject: [PATCH 136/356] hotfix fast register (#171) Signed-off-by: Yuvraj --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 337544ee91..533ac14d2f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -12,7 +12,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v0.19.24 - github.com/flyteorg/flytestdlib v0.3.33 + github.com/flyteorg/flytestdlib v0.3.34 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible diff --git a/flytectl/go.sum b/flytectl/go.sum index 85a4f86cb4..c99b90cda6 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -348,8 +348,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.19.24 h1:aiBKTFNKZpIvOfcI051I33LnhQl54N3dhkaubucOg+E= github.com/flyteorg/flyteidl v0.19.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.33 h1:+oCx3zXUIldL7CWmNMD7PMFPXvGqaPgYkSKn9wB6qvY= -github.com/flyteorg/flytestdlib v0.3.33/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= +github.com/flyteorg/flytestdlib v0.3.34 h1:OOuV03X8c1AWInzBU6IRsqpEF6y8WDJngbPcdL4VktY= +github.com/flyteorg/flytestdlib v0.3.34/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From 0a23db336d62a6c385d6dfd7944ad5dab7d6f195 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 2 Sep 2021 10:55:09 +0530 Subject: [PATCH 137/356] Added launchplan update command and moved namedentity (#170) * Added launchplan update command and moved namedentity Signed-off-by: Prafulla Mahindrakar --- flytectl/clierrors/errors.go | 5 +- .../subcommand/launchplan/updateconfig.go | 14 ++ .../launchplan/updateconfig_flags.go | 58 +++++++ .../launchplan/updateconfig_flags_test.go | 158 ++++++++++++++++++ flytectl/cmd/get/execution.go | 1 + flytectl/cmd/update/launch_plan.go | 57 +++++-- flytectl/cmd/update/launch_plan_meta.go | 49 ++++++ flytectl/cmd/update/launch_plan_meta_test.go | 44 +++++ flytectl/cmd/update/launch_plan_test.go | 17 +- flytectl/cmd/update/{task.go => task_meta.go} | 0 .../{task_test.go => task_meta_test.go} | 0 flytectl/cmd/update/update.go | 9 +- flytectl/cmd/update/update_test.go | 14 +- .../update/{workflow.go => workflow_meta.go} | 0 ...workflow_test.go => workflow_meta_test.go} | 0 15 files changed, 392 insertions(+), 34 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/launchplan/updateconfig.go create mode 100755 flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go create mode 100644 flytectl/cmd/update/launch_plan_meta.go create mode 100644 flytectl/cmd/update/launch_plan_meta_test.go rename flytectl/cmd/update/{task.go => task_meta.go} (100%) rename flytectl/cmd/update/{task_test.go => task_meta_test.go} (100%) rename flytectl/cmd/update/{workflow.go => workflow_meta.go} (100%) rename flytectl/cmd/update/{workflow_test.go => workflow_meta_test.go} (100%) diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index f6869aa2b2..0085d1711c 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -6,8 +6,9 @@ var ( ErrProjectNotPassed = "Project not passed\n" ErrFailedProjectUpdate = "Project %v failed to get updated to %v state due to %v\n" - ErrLPNotPassed = "Launch plan name not passed\n" - ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" + ErrLPNotPassed = "Launch plan name not passed\n" + ErrLPVersionNotPassed = "Launch plan version not passed\n" //nolint + ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" ErrWorkflowNotPassed = "Workflow name not passed\n" ErrFailedWorkflowUpdate = "Workflow %v failed to get updated to due to %v\n" diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go new file mode 100644 index 0000000000..9fcbb8869d --- /dev/null +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go @@ -0,0 +1,14 @@ +package launchplan + +//go:generate pflags UpdateConfig --default-var UConfig --bind-default-var +var ( + UConfig = &UpdateConfig{} +) + +// Config +type UpdateConfig struct { + Archive bool `json:"archive" pflag:",archive launchplan."` + Activate bool `json:"activate" pflag:",activate launchplan."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Version string `json:"version" pflag:",version of the launchplan to be fetched."` +} diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go new file mode 100755 index 0000000000..b217372c76 --- /dev/null +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go @@ -0,0 +1,58 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package launchplan + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (UpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (UpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (UpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in UpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("UpdateConfig", pflag.ExitOnError) + cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "archive launchplan.") + cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate launchplan.") + cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") + cmdFlags.StringVar(&UConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), UConfig.Version, "version of the launchplan to be fetched.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go new file mode 100755 index 0000000000..a0d1c1adf6 --- /dev/null +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go @@ -0,0 +1,158 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package launchplan + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_UpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_UpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_UpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_UpdateConfig(val, result)) +} + +func testDecodeRaw_UpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_UpdateConfig(vStringSlice, result)) +} + +func TestUpdateConfig_GetPFlagSet(t *testing.T) { + val := UpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestUpdateConfig_SetFlags(t *testing.T) { + actual := UpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_archive", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_activate", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_version", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index e17d6759d7..45ce3d9b69 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -88,6 +88,7 @@ var executionColumns = []printer.Column{ {Header: "Launch Plan Name", JSONPath: "$.spec.launchPlan.name"}, {Header: "Type", JSONPath: "$.spec.launchPlan.resourceType"}, {Header: "Phase", JSONPath: "$.closure.phase"}, + {Header: "Scheduled Time", JSONPath: "$.spec.metadata.scheduledAt"}, {Header: "Started", JSONPath: "$.closure.startedAt"}, {Header: "Elapsed Time", JSONPath: "$.closure.duration"}, {Header: "Abort data (Trunc)", JSONPath: "$.closure.abortMetadata[\"cause\"]", TruncateTo: &hundredChars}, diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 1f32a2cb04..a9dd059c5c 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -6,27 +6,26 @@ import ( "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" ) const ( - updateLPShort = "Updates launch plan metadata" + updateLPShort = "Updates launch plan status" updateLPLong = ` -Following command updates the description on the launchplan. +Activating launchplan activates the scheduled job associated with it :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launchplan named entity is not supported and would throw an error. +Archiving launchplan deschedules any scheduled job associated with it :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive -Activating launchplan named entity would be a noop. -:: - - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate Usage ` @@ -39,11 +38,41 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont return fmt.Errorf(clierrors.ErrLPNotPassed) } name := args[0] - err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) - if err != nil { - fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) - return err + version := launchplan.UConfig.Version + if len(version) == 0 { + return fmt.Errorf(clierrors.ErrLPVersionNotPassed) + } + activateLP := launchplan.UConfig.Activate + archiveLP := launchplan.UConfig.Archive + if activateLP == archiveLP && archiveLP { + return fmt.Errorf(clierrors.ErrInvalidStateUpdate) + } + + var lpState admin.LaunchPlanState + if activateLP { + lpState = admin.LaunchPlanState_ACTIVE + } else if archiveLP { + lpState = admin.LaunchPlanState_INACTIVE + } + + if launchplan.UConfig.DryRun { + logger.Debugf(ctx, "skipping CreateExecution request (DryRun)") + } else { + _, err := cmdCtx.AdminClient().UpdateLaunchPlan(ctx, &admin.LaunchPlanUpdateRequest{ + Id: &core.Identifier{ + Project: project, + Domain: domain, + Name: name, + Version: version, + }, + State: lpState, + }) + if err != nil { + fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) + return err + } } - fmt.Printf("updated metadata successfully on %v", name) + fmt.Printf("updated launchplan successfully on %v", name) + return nil } diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go new file mode 100644 index 0000000000..00cd9bef36 --- /dev/null +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -0,0 +1,49 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" +) + +const ( + updateLPMetaShort = "Updates launch plan metadata" + updateLPMetaLong = ` +Following command updates the description on the launchplan. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + +Archiving launchplan named entity is not supported and would throw an error. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating launchplan named entity would be a noop. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage +` +) + +func updateLPMetaFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrLPNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil +} diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go new file mode 100644 index 0000000000..0427964fc6 --- /dev/null +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -0,0 +1,44 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func UpdateLPMetaSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestLPMetaUpdate(t *testing.T) { + testutils.Setup() + UpdateLPMetaSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"task1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, updateLPMetaFunc(ctx, args, cmdCtx)) +} + +func TestLPMetaUpdateFail(t *testing.T) { + testutils.Setup() + UpdateLPMetaSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{"task1"} + mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} + +func TestLPMetaUpdateInvalidArgs(t *testing.T) { + testutils.Setup() + UpdateLPMetaSetup() + namedEntityConfig = &NamedEntityConfig{} + args = []string{} + assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) +} diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index aa8f8601de..3ef074277b 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -20,25 +21,25 @@ func UpdateLPSetup() { func TestLPUpdate(t *testing.T) { testutils.Setup() UpdateLPSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"task1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} + args = []string{"lp1"} + mockClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(&admin.LaunchPlanUpdateResponse{}, nil) assert.Nil(t, updateLPFunc(ctx, args, cmdCtx)) } func TestLPUpdateFail(t *testing.T) { testutils.Setup() UpdateLPSetup() - namedEntityConfig = &NamedEntityConfig{} + launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} args = []string{"task1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + mockClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateLPFunc(ctx, args, cmdCtx)) } func TestLPUpdateInvalidArgs(t *testing.T) { testutils.Setup() UpdateLPSetup() - namedEntityConfig = &NamedEntityConfig{} + launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true, Activate: true} args = []string{} - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + assert.NotNil(t, updateLPFunc(ctx, args, cmdCtx)) } diff --git a/flytectl/cmd/update/task.go b/flytectl/cmd/update/task_meta.go similarity index 100% rename from flytectl/cmd/update/task.go rename to flytectl/cmd/update/task_meta.go diff --git a/flytectl/cmd/update/task_test.go b/flytectl/cmd/update/task_meta_test.go similarity index 100% rename from flytectl/cmd/update/task_test.go rename to flytectl/cmd/update/task_meta_test.go diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index efd2f0a48d..c1a721b704 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -4,6 +4,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" @@ -34,13 +35,15 @@ func CreateUpdateCommand() *cobra.Command { Long: updatecmdLong, } updateResourcesFuncs := map[string]cmdCore.CommandEntry{ - "launchplan": {CmdFunc: updateLPFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "launchplan": {CmdFunc: updateLPFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: launchplan.UConfig, Short: updateLPShort, Long: updateLPLong}, + "launchplan-meta": {CmdFunc: updateLPMetaFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + Short: updateLPMetaShort, Long: updateLPMetaLong}, "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: DefaultProjectConfig, Short: projectShort, Long: projectLong}, - "task": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "task-meta": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateTaskShort, Long: updateTaskLong}, - "workflow": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "workflow-meta": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateWorkflowShort, Long: updateWorkflowLong}, "task-resource-attribute": {CmdFunc: updateTaskResourceAttributesFunc, Aliases: []string{}, PFlagProvider: taskresourceattribute.DefaultUpdateConfig, Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, ProjectDomainNotRequired: true}, diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index eecfbff0d6..8cf80f3f73 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -32,19 +32,19 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 10) + assert.Equal(t, len(updateCommand.Commands()), 11) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) useArray := []string{"cluster-resource-attribute", "execution-cluster-label", "execution-queue-attribute", "launchplan", - "plugin-override", "project", "task", "task-resource-attribute", "workflow", "workflow-execution-config"} - aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}} - shortArray := []string{clusterResourceAttributesShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, - pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, updateWorkflowShort, workflowExecutionConfigShort} - longArray := []string{clusterResourceAttributesLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, - pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, updateWorkflowLong, workflowExecutionConfigLong} + "launchplan-meta", "plugin-override", "project", "task-meta", "task-resource-attribute", "workflow-execution-config", "workflow-meta"} + aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}} + shortArray := []string{clusterResourceAttributesShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, updateLPMetaShort, + pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, workflowExecutionConfigShort, updateWorkflowShort} + longArray := []string{clusterResourceAttributesLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, updateLPMetaLong, + pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, workflowExecutionConfigLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) assert.Equal(t, cmdNouns[i].Aliases, aliases[i]) diff --git a/flytectl/cmd/update/workflow.go b/flytectl/cmd/update/workflow_meta.go similarity index 100% rename from flytectl/cmd/update/workflow.go rename to flytectl/cmd/update/workflow_meta.go diff --git a/flytectl/cmd/update/workflow_test.go b/flytectl/cmd/update/workflow_meta_test.go similarity index 100% rename from flytectl/cmd/update/workflow_test.go rename to flytectl/cmd/update/workflow_meta_test.go From dcc2c091d55f34dd19417b5fa15bba23d3be3a95 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Thu, 2 Sep 2021 10:12:57 -0700 Subject: [PATCH 138/356] Fix panic in rendering LP input descriptions (#174) Signed-off-by: Katrina Rogan --- flytectl/cmd/get/launch_plan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index c5b7e7e581..6ef85d6cb3 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -129,7 +129,7 @@ func LaunchplanToTableProtoMessages(l []*admin.LaunchPlan) []proto.Message { for _, m := range l { m := proto.Clone(m).(*admin.LaunchPlan) if m.Closure != nil { - if m.Closure.ExpectedInputs != nil { + if m.Closure.ExpectedInputs != nil && m.Closure.ExpectedInputs.Parameters != nil { printer.FormatParameterDescriptions(m.Closure.ExpectedInputs.Parameters) } if m.Closure.ExpectedOutputs != nil && m.Closure.ExpectedOutputs.Variables != nil { From 7c31c1e8f96024bdb9bdf10dcda862eb09d4b579 Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Thu, 2 Sep 2021 11:22:26 -0700 Subject: [PATCH 139/356] Adopt flyteidl's ordered variable map change (#158) * Adopt flyteidl's ordered variable map change Signed-off-by: Sean Lin * wip Adopt flyteidl's ordered variable map change Signed-off-by: Sean Lin * wip Adopt flyteidl's ordered variable map change Signed-off-by: Sean Lin * Reformat json Signed-off-by: Sean Lin * Reformat json Signed-off-by: Sean Lin * Parameter field name change Signed-off-by: Sean Lin * Make execfile backward compatible Signed-off-by: Sean Lin * Remove legacy proto Signed-off-by: Sean Lin * Format test data Signed-off-by: Sean Lin * Update flyteidl Signed-off-by: Haytham Abuelfutuh * goimports Signed-off-by: Haytham Abuelfutuh Co-authored-by: Haytham Abuelfutuh --- flytectl/cmd/create/execution_test.go | 52 +- flytectl/cmd/create/serialization_utils.go | 22 +- .../cmd/create/serialization_utils_test.go | 52 +- flytectl/cmd/get/execution_util.go | 34 +- flytectl/cmd/get/execution_util_test.go | 13 +- flytectl/cmd/get/launch_plan.go | 4 +- flytectl/cmd/get/launch_plan_test.go | 864 ++++++++++++------ flytectl/cmd/get/task.go | 14 +- flytectl/cmd/get/task_test.go | 328 +++++-- flytectl/cmd/get/workflow.go | 4 +- flytectl/cmd/get/workflow_test.go | 38 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- flytectl/pkg/ext/launch_plan_fetcher_test.go | 41 +- flytectl/pkg/ext/task_fetcher_test.go | 11 +- flytectl/pkg/ext/workflow_fetcher_test.go | 11 +- flytectl/pkg/printer/printer.go | 46 +- flytectl/pkg/printer/printer_test.go | 65 +- .../compiled_closure_branch_nested.json | 104 ++- .../testdata/compiled_subworkflows.json | 157 ++-- 20 files changed, 1221 insertions(+), 645 deletions(-) diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 65df850ae5..36166fdf21 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -32,9 +32,14 @@ func createExecutionSetup() { }, }, } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } task1 := &admin.Task{ @@ -56,9 +61,10 @@ func createExecutionSetup() { }, } mockClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) - parameterMap := map[string]*core.Parameter{ - "numbers": { - Var: &core.Variable{ + parameterMap := []*core.ParameterMapEntry{ + { + Name: "numbers", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -68,40 +74,42 @@ func createExecutionSetup() { }, }, }, - }, + }}, }, - "numbers_count": { - Var: &core.Variable{ + { + Name: "numbers_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, - }, + }}, }, - "run_local_at_count": { - Var: &core.Variable{ + { + Name: "run_local_at_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, }, }, }, }, }, - }, - }, + }}, }, } launchPlan1 := &admin.LaunchPlan{ diff --git a/flytectl/cmd/create/serialization_utils.go b/flytectl/cmd/create/serialization_utils.go index 53045d2c9e..568ed6dc27 100644 --- a/flytectl/cmd/create/serialization_utils.go +++ b/flytectl/cmd/create/serialization_utils.go @@ -11,15 +11,15 @@ import ( // MakeLiteralForVariables builds a map of literals for the provided serialized values. If a provided value does not have // a corresponding variable or if that variable is invalid (e.g. doesn't have Type property populated), it returns an // error. -func MakeLiteralForVariables(serialize map[string]interface{}, variables map[string]*core.Variable) (map[string]*core.Literal, error) { +func MakeLiteralForVariables(serialize map[string]interface{}, variables []*core.VariableMapEntry) (map[string]*core.Literal, error) { types := make(map[string]*core.LiteralType) - for k, v := range variables { - t := v.GetType() + for _, e := range variables { + t := e.GetVar().GetType() if t == nil { - return nil, fmt.Errorf("variable [%v] has nil type", k) + return nil, fmt.Errorf("variable [%v] has nil type", e.GetName()) } - types[k] = t + types[e.GetName()] = t } return MakeLiteralForTypes(serialize, types) @@ -28,15 +28,15 @@ func MakeLiteralForVariables(serialize map[string]interface{}, variables map[str // MakeLiteralForParams builds a map of literals for the provided serialized values. If a provided value does not have // a corresponding parameter or if that parameter is invalid (e.g. doesn't have Type property populated), it returns an // error. -func MakeLiteralForParams(serialize map[string]interface{}, parameters map[string]*core.Parameter) (map[string]*core.Literal, error) { +func MakeLiteralForParams(serialize map[string]interface{}, parameters []*core.ParameterMapEntry) (map[string]*core.Literal, error) { types := make(map[string]*core.LiteralType) - for k, v := range parameters { - if variable := v.GetVar(); variable == nil { - return nil, fmt.Errorf("parameter [%v] has nil Variable", k) + for _, e := range parameters { + if variable := e.GetParameter().GetVar(); variable == nil { + return nil, fmt.Errorf("parameter [%v] has nil Variable", e.GetName()) } else if t := variable.GetType(); t == nil { - return nil, fmt.Errorf("parameter [%v] has nil variable type", k) + return nil, fmt.Errorf("parameter [%v] has nil variable type", e.GetName()) } else { - types[k] = t + types[e.GetName()] = t } } diff --git a/flytectl/cmd/create/serialization_utils_test.go b/flytectl/cmd/create/serialization_utils_test.go index 5c7326493d..ebe4484472 100644 --- a/flytectl/cmd/create/serialization_utils_test.go +++ b/flytectl/cmd/create/serialization_utils_test.go @@ -67,15 +67,16 @@ func TestMakeLiteralForParams(t *testing.T) { } t.Run("Happy path", func(t *testing.T) { - inputParams := map[string]*core.Parameter{ - "a": { - Var: &core.Variable{ + inputParams := []*core.ParameterMapEntry{ + { + Name: "a", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_STRING, }, }, - }, + }}, }, } @@ -85,8 +86,11 @@ func TestMakeLiteralForParams(t *testing.T) { }) t.Run("Invalid Param", func(t *testing.T) { - inputParams := map[string]*core.Parameter{ - "a": nil, + inputParams := []*core.ParameterMapEntry{ + { + Name: "a", + Parameter: nil, + }, } _, err := MakeLiteralForParams(inputValues, inputParams) @@ -94,9 +98,10 @@ func TestMakeLiteralForParams(t *testing.T) { }) t.Run("Invalid Type", func(t *testing.T) { - inputParams := map[string]*core.Parameter{ - "a": { - Var: &core.Variable{}, + inputParams := []*core.ParameterMapEntry{ + { + Name: "a", + Parameter: &core.Parameter{Var: &core.Variable{}}, }, } @@ -111,11 +116,14 @@ func TestMakeLiteralForVariables(t *testing.T) { } t.Run("Happy path", func(t *testing.T) { - inputVariables := map[string]*core.Variable{ - "a": { - Type: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_STRING, + inputVariables := []*core.VariableMapEntry{ + { + Name: "a", + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, + }, }, }, }, @@ -127,8 +135,11 @@ func TestMakeLiteralForVariables(t *testing.T) { }) t.Run("Invalid Variable", func(t *testing.T) { - inputVariables := map[string]*core.Variable{ - "a": nil, + inputVariables := []*core.VariableMapEntry{ + { + Name: "a", + Var: nil, + }, } _, err := MakeLiteralForVariables(inputValues, inputVariables) @@ -136,9 +147,12 @@ func TestMakeLiteralForVariables(t *testing.T) { }) t.Run("Invalid Type", func(t *testing.T) { - inputVariables := map[string]*core.Variable{ - "a": { - Type: nil, + inputVariables := []*core.VariableMapEntry{ + { + Name: "a", + Var: &core.Variable{ + Type: nil, + }, }, } diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 65b72175a5..8469e68e1d 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -58,8 +58,8 @@ func CreateAndWriteExecConfigForWorkflow(wlp *admin.LaunchPlan, fileName string) return WriteExecConfigToFile(executionConfig, fileName) } -func TaskInputs(task *admin.Task) map[string]*core.Variable { - taskInputs := map[string]*core.Variable{} +func TaskInputs(task *admin.Task) []*core.VariableMapEntry { + taskInputs := []*core.VariableMapEntry{} if task == nil || task.Closure == nil { return taskInputs } @@ -81,10 +81,10 @@ func TaskInputs(task *admin.Task) map[string]*core.Variable { func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { taskInputs := TaskInputs(task) paramMap := make(map[string]yaml.Node, len(taskInputs)) - for k, v := range taskInputs { - varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Type) + for _, e := range taskInputs { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(e.Var.Type) if err != nil { - fmt.Println("error creating default value for literal type ", v.Type) + fmt.Println("error creating default value for literal type ", e.Var.Type) return nil, err } var nativeLiteral interface{} @@ -92,11 +92,11 @@ func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { return nil, err } - if k == v.Description { + if e.Name == e.Var.Description { // a: # a isn't very helpful - paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") + paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, "") } else { - paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Description) + paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, e.Var.Description) } if err != nil { return nil, err @@ -105,8 +105,8 @@ func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { return paramMap, nil } -func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter { - workflowParams := map[string]*core.Parameter{} +func WorkflowParams(lp *admin.LaunchPlan) []*core.ParameterMapEntry { + workflowParams := []*core.ParameterMapEntry{} if lp == nil || lp.Spec == nil { return workflowParams } @@ -119,10 +119,10 @@ func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter { func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { workflowParams := WorkflowParams(lp) paramMap := make(map[string]yaml.Node, len(workflowParams)) - for k, v := range workflowParams { - varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Var.Type) + for _, e := range workflowParams { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(e.Parameter.Var.Type) if err != nil { - fmt.Println("error creating default value for literal type ", v.Var.Type) + fmt.Println("error creating default value for literal type ", e.Parameter.Var.Type) return nil, err } var nativeLiteral interface{} @@ -130,16 +130,16 @@ func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { return nil, err } // Override if there is a default value - if paramsDefault, ok := v.Behavior.(*core.Parameter_Default); ok { + if paramsDefault, ok := e.Parameter.Behavior.(*core.Parameter_Default); ok { if nativeLiteral, err = coreutils.ExtractFromLiteral(paramsDefault.Default); err != nil { return nil, err } } - if k == v.Var.Description { + if e.Name == e.Parameter.Var.Description { // a: # a isn't very helpful - paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") + paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, "") } else { - paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Var.Description) + paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, e.Parameter.Var.Description) } if err != nil { diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go index 2d98c8b834..5a2c53aee7 100644 --- a/flytectl/cmd/get/execution_util_test.go +++ b/flytectl/cmd/get/execution_util_test.go @@ -11,7 +11,7 @@ import ( ) func TestTaskInputs(t *testing.T) { - taskInputs := map[string]*core.Variable{} + taskInputs := []*core.VariableMapEntry{} t.Run("nil task", func(t *testing.T) { retValue := TaskInputs(nil) assert.Equal(t, taskInputs, retValue) @@ -60,9 +60,14 @@ func createTask() *admin.Task { }, } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } inputs := &core.VariableMap{ diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 6ef85d6cb3..dc19efeaa9 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -104,8 +104,8 @@ var launchplanColumns = []printer.Column{ {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, {Header: "State", JSONPath: "$.spec.state"}, {Header: "Schedule", JSONPath: "$.spec.entityMetadata.schedule"}, - {Header: "Inputs", JSONPath: "$.closure.expectedInputs.parameters." + printer.DefaultFormattedDescriptionsKey + ".var.description"}, - {Header: "Outputs", JSONPath: "$.closure.expectedOutputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Inputs", JSONPath: "$.closure.expectedInputs.parameters[0].parameter.var.description"}, + {Header: "Outputs", JSONPath: "$.closure.expectedOutputs.variables[0].var.description"}, } // Column structure for get all launchplans diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index e6a7cbec01..cf944cf5e6 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -39,9 +39,10 @@ func getLaunchPlanSetup() { // TODO: migrate to new command context from testutils cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsLp = []string{"launchplan1"} - parameterMap := map[string]*core.Parameter{ - "numbers": { - Var: &core.Variable{ + parameterMap := []*core.ParameterMapEntry{ + { + Name: "numbers", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -51,21 +52,21 @@ func getLaunchPlanSetup() { }, }, }, - Description: "short desc", - }, + Description: "short desc"}}, }, - "numbers_count": { - Var: &core.Variable{ + { + Name: "numbers_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, - }, - Description: "long description will be truncated in table", - }, + }, Description: "long description will be truncated in table", + }}, }, - "run_local_at_count": { - Var: &core.Variable{ + { + Name: "run_local_at_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, @@ -73,21 +74,21 @@ func getLaunchPlanSetup() { }, Description: "run_local_at_count", }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, }, }, }, }, }, - }, - }, + }}, }, } launchPlan1 := &admin.LaunchPlan{ @@ -257,80 +258,98 @@ func TestGetLaunchPlanFunc(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] } }, "closure": { "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] }, "createdAt": "1970-01-01T00:00:01Z" } @@ -342,80 +361,98 @@ func TestGetLaunchPlanFunc(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] } }, "closure": { "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] }, "createdAt": "1970-01-01T00:00:00Z" } @@ -440,80 +477,98 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] } }, "closure": { "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] }, "createdAt": "1970-01-01T00:00:01Z" } @@ -537,80 +592,98 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] } }, "closure": { "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] }, "createdAt": "1970-01-01T00:00:01Z" } @@ -625,7 +698,214 @@ func TestGetLaunchPlans(t *testing.T) { argsLp = []string{} err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, `[ + { + "id": { + "name": "launchplan1", + "version": "v2" + }, + "spec": { + "defaultInputs": { + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } + } + }, + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } + } + }, + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + ] + } + }, + "closure": { + "expectedInputs": { + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } + } + }, + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } + } + }, + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + ] + }, + "createdAt": "1970-01-01T00:00:01Z" + } + }, + { + "id": { + "name": "launchplan1", + "version": "v1" + }, + "spec": { + "defaultInputs": { + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } + } + }, + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } + } + }, + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + ] + } + }, + "closure": { + "expectedInputs": { + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } + } + }, + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } + } + }, + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" + } + } + } + } + } + ] + }, + "createdAt": "1970-01-01T00:00:00Z" + } + } +]`) } func TestGetLaunchPlansWithExecFile(t *testing.T) { @@ -647,80 +927,98 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] } }, "closure": { "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" + "parameters": [ + { + "name": "numbers", + "parameter": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" + } } }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" + { + "name": "numbers_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" + } } }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" + { + "name": "run_local_at_count", + "parameter": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "run_local_at_count" }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" + "default": { + "scalar": { + "primitive": { + "integer": "10" + } } } } } - } + ] }, "createdAt": "1970-01-01T00:00:01Z" } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 63b490ae82..e3ce88e348 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,6 +3,8 @@ package get import ( "context" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytectl/cmd/config" taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -97,8 +99,8 @@ var taskColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, - {Header: "Inputs", JSONPath: "$.closure.compiledTask.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, - {Header: "Outputs", JSONPath: "$.closure.compiledTask.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Inputs", JSONPath: "$.closure.compiledTask.template.interface.inputs.variables[0].var.description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledTask.template.interface.outputs.variables[0].var.description"}, {Header: "Discoverable", JSONPath: "$.closure.compiledTask.template.metadata.discoverable"}, {Header: "Discovery Version", JSONPath: "$.closure.compiledTask.template.metadata.discoveryVersion"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, @@ -133,6 +135,14 @@ func TaskToTableProtoMessages(l []*admin.Task) []proto.Message { return messages } +func VariableMapEntriesToMap(mapFieldEntries []*core.VariableMapEntry) (variableMap map[string]*core.Variable) { + variableMap = map[string]*core.Variable{} + for _, e := range mapFieldEntries { + variableMap[e.Name] = e.Var + } + return +} + func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { taskPrinter := printer.Printer{} var tasks []*admin.Task diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 0133c20f46..dfed9cea1f 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -54,9 +54,14 @@ func getTaskSetup() { }, Description: "var description", } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } task1 := &admin.Task{ @@ -256,24 +261,30 @@ func TestGetTaskFunc(t *testing.T) { "template": { "interface": { "inputs": { - "variables": { - "sorted_list1": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } }, - "sorted_list2": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } } - } + ] } } } @@ -291,24 +302,30 @@ func TestGetTaskFunc(t *testing.T) { "template": { "interface": { "inputs": { - "variables": { - "sorted_list1": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } }, - "sorted_list2": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } } - } + ] } } } @@ -363,24 +380,30 @@ func TestGetTaskFuncLatest(t *testing.T) { "template": { "interface": { "inputs": { - "variables": { - "sorted_list1": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } }, - "sorted_list2": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } } - } + ] } } } @@ -412,24 +435,30 @@ func TestGetTaskWithVersion(t *testing.T) { "template": { "interface": { "inputs": { - "variables": { - "sorted_list1": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } }, - "sorted_list2": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } } - } + ] } } } @@ -447,7 +476,90 @@ func TestGetTasks(t *testing.T) { mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, `[ + { + "id": { + "name": "task1", + "version": "v2" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + }, + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + } + ] + } + } + } + }, + "createdAt": "1970-01-01T00:00:01Z" + } + }, + { + "id": { + "name": "task1", + "version": "v1" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + }, + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + } + ] + } + } + } + }, + "createdAt": "1970-01-01T00:00:00Z" + } + } +]`) } func TestGetTasksFilters(t *testing.T) { @@ -459,7 +571,47 @@ func TestGetTasksFilters(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) + tearDownAndVerify(t, `{ + "id": { + "name": "task1", + "version": "v1" + }, + "closure": { + "compiledTask": { + "template": { + "interface": { + "inputs": { + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + }, + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } + } + ] + } + } + } + }, + "createdAt": "1970-01-01T00:00:00Z" + } +}`) } func TestGetTaskWithExecFile(t *testing.T) { @@ -484,24 +636,30 @@ func TestGetTaskWithExecFile(t *testing.T) { "template": { "interface": { "inputs": { - "variables": { - "sorted_list1": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + "variables": [ + { + "name": "sorted_list1", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } }, - "sorted_list2": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" + { + "name": "sorted_list2", + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" + } } - } + ] } } } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 2670b7f10d..f461aac9e3 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -87,8 +87,8 @@ Usage var workflowColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, - {Header: "Inputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, - {Header: "Outputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Inputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.inputs.variables[0].var.description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.outputs.variables[0].var.description"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, } diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 46ad846cdd..54c826d423 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -38,31 +38,35 @@ func getWorkflowSetup() { Domain: domainValue, }, } - - variableMap := map[string]*core.Variable{ - "var1": { - Type: &core.LiteralType{ - Type: &core.LiteralType_CollectionType{ - CollectionType: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_INTEGER, + variableMap := []*core.VariableMapEntry{ + { + Name: "var1", + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, }, }, }, + Description: "var1", }, - Description: "var1", - }, - "var2": { - Type: &core.LiteralType{ - Type: &core.LiteralType_CollectionType{ - CollectionType: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_INTEGER, + }, { + Name: "var2", + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, }, }, }, + Description: "var2 long descriptions probably needs truncate", }, - Description: "var2 long descriptions probably needs truncate", }, } workflow1 = &admin.Workflow{ diff --git a/flytectl/go.mod b/flytectl/go.mod index 533ac14d2f..1873b540e2 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.19.24 + github.com/flyteorg/flyteidl v0.20.2 github.com/flyteorg/flytestdlib v0.3.34 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index c99b90cda6..1c820fdecf 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,8 +345,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.19.24 h1:aiBKTFNKZpIvOfcI051I33LnhQl54N3dhkaubucOg+E= -github.com/flyteorg/flyteidl v0.19.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.20.2 h1:3DDj1y9Axmb35SskN/h2nRgohWhGBPGxmJSX7b/Y2rk= +github.com/flyteorg/flyteidl v0.20.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.34 h1:OOuV03X8c1AWInzBU6IRsqpEF6y8WDJngbPcdL4VktY= github.com/flyteorg/flytestdlib v0.3.34/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index 39d0121c93..e38d0d054e 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -27,9 +27,10 @@ func getLaunchPlanFetcherSetup() { adminClient = new(mocks.AdminServiceClient) adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} - parameterMap := map[string]*core.Parameter{ - "numbers": { - Var: &core.Variable{ + parameterMap := []*core.ParameterMapEntry{ + { + Name: "numbers", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -39,40 +40,42 @@ func getLaunchPlanFetcherSetup() { }, }, }, - }, + }}, }, - "numbers_count": { - Var: &core.Variable{ + { + Name: "numbers_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, - }, + }}, }, - "run_local_at_count": { - Var: &core.Variable{ + { + Name: "run_local_at_count", + Parameter: &core.Parameter{Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, }, }, }, }, }, - }, - }, + }}, }, } launchPlan1 = &admin.LaunchPlan{ diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index 0bfc9ef8dd..50d14e2144 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -41,9 +41,14 @@ func getTaskFetcherSetup() { }, }, } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } task1 := &admin.Task{ diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index 9ae96612a6..c8da9b2373 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -38,9 +38,14 @@ func getWorkflowFetcherSetup() { }, }, } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } var compiledTasks []*core.CompiledTask diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 75d67208eb..0f11d15ac7 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -6,7 +6,6 @@ import ( "fmt" "net/url" "os" - "sort" "strings" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -170,50 +169,37 @@ func printJSONYaml(format OutputFormat, v interface{}) error { return nil } -func FormatVariableDescriptions(variableMap map[string]*core.Variable) { - keys := make([]string, 0, len(variableMap)) - // sort the keys for testing and consistency with other output formats - for k := range variableMap { - keys = append(keys, k) - } - sort.Strings(keys) - +func FormatVariableDescriptions(variableMap []*core.VariableMapEntry) { var descriptions []string - for _, k := range keys { - v := variableMap[k] + for _, e := range variableMap { + if e.Var == nil { + continue + } // a: a isn't very helpful - if k != v.Description { - descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Description))) + if e.Name != e.Var.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", e.Name, e.Var.Description))) } else { - descriptions = append(descriptions, getTruncatedLine(k)) + descriptions = append(descriptions, getTruncatedLine(e.Name)) } } - variableMap[DefaultFormattedDescriptionsKey] = &core.Variable{Description: strings.Join(descriptions, "\n")} + variableMap[0] = &core.VariableMapEntry{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}} } -func FormatParameterDescriptions(parameterMap map[string]*core.Parameter) { - keys := make([]string, 0, len(parameterMap)) - // sort the keys for testing and consistency with other output formats - for k := range parameterMap { - keys = append(keys, k) - } - sort.Strings(keys) - +func FormatParameterDescriptions(parameterMap []*core.ParameterMapEntry) { var descriptions []string - for _, k := range keys { - v := parameterMap[k] - if v.Var == nil { + for _, e := range parameterMap { + if e.Parameter == nil || e.Parameter.Var == nil { continue } // a: a isn't very helpful - if k != v.Var.Description { - descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Var.Description))) + if e.Name != e.Parameter.Var.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", e.Name, e.Parameter.Var.Description))) } else { - descriptions = append(descriptions, getTruncatedLine(k)) + descriptions = append(descriptions, getTruncatedLine(e.Name)) } } - parameterMap[DefaultFormattedDescriptionsKey] = &core.Parameter{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}} + parameterMap[0] = &core.ParameterMapEntry{Parameter: &core.Parameter{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}}} } func getTruncatedLine(line string) string { diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 6d5441b9af..1d0ee4e15c 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -150,9 +150,15 @@ func TestPrint(t *testing.T) { }, }, } - variableMap := map[string]*core.Variable{ - "sorted_list1": &sortedListLiteralType, - "sorted_list2": &sortedListLiteralType, + variableMap := []*core.VariableMapEntry{ + { + Name: "sorted_list1", + Var: &sortedListLiteralType, + }, + { + Name: "sorted_list2", + Var: &sortedListLiteralType, + }, } var compiledTasks []*core.CompiledTask @@ -275,14 +281,26 @@ func TestFormatVariableDescriptions(t *testing.T) { barVar := &core.Variable{ Description: "bar", } - variableMap := map[string]*core.Variable{ - "var1": fooVar, - "var2": barVar, - "foo": fooVar, - "bar": barVar, + variableMap := []*core.VariableMapEntry{ + { + Name: "var1", + Var: fooVar, + }, + { + Name: "var2", + Var: barVar, + }, + { + Name: "foo", + Var: fooVar, + }, + { + Name: "bar", + Var: barVar, + }, } FormatVariableDescriptions(variableMap) - assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", variableMap[DefaultFormattedDescriptionsKey].Description) + assert.Equal(t, "var1: foo\nvar2: bar\nfoo\nbar", variableMap[0].Var.Description) } func TestFormatParameterDescriptions(t *testing.T) { @@ -297,13 +315,28 @@ func TestFormatParameterDescriptions(t *testing.T) { }, } emptyParam := &core.Parameter{} - paramMap := map[string]*core.Parameter{ - "var1": fooParam, - "var2": barParam, - "foo": fooParam, - "bar": barParam, - "empty": emptyParam, + paramMap := []*core.ParameterMapEntry{ + { + Name: "var1", + Parameter: fooParam, + }, + { + Name: "var2", + Parameter: barParam, + }, + { + Name: "foo", + Parameter: fooParam, + }, + { + Name: "bar", + Parameter: barParam, + }, + { + Name: "empty", + Parameter: emptyParam, + }, } FormatParameterDescriptions(paramMap) - assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", paramMap[DefaultFormattedDescriptionsKey].Var.Description) + assert.Equal(t, "var1: foo\nvar2: bar\nfoo\nbar", paramMap[0].Parameter.Var.Description) } diff --git a/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json index baae3d9926..6b7330e1d7 100644 --- a/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json +++ b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json @@ -11,24 +11,30 @@ "metadata": {}, "interface": { "inputs": { - "variables": { - "my_input": { - "type": { - "simple": "FLOAT" - }, - "description": "my_input" + "variables": [ + { + "name": "my_input", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "my_input" + } } - } + ] }, "outputs": { - "variables": { - "o0": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" + "variables": [ + { + "name": "o0", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } } - } + ] } }, "nodes": [ @@ -227,7 +233,7 @@ ], "error": { "failedNodeId": "inner_fractions", - "message": "Only \u003c0.7 allowed" + "message": "Only <0.7 allowed" } } } @@ -424,24 +430,30 @@ }, "interface": { "inputs": { - "variables": { - "n": { - "type": { - "simple": "FLOAT" - }, - "description": "n" + "variables": [ + { + "name": "n", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "n" + } } - } + ] }, "outputs": { - "variables": { - "o0": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" + "variables": [ + { + "name": "o0", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } } - } + ] } }, "container": { @@ -497,24 +509,30 @@ }, "interface": { "inputs": { - "variables": { - "n": { - "type": { - "simple": "FLOAT" - }, - "description": "n" + "variables": [ + { + "name": "n", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "n" + } } - } + ] }, "outputs": { - "variables": { - "o0": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" + "variables": [ + { + "name": "o0", + "var": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" + } } - } + ] } }, "container": { diff --git a/flytectl/pkg/visualize/testdata/compiled_subworkflows.json b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json index 8bbf441367..b46a334701 100644 --- a/flytectl/pkg/visualize/testdata/compiled_subworkflows.json +++ b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json @@ -11,36 +11,48 @@ "metadata": {}, "interface": { "inputs": { - "variables": { - "a": { - "type": { - "simple": "INTEGER" - }, - "description": "a" + "variables": [ + { + "name": "a", + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } } - } + ] }, "outputs": { - "variables": { - "o0": { - "type": { - "simple": "INTEGER" - }, - "description": "o0" + "variables": [ + { + "name": "o0", + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "o0" + } }, - "o1": { - "type": { - "simple": "STRING" - }, - "description": "o1" + { + "name": "o1", + "var": { + "type": { + "simple": "STRING" + }, + "description": "o1" + } }, - "o2": { - "type": { - "simple": "STRING" - }, - "description": "o2" + { + "name": "o2", + "var": { + "type": { + "simple": "STRING" + }, + "description": "o2" + } } - } + ] } }, "nodes": [ @@ -222,30 +234,39 @@ "metadata": {}, "interface": { "inputs": { - "variables": { - "a": { - "type": { - "simple": "INTEGER" - }, - "description": "a" + "variables": [ + { + "name": "a", + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } } - } + ] }, "outputs": { - "variables": { - "o0": { - "type": { - "simple": "STRING" - }, - "description": "o0" + "variables": [ + { + "name": "o0", + "var": { + "type": { + "simple": "STRING" + }, + "description": "o0" + } }, - "o1": { - "type": { - "simple": "STRING" - }, - "description": "o1" + { + "name": "o1", + "var": { + "type": { + "simple": "STRING" + }, + "description": "o1" + } } - } + ] } }, "nodes": [ @@ -419,30 +440,39 @@ }, "interface": { "inputs": { - "variables": { - "a": { - "type": { - "simple": "INTEGER" - }, - "description": "a" + "variables": [ + { + "name": "a", + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "a" + } } - } + ] }, "outputs": { - "variables": { - "c": { - "type": { - "simple": "STRING" - }, - "description": "c" + "variables": [ + { + "name": "c", + "var": { + "type": { + "simple": "STRING" + }, + "description": "c" + } }, - "t1_int_output": { - "type": { - "simple": "INTEGER" - }, - "description": "t1_int_output" + { + "name": "t1_int_output", + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "t1_int_output" + } } - } + ] } }, "container": { @@ -478,5 +508,4 @@ } } ] -} - +} \ No newline at end of file From 6a8bb243abafd89faa3907a37cd522b237f0b7aa Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 2 Sep 2021 14:12:35 -0700 Subject: [PATCH 140/356] Update documentation (#173) Signed-off-by: Flyte-Bot Co-authored-by: EngHabu --- flytectl/docs/source/gen/flytectl_update.rst | 7 +- .../gen/flytectl_update_launchplan-meta.rst | 94 +++++++++++++++++++ .../source/gen/flytectl_update_launchplan.rst | 24 ++--- ...task.rst => flytectl_update_task-meta.rst} | 10 +- ....rst => flytectl_update_workflow-meta.rst} | 10 +- 5 files changed, 118 insertions(+), 27 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst rename flytectl/docs/source/gen/{flytectl_update_task.rst => flytectl_update_task-meta.rst} (96%) rename flytectl/docs/source/gen/{flytectl_update_workflow.rst => flytectl_update_workflow-meta.rst} (96%) diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 3336ec4509..cb65073fef 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -76,11 +76,12 @@ SEE ALSO * :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes * :doc:`flytectl_update_execution-cluster-label` - Updates matchable resources of execution cluster label * :doc:`flytectl_update_execution-queue-attribute` - Updates matchable resources of execution queue attributes -* :doc:`flytectl_update_launchplan` - Updates launch plan metadata +* :doc:`flytectl_update_launchplan` - Updates launch plan status +* :doc:`flytectl_update_launchplan-meta` - Updates launch plan metadata * :doc:`flytectl_update_plugin-override` - Updates matchable resources of plugin overrides * :doc:`flytectl_update_project` - Updates project resources -* :doc:`flytectl_update_task` - Updates task metadata +* :doc:`flytectl_update_task-meta` - Updates task metadata * :doc:`flytectl_update_task-resource-attribute` - Updates matchable resources of task attributes -* :doc:`flytectl_update_workflow` - Updates workflow metadata * :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config +* :doc:`flytectl_update_workflow-meta` - Updates workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst new file mode 100644 index 0000000000..14717eb90c --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -0,0 +1,94 @@ +.. _flytectl_update_launchplan-meta: + +flytectl update launchplan-meta +------------------------------- + +Updates launch plan metadata + +Synopsis +~~~~~~~~ + + + +Following command updates the description on the launchplan. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + +Archiving launchplan named entity is not supported and would throw an error. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + +Activating launchplan named entity would be a noop. +:: + + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + +Usage + + +:: + + flytectl update launchplan-meta [flags] + +Options +~~~~~~~ + +:: + + --activate activate the named entity. + --archive archive named entity. + --description string description of the named entity. + --dryRun execute command without making any modifications. + -h, --help help for launchplan-meta + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. + diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 5ad0814622..41f7995b27 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -3,27 +3,23 @@ flytectl update launchplan -------------------------- -Updates launch plan metadata +Updates launch plan status Synopsis ~~~~~~~~ -Following command updates the description on the launchplan. +Activating launchplan activates the scheduled job associated with it :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launchplan named entity is not supported and would throw an error. +Archiving launchplan deschedules any scheduled job associated with it :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive -Activating launchplan named entity would be a noop. -:: - - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate Usage @@ -37,11 +33,11 @@ Options :: - --activate activate the named entity. - --archive archive named entity. - --description string description of the named entity. - --dryRun execute command without making any modifications. - -h, --help help for launchplan + --activate activate launchplan. + --archive archive launchplan. + --dryRun execute command without making any modifications. + -h, --help help for launchplan + --version string version of the launchplan to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst similarity index 96% rename from flytectl/docs/source/gen/flytectl_update_task.rst rename to flytectl/docs/source/gen/flytectl_update_task-meta.rst index 786d17ff96..f25862a7f9 100644 --- a/flytectl/docs/source/gen/flytectl_update_task.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -1,7 +1,7 @@ -.. _flytectl_update_task: +.. _flytectl_update_task-meta: -flytectl update task --------------------- +flytectl update task-meta +------------------------- Updates task metadata @@ -30,7 +30,7 @@ Usage :: - flytectl update task [flags] + flytectl update task-meta [flags] Options ~~~~~~~ @@ -41,7 +41,7 @@ Options --archive archive named entity. --description string description of the named entity. --dryRun execute command without making any modifications. - -h, --help help for task + -h, --help help for task-meta Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_workflow.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst similarity index 96% rename from flytectl/docs/source/gen/flytectl_update_workflow.rst rename to flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index c717ba53e1..404dd37b52 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -1,7 +1,7 @@ -.. _flytectl_update_workflow: +.. _flytectl_update_workflow-meta: -flytectl update workflow ------------------------- +flytectl update workflow-meta +----------------------------- Updates workflow metadata @@ -30,7 +30,7 @@ Usage :: - flytectl update workflow [flags] + flytectl update workflow-meta [flags] Options ~~~~~~~ @@ -41,7 +41,7 @@ Options --archive archive named entity. --description string description of the named entity. --dryRun execute command without making any modifications. - -h, --help help for workflow + -h, --help help for workflow-meta Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 24710f743e8cac29290ca38a4aff1975d39a833f Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 3 Sep 2021 12:19:52 +0530 Subject: [PATCH 141/356] Hotfix register example (#172) * fix register example Signed-off-by: Yuvraj --- .../subcommand/register/files_config.go | 3 +- .../subcommand/register/filesconfig_flags.go | 3 +- .../register/filesconfig_flags_test.go | 14 ++++ flytectl/cmd/register/examples.go | 33 ++++++++-- flytectl/cmd/register/examples_test.go | 4 +- flytectl/cmd/register/files.go | 3 + flytectl/cmd/register/register_util.go | 65 +++++++++---------- flytectl/cmd/register/register_util_test.go | 33 ++++------ 8 files changed, 92 insertions(+), 66 deletions(-) diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index c489dd38ed..8aea9f099b 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -15,7 +15,8 @@ type FilesConfig struct { ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` AssumableIamRole string `json:"assumableIamRole" pflag:", custom assumable iam auth role to register launch plans with."` - K8ServiceAccount string `json:"k8ServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` + K8sServiceAccount string `json:"k8sServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` + K8ServiceAccount string `json:"k8ServiceAccount" pflag:", deprecated. Please use --K8sServiceAccount"` OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` SourceUploadPath string `json:"sourceUploadPath" pflag:", Location for source code in storage."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index cd19e456cc..5727138104 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -54,7 +54,8 @@ func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") cmdFlags.BoolVar(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") cmdFlags.StringVar(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), DefaultFilesConfig.AssumableIamRole, " custom assumable iam auth role to register launch plans with.") - cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " custom kubernetes service account auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.K8sServiceAccount, fmt.Sprintf("%v%v", prefix, "k8sServiceAccount"), DefaultFilesConfig.K8sServiceAccount, " custom kubernetes service account auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " deprecated. Please use --K8sServiceAccount") cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "execute command without making any modifications.") diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 951cfbaecc..6f46245d9f 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -155,6 +155,20 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_k8sServiceAccount", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("k8sServiceAccount", testValue) + if vString, err := cmdFlags.GetString("k8sServiceAccount"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.K8sServiceAccount) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_k8ServiceAccount", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 0952571c12..264324876d 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -4,6 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flytestdlib/logger" + + "github.com/google/go-github/github" + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" ) @@ -16,27 +20,42 @@ Registers all latest flytesnacks example bin/flytectl register examples -d development -p flytesnacks +Registers specific release of flytesnacks example +:: + bin/flytectl register examples -d development -p flytesnacks v0.2.176 + +Note: register command automatically override the version with release version Usage ` ) var ( - githubOrg = "flyteorg" - githubRepository = "flytesnacks" - snackReleaseURL = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flytesnacks-%s.tgz" - flyteManifest = "https://github.com/flyteorg/flytesnacks/releases/download/%s/flyte_tests_manifest.json" + githubOrg = "flyteorg" + flytesnacksRepository = "flytesnacks" ) func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - flytesnacks, tag, err := getFlyteTestManifest(githubOrg, githubRepository) + var examples []github.ReleaseAsset + var release string + + // Deprecated checks for --k8Service + deprecatedCheck(ctx) + + if len(args) == 1 { + release = args[0] + } + examples, tag, err := getAllFlytesnacksExample(githubOrg, flytesnacksRepository, release) if err != nil { return err } + + logger.Infof(ctx, "Register started for %s %s release https://github.com/%s/%s/releases/tag/%s", flytesnacksRepository, tag, githubOrg, flytesnacksRepository, tag) rconfig.DefaultFilesConfig.Archive = true - for _, v := range flytesnacks { + rconfig.DefaultFilesConfig.Version = tag + for _, v := range examples { args := []string{ - fmt.Sprintf(snackReleaseURL, tag, v.Name), + *v.BrowserDownloadURL, } if err := Register(ctx, args, cmdCtx); err != nil { return fmt.Errorf("Example %v failed to register %v", v.Name, err) diff --git a/flytectl/cmd/register/examples_test.go b/flytectl/cmd/register/examples_test.go index 1c004a74a9..5b38de8196 100644 --- a/flytectl/cmd/register/examples_test.go +++ b/flytectl/cmd/register/examples_test.go @@ -16,11 +16,11 @@ func TestRegisterExamplesFunc(t *testing.T) { func TestRegisterExamplesFuncErr(t *testing.T) { setup() registerFilesSetup() - githubRepository = "testingsnacks" + flytesnacksRepository = "testingsnacks" args = []string{""} err := registerExamplesFunc(ctx, args, cmdCtx) // TODO (Yuvraj) make test to success after fixing flytesnacks bug assert.NotNil(t, err) - githubRepository = "flytesnacks" + flytesnacksRepository = "flytesnacks" } diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 210bb1bba2..99d8a99090 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -99,6 +99,9 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) var _err error var dataRefs []string + // Deprecated checks for --k8Service + deprecatedCheck(ctx) + // getSerializeOutputFiles will return you all proto and source code compress file in sorted order dataRefs, tmpDir, err := getSerializeOutputFiles(ctx, args) if err != nil { diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 07f62d6246..fa51cc29c8 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -55,22 +55,8 @@ type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } -var FlyteSnacksRelease []FlyteSnack var Client *storage.DataStore -// FlyteSnack Defines flyte test manifest structure -type FlyteSnack struct { - Name string `json:"name"` - Priority string `json:"priority"` - Path string `json:"path"` - ExitCondition Condition `json:"exitCondition"` -} - -type Condition struct { - ExitSuccess bool `json:"exit_success"` - ExitMessage string `json:"exit_message"` -} - var httpClient HTTPClient func init() { @@ -242,12 +228,12 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { func hydrateLaunchPlanSpec(lpSpec *admin.LaunchPlanSpec) { assumableIamRole := len(rconfig.DefaultFilesConfig.AssumableIamRole) > 0 - k8ServiceAcct := len(rconfig.DefaultFilesConfig.K8ServiceAccount) > 0 + k8sServiceAcct := len(rconfig.DefaultFilesConfig.K8sServiceAccount) > 0 outputLocationPrefix := len(rconfig.DefaultFilesConfig.OutputLocationPrefix) > 0 - if assumableIamRole || k8ServiceAcct { + if assumableIamRole || k8sServiceAcct { lpSpec.AuthRole = &admin.AuthRole{ AssumableIamRole: rconfig.DefaultFilesConfig.AssumableIamRole, - KubernetesServiceAccount: rconfig.DefaultFilesConfig.K8ServiceAccount, + KubernetesServiceAccount: rconfig.DefaultFilesConfig.K8sServiceAccount, } } if outputLocationPrefix { @@ -468,32 +454,34 @@ func getJSONSpec(message proto.Message) string { return jsonSpec } -func getFlyteTestManifest(org, repository string) ([]FlyteSnack, string, error) { +func filterExampleFromRelease(releases github.RepositoryRelease) []github.ReleaseAsset { + var assets []github.ReleaseAsset + for _, v := range releases.Assets { + if strings.HasSuffix(*v.Name, ".tgz") { + assets = append(assets, v) + } + } + return assets +} + +func getAllFlytesnacksExample(org, repository, release string) ([]github.ReleaseAsset, string, error) { c := github.NewClient(nil) opt := &github.ListOptions{Page: 1, PerPage: 1} + if len(release) > 0 { + releases, _, err := c.Repositories.GetReleaseByTag(context.Background(), org, repository, release) + if err != nil { + return nil, "", err + } + return filterExampleFromRelease(*releases), release, nil + } releases, _, err := c.Repositories.ListReleases(context.Background(), org, repository, opt) if err != nil { return nil, "", err } if len(releases) == 0 { - return nil, "", fmt.Errorf("Repository doesn't have any release") + return nil, "", fmt.Errorf("repository doesn't have any release") } - response, err := http.Get(fmt.Sprintf(flyteManifest, *releases[0].TagName)) - if err != nil { - return nil, "", err - } - defer response.Body.Close() - - data, err := ioutil.ReadAll(response.Body) - if err != nil { - return nil, "", err - } - - err = json.Unmarshal(data, &FlyteSnacksRelease) - if err != nil { - return nil, "", err - } - return FlyteSnacksRelease, *releases[0].TagName, nil + return filterExampleFromRelease(*releases[0]), *releases[0].TagName, nil } @@ -580,3 +568,10 @@ func segregateSourceAndProtos(dataRefs []string) (string, []string, []string) { } return sourceCode, validProto, InvalidFiles } + +func deprecatedCheck(ctx context.Context) { + if len(rconfig.DefaultFilesConfig.K8ServiceAccount) > 0 { + logger.Warning(ctx, "--K8ServiceAccount is deprecated, Please use --K8sServiceAccount") + rconfig.DefaultFilesConfig.K8sServiceAccount = rconfig.DefaultFilesConfig.K8ServiceAccount + } +} diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index b4b11563a4..bb85c1c22f 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -53,7 +53,7 @@ func registerFilesSetup() { cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) rconfig.DefaultFilesConfig.AssumableIamRole = "" - rconfig.DefaultFilesConfig.K8ServiceAccount = "" + rconfig.DefaultFilesConfig.K8sServiceAccount = "" rconfig.DefaultFilesConfig.OutputLocationPrefix = "" } @@ -278,19 +278,19 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { hydrateLaunchPlanSpec(lpSpec) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) }) - t.Run("k8Service account override", func(t *testing.T) { + t.Run("k8sService account override", func(t *testing.T) { setup() registerFilesSetup() - rconfig.DefaultFilesConfig.K8ServiceAccount = "k8Account" + rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} hydrateLaunchPlanSpec(lpSpec) assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) - t.Run("Both k8Service and IamRole", func(t *testing.T) { + t.Run("Both k8sService and IamRole", func(t *testing.T) { setup() registerFilesSetup() rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" - rconfig.DefaultFilesConfig.K8ServiceAccount = "k8Account" + rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} hydrateLaunchPlanSpec(lpSpec) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole", @@ -306,13 +306,6 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { }) } -func TestFlyteManifest(t *testing.T) { - _, tag, err := getFlyteTestManifest(githubOrg, githubRepository) - assert.Nil(t, err) - assert.Contains(t, tag, "v") - assert.NotEmpty(t, tag) -} - func TestUploadFastRegisterArtifact(t *testing.T) { t.Run("Successful upload", func(t *testing.T) { testScope := promutils.NewTestScope() @@ -358,22 +351,22 @@ func TestGetStorageClient(t *testing.T) { }) } -func TestGetFlyteTestManifest(t *testing.T) { +func TestGetAllFlytesnacksExample(t *testing.T) { t.Run("Failed to get manifest with wrong name", func(t *testing.T) { - _, tag, err := getFlyteTestManifest("no////ne", "no////ne") + _, tag, err := getAllFlytesnacksExample("no////ne", "no////ne", "") assert.NotNil(t, err) assert.Equal(t, len(tag), 0) }) t.Run("Failed to get release", func(t *testing.T) { - _, tag, err := getFlyteTestManifest("flyteorg", "homebrew-tap") + _, tag, err := getAllFlytesnacksExample("flyteorg", "homebrew-tap", "") assert.NotNil(t, err) assert.Equal(t, len(tag), 0) }) - t.Run("Failed to get manifest", func(t *testing.T) { - flyteManifest = "" - _, tag, err := getFlyteTestManifest("flyteorg", "flytesnacks") - assert.NotNil(t, err) - assert.Equal(t, len(tag), 0) + t.Run("Successfully get examples", func(t *testing.T) { + assets, tag, err := getAllFlytesnacksExample("flyteorg", "flytesnacks", "v0.2.175") + assert.Nil(t, err) + assert.Greater(t, len(tag), 0) + assert.Greater(t, len(assets), 0) }) } From e93d16cfdbce3fd805470285518e06f9181ab900 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 9 Sep 2021 07:34:23 +0530 Subject: [PATCH 142/356] fix algolia search (#179) --- flytectl/doc-requirements.in | 2 +- flytectl/doc-requirements.txt | 15 +-- flytectl/docs/source/_static/custom.css | 16 +++ flytectl/docs/source/conf.py | 7 +- flytectl/docs/source/index.rst | 169 ++++++++++++------------ 5 files changed, 111 insertions(+), 98 deletions(-) create mode 100644 flytectl/docs/source/_static/custom.css diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index e0751192d5..bb24b9a7b1 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -5,5 +5,5 @@ sphinx-material sphinx-code-include sphinx-copybutton sphinx_fontawesome -sphinx_tabs sphinxcontrib-yt +sphinx-panels diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 671f3d786e..e3c954b328 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -8,7 +8,7 @@ alabaster==0.7.12 # via sphinx babel==2.9.1 # via sphinx -beautifulsoup4==4.9.3 +beautifulsoup4==4.10.0 # via # furo # sphinx-code-include @@ -19,10 +19,10 @@ charset-normalizer==2.0.4 # via requests css-html-js-minify==2.5.5 # via sphinx-material -docutils==0.16 +docutils==0.17.1 # via # sphinx - # sphinx-tabs + # sphinx-panels git+git://github.com/flyteorg/furo@main # via -r doc-requirements.in idna==3.2 @@ -41,7 +41,6 @@ pygments==2.10.0 # via # sphinx # sphinx-prompt - # sphinx-tabs pyparsing==2.4.7 # via packaging python-slugify[unidecode]==5.0.2 @@ -64,8 +63,8 @@ sphinx==4.1.2 # sphinx-copybutton # sphinx-fontawesome # sphinx-material + # sphinx-panels # sphinx-prompt - # sphinx-tabs # sphinxcontrib-yt sphinx-code-include==1.1.1 # via -r doc-requirements.in @@ -75,9 +74,9 @@ sphinx-fontawesome==0.0.6 # via -r doc-requirements.in sphinx-material==0.0.34 # via -r doc-requirements.in -sphinx-prompt==1.5.0 +sphinx-panels==0.6.0 # via -r doc-requirements.in -sphinx-tabs==3.2.0 +sphinx-prompt==1.5.0 # via -r doc-requirements.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -95,7 +94,7 @@ sphinxcontrib-yt==0.2.2 # via -r doc-requirements.in text-unidecode==1.3 # via python-slugify -unidecode==1.2.0 +unidecode==1.3.0 # via python-slugify urllib3==1.26.6 # via requests diff --git a/flytectl/docs/source/_static/custom.css b/flytectl/docs/source/_static/custom.css new file mode 100644 index 0000000000..96f45d4066 --- /dev/null +++ b/flytectl/docs/source/_static/custom.css @@ -0,0 +1,16 @@ +html .tabbed-set > label { + color: var(--color-foreground-border); +} + +html .tabbed-set > input:checked + label { + border-color: var(--color-link); + color: var(--color-link); +} + +html .tabbed-set > label:hover { + color: var(--color-link); +} + +html .tabbed-content { + box-shadow: 0 -.0625rem var(--color-background-border),0 .0625rem var(--color-background-border); +} \ No newline at end of file diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 053bbdf1e3..6767fad9e7 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -23,7 +23,7 @@ author = "Flyte" # The full version, including alpha/beta/rc tags -release = re.sub('^v', '', os.popen('git describe').read().strip()) +release = re.sub("^v", "", os.popen("git describe").read().strip()) version = release @@ -43,8 +43,8 @@ "sphinx-prompt", "sphinx_copybutton", "sphinx_fontawesome", - "sphinx_tabs.tabs", "sphinxcontrib.yt", + "sphinx_panels", ] # build the templated autosummary files @@ -77,7 +77,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = [u"_build", "Thumbs.db", ".DS_Store"] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "tango" @@ -123,6 +123,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +html_css_files = ["custom.css"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index bac2ce0607..3125fb7637 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -1,8 +1,8 @@ .. flytectl doc -########################################## +###################### ``Flytectl`` Reference -########################################## +###################### Overview ========= @@ -16,26 +16,23 @@ Install Flytectl is a Golang binary and can be installed on any platform supported by golang +.. tabbed:: OSX -.. tabs:: + .. prompt:: bash $ - .. tab:: OSX + brew install flyteorg/homebrew-tap/flytectl - .. prompt:: bash $ + *Upgrade* existing installation using the following command: - brew install flyteorg/homebrew-tap/flytectl + .. prompt:: bash $ - *Upgrade* existing installation using the following command: + brew update && brew upgrade flytectl - .. prompt:: bash $ +.. tabbed:: Other Operating systems - brew update && brew upgrade flytectl + .. prompt:: bash $ - .. tab:: Other Operating systems - - .. prompt:: bash $ - - curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash **Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: @@ -51,79 +48,79 @@ on command-line. The following configuration is useful to setup. Basic Configuration -------------------- -.. tabs:: Flytectl configuration - - .. tab:: Local Flyte Sandbox - - Automatically configured for you by ``flytectl sandbox`` command. - - .. code-block:: yaml - - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///localhost:30081 - insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - authType: Pkce # authType: Pkce # if using authentication or just drop this. - storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: my-region-here - secret-key: miniostorage - container: my-s3-bucket - type: minio - - .. tab:: AWS Configuration - - .. code-block:: yaml - - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket - - .. tab:: GCS Configuration - - .. code-block:: yaml - - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket - - .. tab:: Others - - For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. - - - Place this in $HOME/.flyte directory with name config.yaml. - This file is searched in - - * $HOME/.flyte +Flytectl configuration + +.. tabbed:: Local Flyte Sandbox + + Automatically configured for you by ``flytectl sandbox`` command. + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + authType: Pkce # authType: Pkce # if using authentication or just drop this. + storage: + connection: + access-key: minio + auth-type: accesskey + disable-ssl: true + endpoint: http://localhost:30084 + region: my-region-here + secret-key: miniostorage + container: my-s3-bucket + type: minio + +.. tabbed:: AWS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + storage: + type: stow + stow: + kind: s3 + config: + auth_type: iam + region: # Example: us-east-2 + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket + +.. tabbed:: GCS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + storage: + type: stow + stow: + kind: google + config: + json: "" + project_id: # TODO: replace with the GCP project ID + scopes: https://www.googleapis.com/auth/devstorage.read_write + container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket + +.. tabbed:: Others + + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + + Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. + This file is typically searched in: + + * ``$HOME/.flyte`` * currDir from where you run flytectl - * /etc/flyte/config - You can pass it commandline using --config aswell + * ``/etc/flyte/config`` + + You can pass the file name in the commandline using ``--config `` as well! .. toctree:: From 2761a7200771756f0671d17eb9791797274489e1 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 9 Sep 2021 14:41:41 +0530 Subject: [PATCH 143/356] added support for helm (#177) * added support for the helm Signed-off-by: Yuvraj --- .../config/subcommand/sandbox/config_flags.go | 4 +- .../subcommand/sandbox/sandbox_config.go | 8 +- flytectl/cmd/sandbox/sandbox.go | 2 +- flytectl/cmd/sandbox/start.go | 114 +++++++++--------- flytectl/cmd/sandbox/start_test.go | 75 ++++++++---- flytectl/pkg/docker/docker_util.go | 7 +- flytectl/pkg/util/githubutil/githubutil.go | 43 +++---- .../pkg/util/githubutil/githubutil_test.go | 27 ++--- 8 files changed, 154 insertions(+), 126 deletions(-) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 7126d6a2e3..ca50e9ad28 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -50,7 +50,7 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, " Path of your source code") - cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte") + cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, "Path of your source code") + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only support v0.10.0+ flyte release") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 5d3bfa9184..7005b031b1 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -7,6 +7,10 @@ var ( //Config type Config struct { - Source string `json:"source" pflag:",Path of your source code"` - Version string `json:"version" pflag:",Version of flyte"` + Source string `json:"source" pflag:",Path of your source code"` + + // Flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags + // Flytectl sandbox will only work for v0.10.0+ + // Default value dind represent the latest release + Version string `json:"version" pflag:",Version of flyte. Only support v0.10.0+ flyte release"` } diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 9be32bbba4..b269f378be 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -56,7 +56,7 @@ func CreateSandboxCommand() *cobra.Command { Long: statusLong}, "exec": {CmdFunc: sandboxClusterExec, Aliases: []string{}, ProjectDomainNotRequired: true, Short: execShort, - Long: execLong, PFlagProvider: sandboxConfig.DefaultConfig}, + Long: execLong}, } cmdcore.AddCommands(sandbox, sandboxResourcesFuncs) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index c5559988fe..b36324be14 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -9,17 +9,15 @@ import ( "path/filepath" "time" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/avast/retry-go" "github.com/olekukonko/tablewriter" corev1api "k8s.io/api/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - "github.com/flyteorg/flytectl/pkg/util/githubutil" - - "github.com/flyteorg/flytestdlib/logger" - "github.com/docker/docker/api/types/mount" - "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/k8s" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,7 +26,6 @@ import ( sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/util" ) @@ -47,23 +44,22 @@ Mount your source code repository inside sandbox bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte, Only available after v0.13.0+ +Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags :: bin/flytectl sandbox start --version=v0.14.0 +Note: Flytectl sandbox will only work for v0.10.0+ + Usage ` - k8sEndpoint = "https://127.0.0.1:30086" - flyteMinimumVersionSupported = "v0.13.0" - generatedManifest = "/flyteorg/share/flyte_generated.yaml" - flyteNamespace = "flyte" - diskPressureTaint = "node.kubernetes.io/disk-pressure" - taintEffect = "NoSchedule" -) - -var ( - flyteManifest = f.FilePathJoin(f.UserHomeDir(), ".flyte", "flyte_generated.yaml") + k8sEndpoint = "https://127.0.0.1:30086" + flyteNamespace = "flyte" + flyteRepository = "flyte" + dind = "dind" + sandboxSupportedVersion = "v0.10.0" + diskPressureTaint = "node.kubernetes.io/disk-pressure" + taintEffect = "NoSchedule" ) type ExecResult struct { @@ -86,23 +82,23 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm docker.WaitForSandbox(reader, docker.SuccessMessage) } - var k8sClient k8s.K8s - err = retry.Do( - func() error { - k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + if reader != nil { + var k8sClient k8s.K8s + err = retry.Do( + func() error { + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + return err + }, + retry.Attempts(10), + ) + if err != nil { return err - }, - retry.Attempts(10), - ) - if err != nil { - return err - } - - if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { - return err + } + if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { + return err + } + util.PrintSandboxMessage() } - - util.PrintSandboxMessage() return nil } @@ -113,7 +109,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu if err.Error() != clierrors.ErrSandboxExists { return nil, err } - fmt.Printf("Existing details of your sandbox:") + fmt.Printf("Existing details of your sandbox") util.PrintSandboxMessage() return nil, nil } @@ -137,35 +133,18 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu volumes = append(volumes, *vol) } - if len(sandboxConfig.DefaultConfig.Version) > 0 { - isGreater, err := util.IsVersionGreaterThan(sandboxConfig.DefaultConfig.Version, flyteMinimumVersionSupported) - if err != nil { - return nil, err - } - if !isGreater { - logger.Infof(ctx, "version flag only supported after with flyte %s+ release", flyteMinimumVersionSupported) - return nil, fmt.Errorf("version flag only supported after with flyte %s+ release", flyteMinimumVersionSupported) - } - if err := githubutil.GetFlyteManifest(sandboxConfig.DefaultConfig.Version, flyteManifest); err != nil { - return nil, err - } - - if vol, err := mountVolume(flyteManifest, generatedManifest); err != nil { - return nil, err - } else if vol != nil { - volumes = append(volumes, *vol) - } - + image, err := getSandboxImage(sandboxConfig.DefaultConfig.Version) + if err != nil { + return nil, err } - - fmt.Printf("%v pulling docker image %s\n", emoji.Whale, docker.ImageName) - if err := docker.PullDockerImage(ctx, cli, docker.ImageName); err != nil { + fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, image) + if err := docker.PullDockerImage(ctx, cli, image); err != nil { return nil, err } fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() - ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, docker.ImageName) + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, image) if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return nil, err @@ -179,6 +158,29 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return logReader, nil } +func getSandboxImage(version string) (string, error) { + // Latest release will use image cr.flyte.org/flyteorg/flyte-sandbox:dind + // In case of version flytectl will use cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} + + var tag = dind + if len(version) > 0 { + isGreater, err := util.IsVersionGreaterThan(version, sandboxSupportedVersion) + if err != nil { + return "", err + } + if !isGreater { + return "", fmt.Errorf("version flag only supported with flyte %s+ release", sandboxSupportedVersion) + } + sha, err := githubutil.GetSHAFromVersion(version, flyteRepository) + if err != nil { + return "", err + } + tag = fmt.Sprintf("%s-%s", dind, sha) + } + + return docker.GetSandboxImage(tag), nil +} + func mountVolume(file, destination string) (*mount.Mount, error) { if len(file) > 0 { source, err := filepath.Abs(file) diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index f2b43ff8da..0d0331968c 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -10,6 +10,8 @@ import ( "strings" "testing" + "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/pkg/k8s" "github.com/docker/docker/api/types" @@ -85,10 +87,11 @@ func TestStartSandboxFunc(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) + sandboxConfig.DefaultConfig.Version = "" bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -118,7 +121,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -155,6 +158,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxConfig.DefaultConfig.Version = "" volumes := docker.Volumes volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, @@ -163,7 +167,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -192,6 +196,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "../" + sandboxConfig.DefaultConfig.Version = "" absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) assert.Nil(t, err) volumes := docker.Volumes @@ -202,7 +207,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -232,15 +237,14 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Version = "v0.15.0" sandboxConfig.DefaultConfig.Source = "" + + sha, err := githubutil.GetSHAFromVersion(sandboxConfig.DefaultConfig.Version, "flyte") + assert.Nil(t, err) + volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: flyteManifest, - Target: generatedManifest, - }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(fmt.Sprintf("%s-%s", dind, sha)), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -260,7 +264,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) t.Run("Failed run sandbox cluster with wrong version", func(t *testing.T) { @@ -271,14 +275,9 @@ func TestStartSandboxFunc(t *testing.T) { sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: flyteManifest, - Target: generatedManifest, - }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -316,7 +315,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -353,7 +352,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -393,7 +392,7 @@ func TestStartSandboxFunc(t *testing.T) { sandboxConfig.DefaultConfig.Version = "" mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -430,7 +429,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -459,6 +458,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxConfig.DefaultConfig.Version = "" volumes := docker.Volumes volumes = append(volumes, mount.Mount{ Type: mount.TypeBind, @@ -467,7 +467,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -510,7 +510,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -534,6 +534,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" + sandboxConfig.DefaultConfig.Version = "" err = startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) @@ -546,7 +547,7 @@ func TestStartSandboxFunc(t *testing.T) { bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.ImageName, + Image: docker.GetSandboxImage(dind), Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -674,3 +675,29 @@ func TestGetNodeTaintStatus(t *testing.T) { assert.Equal(t, true, c) }) } + +func TestGetSandboxImage(t *testing.T) { + t.Run("Get Latest sandbox", func(t *testing.T) { + image, err := getSandboxImage("") + assert.Nil(t, err) + assert.Equal(t, docker.GetSandboxImage(dind), image) + }) + + t.Run("Get sandbox image with version ", func(t *testing.T) { + image, err := getSandboxImage("v0.14.0") + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(image, docker.ImageName)) + }) + t.Run("Get sandbox image with wrong version ", func(t *testing.T) { + _, err := getSandboxImage("v100.1.0") + assert.NotNil(t, err) + }) + t.Run("Get sandbox image with wrong version ", func(t *testing.T) { + _, err := getSandboxImage("aaaaaa") + assert.NotNil(t, err) + }) + t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { + _, err := getSandboxImage("v0.10.0") + assert.NotNil(t, err) + }) +} diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index de19ce15a0..1d3baabed5 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -24,7 +24,7 @@ import ( var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") SuccessMessage = "Deploying Flyte..." - ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" + ImageName = "cr.flyte.org/flyteorg/flyte-sandbox" FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} Source = "/root" @@ -179,3 +179,8 @@ func InspectExecResp(ctx context.Context, cli Docker, containerID string) error } return nil } + +// GetSandboxImage will return the sandbox image with tag +func GetSandboxImage(tag string) string { + return fmt.Sprintf("%s:%s", ImageName, tag) +} diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/util/githubutil/githubutil.go index c3ed9b8b52..ba51c160db 100644 --- a/flytectl/pkg/util/githubutil/githubutil.go +++ b/flytectl/pkg/util/githubutil/githubutil.go @@ -2,6 +2,7 @@ package githubutil import ( "context" + "net/http" "path/filepath" "runtime" "strings" @@ -14,7 +15,6 @@ import ( "github.com/flyteorg/flytectl/pkg/util" "fmt" - "io/ioutil" "github.com/google/go-github/v37/github" ) @@ -47,9 +47,14 @@ var ( arch = platformutil.Arch(runtime.GOARCH) ) +//GetGHClient will return github client +func GetGHClient() *github.Client { + return github.NewClient(&http.Client{}) +} + // GetLatestVersion returns the latest version of provided repository func GetLatestVersion(repository string) (*github.RepositoryRelease, error) { - client := github.NewClient(nil) + client := GetGHClient() release, _, err := client.Repositories.GetLatestRelease(context.Background(), owner, repository) if err != nil { return nil, err @@ -68,7 +73,7 @@ func getFlytectlAssetName() string { // CheckVersionExist returns the provided version release if version exist in repository func CheckVersionExist(version, repository string) (*github.RepositoryRelease, error) { - client := github.NewClient(nil) + client := GetGHClient() release, _, err := client.Repositories.GetReleaseByTag(context.Background(), owner, repository, version) if err != nil { return nil, err @@ -76,6 +81,16 @@ func CheckVersionExist(version, repository string) (*github.RepositoryRelease, e return release, err } +// GetSHAFromVersion returns sha commit hash against a release +func GetSHAFromVersion(version, repository string) (string, error) { + client := GetGHClient() + sha, _, err := client.Repositories.GetCommitSHA1(context.Background(), owner, repository, version, "") + if err != nil { + return "", err + } + return sha, err +} + // GetAssetsFromRelease returns the asset from github release func GetAssetsFromRelease(version, assets, repository string) (*github.ReleaseAsset, error) { release, err := CheckVersionExist(version, repository) @@ -90,28 +105,6 @@ func GetAssetsFromRelease(version, assets, repository string) (*github.ReleaseAs return nil, fmt.Errorf("assest is not found in %s[%s] release", repository, version) } -// GetFlyteManifest will write the flyte manifest in a file -func GetFlyteManifest(version string, target string) error { - asset, err := GetAssetsFromRelease(version, sandboxManifest, flyte) - if err != nil { - return err - } - response, err := util.SendRequest("GET", asset.GetBrowserDownloadURL(), nil) - if err != nil { - return err - } - defer response.Body.Close() - data, err := ioutil.ReadAll(response.Body) - if err != nil { - return err - } - if err := util.WriteIntoFile(data, target); err != nil { - return err - } - return nil - -} - // GetUpgradeMessage return the upgrade message func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error) { isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version) diff --git a/flytectl/pkg/util/githubutil/githubutil_test.go b/flytectl/pkg/util/githubutil/githubutil_test.go index 05566121b9..2f2eb64345 100644 --- a/flytectl/pkg/util/githubutil/githubutil_test.go +++ b/flytectl/pkg/util/githubutil/githubutil_test.go @@ -42,6 +42,18 @@ func TestCheckVersionExist(t *testing.T) { }) } +func TestGetSHAFromVersion(t *testing.T) { + t.Run("Invalid Tag", func(t *testing.T) { + _, err := GetSHAFromVersion("v100.0.0", "flyte") + assert.NotNil(t, err) + }) + t.Run("Valid Tag", func(t *testing.T) { + release, err := GetSHAFromVersion("v0.15.0", "flyte") + assert.Nil(t, err) + assert.Greater(t, len(release), 0) + }) +} + func TestGetAssetsFromRelease(t *testing.T) { t.Run("Successful get assets", func(t *testing.T) { assets, err := GetAssetsFromRelease("v0.15.0", sandboxManifest, flyte) @@ -62,21 +74,6 @@ func TestGetAssetsFromRelease(t *testing.T) { }) } -func TestGetFlyteManifest(t *testing.T) { - t.Run("Successful get manifest", func(t *testing.T) { - err := GetFlyteManifest("v0.15.0", "test.yaml") - assert.Nil(t, err) - }) - t.Run("Failed get manifest with wrong name", func(t *testing.T) { - err := GetFlyteManifest("v100.15.0", "test.yaml") - assert.NotNil(t, err) - }) - t.Run("Failed get manifest with wrong name", func(t *testing.T) { - err := GetFlyteManifest("v0.12.0", "test.yaml") - assert.NotNil(t, err) - }) -} - func TestGetAssetsName(t *testing.T) { t.Run("Get Assets name", func(t *testing.T) { expected := fmt.Sprintf("flytectl_%s_386.tar.gz", strings.Title(runtime.GOOS)) From 8db28dd3eb65798b690d70c4c12e679f51cef68c Mon Sep 17 00:00:00 2001 From: Sean Lin Date: Thu, 9 Sep 2021 20:00:22 -0700 Subject: [PATCH 144/356] #minor Revert "Adopt flyteidl's ordered variable map change" (#180) * Revert "Adopt flyteidl's ordered variable map change (#158)" This reverts commit 7c31c1e8f96024bdb9bdf10dcda862eb09d4b579. Signed-off-by: Sean Lin --- flytectl/cmd/create/execution_test.go | 52 +- flytectl/cmd/create/serialization_utils.go | 22 +- .../cmd/create/serialization_utils_test.go | 52 +- flytectl/cmd/get/execution_util.go | 34 +- flytectl/cmd/get/execution_util_test.go | 13 +- flytectl/cmd/get/launch_plan.go | 4 +- flytectl/cmd/get/launch_plan_test.go | 864 ++++++------------ flytectl/cmd/get/task.go | 14 +- flytectl/cmd/get/task_test.go | 328 ++----- flytectl/cmd/get/workflow.go | 4 +- flytectl/cmd/get/workflow_test.go | 38 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- flytectl/pkg/ext/launch_plan_fetcher_test.go | 41 +- flytectl/pkg/ext/task_fetcher_test.go | 11 +- flytectl/pkg/ext/workflow_fetcher_test.go | 11 +- flytectl/pkg/printer/printer.go | 46 +- flytectl/pkg/printer/printer_test.go | 65 +- .../compiled_closure_branch_nested.json | 104 +-- .../testdata/compiled_subworkflows.json | 157 ++-- 20 files changed, 645 insertions(+), 1221 deletions(-) diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 36166fdf21..65df850ae5 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -32,14 +32,9 @@ func createExecutionSetup() { }, }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } task1 := &admin.Task{ @@ -61,10 +56,9 @@ func createExecutionSetup() { }, } mockClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) - parameterMap := []*core.ParameterMapEntry{ - { - Name: "numbers", - Parameter: &core.Parameter{Var: &core.Variable{ + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -74,42 +68,40 @@ func createExecutionSetup() { }, }, }, - }}, + }, }, - { - Name: "numbers_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "numbers_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, - }}, + }, }, - { - Name: "run_local_at_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "run_local_at_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, - }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, }, }, }, }, }, - }}, + }, + }, }, } launchPlan1 := &admin.LaunchPlan{ diff --git a/flytectl/cmd/create/serialization_utils.go b/flytectl/cmd/create/serialization_utils.go index 568ed6dc27..53045d2c9e 100644 --- a/flytectl/cmd/create/serialization_utils.go +++ b/flytectl/cmd/create/serialization_utils.go @@ -11,15 +11,15 @@ import ( // MakeLiteralForVariables builds a map of literals for the provided serialized values. If a provided value does not have // a corresponding variable or if that variable is invalid (e.g. doesn't have Type property populated), it returns an // error. -func MakeLiteralForVariables(serialize map[string]interface{}, variables []*core.VariableMapEntry) (map[string]*core.Literal, error) { +func MakeLiteralForVariables(serialize map[string]interface{}, variables map[string]*core.Variable) (map[string]*core.Literal, error) { types := make(map[string]*core.LiteralType) - for _, e := range variables { - t := e.GetVar().GetType() + for k, v := range variables { + t := v.GetType() if t == nil { - return nil, fmt.Errorf("variable [%v] has nil type", e.GetName()) + return nil, fmt.Errorf("variable [%v] has nil type", k) } - types[e.GetName()] = t + types[k] = t } return MakeLiteralForTypes(serialize, types) @@ -28,15 +28,15 @@ func MakeLiteralForVariables(serialize map[string]interface{}, variables []*core // MakeLiteralForParams builds a map of literals for the provided serialized values. If a provided value does not have // a corresponding parameter or if that parameter is invalid (e.g. doesn't have Type property populated), it returns an // error. -func MakeLiteralForParams(serialize map[string]interface{}, parameters []*core.ParameterMapEntry) (map[string]*core.Literal, error) { +func MakeLiteralForParams(serialize map[string]interface{}, parameters map[string]*core.Parameter) (map[string]*core.Literal, error) { types := make(map[string]*core.LiteralType) - for _, e := range parameters { - if variable := e.GetParameter().GetVar(); variable == nil { - return nil, fmt.Errorf("parameter [%v] has nil Variable", e.GetName()) + for k, v := range parameters { + if variable := v.GetVar(); variable == nil { + return nil, fmt.Errorf("parameter [%v] has nil Variable", k) } else if t := variable.GetType(); t == nil { - return nil, fmt.Errorf("parameter [%v] has nil variable type", e.GetName()) + return nil, fmt.Errorf("parameter [%v] has nil variable type", k) } else { - types[e.GetName()] = t + types[k] = t } } diff --git a/flytectl/cmd/create/serialization_utils_test.go b/flytectl/cmd/create/serialization_utils_test.go index ebe4484472..5c7326493d 100644 --- a/flytectl/cmd/create/serialization_utils_test.go +++ b/flytectl/cmd/create/serialization_utils_test.go @@ -67,16 +67,15 @@ func TestMakeLiteralForParams(t *testing.T) { } t.Run("Happy path", func(t *testing.T) { - inputParams := []*core.ParameterMapEntry{ - { - Name: "a", - Parameter: &core.Parameter{Var: &core.Variable{ + inputParams := map[string]*core.Parameter{ + "a": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_STRING, }, }, - }}, + }, }, } @@ -86,11 +85,8 @@ func TestMakeLiteralForParams(t *testing.T) { }) t.Run("Invalid Param", func(t *testing.T) { - inputParams := []*core.ParameterMapEntry{ - { - Name: "a", - Parameter: nil, - }, + inputParams := map[string]*core.Parameter{ + "a": nil, } _, err := MakeLiteralForParams(inputValues, inputParams) @@ -98,10 +94,9 @@ func TestMakeLiteralForParams(t *testing.T) { }) t.Run("Invalid Type", func(t *testing.T) { - inputParams := []*core.ParameterMapEntry{ - { - Name: "a", - Parameter: &core.Parameter{Var: &core.Variable{}}, + inputParams := map[string]*core.Parameter{ + "a": { + Var: &core.Variable{}, }, } @@ -116,14 +111,11 @@ func TestMakeLiteralForVariables(t *testing.T) { } t.Run("Happy path", func(t *testing.T) { - inputVariables := []*core.VariableMapEntry{ - { - Name: "a", - Var: &core.Variable{ - Type: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_STRING, - }, + inputVariables := map[string]*core.Variable{ + "a": { + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRING, }, }, }, @@ -135,11 +127,8 @@ func TestMakeLiteralForVariables(t *testing.T) { }) t.Run("Invalid Variable", func(t *testing.T) { - inputVariables := []*core.VariableMapEntry{ - { - Name: "a", - Var: nil, - }, + inputVariables := map[string]*core.Variable{ + "a": nil, } _, err := MakeLiteralForVariables(inputValues, inputVariables) @@ -147,12 +136,9 @@ func TestMakeLiteralForVariables(t *testing.T) { }) t.Run("Invalid Type", func(t *testing.T) { - inputVariables := []*core.VariableMapEntry{ - { - Name: "a", - Var: &core.Variable{ - Type: nil, - }, + inputVariables := map[string]*core.Variable{ + "a": { + Type: nil, }, } diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 8469e68e1d..65b72175a5 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -58,8 +58,8 @@ func CreateAndWriteExecConfigForWorkflow(wlp *admin.LaunchPlan, fileName string) return WriteExecConfigToFile(executionConfig, fileName) } -func TaskInputs(task *admin.Task) []*core.VariableMapEntry { - taskInputs := []*core.VariableMapEntry{} +func TaskInputs(task *admin.Task) map[string]*core.Variable { + taskInputs := map[string]*core.Variable{} if task == nil || task.Closure == nil { return taskInputs } @@ -81,10 +81,10 @@ func TaskInputs(task *admin.Task) []*core.VariableMapEntry { func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { taskInputs := TaskInputs(task) paramMap := make(map[string]yaml.Node, len(taskInputs)) - for _, e := range taskInputs { - varTypeValue, err := coreutils.MakeDefaultLiteralForType(e.Var.Type) + for k, v := range taskInputs { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Type) if err != nil { - fmt.Println("error creating default value for literal type ", e.Var.Type) + fmt.Println("error creating default value for literal type ", v.Type) return nil, err } var nativeLiteral interface{} @@ -92,11 +92,11 @@ func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { return nil, err } - if e.Name == e.Var.Description { + if k == v.Description { // a: # a isn't very helpful - paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, "") + paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") } else { - paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, e.Var.Description) + paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Description) } if err != nil { return nil, err @@ -105,8 +105,8 @@ func ParamMapForTask(task *admin.Task) (map[string]yaml.Node, error) { return paramMap, nil } -func WorkflowParams(lp *admin.LaunchPlan) []*core.ParameterMapEntry { - workflowParams := []*core.ParameterMapEntry{} +func WorkflowParams(lp *admin.LaunchPlan) map[string]*core.Parameter { + workflowParams := map[string]*core.Parameter{} if lp == nil || lp.Spec == nil { return workflowParams } @@ -119,10 +119,10 @@ func WorkflowParams(lp *admin.LaunchPlan) []*core.ParameterMapEntry { func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { workflowParams := WorkflowParams(lp) paramMap := make(map[string]yaml.Node, len(workflowParams)) - for _, e := range workflowParams { - varTypeValue, err := coreutils.MakeDefaultLiteralForType(e.Parameter.Var.Type) + for k, v := range workflowParams { + varTypeValue, err := coreutils.MakeDefaultLiteralForType(v.Var.Type) if err != nil { - fmt.Println("error creating default value for literal type ", e.Parameter.Var.Type) + fmt.Println("error creating default value for literal type ", v.Var.Type) return nil, err } var nativeLiteral interface{} @@ -130,16 +130,16 @@ func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { return nil, err } // Override if there is a default value - if paramsDefault, ok := e.Parameter.Behavior.(*core.Parameter_Default); ok { + if paramsDefault, ok := v.Behavior.(*core.Parameter_Default); ok { if nativeLiteral, err = coreutils.ExtractFromLiteral(paramsDefault.Default); err != nil { return nil, err } } - if e.Name == e.Parameter.Var.Description { + if k == v.Var.Description { // a: # a isn't very helpful - paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, "") + paramMap[k], err = getCommentedYamlNode(nativeLiteral, "") } else { - paramMap[e.Name], err = getCommentedYamlNode(nativeLiteral, e.Parameter.Var.Description) + paramMap[k], err = getCommentedYamlNode(nativeLiteral, v.Var.Description) } if err != nil { diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go index 5a2c53aee7..2d98c8b834 100644 --- a/flytectl/cmd/get/execution_util_test.go +++ b/flytectl/cmd/get/execution_util_test.go @@ -11,7 +11,7 @@ import ( ) func TestTaskInputs(t *testing.T) { - taskInputs := []*core.VariableMapEntry{} + taskInputs := map[string]*core.Variable{} t.Run("nil task", func(t *testing.T) { retValue := TaskInputs(nil) assert.Equal(t, taskInputs, retValue) @@ -60,14 +60,9 @@ func createTask() *admin.Task { }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } inputs := &core.VariableMap{ diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index dc19efeaa9..6ef85d6cb3 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -104,8 +104,8 @@ var launchplanColumns = []printer.Column{ {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, {Header: "State", JSONPath: "$.spec.state"}, {Header: "Schedule", JSONPath: "$.spec.entityMetadata.schedule"}, - {Header: "Inputs", JSONPath: "$.closure.expectedInputs.parameters[0].parameter.var.description"}, - {Header: "Outputs", JSONPath: "$.closure.expectedOutputs.variables[0].var.description"}, + {Header: "Inputs", JSONPath: "$.closure.expectedInputs.parameters." + printer.DefaultFormattedDescriptionsKey + ".var.description"}, + {Header: "Outputs", JSONPath: "$.closure.expectedOutputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, } // Column structure for get all launchplans diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index cf944cf5e6..e6a7cbec01 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -39,10 +39,9 @@ func getLaunchPlanSetup() { // TODO: migrate to new command context from testutils cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsLp = []string{"launchplan1"} - parameterMap := []*core.ParameterMapEntry{ - { - Name: "numbers", - Parameter: &core.Parameter{Var: &core.Variable{ + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -52,21 +51,21 @@ func getLaunchPlanSetup() { }, }, }, - Description: "short desc"}}, + Description: "short desc", + }, }, - { - Name: "numbers_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "numbers_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, - }, Description: "long description will be truncated in table", - }}, + }, + Description: "long description will be truncated in table", + }, }, - { - Name: "run_local_at_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "run_local_at_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, @@ -74,21 +73,21 @@ func getLaunchPlanSetup() { }, Description: "run_local_at_count", }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, - }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, }, }, }, }, }, - }}, + }, + }, }, } launchPlan1 := &admin.LaunchPlan{ @@ -258,98 +257,80 @@ func TestGetLaunchPlanFunc(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } } }, "closure": { "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } }, "createdAt": "1970-01-01T00:00:01Z" } @@ -361,98 +342,80 @@ func TestGetLaunchPlanFunc(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } } }, "closure": { "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } }, "createdAt": "1970-01-01T00:00:00Z" } @@ -477,98 +440,80 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } } }, "closure": { "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } }, "createdAt": "1970-01-01T00:00:01Z" } @@ -592,98 +537,80 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } } }, "closure": { "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } }, "createdAt": "1970-01-01T00:00:01Z" } @@ -698,214 +625,7 @@ func TestGetLaunchPlans(t *testing.T) { argsLp = []string{} err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[ - { - "id": { - "name": "launchplan1", - "version": "v2" - }, - "spec": { - "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - } - }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - } - }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - ] - } - }, - "closure": { - "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - } - }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - } - }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - ] - }, - "createdAt": "1970-01-01T00:00:01Z" - } - }, - { - "id": { - "name": "launchplan1", - "version": "v1" - }, - "spec": { - "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - } - }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - } - }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - ] - } - }, - "closure": { - "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - } - }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - } - }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - ] - }, - "createdAt": "1970-01-01T00:00:00Z" - } - } -]`) + tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlansWithExecFile(t *testing.T) { @@ -927,98 +647,80 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { }, "spec": { "defaultInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } } }, "closure": { "expectedInputs": { - "parameters": [ - { - "name": "numbers", - "parameter": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } + "parameters": { + "numbers": { + "var": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "short desc" } }, - { - "name": "numbers_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } + "numbers_count": { + "var": { + "type": { + "simple": "INTEGER" + }, + "description": "long description will be truncated in table" } }, - { - "name": "run_local_at_count", - "parameter": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" + "run_local_at_count": { + "var": { + "type": { + "simple": "INTEGER" }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } + "description": "run_local_at_count" + }, + "default": { + "scalar": { + "primitive": { + "integer": "10" } } } } - ] + } }, "createdAt": "1970-01-01T00:00:01Z" } diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index e3ce88e348..63b490ae82 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,8 +3,6 @@ package get import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytectl/cmd/config" taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -99,8 +97,8 @@ var taskColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, {Header: "Type", JSONPath: "$.closure.compiledTask.template.type"}, - {Header: "Inputs", JSONPath: "$.closure.compiledTask.template.interface.inputs.variables[0].var.description"}, - {Header: "Outputs", JSONPath: "$.closure.compiledTask.template.interface.outputs.variables[0].var.description"}, + {Header: "Inputs", JSONPath: "$.closure.compiledTask.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledTask.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, {Header: "Discoverable", JSONPath: "$.closure.compiledTask.template.metadata.discoverable"}, {Header: "Discovery Version", JSONPath: "$.closure.compiledTask.template.metadata.discoveryVersion"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, @@ -135,14 +133,6 @@ func TaskToTableProtoMessages(l []*admin.Task) []proto.Message { return messages } -func VariableMapEntriesToMap(mapFieldEntries []*core.VariableMapEntry) (variableMap map[string]*core.Variable) { - variableMap = map[string]*core.Variable{} - for _, e := range mapFieldEntries { - variableMap[e.Name] = e.Var - } - return -} - func getTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { taskPrinter := printer.Printer{} var tasks []*admin.Task diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index dfed9cea1f..0133c20f46 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -54,14 +54,9 @@ func getTaskSetup() { }, Description: "var description", } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } task1 := &admin.Task{ @@ -261,30 +256,24 @@ func TestGetTaskFunc(t *testing.T) { "template": { "interface": { "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" } - ] + } } } } @@ -302,30 +291,24 @@ func TestGetTaskFunc(t *testing.T) { "template": { "interface": { "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" } - ] + } } } } @@ -380,30 +363,24 @@ func TestGetTaskFuncLatest(t *testing.T) { "template": { "interface": { "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" } - ] + } } } } @@ -435,30 +412,24 @@ func TestGetTaskWithVersion(t *testing.T) { "template": { "interface": { "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" } - ] + } } } } @@ -476,90 +447,7 @@ func TestGetTasks(t *testing.T) { mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[ - { - "id": { - "name": "task1", - "version": "v2" - }, - "closure": { - "compiledTask": { - "template": { - "interface": { - "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - } - ] - } - } - } - }, - "createdAt": "1970-01-01T00:00:01Z" - } - }, - { - "id": { - "name": "task1", - "version": "v1" - }, - "closure": { - "compiledTask": { - "template": { - "interface": { - "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - } - ] - } - } - } - }, - "createdAt": "1970-01-01T00:00:00Z" - } - } -]`) + tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetTasksFilters(t *testing.T) { @@ -571,47 +459,7 @@ func TestGetTasksFilters(t *testing.T) { mockClient.OnListTasksMatch(ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) err = getTaskFunc(ctx, argsTask, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `{ - "id": { - "name": "task1", - "version": "v1" - }, - "closure": { - "compiledTask": { - "template": { - "interface": { - "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } - } - ] - } - } - } - }, - "createdAt": "1970-01-01T00:00:00Z" - } -}`) + tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) } func TestGetTaskWithExecFile(t *testing.T) { @@ -636,30 +484,24 @@ func TestGetTaskWithExecFile(t *testing.T) { "template": { "interface": { "inputs": { - "variables": [ - { - "name": "sorted_list1", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "variables": { + "sorted_list1": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" }, - { - "name": "sorted_list2", - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "var description" - } + "sorted_list2": { + "type": { + "collectionType": { + "simple": "INTEGER" + } + }, + "description": "var description" } - ] + } } } } diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index f461aac9e3..2670b7f10d 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -87,8 +87,8 @@ Usage var workflowColumns = []printer.Column{ {Header: "Version", JSONPath: "$.id.version"}, {Header: "Name", JSONPath: "$.id.name"}, - {Header: "Inputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.inputs.variables[0].var.description"}, - {Header: "Outputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.outputs.variables[0].var.description"}, + {Header: "Inputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.inputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, + {Header: "Outputs", JSONPath: "$.closure.compiledWorkflow.primary.template.interface.outputs.variables." + printer.DefaultFormattedDescriptionsKey + ".description"}, {Header: "Created At", JSONPath: "$.closure.createdAt"}, } diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 54c826d423..46ad846cdd 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -38,35 +38,31 @@ func getWorkflowSetup() { Domain: domainValue, }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "var1", - Var: &core.Variable{ - Type: &core.LiteralType{ - Type: &core.LiteralType_CollectionType{ - CollectionType: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_INTEGER, - }, + + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, }, }, }, - Description: "var1", }, - }, { - Name: "var2", - Var: &core.Variable{ - Type: &core.LiteralType{ - Type: &core.LiteralType_CollectionType{ - CollectionType: &core.LiteralType{ - Type: &core.LiteralType_Simple{ - Simple: core.SimpleType_INTEGER, - }, + Description: "var1", + }, + "var2": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, }, }, }, - Description: "var2 long descriptions probably needs truncate", }, + Description: "var2 long descriptions probably needs truncate", }, } workflow1 = &admin.Workflow{ diff --git a/flytectl/go.mod b/flytectl/go.mod index 1873b540e2..94ef0c7047 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.20.2 + github.com/flyteorg/flyteidl v0.21.0 github.com/flyteorg/flytestdlib v0.3.34 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index 1c820fdecf..b482ad192a 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,8 +345,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.20.2 h1:3DDj1y9Axmb35SskN/h2nRgohWhGBPGxmJSX7b/Y2rk= -github.com/flyteorg/flyteidl v0.20.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.0 h1:AwHNusfxJMfRRSDk2QWfb3aIlyLJrFWVGtpXCbCtJ5A= +github.com/flyteorg/flyteidl v0.21.0/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.34 h1:OOuV03X8c1AWInzBU6IRsqpEF6y8WDJngbPcdL4VktY= github.com/flyteorg/flytestdlib v0.3.34/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index e38d0d054e..39d0121c93 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -27,10 +27,9 @@ func getLaunchPlanFetcherSetup() { adminClient = new(mocks.AdminServiceClient) adminFetcherExt = AdminFetcherExtClient{AdminClient: adminClient} - parameterMap := []*core.ParameterMapEntry{ - { - Name: "numbers", - Parameter: &core.Parameter{Var: &core.Variable{ + parameterMap := map[string]*core.Parameter{ + "numbers": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{ @@ -40,42 +39,40 @@ func getLaunchPlanFetcherSetup() { }, }, }, - }}, + }, }, - { - Name: "numbers_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "numbers_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, - }}, + }, }, - { - Name: "run_local_at_count", - Parameter: &core.Parameter{Var: &core.Variable{ + "run_local_at_count": { + Var: &core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_Simple{ Simple: core.SimpleType_INTEGER, }, }, }, - Behavior: &core.Parameter_Default{ - Default: &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 10, - }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, }, }, }, }, }, - }}, + }, + }, }, } launchPlan1 = &admin.LaunchPlan{ diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index 50d14e2144..0bfc9ef8dd 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -41,14 +41,9 @@ func getTaskFetcherSetup() { }, }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } task1 := &admin.Task{ diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index c8da9b2373..9ae96612a6 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -38,14 +38,9 @@ func getWorkflowFetcherSetup() { }, }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } var compiledTasks []*core.CompiledTask diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 0f11d15ac7..75d67208eb 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -6,6 +6,7 @@ import ( "fmt" "net/url" "os" + "sort" "strings" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -169,37 +170,50 @@ func printJSONYaml(format OutputFormat, v interface{}) error { return nil } -func FormatVariableDescriptions(variableMap []*core.VariableMapEntry) { +func FormatVariableDescriptions(variableMap map[string]*core.Variable) { + keys := make([]string, 0, len(variableMap)) + // sort the keys for testing and consistency with other output formats + for k := range variableMap { + keys = append(keys, k) + } + sort.Strings(keys) + var descriptions []string - for _, e := range variableMap { - if e.Var == nil { - continue - } + for _, k := range keys { + v := variableMap[k] // a: a isn't very helpful - if e.Name != e.Var.Description { - descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", e.Name, e.Var.Description))) + if k != v.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Description))) } else { - descriptions = append(descriptions, getTruncatedLine(e.Name)) + descriptions = append(descriptions, getTruncatedLine(k)) } } - variableMap[0] = &core.VariableMapEntry{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}} + variableMap[DefaultFormattedDescriptionsKey] = &core.Variable{Description: strings.Join(descriptions, "\n")} } -func FormatParameterDescriptions(parameterMap []*core.ParameterMapEntry) { +func FormatParameterDescriptions(parameterMap map[string]*core.Parameter) { + keys := make([]string, 0, len(parameterMap)) + // sort the keys for testing and consistency with other output formats + for k := range parameterMap { + keys = append(keys, k) + } + sort.Strings(keys) + var descriptions []string - for _, e := range parameterMap { - if e.Parameter == nil || e.Parameter.Var == nil { + for _, k := range keys { + v := parameterMap[k] + if v.Var == nil { continue } // a: a isn't very helpful - if e.Name != e.Parameter.Var.Description { - descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", e.Name, e.Parameter.Var.Description))) + if k != v.Var.Description { + descriptions = append(descriptions, getTruncatedLine(fmt.Sprintf("%s: %s", k, v.Var.Description))) } else { - descriptions = append(descriptions, getTruncatedLine(e.Name)) + descriptions = append(descriptions, getTruncatedLine(k)) } } - parameterMap[0] = &core.ParameterMapEntry{Parameter: &core.Parameter{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}}} + parameterMap[DefaultFormattedDescriptionsKey] = &core.Parameter{Var: &core.Variable{Description: strings.Join(descriptions, "\n")}} } func getTruncatedLine(line string) string { diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 1d0ee4e15c..6d5441b9af 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -150,15 +150,9 @@ func TestPrint(t *testing.T) { }, }, } - variableMap := []*core.VariableMapEntry{ - { - Name: "sorted_list1", - Var: &sortedListLiteralType, - }, - { - Name: "sorted_list2", - Var: &sortedListLiteralType, - }, + variableMap := map[string]*core.Variable{ + "sorted_list1": &sortedListLiteralType, + "sorted_list2": &sortedListLiteralType, } var compiledTasks []*core.CompiledTask @@ -281,26 +275,14 @@ func TestFormatVariableDescriptions(t *testing.T) { barVar := &core.Variable{ Description: "bar", } - variableMap := []*core.VariableMapEntry{ - { - Name: "var1", - Var: fooVar, - }, - { - Name: "var2", - Var: barVar, - }, - { - Name: "foo", - Var: fooVar, - }, - { - Name: "bar", - Var: barVar, - }, + variableMap := map[string]*core.Variable{ + "var1": fooVar, + "var2": barVar, + "foo": fooVar, + "bar": barVar, } FormatVariableDescriptions(variableMap) - assert.Equal(t, "var1: foo\nvar2: bar\nfoo\nbar", variableMap[0].Var.Description) + assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", variableMap[DefaultFormattedDescriptionsKey].Description) } func TestFormatParameterDescriptions(t *testing.T) { @@ -315,28 +297,13 @@ func TestFormatParameterDescriptions(t *testing.T) { }, } emptyParam := &core.Parameter{} - paramMap := []*core.ParameterMapEntry{ - { - Name: "var1", - Parameter: fooParam, - }, - { - Name: "var2", - Parameter: barParam, - }, - { - Name: "foo", - Parameter: fooParam, - }, - { - Name: "bar", - Parameter: barParam, - }, - { - Name: "empty", - Parameter: emptyParam, - }, + paramMap := map[string]*core.Parameter{ + "var1": fooParam, + "var2": barParam, + "foo": fooParam, + "bar": barParam, + "empty": emptyParam, } FormatParameterDescriptions(paramMap) - assert.Equal(t, "var1: foo\nvar2: bar\nfoo\nbar", paramMap[0].Parameter.Var.Description) + assert.Equal(t, "bar\nfoo\nvar1: foo\nvar2: bar", paramMap[DefaultFormattedDescriptionsKey].Var.Description) } diff --git a/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json index 6b7330e1d7..baae3d9926 100644 --- a/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json +++ b/flytectl/pkg/visualize/testdata/compiled_closure_branch_nested.json @@ -11,30 +11,24 @@ "metadata": {}, "interface": { "inputs": { - "variables": [ - { - "name": "my_input", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "my_input" - } + "variables": { + "my_input": { + "type": { + "simple": "FLOAT" + }, + "description": "my_input" } - ] + } }, "outputs": { - "variables": [ - { - "name": "o0", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" - } + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" } - ] + } } }, "nodes": [ @@ -233,7 +227,7 @@ ], "error": { "failedNodeId": "inner_fractions", - "message": "Only <0.7 allowed" + "message": "Only \u003c0.7 allowed" } } } @@ -430,30 +424,24 @@ }, "interface": { "inputs": { - "variables": [ - { - "name": "n", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "n" - } + "variables": { + "n": { + "type": { + "simple": "FLOAT" + }, + "description": "n" } - ] + } }, "outputs": { - "variables": [ - { - "name": "o0", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" - } + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" } - ] + } } }, "container": { @@ -509,30 +497,24 @@ }, "interface": { "inputs": { - "variables": [ - { - "name": "n", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "n" - } + "variables": { + "n": { + "type": { + "simple": "FLOAT" + }, + "description": "n" } - ] + } }, "outputs": { - "variables": [ - { - "name": "o0", - "var": { - "type": { - "simple": "FLOAT" - }, - "description": "o0" - } + "variables": { + "o0": { + "type": { + "simple": "FLOAT" + }, + "description": "o0" } - ] + } } }, "container": { diff --git a/flytectl/pkg/visualize/testdata/compiled_subworkflows.json b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json index b46a334701..8bbf441367 100644 --- a/flytectl/pkg/visualize/testdata/compiled_subworkflows.json +++ b/flytectl/pkg/visualize/testdata/compiled_subworkflows.json @@ -11,48 +11,36 @@ "metadata": {}, "interface": { "inputs": { - "variables": [ - { - "name": "a", - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "a" - } + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" } - ] + } }, "outputs": { - "variables": [ - { - "name": "o0", - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "o0" - } + "variables": { + "o0": { + "type": { + "simple": "INTEGER" + }, + "description": "o0" }, - { - "name": "o1", - "var": { - "type": { - "simple": "STRING" - }, - "description": "o1" - } + "o1": { + "type": { + "simple": "STRING" + }, + "description": "o1" }, - { - "name": "o2", - "var": { - "type": { - "simple": "STRING" - }, - "description": "o2" - } + "o2": { + "type": { + "simple": "STRING" + }, + "description": "o2" } - ] + } } }, "nodes": [ @@ -234,39 +222,30 @@ "metadata": {}, "interface": { "inputs": { - "variables": [ - { - "name": "a", - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "a" - } + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" } - ] + } }, "outputs": { - "variables": [ - { - "name": "o0", - "var": { - "type": { - "simple": "STRING" - }, - "description": "o0" - } + "variables": { + "o0": { + "type": { + "simple": "STRING" + }, + "description": "o0" }, - { - "name": "o1", - "var": { - "type": { - "simple": "STRING" - }, - "description": "o1" - } + "o1": { + "type": { + "simple": "STRING" + }, + "description": "o1" } - ] + } } }, "nodes": [ @@ -440,39 +419,30 @@ }, "interface": { "inputs": { - "variables": [ - { - "name": "a", - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "a" - } + "variables": { + "a": { + "type": { + "simple": "INTEGER" + }, + "description": "a" } - ] + } }, "outputs": { - "variables": [ - { - "name": "c", - "var": { - "type": { - "simple": "STRING" - }, - "description": "c" - } + "variables": { + "c": { + "type": { + "simple": "STRING" + }, + "description": "c" }, - { - "name": "t1_int_output", - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "t1_int_output" - } + "t1_int_output": { + "type": { + "simple": "INTEGER" + }, + "description": "t1_int_output" } - ] + } } }, "container": { @@ -508,4 +478,5 @@ } } ] -} \ No newline at end of file +} + From 4199e65a39d24cbf50b00811f3dc08fdf7620120 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 14 Sep 2021 15:21:43 +0530 Subject: [PATCH 145/356] Removing the ignore on start-node and minor bug fix (#176) Signed-off-by: Prafulla Mahindrakar --- flytectl/.gitignore | 3 ++- flytectl/cmd/get/node_execution.go | 8 +++----- flytectl/cmd/get/node_execution_test.go | 10 ++++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flytectl/.gitignore b/flytectl/.gitignore index 1715663b54..c1b726f812 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -5,4 +5,5 @@ bin .DS_Store _test ./config.yaml -docs/build/* \ No newline at end of file +docs/build/* +cmd/upgrade/flyte.ext diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 6db868ed88..8700272c0f 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -5,7 +5,6 @@ import ( "context" "sort" "strconv" - "strings" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" @@ -149,10 +148,6 @@ func getNodeExecDetailsInt(ctx context.Context, project, domain, execName, nodeN return nil, err } } else { - // Bug in admin https://github.com/flyteorg/flyte/issues/1221 - if strings.HasSuffix(nodeExec.Id.NodeId, "start-node") { - continue - } taskExecList, err := cmdCtx.AdminFetcherExt().FetchTaskExecutionsOnNode(ctx, nodeExec.Id.NodeId, execName, project, domain) if err != nil { @@ -260,6 +255,9 @@ func createNodeDetailsTreeView(rootView gotree.Tree, nodeExecutionClosures []*No func extractLiteralMap(literalMap *core.LiteralMap) (map[string]interface{}, error) { m := make(map[string]interface{}) + if literalMap == nil || literalMap.Literals == nil { + return m, nil + } for key, literalVal := range literalMap.Literals { extractedLiteralVal, err := coreutils.ExtractFromLiteral(literalVal) if err != nil { diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index ca58d26568..05d5c2372f 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -312,3 +312,13 @@ func TestGetExecutionDetails(t *testing.T) { assert.Equal(t, fmt.Errorf("unable to fetch task exec details"), err) }) } + +func TestExtractLiteralMapError(t *testing.T) { + literalMap, err := extractLiteralMap(nil) + assert.Nil(t, err) + assert.Equal(t, len(literalMap), 0) + + literalMap, err = extractLiteralMap(&core.LiteralMap{}) + assert.Nil(t, err) + assert.Equal(t, len(literalMap), 0) +} From c6dff3f2b406d781b79ba1f08389dd4399e60678 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 21 Sep 2021 12:42:09 +0530 Subject: [PATCH 146/356] Schema support idl update (#182) * Schema support idl update Signed-off-by: Prafulla Mahindrakar * Added released idl version Signed-off-by: Prafulla Mahindrakar * Fixed flaky tests Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/get/execution_test.go | 120 --------------------------- flytectl/cmd/upgrade/upgrade_test.go | 2 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- 4 files changed, 4 insertions(+), 124 deletions(-) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 6589e4df2d..bcedf1f6d3 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -262,126 +262,6 @@ func TestGetExecutionFuncWithIOData(t *testing.T) { err = getExecutionFunc(ctx, args, mockCmdCtx) assert.Nil(t, err) }) - t.Run("invalid inputs", func(t *testing.T) { - setup() - getExecutionSetup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockClient = u.MockClient - mockFetcherExt := u.FetcherExt - execution.DefaultConfig.NodeID = nodeID - args := []string{dummyExec} - - nodeExec1 := createDummyNodeWithID("n0", false) - taskExec1 := createDummyTaskExecutionForNode("n0", "task21") - taskExec2 := createDummyTaskExecutionForNode("n0", "task22") - - nodeExecutions := []*admin.NodeExecution{nodeExec1} - nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - - inputs := map[string]*core.Literal{ - "val1": &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Schema{}, - }, - }, - }, - } - outputs := map[string]*core.Literal{ - "o2": &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 120, - }, - }, - }, - }, - }, - }, - } - dataResp := &admin.NodeExecutionGetDataResponse{ - FullOutputs: &core.LiteralMap{ - Literals: inputs, - }, - FullInputs: &core.LiteralMap{ - Literals: outputs, - }, - } - mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, - }, nil) - mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) - - err = getExecutionFunc(ctx, args, mockCmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unsupported literal scalar type *core.Scalar_Schema"), err) - }) - t.Run("invalid outputs", func(t *testing.T) { - setup() - getExecutionSetup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockClient = u.MockClient - mockFetcherExt := u.FetcherExt - execution.DefaultConfig.NodeID = nodeID - args := []string{dummyExec} - - nodeExec1 := createDummyNodeWithID("n0", false) - taskExec1 := createDummyTaskExecutionForNode("n0", "task21") - taskExec2 := createDummyTaskExecutionForNode("n0", "task22") - - nodeExecutions := []*admin.NodeExecution{nodeExec1} - nodeExecList := &admin.NodeExecutionList{NodeExecutions: nodeExecutions} - - inputs := map[string]*core.Literal{ - "val1": &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Primitive{ - Primitive: &core.Primitive{ - Value: &core.Primitive_Integer{ - Integer: 120, - }, - }, - }, - }, - }, - }, - } - outputs := map[string]*core.Literal{ - "o2": &core.Literal{ - Value: &core.Literal_Scalar{ - Scalar: &core.Scalar{ - Value: &core.Scalar_Schema{}, - }, - }, - }, - } - dataResp := &admin.NodeExecutionGetDataResponse{ - FullOutputs: &core.LiteralMap{ - Literals: inputs, - }, - FullInputs: &core.LiteralMap{ - Literals: outputs, - }, - } - mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) - mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) - mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(&admin.TaskExecutionList{ - TaskExecutions: []*admin.TaskExecution{taskExec1, taskExec2}, - }, nil) - mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) - - err = getExecutionFunc(ctx, args, mockCmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unsupported literal scalar type *core.Scalar_Schema"), err) - }) t.Run("fetch data error from admin", func(t *testing.T) { setup() getExecutionSetup() diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index e1996fb24d..213b02afdc 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -54,7 +54,7 @@ func TestUpgrade(t *testing.T) { t.Run("Successful upgrade", func(t *testing.T) { message, err := upgrade(githubutil.FlytectlReleaseConfig) assert.Nil(t, err) - assert.Equal(t, 39, len(message)) + assert.Contains(t, message, "Successfully updated to version") }) } diff --git a/flytectl/go.mod b/flytectl/go.mod index 94ef0c7047..125993c6d4 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.21.0 + github.com/flyteorg/flyteidl v0.21.2 github.com/flyteorg/flytestdlib v0.3.34 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 diff --git a/flytectl/go.sum b/flytectl/go.sum index b482ad192a..475f57a778 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,8 +345,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.0 h1:AwHNusfxJMfRRSDk2QWfb3aIlyLJrFWVGtpXCbCtJ5A= -github.com/flyteorg/flyteidl v0.21.0/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.2 h1:7qRC28MueIcElwaqQxtjp483zMFrOjINTH8fjW/sQx0= +github.com/flyteorg/flyteidl v0.21.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.3.34 h1:OOuV03X8c1AWInzBU6IRsqpEF6y8WDJngbPcdL4VktY= github.com/flyteorg/flytestdlib v0.3.34/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From f33a41d85d85443fcbbe157a22d6cded947c0e44 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 21 Sep 2021 10:37:07 -0700 Subject: [PATCH 147/356] Update documentation (#175) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_register_examples.rst | 8 +++++++- flytectl/docs/source/gen/flytectl_register_files.rst | 3 ++- flytectl/docs/source/gen/flytectl_sandbox_exec.rst | 4 +--- flytectl/docs/source/gen/flytectl_sandbox_start.rst | 8 +++++--- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index f21135aa5b..e5fd09cfe0 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -15,7 +15,12 @@ Registers all latest flytesnacks example bin/flytectl register examples -d development -p flytesnacks +Registers specific release of flytesnacks example +:: + bin/flytectl register examples -d development -p flytesnacks v0.2.176 + +Note: register command automatically override the version with release version Usage @@ -33,7 +38,8 @@ Options --continueOnError continue on error when registering files. --dryRun execute command without making any modifications. -h, --help help for examples - --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + --k8ServiceAccount string deprecated. Please use --K8sServiceAccount + --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. --version string version of the entity to be registered with flyte. (default "v1") diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 962d7cfaae..cb26121177 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -97,7 +97,8 @@ Options --continueOnError continue on error when registering files. --dryRun execute command without making any modifications. -h, --help help for files - --k8ServiceAccount string custom kubernetes service account auth role to register launch plans with. + --k8ServiceAccount string deprecated. Please use --K8sServiceAccount + --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. --version string version of the entity to be registered with flyte. (default "v1") diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 2f8b53cc81..bd9c0ec4e9 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -26,9 +26,7 @@ Options :: - -h, --help help for exec - --source string Path of your source code - --version string Version of flyte + -h, --help help for exec Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 00de94c676..bc96eb1ade 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -22,11 +22,13 @@ Mount your source code repository inside sandbox bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte, Only available after v0.13.0+ +Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags :: bin/flytectl sandbox start --version=v0.14.0 +Note: Flytectl sandbox will only work for v0.10.0+ + Usage @@ -40,8 +42,8 @@ Options :: -h, --help help for start - --source string Path of your source code - --version string Version of flyte + --source string Path of your source code + --version string Version of flyte. Only support v0.10.0+ flyte release Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From b3ae520644179a2165782a556fff727ff4b77f39 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Wed, 29 Sep 2021 14:17:23 +0530 Subject: [PATCH 148/356] Update FlyteCTL Contribution Guide (#183) * Update FlyteCTL Contribution Guide Signed-off-by: Samhita Alla * delete CONTRIBUTE.md file Signed-off-by: Samhita Alla * fix contribute.rst Signed-off-by: Samhita Alla * fix readme Signed-off-by: Samhita Alla * fix readme Signed-off-by: Samhita Alla * update contrib guide Signed-off-by: Samhita Alla * update contrib guide Signed-off-by: Samhita Alla * update contrib guide Signed-off-by: Samhita Alla * update contrib guide Signed-off-by: Samhita Alla * update README Signed-off-by: Samhita Alla --- flytectl/.gitignore | 1 + flytectl/README.md | 80 ++++++++++++++++++----------- flytectl/docs/CONTRIBUTING.md | 25 --------- flytectl/docs/source/contribute.rst | 73 ++++++++++++++++++++++++++ flytectl/docs/source/index.rst | 2 +- 5 files changed, 124 insertions(+), 57 deletions(-) delete mode 100644 flytectl/docs/CONTRIBUTING.md create mode 100644 flytectl/docs/source/contribute.rst diff --git a/flytectl/.gitignore b/flytectl/.gitignore index c1b726f812..0cfb4d69b2 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -7,3 +7,4 @@ _test ./config.yaml docs/build/* cmd/upgrade/flyte.ext +.vscode diff --git a/flytectl/README.md b/flytectl/README.md index 1dab7131eb..45006d74c7 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -1,4 +1,19 @@ -# flytectl + +

+ Flyte Logo +

+

+ FlyteCTL +

+

+ The official Flyte command-line interface +

+

+ Documentation + · + Contribution Guide +

+ [![Docs](https://readthedocs.org/projects/flytectl/badge/?version=latest&style=plastic)](https://flytectl.rtfd.io) [![Current Release](https://img.shields.io/github/release/flyteorg/flytectl.svg)](https://github.com/flyteorg/flytectl/releases/latest) @@ -10,42 +25,45 @@ ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytectl.svg?style=plastic) ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) -Flytectl is designed to be a portable, lightweight, CLI for working with Flyte. It is written in Golang and can access FlyteAdmin +FlyteCTL is designed to be a portable and lightweight CLI to work with Flyte. It is written in Golang and can access [FlyteAdmin](https://github.com/flyteorg/flyteadmin/)—the control plane of Flyte. -## Docs +## 🚀 Quick Start -Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https://flytectl.rtfd.io) -Generating docs locally can be accomplished by running make gendocs from within the docs folder +1. Install FlyteCTL with bash or shell script + * Bash + ```bash + $ brew install flyteorg/homebrew-tap/flytectl + ``` + * Shell script + ```bash + $ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + ``` +2. (Optional) `flytectl upgrade` provides a general interface to upgrade FlyteCTL; run the command shown in the output -## Installation +3. Start sandbox using FlyteCTL + ```bash + $ flytectl sandbox start + ``` -Install flytectl with homebrew tap -```bash -$ brew install flyteorg/homebrew-tap/flytectl +4. Register examples + ```bash + # Register core workflows + $ flytectl register examples -d development -p flytesnacks + ``` -# Upgrade flytectl -$ brew upgrade flytectl -``` + +

+ 📖 How to Contribute to FlyteCTL +

+ -Install flytectl with shell script -```bash -$ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash -``` +You can find the detailed contribution guide [here](docs/source/contribute.rst). -## Get Started + +

+ 🐞 File an Issue +

+ -### Create a sandbox cluster -```bash -$ flytectl sandbox start -``` - -### Register flytesnacks example -```bash -# Run Core workflows -$ flytectl register examples -d development -p flytesnacks -``` - -## Contributing - -[Contribution guidelines for this project](docs/CONTRIBUTING.md) +Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution guide if you'd like to file an issue. \ No newline at end of file diff --git a/flytectl/docs/CONTRIBUTING.md b/flytectl/docs/CONTRIBUTING.md deleted file mode 100644 index f170374b9e..0000000000 --- a/flytectl/docs/CONTRIBUTING.md +++ /dev/null @@ -1,25 +0,0 @@ -# Developing FlyteCtl - -A local cluster can be setup via --> https://docs.flyte.org/en/latest/getting_started.html - -Then, if having trouble connecting to local cluster see the following: - -#1) Find/Set/Verify gRPC port for your local Flyte service: - -FLYTECTL_GRPC_PORT=`kubectl get service -n flyte flyteadmin -o json | jq '.spec.ports[] | select(.name=="grpc").port'` - -#2) Setup Port forwarding: kubectl port-forward -n flyte service/flyteadmin 8081:$FLYTECTL_GRPC_PORT - -#3) Update config line in https://github.com/flyteorg/flytectl/blob/master/config.yaml to dns:///localhost:8081 - -#4) All new flags introduced for flytectl commands and subcommands should be camelcased. eg: bin/flytectl update project -p flytesnacks --activateProject - -# DCO: Sign your work - -Flyte ships commit hooks that allow you to auto-generate the DCO signoff line if -it doesn't exist when you run `git commit`. Simply navigate to the flytectl project root and run - -```bash -make setup-precommit -``` - diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst new file mode 100644 index 0000000000..bbb5d385f6 --- /dev/null +++ b/flytectl/docs/source/contribute.rst @@ -0,0 +1,73 @@ +########################### +FlyteCTL Contribution Guide +########################### + +First off, thank you for thinking about contributing! +Below you’ll find instructions that will hopefully guide you through how to contribute to, fix, and improve FlyteCTL. + +📝 Contribute to Documentation +============================== + +Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https://flytectl.rtfd.io). + +To update the documentation, follow these steps: + +1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder +2. Make modifications in the `docs/source/gen `__ folder +3. Run ``make gendocs`` from within the `docs `__ folder +4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder) + +💻 Contribute Code +================== + +1. Run ``make compile`` in the root directory to compile the code +2. Set up a local cluster by running ``./bin/flytectl sandbox start`` in the root directory +3. Run ``flytectl get project`` to see if things are working +4. Run the command you want to test in the terminal +5. If you want to update the command (add additional options, change existing options, etc.): + + * Navigate to `cmd `__ directory + * Each sub-directory points to a command, for example, ``create`` points to ``flytectl create ...`` + * Here are the directories you can navigate to: + + .. list-table:: FlyteCTL cmd directories + :widths: 25 25 50 + :header-rows: 1 + + * - Directory + - Command + - Description + * - ``config`` + - ``flytectl config ...`` + - Common package for all commands; has root flags + * - ``configuration`` + - ``flytectl configuration ...`` + - Command to validate/generate flytectl config + * - ``create`` + - ``flytectl create ...`` + - Command to create a project/execution + * - ``delete`` + - ``flytectl delete ...`` + - Command to abort an execution and delete resource attributes + * - ``get`` + - ``flytectl get ...`` + - Command to get a task/workflow/launchplan/execution/project/resource's-attributes + * - ``register`` + - ``flytectl register ...`` + - Command to register a task/workflow/launchplan + * - ``sandbox`` + - ``flytectl sandbox ...`` + - Command to interact with sandbox + * - ``update`` + - ``flytectl update ...`` + - Command to update a project/launchplan/resource's-attributes + * - ``upgrade`` + - ``flytectl upgrade ...`` + - Command to upgrade/rollback FlyteCTL version + * - ``version`` + - ``flytectl version ...`` + - Command to fetch FlyteCTL version + + Find all FlyteCTL commands on the `Nouns `__ page. + * Run appropriate tests to test the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` + in the root directory \ No newline at end of file diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 3125fb7637..40a953745c 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -143,4 +143,4 @@ Flytectl configuration Install and Configure verbs nouns - Contribute + contribute From d963c7aac65974ad23dd9deb82235a6f435edca9 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Fri, 1 Oct 2021 09:08:30 -0700 Subject: [PATCH 149/356] Fix pod task fast registration template substitution (#184) --- flytectl/cmd/register/register_util.go | 29 +++++++++++ flytectl/cmd/register/register_util_test.go | 56 +++++++++++++++++++++ flytectl/go.sum | 1 + 3 files changed, 86 insertions(+) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index fa51cc29c8..1cdc7893c5 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -18,6 +18,7 @@ import ( "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" + "github.com/flyteorg/flytestdlib/utils" "github.com/google/go-github/github" @@ -34,6 +35,7 @@ import ( "github.com/golang/protobuf/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + v1 "k8s.io/api/core/v1" ) // Variable define in serialized proto that needs to be replace in registration time @@ -222,6 +224,33 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { task.Template.GetContainer().Args[k] = string(remotePath) } } + } else if task.Template.GetK8SPod() != nil && task.Template.GetK8SPod().PodSpec != nil { + var podSpec = v1.PodSpec{} + err := utils.UnmarshalStructToObj(task.Template.GetK8SPod().PodSpec, &podSpec) + if err != nil { + return err + } + for containerIdx, container := range podSpec.Containers { + for argIdx, arg := range container.Args { + if arg == registrationRemotePackagePattern { + remotePath, err := getRemoteStoragePath(context.Background(), Client, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCode, rconfig.DefaultFilesConfig.Version) + if err != nil { + return err + } + podSpec.Containers[containerIdx].Args[argIdx] = string(remotePath) + } + } + } + podSpecStruct, err := utils.MarshalObjToStruct(podSpec) + if err != nil { + return err + } + task.Template.Target = &core.TaskTemplate_K8SPod{ + K8SPod: &core.K8SPod{ + Metadata: task.Template.GetK8SPod().Metadata, + PodSpec: podSpecStruct, + }, + } } return nil } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index bb85c1c22f..4963ebe4b3 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -9,6 +9,10 @@ import ( "strings" "testing" + "github.com/flyteorg/flytestdlib/utils" + + v1 "k8s.io/api/core/v1" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" @@ -397,3 +401,55 @@ func TestHydrateNode(t *testing.T) { assert.NotNil(t, err) }) } + +func TestHydrateTaskSpec(t *testing.T) { + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = s + + metadata := &core.K8SObjectMetadata{ + Labels: map[string]string{ + "l": "a", + }, + Annotations: map[string]string{ + "a": "b", + }, + } + + podSpec := v1.PodSpec{ + Containers: []v1.Container{ + { + Args: []string{"foo", "bar"}, + }, + { + Args: []string{"baz", registrationRemotePackagePattern}, + }, + }, + } + podSpecStruct, err := utils.MarshalObjToStruct(podSpec) + if err != nil { + t.Fatal(err) + } + + task := &admin.TaskSpec{ + Template: &core.TaskTemplate{ + Target: &core.TaskTemplate_K8SPod{ + K8SPod: &core.K8SPod{ + Metadata: metadata, + PodSpec: podSpecStruct, + }, + }, + }, + } + err = hydrateTaskSpec(task, "sourcey") + assert.NoError(t, err) + var hydratedPodSpec = v1.PodSpec{} + err = utils.UnmarshalStructToObj(task.Template.GetK8SPod().PodSpec, &hydratedPodSpec) + assert.NoError(t, err) + assert.Len(t, hydratedPodSpec.Containers[1].Args, 2) + assert.True(t, strings.HasSuffix(hydratedPodSpec.Containers[1].Args[1], "sourcey")) +} diff --git a/flytectl/go.sum b/flytectl/go.sum index 475f57a778..28983a22c6 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -534,6 +534,7 @@ github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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= From bdf47b88b8a8a287ffa64313f96909a947da9413 Mon Sep 17 00:00:00 2001 From: Divyansh Bansal <86911142+idivyanshbansal@users.noreply.github.com> Date: Mon, 4 Oct 2021 08:49:51 +0530 Subject: [PATCH 150/356] Update README.md (#192) --- flytectl/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index 45006d74c7..52324250d3 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -6,7 +6,7 @@ FlyteCTL

- The official Flyte command-line interface + Flyte's official command-line interface

Documentation @@ -25,7 +25,7 @@ ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytectl.svg?style=plastic) ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) -FlyteCTL is designed to be a portable and lightweight CLI to work with Flyte. It is written in Golang and can access [FlyteAdmin](https://github.com/flyteorg/flyteadmin/)—the control plane of Flyte. +FlyteCTL was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. ## 🚀 Quick Start @@ -39,7 +39,7 @@ FlyteCTL is designed to be a portable and lightweight CLI to work with Flyte. It ```bash $ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash ``` -2. (Optional) `flytectl upgrade` provides a general interface to upgrade FlyteCTL; run the command shown in the output +2. (Optional) `flytectl upgrade` provides a general interface to upgrading FlyteCTL; run the command in the output 3. Start sandbox using FlyteCTL ```bash @@ -66,4 +66,4 @@ You can find the detailed contribution guide [here](docs/source/contribute.rst).

-Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution guide if you'd like to file an issue. \ No newline at end of file +Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution guide if you'd like to file an issue. From 6f9a2aa918b39988c76b6de6e92f6c7c7b0fc602 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 6 Oct 2021 14:39:46 -0700 Subject: [PATCH 151/356] flytectl sandbox start --image xyz (#195) * flytectl sandbox start --image xyz Sandbox can now use a custom image Signed-off-by: Ketan Umare * fixed unit test Signed-off-by: Ketan Umare * updated comments Signed-off-by: Ketan Umare --- .../config/subcommand/sandbox/config_flags.go | 3 +- .../subcommand/sandbox/config_flags_test.go | 14 +++++++++ .../subcommand/sandbox/sandbox_config.go | 11 +++++-- flytectl/cmd/sandbox/start.go | 30 ++++++++++++------- flytectl/cmd/sandbox/start_test.go | 17 +++++++---- 5 files changed, 56 insertions(+), 19 deletions(-) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index ca50e9ad28..15c7c6f78f 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -51,6 +51,7 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, "Path of your source code") - cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only support v0.10.0+ flyte release") + cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") + cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index f01337ec13..cd58322bb6 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -127,4 +127,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_image", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("image", testValue) + if vString, err := cmdFlags.GetString("image"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Image) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 7005b031b1..9a787757a7 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -9,8 +9,13 @@ var ( type Config struct { Source string `json:"source" pflag:",Path of your source code"` - // Flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags + // Flytectl sandbox only supports flyte version available in Github release https://github.com/flyteorg/flyte/tags // Flytectl sandbox will only work for v0.10.0+ - // Default value dind represent the latest release - Version string `json:"version" pflag:",Version of flyte. Only support v0.10.0+ flyte release"` + // Default value dind represents the latest release + Version string `json:"version" pflag:",Version of flyte. Only supports flyte releases greater than v0.10.0"` + + // Optionally it is possible to specify a specific fqn for the docker image with the tag. This should be + // Flyte compliant sandbox image. Usually useful, if you want to push the image to your own registry and relaunch + // from there. + Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."` } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index b36324be14..8f9518a793 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -37,22 +37,27 @@ The Flyte Sandbox is a fully standalone minimal environment for running Flyte. p Start sandbox cluster without any source code :: - bin/flytectl sandbox start + flytectl sandbox start Mount your source code repository inside sandbox :: - bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags :: - bin/flytectl sandbox start --version=v0.14.0 + flytectl sandbox start --version=v0.14.0 + +Note: Flytectl sandbox is only supported for Flyte versions > v0.10.0 + +Specify a Flyte Sandbox compliant image with the registry. This is useful, in case you want to use an image from your registry. +:: + + flytectl sandbox start --image docker.io/my-override:latest -Note: Flytectl sandbox will only work for v0.10.0+ - Usage - ` +` k8sEndpoint = "https://127.0.0.1:30086" flyteNamespace = "flyte" flyteRepository = "flyte" @@ -133,7 +138,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu volumes = append(volumes, *vol) } - image, err := getSandboxImage(sandboxConfig.DefaultConfig.Version) + image, err := getSandboxImage(sandboxConfig.DefaultConfig.Version, sandboxConfig.DefaultConfig.Image) if err != nil { return nil, err } @@ -158,9 +163,14 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return logReader, nil } -func getSandboxImage(version string) (string, error) { - // Latest release will use image cr.flyte.org/flyteorg/flyte-sandbox:dind - // In case of version flytectl will use cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} +// Returns the alternate image if specified, else +// if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind is used +// else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. +func getSandboxImage(version string, alternateImage string) (string, error) { + + if len(alternateImage) > 0 { + return alternateImage, nil + } var tag = dind if len(version) > 0 { diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 0d0331968c..d15ee17ef4 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -678,26 +678,33 @@ func TestGetNodeTaintStatus(t *testing.T) { func TestGetSandboxImage(t *testing.T) { t.Run("Get Latest sandbox", func(t *testing.T) { - image, err := getSandboxImage("") + image, err := getSandboxImage("", "") assert.Nil(t, err) assert.Equal(t, docker.GetSandboxImage(dind), image) }) t.Run("Get sandbox image with version ", func(t *testing.T) { - image, err := getSandboxImage("v0.14.0") + image, err := getSandboxImage("v0.14.0", "") assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(image, docker.ImageName)) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, err := getSandboxImage("v100.1.0") + _, err := getSandboxImage("v100.1.0", "") assert.NotNil(t, err) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, err := getSandboxImage("aaaaaa") + _, err := getSandboxImage("aaaaaa", "") assert.NotNil(t, err) }) t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - _, err := getSandboxImage("v0.10.0") + _, err := getSandboxImage("v0.10.0", "") assert.NotNil(t, err) }) + + t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { + img := "docker.io/my-override:latest" + i, err := getSandboxImage("v0.11.0", img) + assert.Nil(t, err) + assert.Equal(t, i, img) + }) } From b58b748ac1d18776f7c9f2b47e2f4ce0376c6e8a Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 7 Oct 2021 12:07:36 +0530 Subject: [PATCH 152/356] Fixed the non-zero return code issue in archive path (#194) --- flytectl/cmd/register/files.go | 11 ++++++----- flytectl/cmd/register/files_test.go | 24 +++++++++++++++++++++++- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 99d8a99090..a3575662fd 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -96,7 +96,7 @@ func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Co } func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - var _err error + var regErr error var dataRefs []string // Deprecated checks for --k8Service @@ -131,17 +131,18 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) var registerResults []Result fastFail := rconfig.DefaultFilesConfig.ContinueOnError - for i := 0; i < len(validProto) && !(fastFail && _err != nil); i++ { - registerResults, _err = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx) + for i := 0; i < len(validProto) && !(fastFail && regErr != nil); i++ { + registerResults, regErr = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx) } payload, _ := json.Marshal(registerResults) registerPrinter := printer.Printer{} _ = registerPrinter.JSONToTable(payload, projectColumns) if tmpDir != "" { - if _err = os.RemoveAll(tmpDir); _err != nil { + if _err := os.RemoveAll(tmpDir); _err != nil { logger.Errorf(ctx, "unable to delete temp dir %v due to %v", tmpDir, _err) + return _err } } - return _err + return regErr } diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index c79c1259d2..34da278850 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -1,6 +1,7 @@ package register import ( + "fmt" "testing" "github.com/flyteorg/flytestdlib/contextutils" @@ -71,7 +72,7 @@ func TestRegisterFromFiles(t *testing.T) { err = Register(ctx, args, cmdCtx) assert.Nil(t, err) }) - t.Run("Failed registeration because of invalid files", func(t *testing.T) { + t.Run("Failed registration because of invalid files", func(t *testing.T) { setup() registerFilesSetup() testScope := promutils.NewTestScope() @@ -90,7 +91,28 @@ func TestRegisterFromFiles(t *testing.T) { err = registerFromFilesFunc(ctx, args, cmdCtx) assert.NotNil(t, err) }) + t.Run("Failure registration of fast serialize", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = true + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + Client = s + assert.Nil(t, err) + args = []string{"testdata/flytesnacks-core.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err = registerFromFilesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed"), err) + }) t.Run("Valid registration of fast serialize", func(t *testing.T) { setup() registerFilesSetup() From d0333696bac1bb76c26a875460e7538713b6f3a6 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Fri, 8 Oct 2021 18:54:34 +0530 Subject: [PATCH 153/356] Fix docs contribution guide (#197) Signed-off-by: Samhita Alla --- flytectl/docs/source/contribute.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst index bbb5d385f6..a623d3f159 100644 --- a/flytectl/docs/source/contribute.rst +++ b/flytectl/docs/source/contribute.rst @@ -13,7 +13,7 @@ Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https:// To update the documentation, follow these steps: 1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder -2. Make modifications in the `docs/source/gen `__ folder +2. Make modifications in the `cmd `__ folder 3. Run ``make gendocs`` from within the `docs `__ folder 4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder) @@ -25,11 +25,11 @@ To update the documentation, follow these steps: 3. Run ``flytectl get project`` to see if things are working 4. Run the command you want to test in the terminal 5. If you want to update the command (add additional options, change existing options, etc.): - + * Navigate to `cmd `__ directory * Each sub-directory points to a command, for example, ``create`` points to ``flytectl create ...`` * Here are the directories you can navigate to: - + .. list-table:: FlyteCTL cmd directories :widths: 25 25 50 :header-rows: 1 @@ -67,7 +67,7 @@ To update the documentation, follow these steps: * - ``version`` - ``flytectl version ...`` - Command to fetch FlyteCTL version - + Find all FlyteCTL commands on the `Nouns `__ page. * Run appropriate tests to test the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` in the root directory \ No newline at end of file From 90e01a64860ada1c7c03e1d6de56a9f1c21ea2ad Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Fri, 15 Oct 2021 05:15:13 +0530 Subject: [PATCH 154/356] Add Slack button to README (#198) Signed-off-by: Ketan Umare --- flytectl/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/README.md b/flytectl/README.md index 52324250d3..e0c3279d1c 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -24,6 +24,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/flyteorg/flytectl)](https://goreportcard.com/report/github.com/flyteorg/flytectl) ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytectl.svg?style=plastic) ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) +[![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.flyte.org) FlyteCTL was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. From 6e20a258f208d1cd06775a5546f4b90c0b7afdcf Mon Sep 17 00:00:00 2001 From: Joshua T Date: Mon, 18 Oct 2021 14:57:39 +0530 Subject: [PATCH 155/356] Do not bump version on docs or boilerplate update (#200) This consequently does not run the release wordflow Signed-off-by: radiantly --- flytectl/.github/workflows/master.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flytectl/.github/workflows/master.yml b/flytectl/.github/workflows/master.yml index 320f92c4ce..5a414d6b62 100644 --- a/flytectl/.github/workflows/master.yml +++ b/flytectl/.github/workflows/master.yml @@ -4,22 +4,24 @@ on: push: branches: - master + paths-ignore: + - "docs/**" + - "boilerplate/**" jobs: bump-version: name: Bump Version - if: github.event.head_commit.name != 'flyte-bot' runs-on: ubuntu-latest outputs: version: ${{ steps.bump-version.outputs.tag }} steps: - uses: actions/checkout@v2 with: - fetch-depth: '0' + fetch-depth: "0" - name: Bump version and push tag id: bump-version uses: anothrNick/github-tag-action@1.17.2 env: GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} WITH_V: true - DEFAULT_BUMP: patch \ No newline at end of file + DEFAULT_BUMP: patch From 26f139a33851396b981fc38b69da371f9f09c1a0 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 18 Oct 2021 18:34:34 +0530 Subject: [PATCH 156/356] Added support for tar.gz in register (#199) * Added support for tar.gz in register Signed-off-by: Yuvraj --- flytectl/cmd/register/register_util.go | 35 ++++++++++++++++----- flytectl/cmd/register/register_util_test.go | 2 +- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 1cdc7893c5..cc0130d7dd 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -46,6 +46,12 @@ const registrationVersionPattern = "{{ registration.version }}" // Additional variable define in fast serialized proto that needs to be replace in registration time const registrationRemotePackagePattern = "{{ .remote_package_path }}" +// All supported extensions for compress +var supportedExtensions = []string{".tar", ".tgz", ".tar.gz"} + +// All supported extensions for gzip compress +var validGzipExtensions = []string{".tgz", ".tar.gz"} + type Result struct { Name string Status string @@ -445,15 +451,14 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu func getArchiveReaderCloser(ctx context.Context, ref string) (io.ReadCloser, error) { dataRef := storage.DataReference(ref) scheme, _, key, err := dataRef.Split() - segments := strings.Split(key, ".") - ext := segments[len(segments)-1] if err != nil { return nil, err } var dataRefReaderCloser io.ReadCloser - if ext != "tar" && ext != "tgz" { - return nil, errors.New("only .tar and .tgz extension archives are supported") + isValid, extension := checkSupportedExtensionForCompress(key) + if !isValid { + return nil, errors.New("only .tar, .tar.gz and .tgz extension archives are supported") } if scheme == "http" || scheme == "https" { @@ -464,9 +469,13 @@ func getArchiveReaderCloser(ctx context.Context, ref string) (io.ReadCloser, err if err != nil { return nil, err } - if ext == "tgz" { - if dataRefReaderCloser, err = gzip.NewReader(dataRefReaderCloser); err != nil { - return nil, err + + for _, ext := range validGzipExtensions { + if ext == extension { + if dataRefReaderCloser, err = gzip.NewReader(dataRefReaderCloser); err != nil { + return nil, err + } + break } } return dataRefReaderCloser, err @@ -486,7 +495,8 @@ func getJSONSpec(message proto.Message) string { func filterExampleFromRelease(releases github.RepositoryRelease) []github.ReleaseAsset { var assets []github.ReleaseAsset for _, v := range releases.Assets { - if strings.HasSuffix(*v.Name, ".tgz") { + isValid, _ := checkSupportedExtensionForCompress(*v.Name) + if isValid { assets = append(assets, v) } } @@ -604,3 +614,12 @@ func deprecatedCheck(ctx context.Context) { rconfig.DefaultFilesConfig.K8sServiceAccount = rconfig.DefaultFilesConfig.K8ServiceAccount } } + +func checkSupportedExtensionForCompress(file string) (bool, string) { + for _, extension := range supportedExtensions { + if strings.HasSuffix(file, extension) { + return true, extension + } + } + return false, "" +} diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 4963ebe4b3..7f784776b3 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -163,7 +163,7 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) - assert.Equal(t, errors.New("only .tar and .tgz extension archives are supported"), err) + assert.Equal(t, errors.New("only .tar, .tar.gz and .tgz extension archives are supported"), err) // Clean up the temp directory. assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) } From 249ee0475b360466a60d8d84383bfeee9b9b84d3 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 18 Oct 2021 10:18:34 -0700 Subject: [PATCH 157/356] Update Flyteidl version (#202) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- flytectl/go.mod | 4 ++-- flytectl/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 125993c6d4..79df64a12b 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,8 +11,8 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.21.2 - github.com/flyteorg/flytestdlib v0.3.34 + github.com/flyteorg/flyteidl v0.21.5 + github.com/flyteorg/flytestdlib v0.4.0 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.3 github.com/google/go-github v17.0.0+incompatible diff --git a/flytectl/go.sum b/flytectl/go.sum index 28983a22c6..bee38b14ea 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -345,11 +345,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.2 h1:7qRC28MueIcElwaqQxtjp483zMFrOjINTH8fjW/sQx0= -github.com/flyteorg/flyteidl v0.21.2/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.5 h1:ietcyEpQ0C1FYDTUauo7h4yS792PAeiJYs0mQJ/j+8k= +github.com/flyteorg/flyteidl v0.21.5/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.3.34 h1:OOuV03X8c1AWInzBU6IRsqpEF6y8WDJngbPcdL4VktY= -github.com/flyteorg/flytestdlib v0.3.34/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= +github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= +github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= From f8fff0e2170d5cc1994d91bdb77258d38fed27ea Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 18 Oct 2021 10:19:53 -0700 Subject: [PATCH 158/356] Update documentation (#196) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- .../source/gen/flytectl_sandbox_start.rst | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index bc96eb1ade..441f04674e 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -15,22 +15,27 @@ The Flyte Sandbox is a fully standalone minimal environment for running Flyte. p Start sandbox cluster without any source code :: - bin/flytectl sandbox start + flytectl sandbox start Mount your source code repository inside sandbox :: - bin/flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags :: - bin/flytectl sandbox start --version=v0.14.0 + flytectl sandbox start --version=v0.14.0 + +Note: Flytectl sandbox is only supported for Flyte versions > v0.10.0 + +Specify a Flyte Sandbox compliant image with the registry. This is useful, in case you want to use an image from your registry. +:: + + flytectl sandbox start --image docker.io/my-override:latest -Note: Flytectl sandbox will only work for v0.10.0+ - Usage - + :: @@ -42,8 +47,9 @@ Options :: -h, --help help for start + --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --source string Path of your source code - --version string Version of flyte. Only support v0.10.0+ flyte release + --version string Version of flyte. Only supports flyte releases greater than v0.10.0 Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From a2f437fcde1f3c7dd631d0cbee4fe8392df861f4 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 19 Oct 2021 15:59:50 -0700 Subject: [PATCH 159/356] Redirect install.sh script (#204) * Redirect install.sh script Signed-off-by: Haytham Abuelfutuh * Update index.rst Signed-off-by: Haytham Abuelfutuh * Make curl follow redirects Signed-off-by: Haytham Abuelfutuh --- flytectl/README.md | 12 +++++++----- flytectl/docs/source/index.rst | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index e0c3279d1c..4c64202e23 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -26,7 +26,8 @@ ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) [![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.flyte.org) -FlyteCTL was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. +FlyteCTL was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang +and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. ## 🚀 Quick Start @@ -38,11 +39,11 @@ FlyteCTL was designed as a portable and lightweight command-line interface to wo ``` * Shell script ```bash - $ curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + $ curl -sL https://ctl.flyte.org/install | bash ``` 2. (Optional) `flytectl upgrade` provides a general interface to upgrading FlyteCTL; run the command in the output -3. Start sandbox using FlyteCTL +3. Start sandbox using FlyteCTL ```bash $ flytectl sandbox start ``` @@ -59,7 +60,7 @@ FlyteCTL was designed as a portable and lightweight command-line interface to wo -You can find the detailed contribution guide [here](docs/source/contribute.rst). +You can find the detailed contribution guide [here](docs/source/contribute.rst).

@@ -67,4 +68,5 @@ You can find the detailed contribution guide [here](docs/source/contribute.rst).

-Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution guide if you'd like to file an issue. +Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution +guide if you'd like to file an issue. diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 40a953745c..4ea8589032 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -32,7 +32,7 @@ golang .. prompt:: bash $ - curl -s https://raw.githubusercontent.com/lyft/flytectl/master/install.sh | bash + curl -sL https://ctl.flyte.org/install | bash **Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: From 31ad383f403e3e3e72aa4b52183b02b3e64b20c3 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 20 Oct 2021 11:15:51 +0530 Subject: [PATCH 160/356] Added minio port in sandbox (#203) * Added minio port in the sandbox Signed-off-by: Yuvraj --- flytectl/pkg/docker/docker_util.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 1d3baabed5..05c0d82474 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -78,10 +78,11 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { // GetSandboxPorts will return sandbox ports func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ - "0.0.0.0:30086:30086", - "0.0.0.0:30081:30081", - "0.0.0.0:30082:30082", - "0.0.0.0:30084:30084", + "0.0.0.0:30081:30081", // Flyteconsole Port + "0.0.0.0:30082:30082", // Flyteadmin Port + "0.0.0.0:30084:30084", // Minio API Port + "0.0.0.0:30086:30086", // K8s Dashboard Port + "0.0.0.0:30087:30087", // Minio Console Port }) } From 6453fab47956a9a2937ea2b2bd0c098690fbb888 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 22 Oct 2021 20:40:18 +0530 Subject: [PATCH 161/356] Added arm support (#206) Signed-off-by: Yuvraj --- flytectl/.goreleaser.yml | 4 +++- flytectl/go.mod | 2 +- flytectl/go.sum | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 4f9557b3cd..6d326f33ce 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -23,6 +23,8 @@ archives: format_overrides: - goos: windows format: zip +universal_binaries: + - replace: false checksum: name_template: 'checksums.txt' snapshot: @@ -63,4 +65,4 @@ brews: skip_upload: auto dependencies: - - name: go \ No newline at end of file + - name: go diff --git a/flytectl/go.mod b/flytectl/go.mod index 79df64a12b..f403705864 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/flytectl -go 1.13 +go 1.16 require ( github.com/Microsoft/go-winio v0.5.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index bee38b14ea..823dc8ecf0 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -281,7 +281,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= From 0a2ddb24431a5f7eb33886edab5ef02b094c4ba1 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 25 Oct 2021 09:32:28 +0530 Subject: [PATCH 162/356] Added support for arm64 in install.sh (#209) * Added install.sh script for arm Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 11 +++++------ flytectl/.github/workflows/release.yml | 3 +++ flytectl/.goreleaser.yml | 27 +++++++++++++++++++++++--- flytectl/install.sh | 6 +++--- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 25759ecc17..03b19ecd88 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -20,18 +20,19 @@ jobs: ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - uses: actions/setup-go@v2 + with: + go-version: '1.16' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: version: latest args: --snapshot --skip-publish --rm-dist - name: Unit Tests - uses: cedrickring/golang-action@1.5.2 env: GO111MODULE: "on" CI_ENV: "true" - with: - args: make install && make test_unit_without_flag + run: make install && make test_unit_without_flag - name: Push CodeCov uses: codecov/codecov-action@v1.0.5 with: @@ -39,8 +40,6 @@ jobs: flags: unittests fail_ci_if_error: true - name: Lint - uses: cedrickring/golang-action@1.5.2 env: GO111MODULE: "on" - with: - args: make install && make lint + run: make install && make lint diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml index 1e4c78aa08..7137ab353c 100644 --- a/flytectl/.github/workflows/release.yml +++ b/flytectl/.github/workflows/release.yml @@ -14,6 +14,9 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: "0" + - uses: actions/setup-go@v2 + with: + go-version: '1.16' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 6d326f33ce..17e2499506 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -6,10 +6,33 @@ builds: - CGO_ENABLED=0 main: ./main.go binary: flytectl + id: flytectl-darwin + goos: + - darwin + goarch: + - arm64 + - amd64 + ldflags: + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - env: + - CGO_ENABLED=0 + main: ./main.go + binary: flytectl + id: flytectl-linux goos: - linux + goarch: + - arm64 + - amd64 + ldflags: + - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - env: + - CGO_ENABLED=0 + main: ./main.go + binary: flytectl + id: flytectl-windows + goos: - windows - - darwin ldflags: - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: @@ -23,8 +46,6 @@ archives: format_overrides: - goos: windows format: zip -universal_binaries: - - replace: false checksum: name_template: 'checksums.txt' snapshot: diff --git a/flytectl/install.sh b/flytectl/install.sh index 150ae277af..57860ba297 100755 --- a/flytectl/install.sh +++ b/flytectl/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2021-04-03T07:49:04Z. DO NOT EDIT. +# Code generated by godownloader on 2021-10-24T11:29:26Z. DO NOT EDIT. # usage() { @@ -62,10 +62,10 @@ execute() { } get_binaries() { case "$PLATFORM" in - darwin/386) BINARIES="flytectl" ;; darwin/amd64) BINARIES="flytectl" ;; - linux/386) BINARIES="flytectl" ;; + darwin/arm64) BINARIES="flytectl" ;; linux/amd64) BINARIES="flytectl" ;; + linux/arm64) BINARIES="flytectl" ;; windows/386) BINARIES="flytectl" ;; windows/amd64) BINARIES="flytectl" ;; *) From 89245631091ab8920841b74bd55b13a5d595c651 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 2 Nov 2021 20:21:04 +0530 Subject: [PATCH 163/356] Added check before creating empty k8s config (#211) * Added check before creating empty k8s config Signed-off-by: Yuvraj --- flytectl/pkg/util/util.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 416ad58c7f..9dbc7e7c62 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -35,10 +35,16 @@ func SetupFlyteDir() error { if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm); err != nil { return err } + // Created a empty file with right permission - if err := ioutil.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { - return err + if _, err := os.Stat(docker.Kubeconfig); err != nil { + if os.IsNotExist(err) { + if err := ioutil.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { + return err + } + } } + return nil } From 4752206a355aea83a35b0d2f941f9b89b1cde2d3 Mon Sep 17 00:00:00 2001 From: Abhijeet Chatterjee Date: Mon, 8 Nov 2021 19:02:51 +0530 Subject: [PATCH 164/356] [Docs] Flytectl docs cleanup (#210) * Docs Fix flytectl.rst Signed-off-by: abhijeet007rocks8 * Doc fix config.go Signed-off-by: abhijeet007rocks8 * Docs Update get/Execution.go Signed-off-by: abhijeet007rocks8 * Docs Update get/Execution.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * docs update get/launch_plan.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Docs fix get/matchable_cluster_resource_attribute.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Docs Update matchable_execution_cluster_label.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Docs Update matchable_execution_queue_attribute.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Docs Update matchable_plugin_override.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Docs Fix matchable_task_resource_attribute.go Signed-off-by: Abhijeet Chatterjee Signed-off-by: abhijeet007rocks8 * Applied Suggestion Signed-off-by: abhijeet007rocks8 * Apply suggestions from code review Co-authored-by: Samhita Alla Signed-off-by: abhijeet007rocks8 * Apply suggestions from code review Co-authored-by: Samhita Alla Signed-off-by: abhijeet007rocks8 * Applied Suggestion Signed-off-by: abhijeet007rocks8 * Applied Suggestion Signed-off-by: abhijeet007rocks8 * Applied Suggestion Signed-off-by: abhijeet007rocks8 Co-authored-by: Samhita Alla --- flytectl/cmd/config/config.go | 4 +- flytectl/cmd/get/execution.go | 20 ++++----- flytectl/cmd/get/launch_plan.go | 16 +++---- .../matchable_cluster_resource_attribute.go | 16 ++++--- .../get/matchable_execution_cluster_label.go | 16 +++---- .../matchable_execution_queue_attribute.go | 20 ++++----- flytectl/cmd/get/matchable_plugin_override.go | 16 ++++--- .../get/matchable_task_resource_attribute.go | 18 ++++---- flytectl/docs/source/gen/flytectl.rst | 42 +++++++++---------- 9 files changed, 80 insertions(+), 88 deletions(-) diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index c20f2bc2ef..0283313f24 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -20,8 +20,8 @@ var ( // Config hold configration for flytectl flag type Config struct { Project string `json:"project" pflag:",Specifies the project to work on."` - Domain string `json:"domain" pflag:",Specified the domain to work on."` - Output string `json:"output" pflag:",Specified the output type."` + Domain string `json:"domain" pflag:",Specifies the domain to work on."` + Output string `json:"output" pflag:",Specifies the output type."` } // OutputFormat will return output formate diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 45ce3d9b69..3cda9d4925 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -17,12 +17,12 @@ import ( const ( executionShort = "Gets execution resources" executionLong = ` -Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +Retrieve all executions within the project and domain (execution, executions can be used interchangeably). :: bin/flytectl get execution -p flytesnacks -d development -Retrieves execution by name within project and domain. +Retrieves executions by name within the project and domain. :: @@ -34,44 +34,44 @@ Retrieves all the executions with filters. bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieves all the execution with limit and sorting. +Retrieve executions as per the specified limit and sorting parameters. :: bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the execution within project and domain in yaml format +Retrieve executions within the project and domain in YAML format. :: bin/flytectl get execution -p flytesnacks -d development -o yaml -Retrieves all the execution within project and domain in json format. +Retrieve executions within the project and domain in JSON format. :: bin/flytectl get execution -p flytesnacks -d development -o json -Get more details for the execution using --details flag which shows node executions along with task executions on them. Default view is tree view and TABLE format is not supported on this view +Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Using yaml view for the details. In this view only node details are available. For task details pass --nodeID flag +Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml -Using --nodeID flag to get task executions on a specific node. Use the nodeID attribute from node details view +Fetch task executions on a specific node using the --nodeID flag. Use the nodeID attribute given by the node details view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in yaml/json format. Below example shows yaml. This also contains inputs/outputs data for each node +Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. :: diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 6ef85d6cb3..79aa4822b3 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -16,25 +16,25 @@ import ( const ( launchPlanShort = "Gets launch plan resources" launchPlanLong = ` -Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +Retrieve all launch plans within the project and domain (launchplan, launchplans can be used interchangeably). :: flytectl get launchplan -p flytesnacks -d development -Retrieves launch plan by name within project and domain. + Retrieve a launch plan by name within the project and domain. :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet -Retrieves latest version of task by name within project and domain. +Retrieve the latest version of the task by name within the project and domain. :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves particular version of launchplan by name within project and domain. +Retrieves a particular version of the launch plan by name within the project and domain. :: @@ -57,25 +57,25 @@ Retrieves all the launch plans with limit and sorting. bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the launchplan within project and domain in yaml format. +Retrieves all launch plans within the project and domain in YAML format. :: flytectl get launchplan -p flytesnacks -d development -o yaml -Retrieves all the launchplan within project and domain in json format +Retrieves all launch plans the within the project and domain in JSON format. :: flytectl get launchplan -p flytesnacks -d development -o json -Retrieves a launch plans within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. +Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command. :: flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index e29f61d5a1..7750a30ee2 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -11,12 +11,10 @@ import ( ) const ( - clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes" + clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes." clusterResourceAttributesLong = ` -Retrieves cluster resource attributes for given project and domain combination or additionally with workflow name. - -Retrieves cluster resource attribute for project and domain -Here the command get cluster resource attributes for project flytectldemo and development domain. +Retrieve cluster resource attributes for the given project and domain. +Here, the command gets cluster resource attributes for the project flytectldemo and development domain. :: flytectl get cluster-resource-attribute -p flytectldemo -d development @@ -27,8 +25,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attribute for project and domain and workflow -Here the command get cluster resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve cluster resource attributes for the given project, domain, and workflow. +Here, the command gets cluster resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort @@ -39,8 +37,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. -Here the command gets task resource attributes and writes the config file to cra.yaml +Writes the cluster resource attributes to a file. If there are no cluster resource attributes,the command throws an error. +Here, the command gets the task resource attributes and writes the config file to cra.yaml file. eg: content of cra.yaml :: diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index 56e9e7b94c..8a5227d736 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -11,24 +11,24 @@ import ( ) const ( - executionClusterLabelShort = "Gets matchable resources of execution cluster label" + executionClusterLabelShort = "Gets matchable resources of execution cluster label." executionClusterLabelLong = ` -Retrieves execution cluster label for given project and domain combination or additionally with workflow name. +// Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. -Retrieves execution cluster label for project and domain +Retrieve the execution cluster label for the given project and domain. Here the command get execution cluster label for project flytectldemo and development domain. :: flytectl get execution-cluster-label -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieves execution cluster label for project and domain and workflow -Here the command get execution cluster label for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve the execution cluster label for the given project, domain and workflow. +Here, the command gets the execution cluster label for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort @@ -39,8 +39,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} -Writing the execution cluster label to a file. If there are no execution cluster label, command would return an error. -Here the command gets execution cluster label and writes the config file to ecl.yaml +Writes the execution cluster label to a file. If there is no execution cluster label, command throws an error. +Here, the command gets the execution cluster label and writes the config file to ecl.yaml file. eg: content of ecl.yaml :: diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index b51517e595..0fea10ee56 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -13,35 +13,33 @@ import ( const ( executionQueueAttributesShort = "Gets matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Retrieves execution queue attributes for given project and domain combination or additionally with workflow name. - -Retrieves execution queue attribute for project and domain -Here the command get execution queue attributes for project flytectldemo and development domain. +Retrieve the execution queue attribute for the given project and domain. +Here, the command gets execution queue attributes for the project flytectldemo and development domain. :: flytectl get execution-queue-attribute -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves execution queue attribute for project and domain and workflow -Here the command get execution queue attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve the execution queue attribute for the given project, domain, and workflow. +Here, the command gets execution queue attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} -Writing the execution queue attribute to a file. If there are no execution queue attributes, command would return an error. -Here the command gets execution queue attributes and writes the config file to era.yaml -eg: content of era.yaml +Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. +Here, the command gets the execution queue attributes and writes the config to era.yaml file. +e.g. : content of era.yaml :: diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index 7c42a35219..8c8f5986dc 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -13,16 +13,14 @@ import ( const ( pluginOverrideShort = "Gets matchable resources of plugin override" pluginOverrideLong = ` -Retrieves plugin overrides for given project and domain combination or additionally with workflow name. - -Retrieves plugin overrides for project and domain -Here the command get plugin override for project flytectldemo and development domain. +Retrieve the plugin overrides for the given project and domain. +Here, the command gets the plugin overrides for the project flytectldemo and development domain. :: flytectl get plugin-override -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json @@ -36,14 +34,14 @@ eg : output from the command }] } -Retrieves plugin override for project and domain and workflow -Here the command get plugin override for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves the plugin overrides for project, domain and workflow +Here the command gets the plugin overrides for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json @@ -58,7 +56,7 @@ eg : output from the command }] } -Writing the plugin override to a file. If there are no plugin overrides, command would return an error. +Writing the plugin overrides to a file. If there are no plugin overrides, command would return an error. Here the command gets plugin overrides and writes the config file to po.yaml eg: content of po.yaml diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 74c8a9a99d..2c27bb6f46 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -13,36 +13,34 @@ import ( const ( taskResourceAttributesShort = "Gets matchable resources of task attributes" taskResourceAttributesLong = ` -Retrieves task resource attributes for given project,domain combination or additionally with workflow name. - -Retrieves task resource attribute for project and domain -Here the command get task resource attributes for project flytectldemo and development domain. +Retrieve task resource attributes for the given project and domain. +Here, the command gets the task resource attributes for the project flytectldemo and development domain. :: flytectl get task-resource-attribute -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attribute for project and domain and workflow -Here the command get task resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve task resource attributes for the given project, domain, and workflow. +Here, the command gets task resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. +Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. Here the command gets task resource attributes and writes the config file to tra.yaml -eg: content of tra.yaml +e.g. : content of tra.yaml :: diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index d56aa0fca5..73fc3d1770 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -3,44 +3,44 @@ flytectl -------- -flyetcl CLI tool +**flyetcl** CLI tool Synopsis ~~~~~~~~ -flytectl is CLI tool written in go to interact with flyteadmin service +**flytectl** is CLI tool written in go to interact with flyteadmin service. Options ~~~~~~~ :: - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.authorizationHeader string Custom metadata header to pass JWT. + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint. + --admin.clientId string Client ID. (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret. (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the URI of the service is located. --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution :shouldn't be use for production usecases'. + --admin.maxBackoffDelay string Max delay for gRPC backoff. (default "8s") + --admin.maxRetries int Max number of gRPC retries. (default 4) + --admin.perRetryTimeout string gRPC per retry timeout. (default "15s") --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request + --admin.scopes strings List of scopes to request. --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) + -c, --config string config file. (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. - -h, --help help for flytectl + -h, --help Help for flytectl. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used. --storage.cache.target_gc_percent int Sets the garbage collection target percentage. --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") @@ -48,9 +48,9 @@ Options --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist. --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered. --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow @@ -59,12 +59,12 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`flytectl_completion` - Generate completion script -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_completion` - Generates completion script. +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands. * :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_register` - Registers the tasks/workflows/launchplans from list of generated serialized files. * :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_upgrade` - Used for upgrade/rollback flyte version From 3c0eaa21996763811613725421db09b395942cdd Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 8 Nov 2021 18:17:06 -0800 Subject: [PATCH 165/356] Update documentation (#213) Signed-off-by: Flyte-Bot Co-authored-by: samhita-alla --- flytectl/docs/source/gen/flytectl.rst | 42 +++++++++---------- flytectl/docs/source/gen/flytectl_get.rst | 4 +- ...lytectl_get_cluster-resource-attribute.rst | 16 ++++--- .../flytectl_get_execution-cluster-label.rst | 16 +++---- ...flytectl_get_execution-queue-attribute.rst | 20 ++++----- .../source/gen/flytectl_get_execution.rst | 20 ++++----- .../source/gen/flytectl_get_launchplan.rst | 16 +++---- .../gen/flytectl_get_plugin-override.rst | 16 ++++--- .../flytectl_get_task-resource-attribute.rst | 18 ++++---- 9 files changed, 80 insertions(+), 88 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 73fc3d1770..d56aa0fca5 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -3,44 +3,44 @@ flytectl -------- -**flyetcl** CLI tool +flyetcl CLI tool Synopsis ~~~~~~~~ -**flytectl** is CLI tool written in go to interact with flyteadmin service. +flytectl is CLI tool written in go to interact with flyteadmin service Options ~~~~~~~ :: - --admin.authorizationHeader string Custom metadata header to pass JWT. - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint. - --admin.clientId string Client ID. (default "flytepropeller") - --admin.clientSecretLocation string File containing the client secret. (default "/etc/secrets/client_secret") - --admin.endpoint string For admin types, specify where the URI of the service is located. + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution :shouldn't be use for production usecases'. - --admin.maxBackoffDelay string Max delay for gRPC backoff. (default "8s") - --admin.maxRetries int Max number of gRPC retries. (default 4) - --admin.perRetryTimeout string gRPC per retry timeout. (default "15s") + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request. + --admin.scopes strings List of scopes to request --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file. (default is $HOME/.flyte/config.yaml) + -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. - -h, --help Help for flytectl. + -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used --storage.cache.target_gc_percent int Sets the garbage collection target percentage. --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") @@ -48,9 +48,9 @@ Options --storage.connection.endpoint string URL for storage client to connect to. --storage.connection.region string Region to connect to. (default "us-east-1") --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered. + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow @@ -59,12 +59,12 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`flytectl_completion` - Generates completion script. -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands. +* :doc:`flytectl_completion` - Generate completion script +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. * :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_register` - Registers the tasks/workflows/launchplans from list of generated serialized files. +* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. * :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. * :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_upgrade` - Used for upgrade/rollback flyte version diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 6ccba90bd7..386cee0808 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -71,9 +71,9 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes +* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes. * :doc:`flytectl_get_execution` - Gets execution resources -* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label +* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label. * :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes * :doc:`flytectl_get_launchplan` - Gets launch plan resources * :doc:`flytectl_get_plugin-override` - Gets matchable resources of plugin override diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 2be6c9c3a9..ea44a874bd 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -3,17 +3,15 @@ flytectl get cluster-resource-attribute --------------------------------------- -Gets matchable resources of cluster resource attributes +Gets matchable resources of cluster resource attributes. Synopsis ~~~~~~~~ -Retrieves cluster resource attributes for given project and domain combination or additionally with workflow name. - -Retrieves cluster resource attribute for project and domain -Here the command get cluster resource attributes for project flytectldemo and development domain. +Retrieve cluster resource attributes for the given project and domain. +Here, the command gets cluster resource attributes for the project flytectldemo and development domain. :: flytectl get cluster-resource-attribute -p flytectldemo -d development @@ -24,8 +22,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attribute for project and domain and workflow -Here the command get cluster resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve cluster resource attributes for the given project, domain, and workflow. +Here, the command gets cluster resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort @@ -36,8 +34,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writing the cluster resource attribute to a file. If there are no cluster resource attributes , command would return an error. -Here the command gets task resource attributes and writes the config file to cra.yaml +Writes the cluster resource attributes to a file. If there are no cluster resource attributes,the command throws an error. +Here, the command gets the task resource attributes and writes the config file to cra.yaml file. eg: content of cra.yaml :: diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 513359e3ce..e25ecb4e84 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -3,29 +3,29 @@ flytectl get execution-cluster-label ------------------------------------ -Gets matchable resources of execution cluster label +Gets matchable resources of execution cluster label. Synopsis ~~~~~~~~ -Retrieves execution cluster label for given project and domain combination or additionally with workflow name. +// Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. -Retrieves execution cluster label for project and domain +Retrieve the execution cluster label for the given project and domain. Here the command get execution cluster label for project flytectldemo and development domain. :: flytectl get execution-cluster-label -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieves execution cluster label for project and domain and workflow -Here the command get execution cluster label for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve the execution cluster label for the given project, domain and workflow. +Here, the command gets the execution cluster label for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort @@ -36,8 +36,8 @@ eg : output from the command {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} -Writing the execution cluster label to a file. If there are no execution cluster label, command would return an error. -Here the command gets execution cluster label and writes the config file to ecl.yaml +Writes the execution cluster label to a file. If there is no execution cluster label, command throws an error. +Here, the command gets the execution cluster label and writes the config file to ecl.yaml file. eg: content of ecl.yaml :: diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 28c96777db..04f8d0b24b 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -10,35 +10,33 @@ Synopsis -Retrieves execution queue attributes for given project and domain combination or additionally with workflow name. - -Retrieves execution queue attribute for project and domain -Here the command get execution queue attributes for project flytectldemo and development domain. +Retrieve the execution queue attribute for the given project and domain. +Here, the command gets execution queue attributes for the project flytectldemo and development domain. :: flytectl get execution-queue-attribute -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves execution queue attribute for project and domain and workflow -Here the command get execution queue attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve the execution queue attribute for the given project, domain, and workflow. +Here, the command gets execution queue attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} -Writing the execution queue attribute to a file. If there are no execution queue attributes, command would return an error. -Here the command gets execution queue attributes and writes the config file to era.yaml -eg: content of era.yaml +Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. +Here, the command gets the execution queue attributes and writes the config to era.yaml file. +e.g. : content of era.yaml :: diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 555febfb23..29e0e06706 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -10,12 +10,12 @@ Synopsis -Retrieves all the executions within project and domain.(execution,executions can be used interchangeably in these commands) +Retrieve all executions within the project and domain (execution, executions can be used interchangeably). :: bin/flytectl get execution -p flytesnacks -d development -Retrieves execution by name within project and domain. +Retrieves executions by name within the project and domain. :: @@ -27,44 +27,44 @@ Retrieves all the executions with filters. bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieves all the execution with limit and sorting. +Retrieve executions as per the specified limit and sorting parameters. :: bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the execution within project and domain in yaml format +Retrieve executions within the project and domain in YAML format. :: bin/flytectl get execution -p flytesnacks -d development -o yaml -Retrieves all the execution within project and domain in json format. +Retrieve executions within the project and domain in JSON format. :: bin/flytectl get execution -p flytesnacks -d development -o json -Get more details for the execution using --details flag which shows node executions along with task executions on them. Default view is tree view and TABLE format is not supported on this view +Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Using yaml view for the details. In this view only node details are available. For task details pass --nodeID flag +Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. :: bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml -Using --nodeID flag to get task executions on a specific node. Use the nodeID attribute from node details view +Fetch task executions on a specific node using the --nodeID flag. Use the nodeID attribute given by the node details view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 + bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in yaml/json format. Below example shows yaml. This also contains inputs/outputs data for each node +Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. :: diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 4c73065fe5..2a3c0c1dc3 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -10,25 +10,25 @@ Synopsis -Retrieves all the launch plans within project and domain.(launchplan,launchplans can be used interchangeably in these commands) +Retrieve all launch plans within the project and domain (launchplan, launchplans can be used interchangeably). :: flytectl get launchplan -p flytesnacks -d development -Retrieves launch plan by name within project and domain. + Retrieve a launch plan by name within the project and domain. :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet -Retrieves latest version of task by name within project and domain. +Retrieve the latest version of the task by name within the project and domain. :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves particular version of launchplan by name within project and domain. +Retrieves a particular version of the launch plan by name within the project and domain. :: @@ -51,25 +51,25 @@ Retrieves all the launch plans with limit and sorting. bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the launchplan within project and domain in yaml format. +Retrieves all launch plans within the project and domain in YAML format. :: flytectl get launchplan -p flytesnacks -d development -o yaml -Retrieves all the launchplan within project and domain in json format +Retrieves all launch plans the within the project and domain in JSON format. :: flytectl get launchplan -p flytesnacks -d development -o json -Retrieves a launch plans within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. +Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command. :: flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index c30c99e2db..0c7668510e 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -10,16 +10,14 @@ Synopsis -Retrieves plugin overrides for given project and domain combination or additionally with workflow name. - -Retrieves plugin overrides for project and domain -Here the command get plugin override for project flytectldemo and development domain. +Retrieve the plugin overrides for the given project and domain. +Here, the command gets the plugin overrides for the project flytectldemo and development domain. :: flytectl get plugin-override -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json @@ -33,14 +31,14 @@ eg : output from the command }] } -Retrieves plugin override for project and domain and workflow -Here the command get plugin override for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves the plugin overrides for project, domain and workflow +Here the command gets the plugin overrides for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json @@ -55,7 +53,7 @@ eg : output from the command }] } -Writing the plugin override to a file. If there are no plugin overrides, command would return an error. +Writing the plugin overrides to a file. If there are no plugin overrides, command would return an error. Here the command gets plugin overrides and writes the config file to po.yaml eg: content of po.yaml diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 2385235773..1122ce6411 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -10,36 +10,34 @@ Synopsis -Retrieves task resource attributes for given project,domain combination or additionally with workflow name. - -Retrieves task resource attribute for project and domain -Here the command get task resource attributes for project flytectldemo and development domain. +Retrieve task resource attributes for the given project and domain. +Here, the command gets the task resource attributes for the project flytectldemo and development domain. :: flytectl get task-resource-attribute -p flytectldemo -d development -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attribute for project and domain and workflow -Here the command get task resource attributes for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieve task resource attributes for the given project, domain, and workflow. +Here, the command gets task resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g. : output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Writing the task resource attribute to a file. If there are no task resource attributes a file would be written with basic data populated. +Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. Here the command gets task resource attributes and writes the config file to tra.yaml -eg: content of tra.yaml +e.g. : content of tra.yaml :: From 0c16202671d449fd5920794d3af2c1020a629d57 Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Wed, 10 Nov 2021 16:28:02 +0100 Subject: [PATCH 166/356] fix: Correctly demultiplex sandbox Docker exec output (#214) --- flytectl/pkg/docker/docker_util.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 05c0d82474..a6afbec299 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -15,6 +15,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" + "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" "github.com/enescakir/emoji" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" @@ -174,9 +175,9 @@ func InspectExecResp(ctx context.Context, cli Docker, containerID string) error if err != nil { return err } - s := bufio.NewScanner(resp.Reader) - for s.Scan() { - fmt.Println(s.Text()) + _, err = stdcopy.StdCopy(os.Stdout, os.Stderr, resp.Reader) + if err != nil { + return err } return nil } From fd190c5924bd591fd8edf134a849d2ba2fe2f878 Mon Sep 17 00:00:00 2001 From: Lisa <30621230+aeioulisa@users.noreply.github.com> Date: Tue, 16 Nov 2021 11:58:31 +0800 Subject: [PATCH 167/356] [Housekeeping] Refactor flytectl flags (#212) * use defaultFileConfig as param Signed-off-by: aeioulisa --- flytectl/cmd/register/examples.go | 2 +- flytectl/cmd/register/files.go | 8 +- flytectl/cmd/register/files_test.go | 1 - flytectl/cmd/register/register_util.go | 96 ++++++++++----------- flytectl/cmd/register/register_util_test.go | 52 +++++------ 5 files changed, 79 insertions(+), 80 deletions(-) diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 264324876d..c290b52ae2 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -40,7 +40,7 @@ func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Com var release string // Deprecated checks for --k8Service - deprecatedCheck(ctx) + deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) if len(args) == 1 { release = args[0] diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index a3575662fd..d1b16a18b3 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -100,10 +100,10 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) var dataRefs []string // Deprecated checks for --k8Service - deprecatedCheck(ctx) + deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) // getSerializeOutputFiles will return you all proto and source code compress file in sorted order - dataRefs, tmpDir, err := getSerializeOutputFiles(ctx, args) + dataRefs, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) if err != nil { logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", err) return err @@ -123,7 +123,7 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) if len(sourceCode) > 0 { logger.Infof(ctx, "Fast Registration detected") _, sourceCodeName = filepath.Split(sourceCode) - if err = uploadFastRegisterArtifact(ctx, sourceCode, sourceCodeName, rconfig.DefaultFilesConfig.Version); err != nil { + if err = uploadFastRegisterArtifact(ctx, sourceCode, sourceCodeName, rconfig.DefaultFilesConfig.Version, &rconfig.DefaultFilesConfig.SourceUploadPath); err != nil { return fmt.Errorf("please check your Storage Config. It failed while uploading the source code. %v", err) } logger.Infof(ctx, "Source code successfully uploaded %v/%v ", rconfig.DefaultFilesConfig.SourceUploadPath, sourceCodeName) @@ -132,7 +132,7 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) var registerResults []Result fastFail := rconfig.DefaultFilesConfig.ContinueOnError for i := 0; i < len(validProto) && !(fastFail && regErr != nil); i++ { - registerResults, regErr = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx) + registerResults, regErr = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx, *rconfig.DefaultFilesConfig) } payload, _ := json.Marshal(registerResults) diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index 34da278850..e583e18400 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flytestdlib/storage" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index cc0130d7dd..85b55e81b4 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -97,11 +97,11 @@ func unMarshalContents(ctx context.Context, fileContents []byte, fname string) ( } -func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext) error { +func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun bool, version string) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) - if rconfig.DefaultFilesConfig.DryRun { + if dryRun { logger.Debugf(ctx, "skipping CreateLaunchPlan request (DryRun)") return nil } @@ -112,14 +112,14 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: launchPlan.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, + Version: version, }, Spec: launchPlan.Spec, }) return err case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) - if rconfig.DefaultFilesConfig.DryRun { + if dryRun { logger.Debugf(ctx, "skipping CreateWorkflow request (DryRun)") return nil } @@ -130,14 +130,14 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: workflowSpec.Template.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, + Version: version, }, Spec: workflowSpec, }) return err case *admin.TaskSpec: taskSpec := message.(*admin.TaskSpec) - if rconfig.DefaultFilesConfig.DryRun { + if dryRun { logger.Debugf(ctx, "skipping CreateTask request (DryRun)") return nil } @@ -148,7 +148,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: taskSpec.Template.Id.Name, - Version: rconfig.DefaultFilesConfig.Version, + Version: version, }, Spec: taskSpec, }) @@ -158,33 +158,33 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command } } -func hydrateNode(node *core.Node) error { +func hydrateNode(node *core.Node, version string) error { targetNode := node.Target switch v := targetNode.(type) { case *core.Node_TaskNode: taskNodeWrapper := targetNode.(*core.Node_TaskNode) taskNodeReference := taskNodeWrapper.TaskNode.Reference.(*core.TaskNode_ReferenceId) - hydrateIdentifier(taskNodeReference.ReferenceId) + hydrateIdentifier(taskNodeReference.ReferenceId, version) case *core.Node_WorkflowNode: workflowNodeWrapper := targetNode.(*core.Node_WorkflowNode) switch workflowNodeWrapper.WorkflowNode.Reference.(type) { case *core.WorkflowNode_SubWorkflowRef: subWorkflowNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_SubWorkflowRef) - hydrateIdentifier(subWorkflowNodeReference.SubWorkflowRef) + hydrateIdentifier(subWorkflowNodeReference.SubWorkflowRef, version) case *core.WorkflowNode_LaunchplanRef: launchPlanNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_LaunchplanRef) - hydrateIdentifier(launchPlanNodeReference.LaunchplanRef) + hydrateIdentifier(launchPlanNodeReference.LaunchplanRef, version) default: return fmt.Errorf("unknown type %T", workflowNodeWrapper.WorkflowNode.Reference) } case *core.Node_BranchNode: branchNodeWrapper := targetNode.(*core.Node_BranchNode) - if err := hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode); err != nil { + if err := hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode, version); err != nil { return fmt.Errorf("failed to hydrateNode") } if len(branchNodeWrapper.BranchNode.IfElse.Other) > 0 { for _, ifBlock := range branchNodeWrapper.BranchNode.IfElse.Other { - if err := hydrateNode(ifBlock.ThenNode); err != nil { + if err := hydrateNode(ifBlock.ThenNode, version); err != nil { return fmt.Errorf("failed to hydrateNode") } } @@ -192,7 +192,7 @@ func hydrateNode(node *core.Node) error { switch branchNodeWrapper.BranchNode.IfElse.Default.(type) { case *core.IfElseBlock_ElseNode: elseNodeReference := branchNodeWrapper.BranchNode.IfElse.Default.(*core.IfElseBlock_ElseNode) - if err := hydrateNode(elseNodeReference.ElseNode); err != nil { + if err := hydrateNode(elseNodeReference.ElseNode, version); err != nil { return fmt.Errorf("failed to hydrateNode") } @@ -207,7 +207,7 @@ func hydrateNode(node *core.Node) error { return nil } -func hydrateIdentifier(identifier *core.Identifier) { +func hydrateIdentifier(identifier *core.Identifier, version string) { if identifier.Project == "" || identifier.Project == registrationProjectPattern { identifier.Project = config.GetConfig().Project } @@ -215,15 +215,15 @@ func hydrateIdentifier(identifier *core.Identifier) { identifier.Domain = config.GetConfig().Domain } if identifier.Version == "" || identifier.Version == registrationVersionPattern { - identifier.Version = rconfig.DefaultFilesConfig.Version + identifier.Version = version } } -func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { +func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string, sourceUploadPath string, version string) error { if task.Template.GetContainer() != nil { for k := range task.Template.GetContainer().Args { if task.Template.GetContainer().Args[k] == "" || task.Template.GetContainer().Args[k] == registrationRemotePackagePattern { - remotePath, err := getRemoteStoragePath(context.Background(), Client, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCode, rconfig.DefaultFilesConfig.Version) + remotePath, err := getRemoteStoragePath(context.Background(), Client, sourceUploadPath, sourceCode, version) if err != nil { return err } @@ -239,7 +239,7 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { for containerIdx, container := range podSpec.Containers { for argIdx, arg := range container.Args { if arg == registrationRemotePackagePattern { - remotePath, err := getRemoteStoragePath(context.Background(), Client, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCode, rconfig.DefaultFilesConfig.Version) + remotePath, err := getRemoteStoragePath(context.Background(), Client, sourceUploadPath, sourceCode, version) if err != nil { return err } @@ -261,50 +261,50 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string) error { return nil } -func hydrateLaunchPlanSpec(lpSpec *admin.LaunchPlanSpec) { - assumableIamRole := len(rconfig.DefaultFilesConfig.AssumableIamRole) > 0 - k8sServiceAcct := len(rconfig.DefaultFilesConfig.K8sServiceAccount) > 0 - outputLocationPrefix := len(rconfig.DefaultFilesConfig.OutputLocationPrefix) > 0 +func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccount string, configOutputLocationPrefix string, lpSpec *admin.LaunchPlanSpec) { + assumableIamRole := len(configAssumableIamRole) > 0 + k8sServiceAcct := len(configK8sServiceAccount) > 0 + outputLocationPrefix := len(configOutputLocationPrefix) > 0 if assumableIamRole || k8sServiceAcct { lpSpec.AuthRole = &admin.AuthRole{ - AssumableIamRole: rconfig.DefaultFilesConfig.AssumableIamRole, - KubernetesServiceAccount: rconfig.DefaultFilesConfig.K8sServiceAccount, + AssumableIamRole: configAssumableIamRole, + KubernetesServiceAccount: configK8sServiceAccount, } } if outputLocationPrefix { lpSpec.RawOutputDataConfig = &admin.RawOutputDataConfig{ - OutputLocationPrefix: rconfig.DefaultFilesConfig.OutputLocationPrefix, + OutputLocationPrefix: configOutputLocationPrefix, } } } -func hydrateSpec(message proto.Message, sourceCode string) error { +func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesConfig) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) - hydrateIdentifier(launchPlan.Spec.WorkflowId) - hydrateLaunchPlanSpec(launchPlan.Spec) + hydrateIdentifier(launchPlan.Spec.WorkflowId, config.Version) + hydrateLaunchPlanSpec(config.AssumableIamRole, config.K8sServiceAccount, config.OutputLocationPrefix, launchPlan.Spec) case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) for _, Noderef := range workflowSpec.Template.Nodes { - if err := hydrateNode(Noderef); err != nil { + if err := hydrateNode(Noderef, config.Version); err != nil { return err } } - hydrateIdentifier(workflowSpec.Template.Id) + hydrateIdentifier(workflowSpec.Template.Id, config.Version) for _, subWorkflow := range workflowSpec.SubWorkflows { for _, Noderef := range subWorkflow.Nodes { - if err := hydrateNode(Noderef); err != nil { + if err := hydrateNode(Noderef, config.Version); err != nil { return err } } - hydrateIdentifier(subWorkflow.Id) + hydrateIdentifier(subWorkflow.Id, config.Version) } case *admin.TaskSpec: taskSpec := message.(*admin.TaskSpec) - hydrateIdentifier(taskSpec.Template.Id) + hydrateIdentifier(taskSpec.Template.Id, config.Version) // In case of fast serialize input proto also have on additional variable to substitute i.e destination bucket for source code - if err := hydrateTaskSpec(taskSpec, sourceCode); err != nil { + if err := hydrateTaskSpec(taskSpec, sourceCode, config.SourceUploadPath, config.Version); err != nil { return err } @@ -331,8 +331,8 @@ Get serialize output file list from the args list. If the archive flag is on then download the archives to temp directory and extract it. In case of fast register it will also return the compressed source code The o/p of this function would be sorted list of the file locations. */ -func getSerializeOutputFiles(ctx context.Context, args []string) ([]string, string, error) { - if !rconfig.DefaultFilesConfig.Archive { +func getSerializeOutputFiles(ctx context.Context, args []string, archive bool) ([]string, string, error) { + if !archive { /* * Sorting is required for non-archived case since its possible for the user to pass in a list of unordered * serialized protobuf files , but flyte expects them to be registered in topologically sorted order that it had @@ -406,7 +406,7 @@ func readAndCopyArchive(src io.Reader, tempDir string, unarchivedFiles []string) } } -func registerFile(ctx context.Context, fileName, sourceCode string, registerResults []Result, cmdCtx cmdCore.CommandContext) ([]Result, error) { +func registerFile(ctx context.Context, fileName, sourceCode string, registerResults []Result, cmdCtx cmdCore.CommandContext, config rconfig.FilesConfig) ([]Result, error) { var registerResult Result var fileContents []byte var err error @@ -422,7 +422,7 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu return registerResults, err } - if err := hydrateSpec(spec, sourceCode); err != nil { + if err := hydrateSpec(spec, sourceCode, config); err != nil { registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} registerResults = append(registerResults, registerResult) return registerResults, err @@ -430,7 +430,7 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) - if err := register(ctx, spec, cmdCtx); err != nil { + if err := register(ctx, spec, cmdCtx, config.DryRun, config.Version); err != nil { // If error is AlreadyExists then dont consider this to be an error but just a warning state if grpcError := status.Code(err); grpcError == codes.AlreadyExists { registerResult = Result{Name: fileName, Status: "Success", Info: fmt.Sprintf("%v", grpcError.String())} @@ -532,21 +532,21 @@ func getRemoteStoragePath(ctx context.Context, s *storage.DataStore, remoteLocat return remotePath, nil } -func uploadFastRegisterArtifact(ctx context.Context, file, sourceCodeName, version string) error { +func uploadFastRegisterArtifact(ctx context.Context, file, sourceCodeName, version string, sourceUploadPath *string) error { dataStore, err := getStorageClient(ctx) if err != nil { return err } var dataRefReaderCloser io.ReadCloser - remotePath := storage.DataReference(rconfig.DefaultFilesConfig.SourceUploadPath) - if len(rconfig.DefaultFilesConfig.SourceUploadPath) == 0 { + remotePath := storage.DataReference(*sourceUploadPath) + if len(*sourceUploadPath) == 0 { remotePath, err = dataStore.ConstructReference(ctx, dataStore.GetBaseContainerFQN(ctx), "fast") if err != nil { return err } } - rconfig.DefaultFilesConfig.SourceUploadPath = string(remotePath) - fullRemotePath, err := getRemoteStoragePath(ctx, dataStore, rconfig.DefaultFilesConfig.SourceUploadPath, sourceCodeName, version) + *sourceUploadPath = string(remotePath) + fullRemotePath, err := getRemoteStoragePath(ctx, dataStore, *sourceUploadPath, sourceCodeName, version) if err != nil { return err } @@ -608,10 +608,10 @@ func segregateSourceAndProtos(dataRefs []string) (string, []string, []string) { return sourceCode, validProto, InvalidFiles } -func deprecatedCheck(ctx context.Context) { - if len(rconfig.DefaultFilesConfig.K8ServiceAccount) > 0 { +func deprecatedCheck(ctx context.Context, k8sServiceAccount *string, k8ServiceAccount string) { + if len(k8ServiceAccount) > 0 { logger.Warning(ctx, "--K8ServiceAccount is deprecated, Please use --K8sServiceAccount") - rconfig.DefaultFilesConfig.K8sServiceAccount = rconfig.DefaultFilesConfig.K8ServiceAccount + *k8sServiceAccount = k8ServiceAccount } } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 7f784776b3..24be8297c5 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -66,7 +66,7 @@ func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-parent-folder-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -83,7 +83,7 @@ func TestGetSortedArchivedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -100,7 +100,7 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-unordered-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -117,7 +117,7 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -130,7 +130,7 @@ func TestGetSortedArchivedTgzList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/valid-register.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -146,7 +146,7 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { setup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -159,7 +159,7 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"testdata/invalid-extension-register.zip"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -172,7 +172,7 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { setup() rconfig.DefaultFilesConfig.Archive = true args = []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -185,7 +185,7 @@ func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -203,7 +203,7 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) rconfig.DefaultFilesConfig.Archive = true args = []string{"http://dummyhost:80/testdata/valid-register.tar"} ctx = nil - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args) + fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -219,7 +219,7 @@ func TestRegisterFile(t *testing.T) { mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Nil(t, err) }) @@ -228,7 +228,7 @@ func TestRegisterFile(t *testing.T) { registerFilesSetup() args = []string{"testdata/non-existent.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error reading file due to open testdata/non-existent.pb: no such file or directory", results[0].Info) @@ -239,7 +239,7 @@ func TestRegisterFile(t *testing.T) { registerFilesSetup() args = []string{"testdata/valid-register.tar"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error unmarshalling file due to failed unmarshalling file testdata/valid-register.tar", results[0].Info) @@ -252,7 +252,7 @@ func TestRegisterFile(t *testing.T) { status.Error(codes.AlreadyExists, "AlreadyExists")) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Success", results[0].Status) assert.Equal(t, "AlreadyExists", results[0].Info) @@ -265,7 +265,7 @@ func TestRegisterFile(t *testing.T) { status.Error(codes.InvalidArgument, "Invalid")) args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx) + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error registering file due to rpc error: code = InvalidArgument desc = Invalid", results[0].Info) @@ -279,7 +279,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(lpSpec) + hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) }) t.Run("k8sService account override", func(t *testing.T) { @@ -287,7 +287,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(lpSpec) + hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) t.Run("Both k8sService and IamRole", func(t *testing.T) { @@ -296,7 +296,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(lpSpec) + hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole", KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) @@ -305,7 +305,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.OutputLocationPrefix = "prefix" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(lpSpec) + hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Equal(t, &admin.RawOutputDataConfig{OutputLocationPrefix: "prefix"}, lpSpec.RawOutputDataConfig) }) } @@ -319,7 +319,7 @@ func TestUploadFastRegisterArtifact(t *testing.T) { }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "flytesnacks-core.tgz", "") + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "flytesnacks-core.tgz", "", &rconfig.DefaultFilesConfig.SourceUploadPath) assert.Nil(t, err) }) t.Run("Failed upload", func(t *testing.T) { @@ -330,7 +330,7 @@ func TestUploadFastRegisterArtifact(t *testing.T) { }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "", "") + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "", "", &rconfig.DefaultFilesConfig.SourceUploadPath) assert.Nil(t, err) }) t.Run("Failed upload", func(t *testing.T) { @@ -341,7 +341,7 @@ func TestUploadFastRegisterArtifact(t *testing.T) { }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacksre.tgz", "", "") + err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacksre.tgz", "", "", &rconfig.DefaultFilesConfig.SourceUploadPath) assert.NotNil(t, err) }) } @@ -379,7 +379,7 @@ func TestRegister(t *testing.T) { setup() registerFilesSetup() node := &admin.NodeExecution{} - err := register(ctx, node, cmdCtx) + err := register(ctx, node, cmdCtx, rconfig.DefaultFilesConfig.DryRun, rconfig.DefaultFilesConfig.Version) assert.NotNil(t, err) }) } @@ -389,7 +389,7 @@ func TestHydrateNode(t *testing.T) { setup() registerFilesSetup() node := &core.Node{} - err := hydrateNode(node) + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version) assert.NotNil(t, err) }) @@ -397,7 +397,7 @@ func TestHydrateNode(t *testing.T) { setup() registerFilesSetup() task := &admin.Task{} - err := hydrateSpec(task, "") + err := hydrateSpec(task, "", *rconfig.DefaultFilesConfig) assert.NotNil(t, err) }) } @@ -445,7 +445,7 @@ func TestHydrateTaskSpec(t *testing.T) { }, }, } - err = hydrateTaskSpec(task, "sourcey") + err = hydrateTaskSpec(task, "sourcey", rconfig.DefaultFilesConfig.SourceUploadPath, rconfig.DefaultFilesConfig.Version) assert.NoError(t, err) var hydratedPodSpec = v1.PodSpec{} err = utils.UnmarshalStructToObj(task.Template.GetK8SPod().PodSpec, &hydratedPodSpec) From 06458f5809bd27a788cba44c4c9a5b777f609a9e Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 16 Nov 2021 12:55:32 +0530 Subject: [PATCH 168/356] Added validation for scheduled workflow during registration (#215) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/register/register_util.go | 39 ++++++- flytectl/cmd/register/register_util_test.go | 107 +++++++++++++++++++- 2 files changed, 140 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 85b55e81b4..91657241d3 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -261,7 +261,39 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string, sourceUploadPath s return nil } -func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccount string, configOutputLocationPrefix string, lpSpec *admin.LaunchPlanSpec) { +func validateLaunchSpec(lpSpec *admin.LaunchPlanSpec) error { + if lpSpec == nil { + return nil + } + if lpSpec.EntityMetadata != nil && lpSpec.EntityMetadata.Schedule != nil { + schedule := lpSpec.EntityMetadata.Schedule + var scheduleFixedParams []string + if lpSpec.DefaultInputs != nil { + for paramKey := range lpSpec.DefaultInputs.Parameters { + if paramKey != schedule.KickoffTimeInputArg { + scheduleFixedParams = append(scheduleFixedParams, paramKey) + } + } + } + if (lpSpec.FixedInputs == nil && len(scheduleFixedParams) > 0) || + (len(scheduleFixedParams) > len(lpSpec.FixedInputs.Literals)) { + fixedInputLen := 0 + if lpSpec.FixedInputs != nil { + fixedInputLen = len(lpSpec.FixedInputs.Literals) + } + return fmt.Errorf("param values are missing on scheduled workflow."+ + "additional args other than %v on scheduled workflow are %v > %v fixed values", schedule.KickoffTimeInputArg, + len(scheduleFixedParams), fixedInputLen) + } + } + return nil +} + +func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccount string, configOutputLocationPrefix string, lpSpec *admin.LaunchPlanSpec) error { + + if err := validateLaunchSpec(lpSpec); err != nil { + return err + } assumableIamRole := len(configAssumableIamRole) > 0 k8sServiceAcct := len(configK8sServiceAccount) > 0 outputLocationPrefix := len(configOutputLocationPrefix) > 0 @@ -276,6 +308,7 @@ func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccoun OutputLocationPrefix: configOutputLocationPrefix, } } + return nil } func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesConfig) error { @@ -283,7 +316,9 @@ func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesC case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) hydrateIdentifier(launchPlan.Spec.WorkflowId, config.Version) - hydrateLaunchPlanSpec(config.AssumableIamRole, config.K8sServiceAccount, config.OutputLocationPrefix, launchPlan.Spec) + if err := hydrateLaunchPlanSpec(config.AssumableIamRole, config.K8sServiceAccount, config.OutputLocationPrefix, launchPlan.Spec); err != nil { + return err + } case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) for _, Noderef := range workflowSpec.Template.Nodes { diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 24be8297c5..fcbff5a802 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -13,6 +13,7 @@ import ( v1 "k8s.io/api/core/v1" + "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" @@ -279,7 +280,8 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) }) t.Run("k8sService account override", func(t *testing.T) { @@ -287,7 +289,8 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) t.Run("Both k8sService and IamRole", func(t *testing.T) { @@ -296,7 +299,8 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole", KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) @@ -305,9 +309,104 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.OutputLocationPrefix = "prefix" lpSpec := &admin.LaunchPlanSpec{} - hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) assert.Equal(t, &admin.RawOutputDataConfig{OutputLocationPrefix: "prefix"}, lpSpec.RawOutputDataConfig) }) + t.Run("Validation successful", func(t *testing.T) { + lpSpec := &admin.LaunchPlanSpec{ + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + ScheduleExpression: &admin.Schedule_CronExpression{ + CronExpression: "foo", + }, + KickoffTimeInputArg: "kickoff_time_arg", + }, + }, + FixedInputs: &core.LiteralMap{ + Literals: map[string]*core.Literal{}, + }, + } + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) + }) + t.Run("Validation failure", func(t *testing.T) { + lpSpec := &admin.LaunchPlanSpec{ + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + ScheduleExpression: &admin.Schedule_CronExpression{ + CronExpression: "expr", + }, + KickoffTimeInputArg: "kickoff_time_arg", + }, + }, + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{ + "bar": { + Var: &core.Variable{ + Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, + }, + }, + }, + }, + FixedInputs: &core.LiteralMap{ + Literals: map[string]*core.Literal{}, + }, + } + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.NotNil(t, err) + }) + t.Run("Validation failed with fixed inputs empty", func(t *testing.T) { + lpSpec := &admin.LaunchPlanSpec{ + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + ScheduleExpression: &admin.Schedule_CronExpression{ + CronExpression: "expr", + }, + KickoffTimeInputArg: "kickoff_time_arg", + }, + }, + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{ + "bar": { + Var: &core.Variable{ + Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, + }, + }, + }, + }, + } + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.NotNil(t, err) + }) + t.Run("Validation success with fixed", func(t *testing.T) { + lpSpec := &admin.LaunchPlanSpec{ + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + ScheduleExpression: &admin.Schedule_CronExpression{ + CronExpression: "expr", + }, + KickoffTimeInputArg: "kickoff_time_arg", + }, + }, + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{ + "bar": { + Var: &core.Variable{ + Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, + }, + }, + }, + }, + FixedInputs: &core.LiteralMap{ + Literals: map[string]*core.Literal{ + "bar": coreutils.MustMakeLiteral("bar-value"), + }, + }, + } + err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) + assert.Nil(t, err) + }) } func TestUploadFastRegisterArtifact(t *testing.T) { From fe72730a5499f509846eb6edc964f7b5dc6cbb86 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 24 Nov 2021 20:32:09 +0530 Subject: [PATCH 169/356] Added flags for using local images in sandbox (#216) * Added flags for local images in sandbox Signed-off-by: Yuvraj * debug Signed-off-by: Yuvraj * Added pull policy in sandbox Signed-off-by: Yuvraj * fix pflag manually Signed-off-by: Yuvraj * more changes Signed-off-by: Yuvraj * Allow setting ImagePullPolicy in cmd line (#218) Signed-off-by: Haytham Abuelfutuh * fix test Signed-off-by: Yuvraj * Fix docs for ImagePullPolicy values Signed-off-by: Haytham Abuelfutuh Co-authored-by: Haytham Abuelfutuh --- .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 12 ++++ .../sandbox/imagepullpolicy_enumer.go | 69 +++++++++++++++++++ .../subcommand/sandbox/sandbox_config.go | 31 ++++++++- flytectl/cmd/sandbox/start.go | 8 ++- flytectl/pkg/docker/docker.go | 1 + flytectl/pkg/docker/docker_util.go | 30 ++++++-- flytectl/pkg/docker/docker_util_test.go | 26 ++++++- flytectl/pkg/docker/mocks/docker.go | 41 +++++++++++ 9 files changed, 208 insertions(+), 11 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 15c7c6f78f..5339211026 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -53,5 +53,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, "Path of your source code") cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") + cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index cd58322bb6..4e1410c228 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -141,4 +141,16 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_imagePullPolicy", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("imagePullPolicy", testValue) + if v := cmdFlags.Lookup("imagePullPolicy"); v != nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", v.Value.String()), &actual.ImagePullPolicy) + + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go b/flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go new file mode 100644 index 0000000000..8416741819 --- /dev/null +++ b/flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go @@ -0,0 +1,69 @@ +// Code generated by "enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json"; DO NOT EDIT. + +// +package sandbox + +import ( + "encoding/json" + "fmt" +) + +const _ImagePullPolicyName = "AlwaysIfNotPresentNever" + +var _ImagePullPolicyIndex = [...]uint8{0, 6, 18, 23} + +func (i ImagePullPolicy) String() string { + if i < 0 || i >= ImagePullPolicy(len(_ImagePullPolicyIndex)-1) { + return fmt.Sprintf("ImagePullPolicy(%d)", i) + } + return _ImagePullPolicyName[_ImagePullPolicyIndex[i]:_ImagePullPolicyIndex[i+1]] +} + +var _ImagePullPolicyValues = []ImagePullPolicy{0, 1, 2} + +var _ImagePullPolicyNameToValueMap = map[string]ImagePullPolicy{ + _ImagePullPolicyName[0:6]: 0, + _ImagePullPolicyName[6:18]: 1, + _ImagePullPolicyName[18:23]: 2, +} + +// ImagePullPolicyString retrieves an enum value from the enum constants string name. +// Throws an error if the param is not part of the enum. +func ImagePullPolicyString(s string) (ImagePullPolicy, error) { + if val, ok := _ImagePullPolicyNameToValueMap[s]; ok { + return val, nil + } + return 0, fmt.Errorf("%s does not belong to ImagePullPolicy values", s) +} + +// ImagePullPolicyValues returns all values of the enum +func ImagePullPolicyValues() []ImagePullPolicy { + return _ImagePullPolicyValues +} + +// IsAImagePullPolicy returns "true" if the value is listed in the enum definition. "false" otherwise +func (i ImagePullPolicy) IsAImagePullPolicy() bool { + for _, v := range _ImagePullPolicyValues { + if i == v { + return true + } + } + return false +} + +// MarshalJSON implements the json.Marshaler interface for ImagePullPolicy +func (i ImagePullPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(i.String()) +} + +// UnmarshalJSON implements the json.Unmarshaler interface for ImagePullPolicy +func (i *ImagePullPolicy) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return fmt.Errorf("ImagePullPolicy should be a string, got %s", data) + } + + var err error + *i, err = ImagePullPolicyString(s) + return err +} diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 9a787757a7..ff7559b562 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -1,11 +1,36 @@ package sandbox +//go:generate enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json +type ImagePullPolicy int + +const ( + ImagePullPolicyAlways ImagePullPolicy = iota + ImagePullPolicyIfNotPresent + ImagePullPolicyNever +) + +// Set implements PFlag's Value interface to attempt to set the value of the flag from string. +func (i *ImagePullPolicy) Set(val string) error { + policy, err := ImagePullPolicyString(val) + if err != nil { + return err + } + + *i = policy + return nil +} + +// Type implements PFlag's Value interface to return type name. +func (i ImagePullPolicy) Type() string { + return "ImagePullPolicy" +} + //go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{} ) -//Config +//Config holds configuration flags for sandbox command. type Config struct { Source string `json:"source" pflag:",Path of your source code"` @@ -18,4 +43,8 @@ type Config struct { // Flyte compliant sandbox image. Usually useful, if you want to push the image to your own registry and relaunch // from there. Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."` + + // Optionally it is possible to use local sandbox image + // If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry + ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 8f9518a793..720b6f1a1d 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -56,6 +56,11 @@ Specify a Flyte Sandbox compliant image with the registry. This is useful, in ca flytectl sandbox start --image docker.io/my-override:latest + +Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never +:: + + flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always Usage ` k8sEndpoint = "https://127.0.0.1:30086" @@ -143,7 +148,8 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return nil, err } fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, image) - if err := docker.PullDockerImage(ctx, cli, image); err != nil { + + if err := docker.PullDockerImage(ctx, cli, image, sandboxConfig.DefaultConfig.ImagePullPolicy); err != nil { return nil, err } diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index 1cc53b6285..cb08092b5f 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -24,6 +24,7 @@ type Docker interface { ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) + ImageList(ctx context.Context, listOption types.ImageListOptions) ([]types.ImageSummary, error) } type FlyteDocker struct { diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index a6afbec299..29551decab 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -9,6 +9,8 @@ import ( "os" "strings" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + "github.com/flyteorg/flytectl/clierrors" "github.com/docker/docker/api/types" @@ -88,14 +90,30 @@ func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, e } // PullDockerImage will Pull docker image -func PullDockerImage(ctx context.Context, cli Docker, image string) error { - r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{}) - if err != nil { +func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy sandboxConfig.ImagePullPolicy) error { + if pullPolicy == sandboxConfig.ImagePullPolicyAlways || pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { + if pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { + imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) + if err != nil { + return err + } + for _, img := range imageSummary { + for _, tags := range img.RepoTags { + if image == tags { + return nil + } + } + } + } + r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{}) + if err != nil { + return err + } + + _, err = io.Copy(os.Stdout, r) return err } - - _, err = io.Copy(os.Stdout, r) - return err + return nil } //StartContainer will create and start docker container diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 5aa2b34896..0a40d55ea2 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -8,6 +8,8 @@ import ( "strings" "testing" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/docker/docker/api/types/container" @@ -101,13 +103,13 @@ func TestRemoveSandboxWithNoReply(t *testing.T) { } func TestPullDockerImage(t *testing.T) { - t.Run("Successfully pull image", func(t *testing.T) { + t.Run("Successfully pull image Always", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} context := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - err := PullDockerImage(context, mockDocker, "nginx") + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways) assert.Nil(t, err) }) @@ -117,10 +119,28 @@ func TestPullDockerImage(t *testing.T) { context := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - err := PullDockerImage(context, mockDocker, "nginx") + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways) assert.NotNil(t, err) }) + t.Run("Successfully pull image IfNotPresent", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + // Verify the attributes + mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImageListMatch(context, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent) + assert.Nil(t, err) + }) + + t.Run("Successfully pull image Never", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever) + assert.Nil(t, err) + }) } func TestStartContainer(t *testing.T) { diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index 9655d46a9c..b08cf0d51a 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -368,6 +368,47 @@ func (_m *Docker) ContainerWait(ctx context.Context, containerID string, conditi return r0, r1 } +type Docker_ImageList struct { + *mock.Call +} + +func (_m Docker_ImageList) Return(_a0 []types.ImageSummary, _a1 error) *Docker_ImageList { + return &Docker_ImageList{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnImageList(ctx context.Context, listOption types.ImageListOptions) *Docker_ImageList { + c := _m.On("ImageList", ctx, listOption) + return &Docker_ImageList{Call: c} +} + +func (_m *Docker) OnImageListMatch(matchers ...interface{}) *Docker_ImageList { + c := _m.On("ImageList", matchers...) + return &Docker_ImageList{Call: c} +} + +// ImageList provides a mock function with given fields: ctx, listOption +func (_m *Docker) ImageList(ctx context.Context, listOption types.ImageListOptions) ([]types.ImageSummary, error) { + ret := _m.Called(ctx, listOption) + + var r0 []types.ImageSummary + if rf, ok := ret.Get(0).(func(context.Context, types.ImageListOptions) []types.ImageSummary); ok { + r0 = rf(ctx, listOption) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.ImageSummary) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, types.ImageListOptions) error); ok { + r1 = rf(ctx, listOption) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type Docker_ImagePull struct { *mock.Call } From 47ee1ef2e851cd13e8db156555ed0d3cb510aee5 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 24 Nov 2021 07:19:36 -0800 Subject: [PATCH 170/356] Update documentation (#220) Signed-off-by: Flyte-Bot Co-authored-by: EngHabu --- .../docs/source/gen/flytectl_sandbox_start.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 441f04674e..3c48e3ad2b 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -34,6 +34,11 @@ Specify a Flyte Sandbox compliant image with the registry. This is useful, in ca flytectl sandbox start --image docker.io/my-override:latest + +Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never +:: + + flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always Usage @@ -46,10 +51,11 @@ Options :: - -h, --help help for start - --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. - --source string Path of your source code - --version string Version of flyte. Only supports flyte releases greater than v0.10.0 + -h, --help help for start + --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. + --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) + --source string Path of your source code + --version string Version of flyte. Only supports flyte releases greater than v0.10.0 Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 922a8b1920cc29ed0233f57f294508619b807fdc Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Wed, 24 Nov 2021 09:20:39 -0800 Subject: [PATCH 171/356] Implement PFlag Value interface for OutputFormat to allow pflag binding (#219) * Added flags for local images in sandbox Signed-off-by: Yuvraj * debug Signed-off-by: Yuvraj * Added pull policy in sandbox Signed-off-by: Yuvraj * fix pflag manually Signed-off-by: Yuvraj * Allow setting ImagePullPolicy in cmd line Signed-off-by: Haytham Abuelfutuh * Regenerate Flags with new pflags Signed-off-by: Haytham Abuelfutuh * Regenerate Signed-off-by: Haytham Abuelfutuh Co-authored-by: Yuvraj --- flytectl/cmd/create/execution.go | 2 +- flytectl/cmd/create/executionconfig_flags.go | 3 ++ .../cmd/create/executionconfig_flags_test.go | 42 +++++++++++++++++++ .../ext/mocks/admin_fetcher_ext_interface.go | 14 +++---- flytectl/pkg/printer/printer.go | 16 +++++++ 5 files changed, 69 insertions(+), 8 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 1c78c6c8d8..d3e5d1c34c 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -152,7 +152,7 @@ type ExecutionConfig struct { Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` Version string `json:"version"` - Inputs map[string]interface{} `json:"inputs"` + Inputs map[string]interface{} `json:"inputs" pflag:"-"` } type ExecutionType int diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index fbfb378627..8dbfa9fdfe 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -58,5 +58,8 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Recover, "execution id to be recreated from the last known failure point.") cmdFlags.BoolVar(&executionConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), executionConfig.DryRun, "execute command without making any modifications.") + cmdFlags.StringVar(&executionConfig.Workflow, fmt.Sprintf("%v%v", prefix, "workflow"), executionConfig.Workflow, "") + cmdFlags.StringVar(&executionConfig.Task, fmt.Sprintf("%v%v", prefix, "task"), executionConfig.Task, "") + cmdFlags.StringVar(&executionConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), executionConfig.Version, "") return cmdFlags } diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index 4ad41018ad..0b301402cc 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -211,4 +211,46 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_workflow", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("workflow", testValue) + if vString, err := cmdFlags.GetString("workflow"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Workflow) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_task", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("task", testValue) + if vString, err := cmdFlags.GetString("task"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Task) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_version", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index f41cb66dda..623199b9f9 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -348,8 +348,8 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionDetails) Return(_a0 *admin.N return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: _m.Call.Return(_a0, _a1)} } -func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentId string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentId) +func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentID string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { + c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentID) return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} } @@ -358,13 +358,13 @@ func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetailsMatch(matchers .. return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} } -// FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain, uniqueParentId -func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentId string) (*admin.NodeExecutionList, error) { - ret := _m.Called(ctx, name, project, domain, uniqueParentId) +// FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain, uniqueParentID +func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentID string) (*admin.NodeExecutionList, error) { + ret := _m.Called(ctx, name, project, domain, uniqueParentID) var r0 *admin.NodeExecutionList if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *admin.NodeExecutionList); ok { - r0 = rf(ctx, name, project, domain, uniqueParentId) + r0 = rf(ctx, name, project, domain, uniqueParentID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*admin.NodeExecutionList) @@ -373,7 +373,7 @@ func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Contex var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { - r1 = rf(ctx, name, project, domain, uniqueParentId) + r1 = rf(ctx, name, project, domain, uniqueParentID) } else { r1 = ret.Error(1) } diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index 75d67208eb..f231c32baf 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -35,6 +35,22 @@ const ( OutputFormatDOTURL ) +// Set implements PFlag's Value interface to attempt to set the value of the flag from string. +func (i *OutputFormat) Set(val string) error { + policy, err := OutputFormatString(val) + if err != nil { + return err + } + + *i = policy + return nil +} + +// Type implements PFlag's Value interface to return type name. +func (i OutputFormat) Type() string { + return "OutputFormat" +} + const GraphVisualizationServiceURL = "http://graph.flyte.org/#" func OutputFormats() []string { From f4a7e1e3a9119146dacaddb826c1ffee0cefb120 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 24 Nov 2021 09:59:48 -0800 Subject: [PATCH 172/356] Update documentation (#221) Signed-off-by: Flyte-Bot Co-authored-by: EngHabu --- flytectl/docs/source/gen/flytectl_create_execution.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 7cac61bbd2..2838ecdd5c 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -149,6 +149,9 @@ Options --relaunch string execution id to be relaunched. --targetDomain string project where execution needs to be created.If not specified configured domain would be used. --targetProject string project where execution needs to be created.If not specified configured project would be used. + --task string + --version string + --workflow string Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 8d2b83b1e05b9f94202f3cd0f54202c48a9afaca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 23:30:25 +0530 Subject: [PATCH 173/356] Bump github.com/opencontainers/image-spec from 1.0.1 to 1.0.2 (#217) Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/opencontainers/image-spec/releases) - [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md) - [Commits](https://github.com/opencontainers/image-spec/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: github.com/opencontainers/image-spec dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- flytectl/go.mod | 2 +- flytectl/go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index f403705864..21bb228fda 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -31,7 +31,7 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/mouuff/go-rocket-update v1.5.1 github.com/olekukonko/tablewriter v0.0.5 - github.com/opencontainers/image-spec v1.0.1 + github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 823dc8ecf0..38549bec3b 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -719,8 +719,9 @@ github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go. github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= From b09e206532e2463d5c6fd8ab6f91021963058f95 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 30 Nov 2021 06:52:26 +0530 Subject: [PATCH 174/356] Improve register example UX, Moved from argument to version flag. (#222) * fix flytesnacks register version Signed-off-by: Yuvraj --- .../cmd/config/subcommand/register/files_config.go | 2 +- flytectl/cmd/register/examples.go | 10 +++------- flytectl/cmd/register/register_util.go | 8 ++++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index 8aea9f099b..9c17c958c8 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -4,7 +4,7 @@ package register var ( DefaultFilesConfig = &FilesConfig{ - Version: "v1", + Version: "", ContinueOnError: false, } ) diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index c290b52ae2..3e1b805554 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -18,12 +18,12 @@ const ( Registers all latest flytesnacks example :: - bin/flytectl register examples -d development -p flytesnacks + bin/flytectl register examples -d development -p flytesnacks Registers specific release of flytesnacks example :: - bin/flytectl register examples -d development -p flytesnacks v0.2.176 + bin/flytectl register examples -d development -p flytesnacks --version v0.2.176 Note: register command automatically override the version with release version Usage @@ -37,15 +37,11 @@ var ( func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { var examples []github.ReleaseAsset - var release string // Deprecated checks for --k8Service deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) - if len(args) == 1 { - release = args[0] - } - examples, tag, err := getAllFlytesnacksExample(githubOrg, flytesnacksRepository, release) + examples, tag, err := getAllFlytesnacksExample(githubOrg, flytesnacksRepository, rconfig.DefaultFilesConfig.Version) if err != nil { return err } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 91657241d3..2e8d3cf6e8 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -538,15 +538,15 @@ func filterExampleFromRelease(releases github.RepositoryRelease) []github.Releas return assets } -func getAllFlytesnacksExample(org, repository, release string) ([]github.ReleaseAsset, string, error) { +func getAllFlytesnacksExample(org, repository, version string) ([]github.ReleaseAsset, string, error) { c := github.NewClient(nil) opt := &github.ListOptions{Page: 1, PerPage: 1} - if len(release) > 0 { - releases, _, err := c.Repositories.GetReleaseByTag(context.Background(), org, repository, release) + if len(version) > 0 { + releases, _, err := c.Repositories.GetReleaseByTag(context.Background(), org, repository, version) if err != nil { return nil, "", err } - return filterExampleFromRelease(*releases), release, nil + return filterExampleFromRelease(*releases), version, nil } releases, _, err := c.Repositories.ListReleases(context.Background(), org, repository, opt) if err != nil { From 0f9eee813e8858aee1ea6a9756c659c083ca0ab9 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 29 Nov 2021 20:25:08 -0800 Subject: [PATCH 175/356] Update documentation (#223) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- flytectl/docs/source/gen/flytectl_register_examples.rst | 6 +++--- flytectl/docs/source/gen/flytectl_register_files.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index e5fd09cfe0..8a01a27d65 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -13,12 +13,12 @@ Synopsis Registers all latest flytesnacks example :: - bin/flytectl register examples -d development -p flytesnacks + bin/flytectl register examples -d development -p flytesnacks Registers specific release of flytesnacks example :: - bin/flytectl register examples -d development -p flytesnacks v0.2.176 + bin/flytectl register examples -d development -p flytesnacks --version v0.2.176 Note: register command automatically override the version with release version Usage @@ -42,7 +42,7 @@ Options --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte. (default "v1") + --version string version of the entity to be registered with flyte. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index cb26121177..f25b6597fb 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -101,7 +101,7 @@ Options --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte. (default "v1") + --version string version of the entity to be registered with flyte. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From bd1d4e5efbc0928f45c01d09efc54ac578a27621 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 6 Dec 2021 12:03:00 +0530 Subject: [PATCH 176/356] Added script for checking diff of generated code (#229) * Added script for checking diff of generated code Signed-off-by: Yuvraj --- flytectl/.github/config.yml | 2 +- flytectl/.github/workflows/build.yaml | 10 +++++++++ flytectl/Makefile | 3 --- .../flyte/golang_support_tools/go.mod | 4 ++-- .../flyte/golang_support_tools/go.sum | 5 +++-- .../flyte/golang_test_targets/Makefile | 4 ++++ .../flyte/golang_test_targets/go-gen.sh | 22 +++++++++++++++++++ .../boilerplate/flyte/welcome_bot/config.yml | 2 +- 8 files changed, 43 insertions(+), 9 deletions(-) create mode 100755 flytectl/boilerplate/flyte/golang_test_targets/go-gen.sh diff --git a/flytectl/.github/config.yml b/flytectl/.github/config.yml index 7afe6111f5..73da252e52 100644 --- a/flytectl/.github/config.yml +++ b/flytectl/.github/config.yml @@ -1,5 +1,5 @@ # Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: > +newPRWelcomeComment: | Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 03b19ecd88..148963bd0c 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -43,3 +43,13 @@ jobs: env: GO111MODULE: "on" run: make install && make lint + + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-go@v2 + with: + go-version: '1.16' + - name: Go generate and diff + run: DELTA_CHECK=true make generate \ No newline at end of file diff --git a/flytectl/Makefile b/flytectl/Makefile index 601e502569..d515ffa462 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -13,9 +13,6 @@ define PIP_COMPILE pip-compile $(1) --upgrade --verbose endef -generate: - go test github.com/flyteorg/flytectl/cmd --update - compile: go build -o bin/flytectl -ldflags=$(LD_FLAGS) main.go diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 53f645159a..13941936c5 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -4,10 +4,10 @@ go 1.16 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/flyteorg/flytestdlib v0.3.22 + github.com/flyteorg/flytestdlib v0.4.7 github.com/golangci/golangci-lint v1.38.0 - github.com/pseudomuto/protoc-gen-doc v1.4.1 // indirect github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 + github.com/pseudomuto/protoc-gen-doc v0.1.1 // indirect ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index 261048f745..a62010d29f 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -210,8 +210,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flytestdlib v0.3.22 h1:nJEPaCdxzXBaeg2p4fdo3I3Ua09NedFRaUwuLafLEdw= -github.com/flyteorg/flytestdlib v0.3.22/go.mod h1:1XG0DwYTUm34Yrffm1Qy9Tdr/pWQypEqTq5dUxw3/cM= +github.com/flyteorg/flytestdlib v0.4.7 h1:SMPPXI3j/MjP7D2fqaR+lPQkTrqYS7xZbwsgJI2F8SU= +github.com/flyteorg/flytestdlib v0.4.7/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= @@ -1263,6 +1263,7 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= diff --git a/flytectl/boilerplate/flyte/golang_test_targets/Makefile b/flytectl/boilerplate/flyte/golang_test_targets/Makefile index 21d8b5b776..280e1e55e4 100644 --- a/flytectl/boilerplate/flyte/golang_test_targets/Makefile +++ b/flytectl/boilerplate/flyte/golang_test_targets/Makefile @@ -8,6 +8,10 @@ download_tooling: #download dependencies (including test deps) for the package @boilerplate/flyte/golang_test_targets/download_tooling.sh +.PHONY: generate +generate: download_tooling #generate go code + @boilerplate/flyte/golang_test_targets/go-gen.sh + .PHONY: lint lint: download_tooling #lints the package for common code smells GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v diff --git a/flytectl/boilerplate/flyte/golang_test_targets/go-gen.sh b/flytectl/boilerplate/flyte/golang_test_targets/go-gen.sh new file mode 100755 index 0000000000..54bd6af61b --- /dev/null +++ b/flytectl/boilerplate/flyte/golang_test_targets/go-gen.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -ex + +echo "Running go generate" +go generate ./... + +# This section is used by GitHub workflow to ensure that the generation step was run +if [ -n "$DELTA_CHECK" ]; then + DIRTY=$(git status --porcelain) + if [ -n "$DIRTY" ]; then + echo "FAILED: Go code updated without commiting generated code." + echo "Ensure make generate has run and all changes are committed." + DIFF=$(git diff) + echo "diff detected: $DIFF" + DIFF=$(git diff --name-only) + echo "files different: $DIFF" + exit 1 + else + echo "SUCCESS: Generated code is up to date." + fi +fi diff --git a/flytectl/boilerplate/flyte/welcome_bot/config.yml b/flytectl/boilerplate/flyte/welcome_bot/config.yml index 7afe6111f5..73da252e52 100644 --- a/flytectl/boilerplate/flyte/welcome_bot/config.yml +++ b/flytectl/boilerplate/flyte/welcome_bot/config.yml @@ -1,5 +1,5 @@ # Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: > +newPRWelcomeComment: | Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line: From 073c29d762de93e6849e489d4b0f77ce458ebaad Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 7 Dec 2021 20:51:29 +0530 Subject: [PATCH 177/356] bump version containerd (#231) Signed-off-by: Yuvraj --- flytectl/go.mod | 8 ++++---- flytectl/go.sum | 36 ++++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 21bb228fda..c4c7eb3fa2 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible - github.com/containerd/containerd v1.5.2 // indirect + github.com/containerd/containerd v1.5.8 // indirect github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 @@ -14,7 +14,7 @@ require ( github.com/flyteorg/flyteidl v0.21.5 github.com/flyteorg/flytestdlib v0.4.0 github.com/ghodss/yaml v1.0.0 - github.com/golang/protobuf v1.4.3 + github.com/golang/protobuf v1.5.0 github.com/google/go-github v17.0.0+incompatible github.com/google/go-github/v37 v37.0.0 github.com/google/go-querystring v1.1.0 // indirect @@ -34,7 +34,7 @@ require ( github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/pkg/errors v0.9.1 - github.com/sirupsen/logrus v1.8.0 + github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 @@ -45,7 +45,7 @@ require ( golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect google.golang.org/grpc v1.36.0 - google.golang.org/protobuf v1.25.0 + google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gotest.tools v2.2.0+incompatible diff --git a/flytectl/go.sum b/flytectl/go.sum index 38549bec3b..9de725ed5f 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -95,6 +95,7 @@ github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg3 github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -141,6 +142,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -152,12 +154,14 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0Bsq github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= @@ -170,6 +174,7 @@ github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmE github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -204,12 +209,13 @@ github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.2 h1:MG/Bg1pbmMb61j3wHCFWPxESXHieiKr2xG64px/k8zQ= -github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw= +github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -242,6 +248,7 @@ github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDG github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= @@ -274,6 +281,7 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -391,8 +399,9 @@ github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblf github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -431,8 +440,9 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -446,6 +456,7 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= @@ -548,8 +559,9 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -607,8 +619,6 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw= github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= -github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= @@ -727,14 +737,17 @@ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59P github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -835,8 +848,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= -github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1360,8 +1373,11 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 1d2d0db4f23ae9022868d13122385cb2312061eb Mon Sep 17 00:00:00 2001 From: Babis Kiosidis Date: Thu, 9 Dec 2021 17:44:50 +0200 Subject: [PATCH 178/356] add version to pflags (#232) --- flytectl/cmd/create/execution.go | 2 +- flytectl/cmd/create/execution_test.go | 1 + flytectl/cmd/create/execution_util.go | 3 +++ flytectl/cmd/create/executionconfig_flags.go | 2 +- .../cmd/create/executionconfig_flags_test.go | 24 +++++++++---------- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index d3e5d1c34c..bbb7d77d9e 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -148,10 +148,10 @@ type ExecutionConfig struct { Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."` Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Version string `json:"version" pflag:",specify version of execution workflow/task."` // Non plfag section is read from the execution config generated by get task/launchplan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` - Version string `json:"version"` Inputs map[string]interface{} `json:"inputs" pflag:"-"` } diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 65df850ae5..49ff720f6a 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -19,6 +19,7 @@ import ( func createExecutionSetup() { ctx = testutils.Ctx mockClient = testutils.MockClient + executionConfig = &ExecutionConfig{} // TODO: migrate to new command context from testutils cmdCtx = cmdCore.NewCommandContext(mockClient, testutils.MockOutStream) sortedListLiteralType := core.Variable{ diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 0f90c7ccfe..f2f7bdd60f 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -179,6 +179,9 @@ func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain st if executionConfig.TargetDomain != "" { toBeOverridden.TargetDomain = executionConfig.TargetDomain } + if executionConfig.Version != "" { + toBeOverridden.Version = executionConfig.Version + } // Use the root project and domain to launch the task/workflow if target is unspecified if executionConfig.TargetProject == "" { toBeOverridden.TargetProject = project diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 8dbfa9fdfe..621a53d253 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -58,8 +58,8 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Recover, "execution id to be recreated from the last known failure point.") cmdFlags.BoolVar(&executionConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), executionConfig.DryRun, "execute command without making any modifications.") + cmdFlags.StringVar(&executionConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), executionConfig.Version, "specify version of execution workflow/task.") cmdFlags.StringVar(&executionConfig.Workflow, fmt.Sprintf("%v%v", prefix, "workflow"), executionConfig.Workflow, "") cmdFlags.StringVar(&executionConfig.Task, fmt.Sprintf("%v%v", prefix, "task"), executionConfig.Task, "") - cmdFlags.StringVar(&executionConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), executionConfig.Version, "") return cmdFlags } diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index 0b301402cc..dcae9e6516 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -211,42 +211,42 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_workflow", func(t *testing.T) { + t.Run("Test_version", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("workflow", testValue) - if vString, err := cmdFlags.GetString("workflow"); err == nil { - testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Workflow) + cmdFlags.Set("version", testValue) + if vString, err := cmdFlags.GetString("version"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Version) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_task", func(t *testing.T) { + t.Run("Test_workflow", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("task", testValue) - if vString, err := cmdFlags.GetString("task"); err == nil { - testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Task) + cmdFlags.Set("workflow", testValue) + if vString, err := cmdFlags.GetString("workflow"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Workflow) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_version", func(t *testing.T) { + t.Run("Test_task", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("version", testValue) - if vString, err := cmdFlags.GetString("version"); err == nil { - testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Version) + cmdFlags.Set("task", testValue) + if vString, err := cmdFlags.GetString("task"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.Task) } else { assert.FailNow(t, err.Error()) From c751289f0d9e4b3a8bb23601424566a1c490076d Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Fri, 10 Dec 2021 10:46:15 +0530 Subject: [PATCH 179/356] Created separate rst files for every resource (noun) (#230) * Update nouns.rst * removed html links Created separate rst file for each noun and referenced it in the nouns.rst file. * Update verbs.rst * Deleted newly added rst files error with codecov, so deleted the newly added rst files. * Delete verbs.rst * Created separate rst files for every resource * Changes to files in cmd folder * Update create_test.go * cmd folders * Update cmd/create/execution.go Co-authored-by: Samhita Alla * Added verbs.rst * changes to cmd folder files /bin removed, * Update based on review * Update cmd/create/project.go Co-authored-by: Samhita Alla * Update cmd/create/create.go Co-authored-by: Samhita Alla * Update cmd/create/create_test.go Co-authored-by: Samhita Alla * Update cmd/delete/delete.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Changes to delete - matchable_plugin_override * Changes to .go files in cmd * Changed flytesnack to Flytesnack * Creates to create * Update cmd/get/launch_plan.go Co-authored-by: Samhita Alla * Changed 'launchplan' to 'launch plan' * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/files.go Co-authored-by: Samhita Alla * Update cmd/register/register.go Co-authored-by: Samhita Alla * Update cmd/register/register_test.go Co-authored-by: Samhita Alla * Update cmd/sandbox/sandbox.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/status.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_cluster_label.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_queue_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_plugin_override.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/version/version.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Resolved changes * Changed 'delte' to 'delete' * Updated rst files Created rst files for every noun, and linked the associated verbs with it * Trial * Removed the extra whitespace * Changed 'delte' to 'delete' Co-authored-by: Samhita Alla --- flytectl/cmd/completion.go | 2 +- flytectl/cmd/completion_test.go | 6 +- flytectl/cmd/configuration/configuration.go | 18 +++--- flytectl/cmd/create/create.go | 10 +-- flytectl/cmd/create/create_test.go | 2 +- flytectl/cmd/create/execution.go | 26 ++++---- flytectl/cmd/create/project.go | 8 +-- flytectl/cmd/delete/delete.go | 8 +-- flytectl/cmd/delete/execution.go | 21 +++---- .../matchable_cluster_resource_attribute.go | 19 +++--- .../matchable_execution_cluster_label.go | 15 +++-- .../matchable_execution_cluster_label_test.go | 4 +- .../matchable_execution_queue_attribute.go | 17 +++-- .../cmd/delete/matchable_plugin_override.go | 20 +++--- .../matchable_task_resource_attribute.go | 19 +++--- .../matchable_workflow_execution_config.go | 19 +++--- flytectl/cmd/get/execution.go | 34 +++++----- flytectl/cmd/get/get.go | 4 +- flytectl/cmd/get/get_test.go | 2 +- flytectl/cmd/get/launch_plan.go | 28 ++++----- .../matchable_cluster_resource_attribute.go | 20 +++--- .../get/matchable_execution_cluster_label.go | 19 +++--- .../matchable_execution_queue_attribute.go | 18 +++--- flytectl/cmd/get/matchable_plugin_override.go | 20 +++--- .../get/matchable_task_resource_attribute.go | 18 +++--- .../matchable_workflow_execution_config.go | 21 +++---- flytectl/cmd/get/project.go | 26 ++++---- flytectl/cmd/get/task.go | 40 ++++++------ flytectl/cmd/get/workflow.go | 30 ++++----- flytectl/cmd/register/examples.go | 12 ++-- flytectl/cmd/register/files.go | 54 ++++++++-------- flytectl/cmd/register/register.go | 8 +-- flytectl/cmd/register/register_test.go | 6 +- flytectl/cmd/root.go | 6 +- flytectl/cmd/sandbox/exec.go | 4 +- flytectl/cmd/sandbox/sandbox.go | 18 +++--- flytectl/cmd/sandbox/start.go | 14 ++--- flytectl/cmd/sandbox/status.go | 7 +-- flytectl/cmd/sandbox/teardown.go | 6 +- flytectl/cmd/update/launch_plan.go | 6 +- flytectl/cmd/update/launch_plan_meta.go | 8 +-- .../matchable_cluster_resource_attribute.go | 18 +++--- .../matchable_execution_cluster_label.go | 14 ++--- .../matchable_execution_queue_attribute.go | 18 +++--- .../cmd/update/matchable_plugin_override.go | 14 ++--- .../matchable_task_resource_attribute.go | 18 +++--- .../matchable_workflow_execution_config.go | 16 ++--- flytectl/cmd/update/project.go | 24 +++---- flytectl/cmd/update/task_meta.go | 8 +-- flytectl/cmd/update/update.go | 10 +-- flytectl/cmd/update/workflow_meta.go | 8 +-- flytectl/cmd/upgrade/upgrade.go | 14 ++--- flytectl/cmd/upgrade/upgrade_test.go | 6 +- flytectl/cmd/version/version.go | 6 +- flytectl/cmd/version/version_test.go | 6 +- .../source/cluster-resource-attribute.rst | 9 +++ flytectl/docs/source/config.rst | 10 +++ flytectl/docs/source/examples.rst | 8 +++ .../docs/source/execution-cluster-label.rst | 10 +++ .../docs/source/execution-queue-attribute.rst | 10 +++ flytectl/docs/source/execution.rst | 10 +++ flytectl/docs/source/files.rst | 10 +++ flytectl/docs/source/gen/flytectl.rst | 30 ++++----- .../docs/source/gen/flytectl_completion.rst | 10 +-- flytectl/docs/source/gen/flytectl_config.rst | 12 ++-- .../source/gen/flytectl_config_discover.rst | 8 +-- .../docs/source/gen/flytectl_config_init.rst | 24 +++---- .../source/gen/flytectl_config_validate.rst | 8 +-- flytectl/docs/source/gen/flytectl_create.rst | 16 ++--- .../source/gen/flytectl_create_execution.rst | 34 +++++----- .../source/gen/flytectl_create_project.rst | 16 ++--- flytectl/docs/source/gen/flytectl_delete.rst | 26 ++++---- ...ectl_delete_cluster-resource-attribute.rst | 27 ++++---- ...lytectl_delete_execution-cluster-label.rst | 23 ++++--- ...tectl_delete_execution-queue-attribute.rst | 25 ++++---- .../source/gen/flytectl_delete_execution.rst | 27 ++++---- .../gen/flytectl_delete_plugin-override.rst | 28 ++++----- ...lytectl_delete_task-resource-attribute.rst | 27 ++++---- ...tectl_delete_workflow-execution-config.rst | 27 ++++---- flytectl/docs/source/gen/flytectl_get.rst | 32 +++++----- ...lytectl_get_cluster-resource-attribute.rst | 28 ++++----- .../flytectl_get_execution-cluster-label.rst | 27 ++++---- ...flytectl_get_execution-queue-attribute.rst | 26 ++++---- .../source/gen/flytectl_get_execution.rst | 42 ++++++------- .../source/gen/flytectl_get_launchplan.rst | 36 +++++------ .../gen/flytectl_get_plugin-override.rst | 28 ++++----- .../docs/source/gen/flytectl_get_project.rst | 34 +++++----- .../flytectl_get_task-resource-attribute.rst | 26 ++++---- .../docs/source/gen/flytectl_get_task.rst | 48 +++++++------- ...flytectl_get_workflow-execution-config.rst | 29 +++++---- .../docs/source/gen/flytectl_get_workflow.rst | 38 ++++++------ .../docs/source/gen/flytectl_register.rst | 18 +++--- .../source/gen/flytectl_register_examples.rst | 20 +++--- .../source/gen/flytectl_register_files.rst | 62 +++++++++---------- flytectl/docs/source/gen/flytectl_sandbox.rst | 32 +++++----- .../docs/source/gen/flytectl_sandbox_exec.rst | 12 ++-- .../source/gen/flytectl_sandbox_start.rst | 22 +++---- .../source/gen/flytectl_sandbox_status.rst | 15 +++-- .../source/gen/flytectl_sandbox_teardown.rst | 14 ++--- flytectl/docs/source/gen/flytectl_update.rst | 38 ++++++------ ...ectl_update_cluster-resource-attribute.rst | 26 ++++---- ...lytectl_update_execution-cluster-label.rst | 22 +++---- ...tectl_update_execution-queue-attribute.rst | 26 ++++---- .../gen/flytectl_update_launchplan-meta.rst | 16 ++--- .../source/gen/flytectl_update_launchplan.rst | 14 ++--- .../gen/flytectl_update_plugin-override.rst | 22 +++---- .../source/gen/flytectl_update_project.rst | 32 +++++----- .../source/gen/flytectl_update_task-meta.rst | 16 ++--- ...lytectl_update_task-resource-attribute.rst | 26 ++++---- ...tectl_update_workflow-execution-config.rst | 24 +++---- .../gen/flytectl_update_workflow-meta.rst | 16 ++--- flytectl/docs/source/gen/flytectl_upgrade.rst | 22 +++---- flytectl/docs/source/gen/flytectl_version.rst | 14 ++--- flytectl/docs/source/launchplan.rst | 9 +++ flytectl/docs/source/nouns.rst | 60 ++++++------------ flytectl/docs/source/plugin-override.rst | 10 +++ flytectl/docs/source/project.rst | 10 +++ flytectl/docs/source/sandbox.rst | 11 ++++ .../docs/source/task-resource-attribute.rst | 11 ++++ flytectl/docs/source/task.rst | 8 +++ flytectl/docs/source/verbs.rst | 22 +++---- .../docs/source/workflow-execution-config.rst | 10 +++ flytectl/docs/source/workflow.rst | 8 +++ flytectl/pkg/configutil/configutil.go | 8 +-- flytectl/pkg/util/util_test.go | 14 ++--- flytectl/proposal/README.md | 10 +-- 126 files changed, 1225 insertions(+), 1127 deletions(-) create mode 100644 flytectl/docs/source/cluster-resource-attribute.rst create mode 100644 flytectl/docs/source/config.rst create mode 100644 flytectl/docs/source/examples.rst create mode 100644 flytectl/docs/source/execution-cluster-label.rst create mode 100644 flytectl/docs/source/execution-queue-attribute.rst create mode 100644 flytectl/docs/source/execution.rst create mode 100644 flytectl/docs/source/files.rst create mode 100644 flytectl/docs/source/launchplan.rst create mode 100644 flytectl/docs/source/plugin-override.rst create mode 100644 flytectl/docs/source/project.rst create mode 100644 flytectl/docs/source/sandbox.rst create mode 100644 flytectl/docs/source/task-resource-attribute.rst create mode 100644 flytectl/docs/source/task.rst create mode 100644 flytectl/docs/source/workflow-execution-config.rst create mode 100644 flytectl/docs/source/workflow.rst diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go index 7c705c2e00..ceeb07643a 100644 --- a/flytectl/cmd/completion.go +++ b/flytectl/cmd/completion.go @@ -40,7 +40,7 @@ Bash: Zsh: # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + # you will need to enable it. You can execute the following once: $ echo "autoload -U compinit; compinit" >> ~/.zshrc diff --git a/flytectl/cmd/completion_test.go b/flytectl/cmd/completion_test.go index 3fd8ae01b1..71eab97dc9 100644 --- a/flytectl/cmd/completion_test.go +++ b/flytectl/cmd/completion_test.go @@ -9,9 +9,9 @@ import ( func TestCompletionCmdIntegration(t *testing.T) { rootCmd := &cobra.Command{ - Long: "flytectl is CLI tool written in go to interact with flyteadmin service", - Short: "flyetcl CLI tool", - Use: "flytectl", + Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", + Short: "FlyteCTL CLI tool", + Use: "FlyteCTL", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index e47ff2ff81..cbf0b8bf36 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -22,27 +22,27 @@ import ( "github.com/spf13/cobra" ) -// Long descriptions are whitespace sensitive when generating docs using sphinx. +// Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - initCmdShort = `Generates flytectl config file in the user's home directory.` - initCmdLong = `Creates a flytectl config file in flyte directory i.e ~/.flyte + initCmdShort = `Generates FlyteCTL config file in the user's home directory.` + initCmdLong = `Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte -Generate sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html +Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html :: - bin/flytectl configuration config + flytectl configuration config -Generate remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Generates remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html :: - bin/flytectl configuration config --host=flyte.myexample.com + flytectl configuration config --host=flyte.myexample.com -Generate flytectl config with a storage provider +Generates FlyteCTL config with a storage provider :: - bin/flytectl configuration config --host=flyte.myexample.com --storage + flytectl configuration config --host=flyte.myexample.com --storage ` ) diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 5868b91c97..54ad53cf22 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -6,18 +6,18 @@ import ( "github.com/spf13/cobra" ) -// Long descriptions are whitespace sensitive when generating docs using sphinx. +// Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - createCmdShort = `Used for creating various flyte resources including tasks/workflows/launchplans/executions/project.` + createCmdShort = `Create various Flyte resources including tasks/workflows/launchplans/executions/project.` createCmdLong = ` -Example create. +Create Flyte resource; if a project: :: - bin/flytectl create project --file project.yaml + flytectl create project --file project.yaml ` ) -// RemoteCreateCommand will return create flyte resource commands +// RemoteCreateCommand will return create Flyte resource commands func RemoteCreateCommand() *cobra.Command { createCmd := &cobra.Command{ Use: "create", diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index d2e4711a31..a33201cf12 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -27,7 +27,7 @@ var tearDownAndVerify = testutils.TearDownAndVerify func TestCreateCommand(t *testing.T) { createCommand := RemoteCreateCommand() assert.Equal(t, createCommand.Use, "create") - assert.Equal(t, createCommand.Short, "Used for creating various flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, createCommand.Short, "Create various Flyte resources including tasks/workflows/launchplans/executions/project.") assert.Equal(t, len(createCommand.Commands()), 2) cmdNouns := createCommand.Commands() // Sort by Use value. diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index bbb7d77d9e..263046389e 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -13,22 +13,22 @@ import ( const ( executionShort = "Create execution resources" executionLong = ` -Create the executions for given workflow/task in a project and domain. +Creates executions for a given workflow/task in a project and domain. -There are three steps in generating an execution. +There are three steps in generating an execution: - Generate the execution spec file using the get command. - Update the inputs for the execution if needed. - Run the execution by passing in the generated yaml file. -The spec file should be generated first and then run the execution using the spec file. -You can reference the flytectl get task for more details +The spec file should be generated first and then, the execution should be run using the spec file. +You can reference the FlyteCTL get task for more details. :: flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml @@ -65,35 +65,35 @@ The generated file can be modified to change the input values. task: core.advanced.run_merge_sort.merge version: "v2" -And then can be passed through the command line. -Notice the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to task/launch plans project/domain. +It can then be passed through the command line. +Notice that the source and target domain/projects can be different. +The root project and domain flags of -p and -d should point to the task/launch plans project/domain. :: flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks -Also an execution can be relaunched by passing in current execution id. +Also, an execution can be relaunched by passing in the current execution id. :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, that is recreated from the last known failure point for a previously-run workflow execution. +An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. -As usual the spec file should be generated first and then run the execution using the spec file. +Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. +The spec file should be generated first and then, the execution should be run using the spec file. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here you can see empty values dumped for generic data type x and y. +The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. :: diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 06c039c529..dec5a7322d 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -15,16 +15,16 @@ import ( const ( projectShort = "Create project resources" projectLong = ` -Create the projects.(project,projects can be used interchangeably in these commands) +Create projects.(project/projects can be used interchangeably in these commands) :: - bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte -Create Project by definition file. Note: The name shouldn't contain any whitespace characters' +Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - bin/flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 9a489abb65..14969e9aeb 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -13,14 +13,14 @@ import ( "github.com/spf13/cobra" ) -// Long descriptions are whitespace sensitive when generating docs using sphinx. +// Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - deleteCmdShort = `Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project.` + deleteCmdShort = `Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project.` deleteCmdLong = ` -Example Delete executions. +Delete a resource; if an execution: :: - bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks + flytectl delete execution kxd1i72850 -d development -p flytesnacks ` ) diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index 4b41181852..12a0e268fc 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -11,42 +11,41 @@ import ( "github.com/flyteorg/flytestdlib/logger" ) -// Long descriptions are whitespace sensitive when generating docs using sphinx. +// Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( execCmdShort = `Terminate/Delete execution resources.` execCmdLong = ` Terminate executions.(execution,executions can be used interchangeably in these commands) -Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then -calling terminate on them has no effect. +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. -Terminate a single execution with its name +Terminate a single execution with its name: :: - bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + flytectl delete execution c6a51x2l9e -d development -p flytesnacks -You can get executions to check its state. +Get executions to check its state: :: - bin/flytectl get execution -d development -p flytesnacks + flytectl get execution -d development -p flytesnacks ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- -Terminate multiple executions with there names +Terminate multiple executions with their names: :: - bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Similarly you can get executions to find the state of previously terminated executions. +Get executions to find the state of previously terminated executions: :: - bin/flytectl get execution -d development -p flytesnacks + flytectl get execution -d development -p flytesnacks ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index c6f71fec35..8b4b6fb4dc 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -11,21 +11,20 @@ import ( ) const ( - clusterResourceAttributesShort = "Deletes matchable resources of cluster attributes" + clusterResourceAttributesShort = "Delete matchable resources of cluster attributes" clusterResourceAttributesLong = ` -Deletes cluster resource attributes for given project and domain combination or additionally with workflow name. +Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. -Deletes cluster resource attribute for project and domain -Here the command delete cluster resource attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used for creating it. -Here the command deletes cluster resource attributes from the config file cra.yaml -Attributes are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource +Deletes cluster resource attribute using config file which was used to create it. +Here, the config file is written to cra.yaml. +Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of cra.yaml: :: @@ -40,8 +39,8 @@ eg: content of cra.yaml which will use the project domain and workflow name for foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow -Here the command deletes cluster resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes cluster resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index 4149b5e18b..e8ed9c04ae 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -11,21 +11,20 @@ import ( ) const ( - executionClusterLabelShort = "Deletes matchable resources of execution cluster label" + executionClusterLabelShort = "Delete matchable resources of execution cluster label" executionClusterLabelLong = ` Deletes execution cluster label for given project and domain combination or additionally with workflow name. -Deletes execution cluster label for project and domain -Here the command delete execution cluster label for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete execution-cluster-label -p flytectldemo -d development Deletes execution cluster label using config file which was used for creating it. -Here the command deletes execution cluster label from the config file ecl.yaml -Value is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of ecl.yaml which will use the project domain and workflow name for deleting the resource +Here, the config file is written to ecl.yaml. +Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. +e.g., content of ecl.yaml: :: @@ -38,8 +37,8 @@ eg: content of ecl.yaml which will use the project domain and workflow name for project: flytectldemo value: foo -Deletes execution cluster label for a workflow -Here the command deletes execution cluster label for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes execution cluster label for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index fe90153dbf..834e5afb66 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -40,10 +40,10 @@ func TestDeleteExecutionClusterLabels(t *testing.T) { deleteExecutionClusterLabelSetup() // No args implying project domain attribute deletion u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + mock.Anything).Return(fmt.Errorf("failed to delete project domain attributes")) err = deleteExecutionClusterLabel(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + assert.Equal(t, fmt.Errorf("failed to delete project domain attributes"), err) u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index 6bc5a47aae..d3b77a62c5 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -11,21 +11,20 @@ import ( ) const ( - executionQueueAttributesShort = "Deletes matchable resources of execution queue attributes" + executionQueueAttributesShort = "Delete matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Deletes execution queue attributes for given project and domain combination or additionally with workflow name. +Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. -Deletes execution queue attribute for project and domain -Here the command delete execution queue attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete execution-queue-attribute -p flytectldemo -d development Deletes execution queue attribute using config file which was used for creating it. -Here the command deletes execution queue attributes from the config file era.yaml -Tags are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of era.yaml which will use the project domain and workflow name for deleting the resource +Here, the config file is written to era.yaml. +Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. +e.g., content of era.yaml: :: @@ -42,8 +41,8 @@ eg: content of era.yaml which will use the project domain and workflow name for - buzz - lightyear -Deletes execution queue attribute for a workflow -Here the command deletes the execution queue attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes execution queue attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index edbe826a82..80b46b35db 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -11,22 +11,20 @@ import ( ) const ( - pluginOverrideShort = "Deletes matchable resources of plugin overrides" + pluginOverrideShort = "Delete matchable resources of plugin overrides" pluginOverrideLong = ` -Deletes plugin override for given project and domain combination or additionally with workflow name. +Deletes plugin override for the given project and domain combination or additionally with workflow name. -Deletes plugin override for project and domain -Here the command deletes plugin override for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used for creating it. -Here the command deletes plugin overrides from the config file po.yaml -Overrides are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of po.yaml which will use the project domain and workflow name for deleting the resource - +Deletes plugin override using config file which was used to create it. +Here, the config file is written to po.yaml. +Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of po.yaml: :: flytectl delete plugin-override --attrFile po.yaml @@ -43,8 +41,8 @@ eg: content of po.yaml which will use the project domain and workflow name for - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow -Here the command deletes the plugin override for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes plugin override for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 01af86bb6d..90cd11e48f 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -11,21 +11,20 @@ import ( ) const ( - taskResourceAttributesShort = "Deletes matchable resources of task attributes" + taskResourceAttributesShort = "Delete matchable resources of task attributes" taskResourceAttributesLong = ` -Deletes task resource attributes for given project,domain combination or additionally with workflow name. +Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. -Deletes task resource attribute for project and domain -Here the command delete task resource attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete task-resource-attribute -p flytectldemo -d development -Deletes task resource attribute using config file which was used for creating it. -Here the command deletes task resource attributes from the config file tra.yaml -defaults/limits are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource +Deletes task resource attribute using config file which was used to create it. +Here, the config file is written to tra.yaml. +The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of tra.yaml: :: @@ -43,8 +42,8 @@ eg: content of tra.yaml which will use the project domain and workflow name for cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow -Here the command deletes task resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes task resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index fb9d6d5c6b..ee9b612712 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -12,21 +12,20 @@ import ( ) const ( - workflowExecutionConfigShort = "Deletes matchable resources of workflow execution config" + workflowExecutionConfigShort = "Delete matchable resources of workflow execution config" workflowExecutionConfigLong = ` -Deletes workflow execution config for given project and domain combination or additionally with workflow name. +Deletes workflow execution config for the given project and domain combination or additionally with workflow name. -Deletes workflow execution config label for project and domain -Here the command delete workflow execution config for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete workflow-execution-config -p flytectldemo -d development -Deletes workflow execution config using config file which was used for creating it. -Here the command deletes workflow execution config from the config file wec.yaml -Max_parallelism is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of wec.yaml which will use the project domain and workflow name for deleting the resource +Deletes workflow execution config using config file which was used to create it. +Here, the config file is written to wec.yaml. +Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of wec.yaml: :: @@ -39,8 +38,8 @@ eg: content of wec.yaml which will use the project domain and workflow name for project: flytectldemo max_parallelism: 5 -Deletes workflow execution config for a workflow -Here the command deletes workflow execution config for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes workflow execution config for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 3cda9d4925..3dcf3f34ae 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -15,67 +15,67 @@ import ( ) const ( - executionShort = "Gets execution resources" + executionShort = "Get execution resources" executionLong = ` -Retrieve all executions within the project and domain (execution, executions can be used interchangeably). +Retrieve all executions within the project and domain (execution, executions can be used interchangeably): :: - bin/flytectl get execution -p flytesnacks -d development + flytectl get execution -p flytesnacks -d development -Retrieves executions by name within the project and domain. +Retrieve executions by name within the project and domain: :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r + flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieves all the executions with filters. +Retrieve all the executions with filters: :: - bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters. +Retrieve executions as per the specified limit and sorting parameters: :: - bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions within the project and domain in YAML format. +Retrieve executions within the project and domain in YAML format: :: - bin/flytectl get execution -p flytesnacks -d development -o yaml + flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format. +Retrieve executions within the project and domain in JSON format: :: - bin/flytectl get execution -p flytesnacks -d development -o json + flytectl get execution -p flytesnacks -d development -o json Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details + flytectl get execution -p flytesnacks -d development oeh94k9r2r --details Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml Fetch task executions on a specific node using the --nodeID flag. Use the nodeID attribute given by the node details view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml Usage ` diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index e6b750e2f5..181444afec 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -19,9 +19,9 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - getCmdShort = `Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.` + getCmdShort = `Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.` getCmdLong = ` -Example get projects. +For project, it is: :: flytectl get project diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index c6bce31c54..bf22c762f1 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -40,7 +40,7 @@ const ( func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() assert.Equal(t, getCommand.Use, "get") - assert.Equal(t, getCommand.Short, "Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, getCommand.Short, "Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.") fmt.Println(getCommand.Commands()) assert.Equal(t, len(getCommand.Commands()), 11) cmdNouns := getCommand.Commands() diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 79aa4822b3..531504d41c 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -14,62 +14,62 @@ import ( ) const ( - launchPlanShort = "Gets launch plan resources" + launchPlanShort = "Get launch plan resources" launchPlanLong = ` -Retrieve all launch plans within the project and domain (launchplan, launchplans can be used interchangeably). +Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): :: flytectl get launchplan -p flytesnacks -d development - Retrieve a launch plan by name within the project and domain. + Retrieve a launch plan by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet -Retrieve the latest version of the task by name within the project and domain. +Retrieve the latest version of the task by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves a particular version of the launch plan by name within the project and domain. +Retrieve a particular version of the launch plan by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves all the launch plans with filters. +Retrieve all the launch plans with filters: :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" + flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" -Retrieves launch plans entity search across all versions with filters. +Retrieve launch plans entity search across all versions with filters: :: - bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" + flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" -Retrieves all the launch plans with limit and sorting. +Retrieve all the launch plans with limit and sorting: :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all launch plans within the project and domain in YAML format. +Retrieve all launch plans within the project and domain in YAML format: :: flytectl get launchplan -p flytesnacks -d development -o yaml -Retrieves all launch plans the within the project and domain in JSON format. +Retrieve all launch plans the within the project and domain in JSON format: :: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command. +Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 7750a30ee2..9682ec271d 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes." + clusterResourceAttributesShort = "Get matchable resources of cluster resource attributes." clusterResourceAttributesLong = ` -Retrieve cluster resource attributes for the given project and domain. -Here, the command gets cluster resource attributes for the project flytectldemo and development domain. +Retrieves cluster resource attributes for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieve cluster resource attributes for the given project, domain, and workflow. -Here, the command gets cluster resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves cluster resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes,the command throws an error. -Here, the command gets the task resource attributes and writes the config file to cra.yaml file. -eg: content of cra.yaml +Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +Here, the config file is written to cra.yaml file: +e.g., content of cra.yaml :: diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index 8a5227d736..a8ebb50514 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -11,37 +11,36 @@ import ( ) const ( - executionClusterLabelShort = "Gets matchable resources of execution cluster label." + executionClusterLabelShort = "Get matchable resources of execution cluster label." executionClusterLabelLong = ` -// Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. -Retrieve the execution cluster label for the given project and domain. -Here the command get execution cluster label for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} Retrieve the execution cluster label for the given project, domain and workflow. -Here, the command gets the execution cluster label for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} -Writes the execution cluster label to a file. If there is no execution cluster label, command throws an error. -Here, the command gets the execution cluster label and writes the config file to ecl.yaml file. -eg: content of ecl.yaml +Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. +Here, the config file is written to ecl.yaml, +e.g., content of ecl.yaml: :: diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 0fea10ee56..34b73c139e 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - executionQueueAttributesShort = "Gets matchable resources of execution queue attributes" + executionQueueAttributesShort = "Get matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Retrieve the execution queue attribute for the given project and domain. -Here, the command gets execution queue attributes for the project flytectldemo and development domain. +Retrieves the execution queue attribute for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieve the execution queue attribute for the given project, domain, and workflow. -Here, the command gets execution queue attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the command gets the execution queue attributes and writes the config to era.yaml file. -e.g. : content of era.yaml +Here, the config file is written to era.yaml, +e.g., content of era.yaml: :: diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index 8c8f5986dc..eb8e0fdd0c 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -11,16 +11,16 @@ import ( ) const ( - pluginOverrideShort = "Gets matchable resources of plugin override" + pluginOverrideShort = "Get matchable resources of plugin override" pluginOverrideLong = ` -Retrieve the plugin overrides for the given project and domain. -Here, the command gets the plugin overrides for the project flytectldemo and development domain. +Retrieves the plugin override for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get plugin-override -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json @@ -34,14 +34,14 @@ e.g. : output from the command }] } -Retrieves the plugin overrides for project, domain and workflow -Here the command gets the plugin overrides for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves the plugin override for the given project, domain and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command: .. code-block:: json @@ -56,9 +56,9 @@ e.g. : output from the command }] } -Writing the plugin overrides to a file. If there are no plugin overrides, command would return an error. -Here the command gets plugin overrides and writes the config file to po.yaml -eg: content of po.yaml +Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. +Here, the config file is written to po.yaml, +e.g., content of po.yaml: :: diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 2c27bb6f46..6636976350 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -11,27 +11,27 @@ import ( ) const ( - taskResourceAttributesShort = "Gets matchable resources of task attributes" + taskResourceAttributesShort = "Get matchable resources of task attributes" taskResourceAttributesLong = ` -Retrieve task resource attributes for the given project and domain. -Here, the command gets the task resource attributes for the project flytectldemo and development domain. +Retrieves task resource attributes for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieve task resource attributes for the given project, domain, and workflow. -Here, the command gets task resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command: .. code-block:: json @@ -39,8 +39,8 @@ e.g. : output from the command Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here the command gets task resource attributes and writes the config file to tra.yaml -e.g. : content of tra.yaml +Here, the config file is written to tra.yaml, +e.g., content of tra.yaml: :: diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 1afbc4324f..afb1d3b0f8 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -12,18 +12,17 @@ import ( ) const ( - workflowExecutionConfigShort = "Gets matchable resources of workflow execution config" + workflowExecutionConfigShort = "Get matchable resources of workflow execution config" workflowExecutionConfigLong = ` -Retrieves workflow execution config for given project and domain combination or additionally with workflow name. +Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. -Retrieves workflow execution config for project and domain -Here the command get workflow execution config for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl get workflow-execution-config -p flytectldemo -d development -eg : output from the command +e.g., output from the command .. code-block:: json @@ -33,14 +32,14 @@ eg : output from the command "max_parallelism": 5 } -Retrieves workflow execution config for project and domain and workflow -Here the command get workflow execution config for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves workflow execution config for the project, domain and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json @@ -51,9 +50,9 @@ eg : output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, command would return an error. -Here the command gets workflow execution config and writes the config file to wec.yaml -eg: content of wec.yaml +Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. +Here, the config file is written to wec.yaml, +e.g., content of wec.yaml: :: diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 10148a1c07..4912d4b5fc 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -15,40 +15,40 @@ import ( ) const ( - projectShort = "Gets project resources" + projectShort = "Get project resources" projectLong = ` -Retrieves all the projects.(project,projects can be used interchangeably in these commands) +Retrieve all the projects. (project,projects can be used interchangeably in these commands): :: - bin/flytectl get project + flytectl get project -Retrieves project by name +Retrieve project by name: :: - bin/flytectl get project flytesnacks + flytectl get project flytesnacks -Retrieves all the projects with filters. +Retrieve all the projects with filters: :: - bin/flytectl get project --filter.fieldSelector="project.name=flytesnacks" + flytectl get project --filter.fieldSelector="project.name=flytesnacks" -Retrieves all the projects with limit and sorting. +Retrieve all the projects with limit and sorting: :: - bin/flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the projects in yaml format +Retrieve all the projects in yaml format: :: - bin/flytectl get project -o yaml + flytectl get project -o yaml -Retrieves all the projects in json format +Retrieve all the projects in json format: :: - bin/flytectl get project -o json + flytectl get project -o json Usage ` diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 63b490ae82..c1f103dea4 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -14,64 +14,64 @@ import ( ) const ( - taskShort = "Gets task resources" + taskShort = "Get task resources" taskLong = ` -Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): :: - bin/flytectl get task -p flytesnacks -d development + flytectl get task -p flytesnacks -d development -Retrieves task by name within project and domain. +Retrieve task by name within project and domain: :: - bin/flytectl task -p flytesnacks -d development core.basic.lp.greet + flytectl task -p flytesnacks -d development core.basic.lp.greet -Retrieves latest version of task by name within project and domain. +Retrieve latest version of task by name within project and domain: :: flytectl get task -p flytesnacks -d development core.basic.lp.greet --latest -Retrieves particular version of task by name within project and domain. +Retrieve particular version of task by name within project and domain: :: flytectl get task -p flytesnacks -d development core.basic.lp.greet --version v2 -Retrieves all the tasks with filters. +Retrieve all the tasks with filters: :: - bin/flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" -Retrieve a specific task with filters. +Retrieve a specific task with filters: :: - bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" -Retrieves all the task with limit and sorting. +Retrieve all the tasks with limit and sorting: :: - bin/flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the tasks within project and domain in yaml format. +Retrieve all the tasks within project and domain in yaml format: :: - bin/flytectl get task -p flytesnacks -d development -o yaml + flytectl get task -p flytesnacks -d development -o yaml -Retrieves all the tasks within project and domain in json format. +Retrieve all the tasks within project and domain in json format: :: - bin/flytectl get task -p flytesnacks -d development -o json + flytectl get task -p flytesnacks -d development -o json -Retrieves a tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. +Retrieve tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution: :: - bin/flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 2670b7f10d..0b80e652e3 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -16,65 +16,65 @@ import ( ) const ( - workflowShort = "Gets workflow resources" + workflowShort = "Get workflow resources" workflowLong = ` -Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development -Retrieves workflow by name within project and domain. +Retrieve workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet -Retrieves latest version of workflow by name within project and domain. +Retrieve latest version of workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves particular version of workflow by name within project and domain. +Retrieve particular version of workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves all the workflows with filters. +Retrieve all the workflows with filters: :: - bin/flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" -Retrieve specific workflow with filters. +Retrieve specific workflow with filters: :: - bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" + flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" -Retrieves all the workflows with limit and sorting. +Retrieve all the workflows with limit and sorting: :: - bin/flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the workflow within project and domain in yaml format. +Retrieve all the workflows within project and domain in yaml format: :: flytectl get workflow -p flytesnacks -d development -o yaml -Retrieves all the workflow within project and domain in json format. +Retrieve all the workflow within project and domain in json format: :: flytectl get workflow -p flytesnacks -d development -o json -Visualize the graph for a workflow within project and domain in dot format. +Visualize the graph for a workflow within project and domain in dot format: :: flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o dot -Visualize the graph for a workflow within project and domain in a dot content render. +Visualize the graph for a workflow within project and domain in a dot content render: :: diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 3e1b805554..c27ca67409 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -13,19 +13,19 @@ import ( ) const ( - registerExampleShort = "Registers flytesnack example" + registerExampleShort = "Register Flytesnacks example" registerExampleLong = ` -Registers all latest flytesnacks example +Register all latest Flytesnacks examples: :: - bin/flytectl register examples -d development -p flytesnacks + flytectl register examples -d development -p flytesnacks -Registers specific release of flytesnacks example +Register specific release of Flytesnacks examples: :: - bin/flytectl register examples -d development -p flytesnacks --version v0.2.176 + flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: register command automatically override the version with release version +Note: The register command automatically override the version with release version Usage ` ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index d1b16a18b3..b2801d53ef 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -14,77 +14,77 @@ import ( ) const ( - registerFilesShort = "Registers file resources" + registerFilesShort = "Register file resources" registerFilesLong = ` Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. -If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks + flytectl register file _pb_output/* -d development -p flytesnacks -There is no difference between registration and fast registration, In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If Flytectl finds any source code in users's input then it will consider registration as fast registration. Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also archive create source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration +In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" -Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. -Use --archive flag. +Using archive file. Currently supported extensions are .tgz and .tar. They can be local or remote files served through http/https. +Use --archive flag: :: - bin/flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive -Using local tgz file. +Using local tgz file: :: - bin/flytectl register files _pb_output.tgz -d development -p flytesnacks --archive + flytectl register files _pb_output.tgz -d development -p flytesnacks --archive -If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in the continueOnError flag. +If you wish to continue executing registration on other files by ignoring the errors including the version conflicts, then send the continueOnError flag: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -Using short format of continueOnError flag +Using short format of continueOnError flag: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -Overriding the default version v1 using version string. +Override the default version v1 using version string: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -Change the o/p format has not effect on registration. The O/p is currently available only in table format. +Changing the o/p format has no effect on the registration. The O/p is currently available only in table format: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml -Override IamRole during registration. +Override IamRole during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" -Override Kubernetes service account during registration. +Override Kubernetes service account during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" -Override Output location prefix during registration. +Override Output location prefix during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" Usage ` diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index ccc95a5127..469a3811a9 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -9,12 +9,12 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - registerCmdShort = "Registers tasks/workflows/launchplans from list of generated serialized files." + registerCmdShort = "Register tasks/workflows/launchplans from a list of generated serialized files." registercmdLong = ` Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. -Currently these input files are protobuf files generated as output from flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 -If the entities are already registered with flyte for the same version then registration would fail. +Currently, these input files are protobuf files generated as output from Flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +If the entities are already registered with Flyte for the same version, the registration would fail. ` ) diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index 33f48dddd3..cf3b725fcd 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -27,7 +27,7 @@ var setup = u.Setup func TestRegisterCommand(t *testing.T) { registerCommand := RemoteRegisterCommand() assert.Equal(t, registerCommand.Use, "register") - assert.Equal(t, registerCommand.Short, "Registers tasks/workflows/launchplans from list of generated serialized files.") + assert.Equal(t, registerCommand.Short, "Register tasks/workflows/launchplans from a list of generated serialized files.") fmt.Println(registerCommand.Commands()) assert.Equal(t, len(registerCommand.Commands()), 2) cmdNouns := registerCommand.Commands() @@ -38,9 +38,9 @@ func TestRegisterCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Use, "examples") assert.Equal(t, cmdNouns[0].Aliases, []string{"example", "flytesnack", "flytesnacks"}) - assert.Equal(t, cmdNouns[0].Short, "Registers flytesnack example") + assert.Equal(t, cmdNouns[0].Short, "Register Flytesnacks example") assert.Equal(t, cmdNouns[1].Use, "files") assert.Equal(t, cmdNouns[1].Aliases, []string{"file"}) - assert.Equal(t, cmdNouns[1].Short, "Registers file resources") + assert.Equal(t, cmdNouns[1].Short, "Register file resources") } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 5da86063ce..98c646c37a 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -42,9 +42,9 @@ const ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, - Long: "flytectl is CLI tool written in go to interact with flyteadmin service", - Short: "flyetcl CLI tool", - Use: "flytectl", + Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", + Short: "FlyteCTL CLI tool", + Use: "FlyteCTL", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index bc42048a86..98f584aa64 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -11,10 +11,10 @@ import ( const ( execShort = "Execute non-interactive command inside the sandbox container" execLong = ` -Execute command will run non-interactive command inside the sandbox container and return immediately with the output.By default flytectl exec in /root directory inside the sandbox container +Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. :: - bin/flytectl sandbox exec -- ls -al + flytectl sandbox exec -- ls -al Usage` ) diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index b269f378be..ea639fa4a4 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -10,29 +10,29 @@ import ( const ( sandboxShort = `Used for sandbox interactions like start/teardown/status/exec.` sandboxLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Create sandbox cluster. +Create sandbox cluster: :: - bin/flytectl sandbox start + flytectl sandbox start -Remove sandbox cluster. +Remove sandbox cluster: :: - bin/flytectl sandbox teardown + flytectl sandbox teardown -Check status of sandbox container. +Check status of sandbox container: :: - bin/flytectl sandbox status + flytectl sandbox status -Execute command inside sandbox container. +Execute command inside sandbox container: :: - bin/flytectl sandbox exec -- pwd + flytectl sandbox exec -- pwd ` ) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 720b6f1a1d..73f1a083be 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -32,32 +32,32 @@ import ( const ( startShort = "Start the flyte sandbox cluster" startLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Start sandbox cluster without any source code +Start sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox +Mount your source code repository inside sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags +Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: Flytectl sandbox is only supported for Flyte versions > v0.10.0 +Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 -Specify a Flyte Sandbox compliant image with the registry. This is useful, in case you want to use an image from your registry. +Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: flytectl sandbox start --image docker.io/my-override:latest -Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never +Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index c9493b4509..bff5230c11 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -10,15 +10,14 @@ import ( ) const ( - statusShort = "Get the status of the sandbox environment." + statusShort = "Get status of the sandbox environment." statusLong = ` -Status will retrieve the status of the Sandbox environment. Currently FlyteSandbox runs as a local docker container. -This will return the docker status for this container +Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. Usage :: - bin/flytectl sandbox status + flytectl sandbox status ` ) diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 544880b997..3d42e7c7c5 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -15,12 +15,12 @@ import ( ) const ( - teardownShort = "Teardown will cleanup the sandbox environment" + teardownShort = "Teardown cleans up the sandbox environment" teardownLong = ` -Teardown will remove sandbox cluster and all the flyte config created by sandbox start +Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: :: - bin/flytectl sandbox teardown + flytectl sandbox teardown Usage diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index a9dd059c5c..0c2a3267dd 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -14,14 +14,14 @@ import ( ) const ( - updateLPShort = "Updates launch plan status" + updateLPShort = "Update launch plan status" updateLPLong = ` -Activating launchplan activates the scheduled job associated with it +Activating launch plan activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launchplan deschedules any scheduled job associated with it +Archiving launch plan deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index 00cd9bef36..d2a9678667 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -11,19 +11,19 @@ import ( ) const ( - updateLPMetaShort = "Updates launch plan metadata" + updateLPMetaShort = "Update launch plan metadata" updateLPMetaLong = ` -Following command updates the description on the launchplan. +Update the description on the launch plan: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" -Archiving launchplan named entity is not supported and would throw an error. +Archiving launch plan named entity is not supported and would throw an error: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive -Activating launchplan named entity would be a noop. +Activating launch plan named entity would be a noop: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 4938245a3b..2e8f2a2077 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -10,13 +10,13 @@ import ( ) const ( - clusterResourceAttributesShort = "Updates matchable resources of cluster attributes" + clusterResourceAttributesShort = "Update matchable resources of cluster attributes" clusterResourceAttributesLong = ` Updates cluster resource attributes for given project and domain combination or additionally with workflow name. -Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. -Here the command updates takes the input for cluster resource attributes from the config file cra.yaml -eg: content of cra.yaml +Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. +It takes input for cluster resource attributes from the config file cra.yaml, +e.g., content of cra.yaml: .. code-block:: yaml @@ -30,12 +30,12 @@ eg: content of cra.yaml flytectl update cluster-resource-attribute --attrFile cra.yaml -Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values -Refer to get cluster-resource-attribute section on how to generate this file -Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. +Refer to get cluster-resource-attribute section on how to generate this file. +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index e9c6c62e5a..2c03815468 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -10,13 +10,13 @@ import ( ) const ( - executionClusterLabelShort = "Updates matchable resources of execution cluster label" + executionClusterLabelShort = "Update matchable resources of execution cluster label" executionClusterLabelLong = ` -Updates execution cluster label for given project and domain combination or additionally with workflow name. +Updates execution cluster label for the given project and domain combination or additionally with workflow name. -Updating to the execution cluster label is only available from a generated file. See the get section for generating this file. -Here the command updates takes the input for execution cluster label from the config file ecl.yaml -eg: content of ecl.yaml +Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. +It takes input for execution cluster label from the config file ecl.yaml +e.g., content of ecl.yaml: .. code-block:: yaml @@ -28,9 +28,9 @@ eg: content of ecl.yaml flytectl update execution-cluster-label --attrFile ecl.yaml -Updating execution cluster label for project and domain and workflow combination. This will take precedence over any other +Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. -Update the execution cluster label for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index 6c09f9d7b0..4d85146680 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -10,16 +10,16 @@ import ( ) const ( - executionQueueAttributesShort = "Updates matchable resources of execution queue attributes" + executionQueueAttributesShort = "Update matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Updates execution queue attributes for given project and domain combination or additionally with workflow name. +Updates execution queue attributes for the given project and domain combination or additionally with workflow name. -Updating to the execution queue attribute is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file -Here the command updates takes the input for execution queue attributes from the config file era.yaml -eg: content of era.yaml +It takes input for execution queue attributes from the config file era.yaml, +e.g., content of era.yaml: .. code-block:: yaml @@ -35,9 +35,9 @@ eg: content of era.yaml flytectl update execution-queue-attribute --attrFile era.yaml -Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other +Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 065f2d7070..2dfca66113 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -10,16 +10,16 @@ import ( ) const ( - pluginOverrideShort = "Updates matchable resources of plugin overrides" + pluginOverrideShort = "Update matchable resources of plugin overrides" pluginOverrideLong = ` Updates plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing plugins overrides on custom project and domain and workflow combination. -Would be preferable to do get and generate an plugin override file if there is an existing override already set and then update it to have new values +This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file -Here the command updates takes the input for plugin overrides from the config file po.yaml -eg: content of po.yaml +It takes input for plugin overrides from the config file po.yaml, +e.g., content of po.yaml: .. code-block:: yaml @@ -36,9 +36,9 @@ eg: content of po.yaml flytectl update plugin-override --attrFile po.yaml -Updating plugin override for project and domain and workflow combination. This will take precedence over any other +Updates plugin override for project, domain and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. -Update the plugin overrides for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index bebd96929b..f7bb45ce67 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -10,16 +10,16 @@ import ( ) const ( - taskResourceAttributesShort = "Updates matchable resources of task attributes" + taskResourceAttributesShort = "Update matchable resources of task attributes" taskResourceAttributesLong = ` -Updates task resource attributes for given project and domain combination or additionally with workflow name. +Updates task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values -Refer to get task-resource-attribute section on how to generate this file -Here the command updates takes the input for task resource attributes from the config file tra.yaml -eg: content of tra.yaml +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. +Refer to get task-resource-attribute section on how to generate this file. +It takes input for task resource attributes from the config file tra.yaml, +e.g., content of tra.yaml: .. code-block:: yaml @@ -36,9 +36,9 @@ eg: content of tra.yaml flytectl update task-resource-attribute --attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 07b684ec5b..740685ef2b 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -11,16 +11,16 @@ import ( ) const ( - workflowExecutionConfigShort = "Updates matchable resources of workflow execution config" + workflowExecutionConfigShort = "Update matchable resources of workflow execution config" workflowExecutionConfigLong = ` Updates workflow execution config for given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination execution config. -Would be preferable to do get and generate an config file if there is an existing execution config already set and then update it to have new values -Refer to get workflow-execution-config section on how to generate this file -Here the command updates takes the input for workflow execution config from the config file wec.yaml -eg: content of wec.yaml +This will completely overwrite any existing custom project and domain and workflow combination execution config. +It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. +Refer to get workflow-execution-config section on how to generate this file. +It takes input for workflow execution config from the config file wec.yaml, +e.g., content of wec.yaml: .. code-block:: yaml @@ -32,9 +32,9 @@ eg: content of wec.yaml flytectl update workflow-execution-config --attrFile wec.yaml -Updating workflow execution config for project and domain and workflow combination. This will take precedence over any other +Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other execution config defined at project domain level. -Update the workflow execution config for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index abc54a6d36..330afe395c 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -22,37 +22,37 @@ type ProjectConfig struct { } const ( - projectShort = "Updates project resources" + projectShort = "Update project resources" projectLong = ` -Updates the project according the flags passed. Allows you to archive or activate a project. -Activates project named flytesnacks. +Updates the project according to the flags passed. Allows you to archive or activate a project. +Activate project flytesnacks: :: - bin/flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activateProject -Archives project named flytesnacks. +Archive project flytesnacks: :: - bin/flytectl update project -p flytesnacks --archiveProject + flytectl update project -p flytesnacks --archiveProject -Incorrect usage when passing both archive and activate. +Incorrect usage when passing both archive and activate: :: - bin/flytectl update project flytesnacks --archiveProject --activateProject + flytectl update project flytesnacks --archiveProject --activateProject -Incorrect usage when passing unknown-project. +Incorrect usage when passing unknown-project: :: - bin/flytectl update project unknown-project --archiveProject + flytectl update project unknown-project --archiveProject -Incorrect usage when passing valid project using -p option. +Incorrect usage when passing valid project using -p option: :: - bin/flytectl update project unknown-project --archiveProject -p known-project + flytectl update project unknown-project --archiveProject -p known-project Usage ` diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index e38cdff16b..8c599710b2 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -11,19 +11,19 @@ import ( ) const ( - updateTaskShort = "Updates task metadata" + updateTaskShort = "Update task metadata" updateTaskLong = ` -Following command updates the description on the task. +Updates the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" -Archiving task named entity is not supported and would throw an error. +Archiving task named entity is not supported and would throw an error: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive -Activating task named entity would be a noop as archiving is not possible. +Activating task named entity would be a noop since archiving is not possible: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index c1a721b704..60603a7dbe 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -16,14 +16,14 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( updateUse = "update" - updateShort = `Used for updating flyte resources eg: project.` + updateShort = `Update Flyte resources e.g., project.` updatecmdLong = ` -Currently this command only provides subcommands to update project. -Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. -Example update project to activate it. +Currently, this command only provides subcommands to update project. +Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +To update a project: :: - bin/flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activateProject ` ) diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index 9e67796208..af4cb3fe7d 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -11,19 +11,19 @@ import ( ) const ( - updateWorkflowShort = "Updates workflow metadata" + updateWorkflowShort = "Update workflow metadata" updateWorkflowLong = ` -Following command updates the description on the workflow. +Updates the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" -Archiving workflow named entity would cause this to disapper from flyteconsole UI. +Archiving workflow named entity would cause this to disapper from flyteconsole UI: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive -Activating workflow named entity +Activate workflow named entity: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index d32d587252..7fdd6d5f82 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -25,21 +25,21 @@ type Goos string // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - upgradeCmdShort = `Used for upgrade/rollback flyte version` + upgradeCmdShort = `Upgrade/rollback to a Flyte version` upgradeCmdLong = ` -Upgrade flytectl +For FlyteCTL, it is: :: - bin/flytectl upgrade + flytectl upgrade -Note: Please use upgrade with sudo, Without sudo it will cause permission issue +Note: Please use upgrade with sudo. Without sudo it will cause permission issue. -Rollback flytectl binary +Rollback flytectl binary: :: - bin/flytectl upgrade rollback + flytectl upgrade rollback -Note: Upgrade is not available on windows +Note: Upgrade is not available on windows. ` rollBackSubCommand = "rollback" ) diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 213b02afdc..17584822a7 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -27,9 +27,9 @@ var ( func TestUpgradeCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "flytectl is CLI tool written in go to interact with flyteadmin service", - Short: "flyetcl CLI tool", - Use: "flytectl", + Long: "FlyteCTL is CLI tool written in go to interact with flyteadmin service", + Short: "FlyteCTL CLI tool", + Use: "FlyteCTL", DisableAutoGenTag: true, } upgradeCmd := SelfUpgrade(rootCmd) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 14a6d0bc4c..f52dd27407 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -19,12 +19,12 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - versionCmdShort = `Used for fetching flyte version` + versionCmdShort = `Fetch Flyte version` versionCmdLong = ` -Example version. +For FlyteCTL version, it is: :: - bin/flytectl version + flytectl version ` flytectlAppName = "flytectl" controlPlanAppName = "controlPlane" diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index cd9065258f..2b83ff9403 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -31,9 +31,9 @@ var ( func TestVersionCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "flytectl is CLI tool written in go to interact with flyteadmin service", - Short: "flyetcl CLI tool", - Use: "flytectl", + Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", + Short: "FlyteCTL CLI tool", + Use: "FlyteCTL", DisableAutoGenTag: true, } versionCommand := GetVersionCommand(rootCmd) diff --git a/flytectl/docs/source/cluster-resource-attribute.rst b/flytectl/docs/source/cluster-resource-attribute.rst new file mode 100644 index 0000000000..bfbd2b0ffa --- /dev/null +++ b/flytectl/docs/source/cluster-resource-attribute.rst @@ -0,0 +1,9 @@ +Cluster resource attribute +------ +.. toctree:: + :maxdepth: 1 + :caption: Cluster resource attribute + + gen/FlyteCTL_get_cluster-resource-attribute + gen/FlyteCTL_delete_cluster-resource-attribute + gen/FlyteCTL_update_cluster-resource-attribute diff --git a/flytectl/docs/source/config.rst b/flytectl/docs/source/config.rst new file mode 100644 index 0000000000..bf112114f8 --- /dev/null +++ b/flytectl/docs/source/config.rst @@ -0,0 +1,10 @@ +Config +------ + +.. toctree:: + :maxdepth: 1 + :caption: Config + + gen/FlyteCTL_config_validate + gen/FlyteCTL_config_init + gen/flytectl_config_discover diff --git a/flytectl/docs/source/examples.rst b/flytectl/docs/source/examples.rst new file mode 100644 index 0000000000..a854e2349b --- /dev/null +++ b/flytectl/docs/source/examples.rst @@ -0,0 +1,8 @@ +Examples +------ +.. toctree:: + :maxdepth: 1 + :caption: Examples + + + gen/FlyteCTL_register_examples \ No newline at end of file diff --git a/flytectl/docs/source/execution-cluster-label.rst b/flytectl/docs/source/execution-cluster-label.rst new file mode 100644 index 0000000000..e0dae2adbc --- /dev/null +++ b/flytectl/docs/source/execution-cluster-label.rst @@ -0,0 +1,10 @@ +Execution cluster label +------ + +.. toctree:: + :maxdepth: 1 + :caption: Execution cluster label + + gen/FlyteCTL_get_execution-cluster-label + gen/FlyteCTL_update_execution-cluster-label + gen/FlyteCTL_delete_execution-cluster-label \ No newline at end of file diff --git a/flytectl/docs/source/execution-queue-attribute.rst b/flytectl/docs/source/execution-queue-attribute.rst new file mode 100644 index 0000000000..92ba2502c0 --- /dev/null +++ b/flytectl/docs/source/execution-queue-attribute.rst @@ -0,0 +1,10 @@ +Execution queue attribute +------ + +.. toctree:: + :maxdepth: 1 + :caption: Execution queue attribute + + gen/FlyteCTL_get_execution-queue-attribute + gen/FlyteCTL_delete_execution-queue-attribute + gen/FlyteCTL_update_execution-queue-attribute \ No newline at end of file diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst new file mode 100644 index 0000000000..b7857e7103 --- /dev/null +++ b/flytectl/docs/source/execution.rst @@ -0,0 +1,10 @@ +Execution +------ + +.. toctree:: + :maxdepth: 1 + :caption: Execution + + gen/FlyteCTL_create_execution + gen/FlyteCTL_get_execution + gen/FlyteCTL_delete_execution \ No newline at end of file diff --git a/flytectl/docs/source/files.rst b/flytectl/docs/source/files.rst new file mode 100644 index 0000000000..b7216fbcae --- /dev/null +++ b/flytectl/docs/source/files.rst @@ -0,0 +1,10 @@ +Files +------ + +.. toctree:: + :maxdepth: 1 + :caption: Files + + gen/FlyteCTL_register_files + +Note: It allows the user to register local files diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index d56aa0fca5..d11e9d5bbf 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -1,15 +1,15 @@ -.. _flytectl: +.. _FlyteCTL: -flytectl +FlyteCTL -------- -flyetcl CLI tool +FlyteCTL CLI tool Synopsis ~~~~~~~~ -flytectl is CLI tool written in go to interact with flyteadmin service +FlyteCTL is CLI tool written in go to interact with Flyteadmin service Options ~~~~~~~ @@ -33,7 +33,7 @@ Options --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. - -h, --help help for flytectl + -h, --help help for FlyteCTL --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. @@ -59,14 +59,14 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`flytectl_completion` - Generate completion script -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. -* :doc:`flytectl_upgrade` - Used for upgrade/rollback flyte version -* :doc:`flytectl_version` - Used for fetching flyte version +* :doc:`FlyteCTL_completion` - Generate completion script +* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`FlyteCTL_upgrade` - Upgrade/rollback to a Flyte version +* :doc:`FlyteCTL_version` - Fetch Flyte version diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 24271d7b12..1e4ed90351 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -1,6 +1,6 @@ -.. _flytectl_completion: +.. _FlyteCTL_completion: -flytectl completion +FlyteCTL completion ------------------- Generate completion script @@ -24,7 +24,7 @@ Bash: Zsh: # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + # you will need to enable it. You can execute the following once: $ echo "autoload -U compinit; compinit" >> ~/.zshrc @@ -51,7 +51,7 @@ PowerShell: :: - flytectl completion [bash|zsh|fish|powershell] + FlyteCTL completion [bash|zsh|fish|powershell] Options ~~~~~~~ @@ -107,5 +107,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool +* :doc:`FlyteCTL` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index e835ee9fe9..3df3187008 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -1,6 +1,6 @@ -.. _flytectl_config: +.. _FlyteCTL_config: -flytectl config +FlyteCTL config --------------- Runs various config commands, look at the help of this command to get a list of available commands.. @@ -67,8 +67,8 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. -* :doc:`flytectl_config_init` - Generates flytectl config file in the user's home directory. -* :doc:`flytectl_config_validate` - Validates the loaded config. +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_config_discover` - Searches for a config in one of the default search paths. +* :doc:`FlyteCTL_config_init` - Generates FlyteCTL config file in the user's home directory. +* :doc:`FlyteCTL_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 8550321470..a91147e3d4 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -1,6 +1,6 @@ -.. _flytectl_config_discover: +.. _FlyteCTL_config_discover: -flytectl config discover +FlyteCTL config discover ------------------------ Searches for a config in one of the default search paths. @@ -13,7 +13,7 @@ Searches for a config in one of the default search paths. :: - flytectl config discover [flags] + FlyteCTL config discover [flags] Options ~~~~~~~ @@ -71,5 +71,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 30b4eb404f..3ba2564ca2 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -1,37 +1,37 @@ -.. _flytectl_config_init: +.. _FlyteCTL_config_init: -flytectl config init +FlyteCTL config init -------------------- -Generates flytectl config file in the user's home directory. +Generates FlyteCTL config file in the user's home directory. Synopsis ~~~~~~~~ -Creates a flytectl config file in flyte directory i.e ~/.flyte +Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte -Generate sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html +Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html :: - bin/flytectl configuration config + flytectl configuration config -Generate remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Generates remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html :: - bin/flytectl configuration config --host=flyte.myexample.com + flytectl configuration config --host=flyte.myexample.com -Generate flytectl config with a storage provider +Generates FlyteCTL config with a storage provider :: - bin/flytectl configuration config --host=flyte.myexample.com --storage + flytectl configuration config --host=flyte.myexample.com --storage :: - flytectl config init [flags] + FlyteCTL config init [flags] Options ~~~~~~~ @@ -92,5 +92,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 51a3a7e443..461e625269 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -1,6 +1,6 @@ -.. _flytectl_config_validate: +.. _FlyteCTL_config_validate: -flytectl config validate +FlyteCTL config validate ------------------------ Validates the loaded config. @@ -13,7 +13,7 @@ Validates the loaded config. :: - flytectl config validate [flags] + FlyteCTL config validate [flags] Options ~~~~~~~ @@ -73,5 +73,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index de2f4a89d4..d389ea2c0d 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -1,19 +1,19 @@ -.. _flytectl_create: +.. _FlyteCTL_create: -flytectl create +FlyteCTL create --------------- -Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. +Create various Flyte resources including tasks/workflows/launchplans/executions/project. Synopsis ~~~~~~~~ -Example create. +Create Flyte resource; if a project: :: - bin/flytectl create project --file project.yaml + flytectl create project --file project.yaml Options @@ -70,7 +70,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_create_execution` - Create execution resources -* :doc:`flytectl_create_project` - Create project resources +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_create_execution` - Create execution resources +* :doc:`FlyteCTL_create_project` - Create project resources diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 2838ecdd5c..2d502a4209 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -1,6 +1,6 @@ -.. _flytectl_create_execution: +.. _FlyteCTL_create_execution: -flytectl create execution +FlyteCTL create execution ------------------------- Create execution resources @@ -10,22 +10,22 @@ Synopsis -Create the executions for given workflow/task in a project and domain. +Creates executions for a given workflow/task in a project and domain. -There are three steps in generating an execution. +There are three steps in generating an execution: - Generate the execution spec file using the get command. - Update the inputs for the execution if needed. - Run the execution by passing in the generated yaml file. -The spec file should be generated first and then run the execution using the spec file. -You can reference the flytectl get task for more details +The spec file should be generated first and then, the execution should be run using the spec file. +You can reference the FlyteCTL get task for more details. :: flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml @@ -62,35 +62,35 @@ The generated file can be modified to change the input values. task: core.advanced.run_merge_sort.merge version: "v2" -And then can be passed through the command line. -Notice the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to task/launch plans project/domain. +It can then be passed through the command line. +Notice that the source and target domain/projects can be different. +The root project and domain flags of -p and -d should point to the task/launch plans project/domain. :: flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks -Also an execution can be relaunched by passing in current execution id. +Also, an execution can be relaunched by passing in the current execution id. :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, that is recreated from the last known failure point for a previously-run workflow execution. +An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in similar way.Following is sample of how the inputs need to be specified while creating the execution. -As usual the spec file should be generated first and then run the execution using the spec file. +Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. +The spec file should be generated first and then, the execution should be run using the spec file. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here you can see empty values dumped for generic data type x and y. +The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. :: @@ -133,7 +133,7 @@ Usage :: - flytectl create execution [flags] + FlyteCTL create execution [flags] Options ~~~~~~~ @@ -200,5 +200,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index f1e8a47194..49d244f310 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -1,6 +1,6 @@ -.. _flytectl_create_project: +.. _FlyteCTL_create_project: -flytectl create project +FlyteCTL create project ----------------------- Create project resources @@ -10,16 +10,16 @@ Synopsis -Create the projects.(project,projects can be used interchangeably in these commands) +Create projects.(project/projects can be used interchangeably in these commands) :: - bin/flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte -Create Project by definition file. Note: The name shouldn't contain any whitespace characters' +Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - bin/flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml @@ -33,7 +33,7 @@ Create Project by definition file. Note: The name shouldn't contain any whitespa :: - flytectl create project [flags] + FlyteCTL create project [flags] Options ~~~~~~~ @@ -95,5 +95,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Used for creating various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 0af8199dca..b675158f7a 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -1,19 +1,19 @@ -.. _flytectl_delete: +.. _FlyteCTL_delete: -flytectl delete +FlyteCTL delete --------------- -Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. Synopsis ~~~~~~~~ -Example Delete executions. +Delete a resource; if an execution: :: - bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks + flytectl delete execution kxd1i72850 -d development -p flytesnacks Options @@ -70,12 +70,12 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes -* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. -* :doc:`flytectl_delete_execution-cluster-label` - Deletes matchable resources of execution cluster label -* :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes -* :doc:`flytectl_delete_plugin-override` - Deletes matchable resources of plugin overrides -* :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes -* :doc:`flytectl_delete_workflow-execution-config` - Deletes matchable resources of workflow execution config +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_delete_cluster-resource-attribute` - Delete matchable resources of cluster attributes +* :doc:`FlyteCTL_delete_execution` - Terminate/Delete execution resources. +* :doc:`FlyteCTL_delete_execution-cluster-label` - Delete matchable resources of execution cluster label +* :doc:`FlyteCTL_delete_execution-queue-attribute` - Delete matchable resources of execution queue attributes +* :doc:`FlyteCTL_delete_plugin-override` - Delete matchable resources of plugin overrides +* :doc:`FlyteCTL_delete_task-resource-attribute` - Delete matchable resources of task attributes +* :doc:`FlyteCTL_delete_workflow-execution-config` - Delete matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 5e80a706d1..80d749a821 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -1,28 +1,27 @@ -.. _flytectl_delete_cluster-resource-attribute: +.. _FlyteCTL_delete_cluster-resource-attribute: -flytectl delete cluster-resource-attribute +FlyteCTL delete cluster-resource-attribute ------------------------------------------ -Deletes matchable resources of cluster attributes +Delete matchable resources of cluster attributes Synopsis ~~~~~~~~ -Deletes cluster resource attributes for given project and domain combination or additionally with workflow name. +Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. -Deletes cluster resource attribute for project and domain -Here the command delete cluster resource attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used for creating it. -Here the command deletes cluster resource attributes from the config file cra.yaml -Attributes are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of cra.yaml which will use the project domain and workflow name for deleting the resource +Deletes cluster resource attribute using config file which was used to create it. +Here, the config file is written to cra.yaml. +Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of cra.yaml: :: @@ -37,8 +36,8 @@ eg: content of cra.yaml which will use the project domain and workflow name for foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow -Here the command deletes cluster resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes cluster resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -49,7 +48,7 @@ Usage :: - flytectl delete cluster-resource-attribute [flags] + FlyteCTL delete cluster-resource-attribute [flags] Options ~~~~~~~ @@ -107,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 488a732b58..1938d47b4a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -1,9 +1,9 @@ -.. _flytectl_delete_execution-cluster-label: +.. _FlyteCTL_delete_execution-cluster-label: -flytectl delete execution-cluster-label +FlyteCTL delete execution-cluster-label --------------------------------------- -Deletes matchable resources of execution cluster label +Delete matchable resources of execution cluster label Synopsis ~~~~~~~~ @@ -12,17 +12,16 @@ Synopsis Deletes execution cluster label for given project and domain combination or additionally with workflow name. -Deletes execution cluster label for project and domain -Here the command delete execution cluster label for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete execution-cluster-label -p flytectldemo -d development Deletes execution cluster label using config file which was used for creating it. -Here the command deletes execution cluster label from the config file ecl.yaml -Value is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of ecl.yaml which will use the project domain and workflow name for deleting the resource +Here, the config file is written to ecl.yaml. +Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. +e.g., content of ecl.yaml: :: @@ -35,8 +34,8 @@ eg: content of ecl.yaml which will use the project domain and workflow name for project: flytectldemo value: foo -Deletes execution cluster label for a workflow -Here the command deletes execution cluster label for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes execution cluster label for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -47,7 +46,7 @@ Usage :: - flytectl delete execution-cluster-label [flags] + FlyteCTL delete execution-cluster-label [flags] Options ~~~~~~~ @@ -105,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 671eed2879..3f84f50441 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -1,28 +1,27 @@ -.. _flytectl_delete_execution-queue-attribute: +.. _FlyteCTL_delete_execution-queue-attribute: -flytectl delete execution-queue-attribute +FlyteCTL delete execution-queue-attribute ----------------------------------------- -Deletes matchable resources of execution queue attributes +Delete matchable resources of execution queue attributes Synopsis ~~~~~~~~ -Deletes execution queue attributes for given project and domain combination or additionally with workflow name. +Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. -Deletes execution queue attribute for project and domain -Here the command delete execution queue attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete execution-queue-attribute -p flytectldemo -d development Deletes execution queue attribute using config file which was used for creating it. -Here the command deletes execution queue attributes from the config file era.yaml -Tags are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of era.yaml which will use the project domain and workflow name for deleting the resource +Here, the config file is written to era.yaml. +Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. +e.g., content of era.yaml: :: @@ -39,8 +38,8 @@ eg: content of era.yaml which will use the project domain and workflow name for - buzz - lightyear -Deletes execution queue attribute for a workflow -Here the command deletes the execution queue attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes execution queue attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -51,7 +50,7 @@ Usage :: - flytectl delete execution-queue-attribute [flags] + FlyteCTL delete execution-queue-attribute [flags] Options ~~~~~~~ @@ -109,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 11ebaa66fd..d84c5d3b55 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -1,6 +1,6 @@ -.. _flytectl_delete_execution: +.. _FlyteCTL_delete_execution: -flytectl delete execution +FlyteCTL delete execution ------------------------- Terminate/Delete execution resources. @@ -12,36 +12,35 @@ Synopsis Terminate executions.(execution,executions can be used interchangeably in these commands) -Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then -calling terminate on them has no effect. +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. -Terminate a single execution with its name +Terminate a single execution with its name: :: - bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + flytectl delete execution c6a51x2l9e -d development -p flytesnacks -You can get executions to check its state. +Get executions to check its state: :: - bin/flytectl get execution -d development -p flytesnacks + flytectl get execution -d development -p flytesnacks ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- -Terminate multiple executions with there names +Terminate multiple executions with their names: :: - bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Similarly you can get executions to find the state of previously terminated executions. +Get executions to find the state of previously terminated executions: :: - bin/flytectl get execution -d development -p flytesnacks + flytectl get execution -d development -p flytesnacks ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- @@ -57,7 +56,7 @@ Usage :: - flytectl delete execution [flags] + FlyteCTL delete execution [flags] Options ~~~~~~~ @@ -114,5 +113,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 2328ff9e12..baa2d4355c 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -1,29 +1,27 @@ -.. _flytectl_delete_plugin-override: +.. _FlyteCTL_delete_plugin-override: -flytectl delete plugin-override +FlyteCTL delete plugin-override ------------------------------- -Deletes matchable resources of plugin overrides +Delete matchable resources of plugin overrides Synopsis ~~~~~~~~ -Deletes plugin override for given project and domain combination or additionally with workflow name. +Deletes plugin override for the given project and domain combination or additionally with workflow name. -Deletes plugin override for project and domain -Here the command deletes plugin override for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used for creating it. -Here the command deletes plugin overrides from the config file po.yaml -Overrides are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of po.yaml which will use the project domain and workflow name for deleting the resource - +Deletes plugin override using config file which was used to create it. +Here, the config file is written to po.yaml. +Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of po.yaml: :: flytectl delete plugin-override --attrFile po.yaml @@ -40,8 +38,8 @@ eg: content of po.yaml which will use the project domain and workflow name for - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow -Here the command deletes the plugin override for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes plugin override for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -52,7 +50,7 @@ Usage :: - flytectl delete plugin-override [flags] + FlyteCTL delete plugin-override [flags] Options ~~~~~~~ @@ -110,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 544712992f..1800977e0f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -1,28 +1,27 @@ -.. _flytectl_delete_task-resource-attribute: +.. _FlyteCTL_delete_task-resource-attribute: -flytectl delete task-resource-attribute +FlyteCTL delete task-resource-attribute --------------------------------------- -Deletes matchable resources of task attributes +Delete matchable resources of task attributes Synopsis ~~~~~~~~ -Deletes task resource attributes for given project,domain combination or additionally with workflow name. +Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. -Deletes task resource attribute for project and domain -Here the command delete task resource attributes for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete task-resource-attribute -p flytectldemo -d development -Deletes task resource attribute using config file which was used for creating it. -Here the command deletes task resource attributes from the config file tra.yaml -defaults/limits are optional in the file as they are unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of tra.yaml which will use the project domain and workflow name for deleting the resource +Deletes task resource attribute using config file which was used to create it. +Here, the config file is written to tra.yaml. +The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of tra.yaml: :: @@ -40,8 +39,8 @@ eg: content of tra.yaml which will use the project domain and workflow name for cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow -Here the command deletes task resource attributes for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes task resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -52,7 +51,7 @@ Usage :: - flytectl delete task-resource-attribute [flags] + FlyteCTL delete task-resource-attribute [flags] Options ~~~~~~~ @@ -110,5 +109,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index a97fcc811c..5d23c0547b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -1,28 +1,27 @@ -.. _flytectl_delete_workflow-execution-config: +.. _FlyteCTL_delete_workflow-execution-config: -flytectl delete workflow-execution-config +FlyteCTL delete workflow-execution-config ----------------------------------------- -Deletes matchable resources of workflow execution config +Delete matchable resources of workflow execution config Synopsis ~~~~~~~~ -Deletes workflow execution config for given project and domain combination or additionally with workflow name. +Deletes workflow execution config for the given project and domain combination or additionally with workflow name. -Deletes workflow execution config label for project and domain -Here the command delete workflow execution config for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl delete workflow-execution-config -p flytectldemo -d development -Deletes workflow execution config using config file which was used for creating it. -Here the command deletes workflow execution config from the config file wec.yaml -Max_parallelism is optional in the file as its unread during the delete command but can be kept as the same file can be used for get, update or delete -eg: content of wec.yaml which will use the project domain and workflow name for deleting the resource +Deletes workflow execution config using config file which was used to create it. +Here, the config file is written to wec.yaml. +Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. +e.g., content of wec.yaml: :: @@ -35,8 +34,8 @@ eg: content of wec.yaml which will use the project domain and workflow name for project: flytectldemo max_parallelism: 5 -Deletes workflow execution config for a workflow -Here the command deletes workflow execution config for a workflow core.control_flow.run_merge_sort.merge_sort +Deletes workflow execution config for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: @@ -47,7 +46,7 @@ Usage :: - flytectl delete workflow-execution-config [flags] + FlyteCTL delete workflow-execution-config [flags] Options ~~~~~~~ @@ -105,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 386cee0808..d27ae935a2 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -1,16 +1,16 @@ -.. _flytectl_get: +.. _FlyteCTL_get: -flytectl get +FlyteCTL get ------------ -Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. Synopsis ~~~~~~~~ -Example get projects. +For project, it is: :: flytectl get project @@ -70,16 +70,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes. -* :doc:`flytectl_get_execution` - Gets execution resources -* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label. -* :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes -* :doc:`flytectl_get_launchplan` - Gets launch plan resources -* :doc:`flytectl_get_plugin-override` - Gets matchable resources of plugin override -* :doc:`flytectl_get_project` - Gets project resources -* :doc:`flytectl_get_task` - Gets task resources -* :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes -* :doc:`flytectl_get_workflow` - Gets workflow resources -* :doc:`flytectl_get_workflow-execution-config` - Gets matchable resources of workflow execution config +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_get_cluster-resource-attribute` - Get matchable resources of cluster resource attributes. +* :doc:`FlyteCTL_get_execution` - Get execution resources +* :doc:`FlyteCTL_get_execution-cluster-label` - Get matchable resources of execution cluster label. +* :doc:`FlyteCTL_get_execution-queue-attribute` - Get matchable resources of execution queue attributes +* :doc:`FlyteCTL_get_launchplan` - Get launch plan resources +* :doc:`FlyteCTL_get_plugin-override` - Get matchable resources of plugin override +* :doc:`FlyteCTL_get_project` - Get project resources +* :doc:`FlyteCTL_get_task` - Get task resources +* :doc:`FlyteCTL_get_task-resource-attribute` - Get matchable resources of task attributes +* :doc:`FlyteCTL_get_workflow` - Get workflow resources +* :doc:`FlyteCTL_get_workflow-execution-config` - Get matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index ea44a874bd..059cfe64a5 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -1,42 +1,42 @@ -.. _flytectl_get_cluster-resource-attribute: +.. _FlyteCTL_get_cluster-resource-attribute: -flytectl get cluster-resource-attribute +FlyteCTL get cluster-resource-attribute --------------------------------------- -Gets matchable resources of cluster resource attributes. +Get matchable resources of cluster resource attributes. Synopsis ~~~~~~~~ -Retrieve cluster resource attributes for the given project and domain. -Here, the command gets cluster resource attributes for the project flytectldemo and development domain. +Retrieves cluster resource attributes for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieve cluster resource attributes for the given project, domain, and workflow. -Here, the command gets cluster resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves cluster resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes,the command throws an error. -Here, the command gets the task resource attributes and writes the config file to cra.yaml file. -eg: content of cra.yaml +Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +Here, the config file is written to cra.yaml file: +e.g., content of cra.yaml :: @@ -56,7 +56,7 @@ Usage :: - flytectl get cluster-resource-attribute [flags] + FlyteCTL get cluster-resource-attribute [flags] Options ~~~~~~~ @@ -113,5 +113,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index e25ecb4e84..1db5d7980c 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -1,44 +1,43 @@ -.. _flytectl_get_execution-cluster-label: +.. _FlyteCTL_get_execution-cluster-label: -flytectl get execution-cluster-label +FlyteCTL get execution-cluster-label ------------------------------------ -Gets matchable resources of execution cluster label. +Get matchable resources of execution cluster label. Synopsis ~~~~~~~~ -// Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. -Retrieve the execution cluster label for the given project and domain. -Here the command get execution cluster label for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} Retrieve the execution cluster label for the given project, domain and workflow. -Here, the command gets the execution cluster label for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} -Writes the execution cluster label to a file. If there is no execution cluster label, command throws an error. -Here, the command gets the execution cluster label and writes the config file to ecl.yaml file. -eg: content of ecl.yaml +Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. +Here, the config file is written to ecl.yaml, +e.g., content of ecl.yaml: :: @@ -56,7 +55,7 @@ Usage :: - flytectl get execution-cluster-label [flags] + FlyteCTL get execution-cluster-label [flags] Options ~~~~~~~ @@ -113,5 +112,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 04f8d0b24b..e56c92e39e 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -1,42 +1,42 @@ -.. _flytectl_get_execution-queue-attribute: +.. _FlyteCTL_get_execution-queue-attribute: -flytectl get execution-queue-attribute +FlyteCTL get execution-queue-attribute -------------------------------------- -Gets matchable resources of execution queue attributes +Get matchable resources of execution queue attributes Synopsis ~~~~~~~~ -Retrieve the execution queue attribute for the given project and domain. -Here, the command gets execution queue attributes for the project flytectldemo and development domain. +Retrieves the execution queue attribute for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieve the execution queue attribute for the given project, domain, and workflow. -Here, the command gets execution queue attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the command gets the execution queue attributes and writes the config to era.yaml file. -e.g. : content of era.yaml +Here, the config file is written to era.yaml, +e.g., content of era.yaml: :: @@ -58,7 +58,7 @@ Usage :: - flytectl get execution-queue-attribute [flags] + FlyteCTL get execution-queue-attribute [flags] Options ~~~~~~~ @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 29e0e06706..714a6ddeae 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -1,81 +1,81 @@ -.. _flytectl_get_execution: +.. _FlyteCTL_get_execution: -flytectl get execution +FlyteCTL get execution ---------------------- -Gets execution resources +Get execution resources Synopsis ~~~~~~~~ -Retrieve all executions within the project and domain (execution, executions can be used interchangeably). +Retrieve all executions within the project and domain (execution, executions can be used interchangeably): :: - bin/flytectl get execution -p flytesnacks -d development + flytectl get execution -p flytesnacks -d development -Retrieves executions by name within the project and domain. +Retrieve executions by name within the project and domain: :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r + flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieves all the executions with filters. +Retrieve all the executions with filters: :: - bin/flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters. +Retrieve executions as per the specified limit and sorting parameters: :: - bin/flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions within the project and domain in YAML format. +Retrieve executions within the project and domain in YAML format: :: - bin/flytectl get execution -p flytesnacks -d development -o yaml + flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format. +Retrieve executions within the project and domain in JSON format: :: - bin/flytectl get execution -p flytesnacks -d development -o json + flytectl get execution -p flytesnacks -d development -o json Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details + flytectl get execution -p flytesnacks -d development oeh94k9r2r --details Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml Fetch task executions on a specific node using the --nodeID flag. Use the nodeID attribute given by the node details view. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. :: - bin/flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml Usage :: - flytectl get execution [flags] + FlyteCTL get execution [flags] Options ~~~~~~~ @@ -137,5 +137,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 2a3c0c1dc3..6d2c4fcafa 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -1,69 +1,69 @@ -.. _flytectl_get_launchplan: +.. _FlyteCTL_get_launchplan: -flytectl get launchplan +FlyteCTL get launchplan ----------------------- -Gets launch plan resources +Get launch plan resources Synopsis ~~~~~~~~ -Retrieve all launch plans within the project and domain (launchplan, launchplans can be used interchangeably). +Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): :: flytectl get launchplan -p flytesnacks -d development - Retrieve a launch plan by name within the project and domain. + Retrieve a launch plan by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet -Retrieve the latest version of the task by name within the project and domain. +Retrieve the latest version of the task by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves a particular version of the launch plan by name within the project and domain. +Retrieve a particular version of the launch plan by name within the project and domain: :: flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves all the launch plans with filters. +Retrieve all the launch plans with filters: :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" + flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" -Retrieves launch plans entity search across all versions with filters. +Retrieve launch plans entity search across all versions with filters: :: - bin/flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" + flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" -Retrieves all the launch plans with limit and sorting. +Retrieve all the launch plans with limit and sorting: :: - bin/flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all launch plans within the project and domain in YAML format. +Retrieve all launch plans within the project and domain in YAML format: :: flytectl get launchplan -p flytesnacks -d development -o yaml -Retrieves all launch plans the within the project and domain in JSON format. +Retrieve all launch plans the within the project and domain in JSON format: :: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command. +Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: @@ -92,7 +92,7 @@ Usage :: - flytectl get launchplan [flags] + FlyteCTL get launchplan [flags] Options ~~~~~~~ @@ -155,5 +155,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 0c7668510e..30d89032b1 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -1,23 +1,23 @@ -.. _flytectl_get_plugin-override: +.. _FlyteCTL_get_plugin-override: -flytectl get plugin-override +FlyteCTL get plugin-override ---------------------------- -Gets matchable resources of plugin override +Get matchable resources of plugin override Synopsis ~~~~~~~~ -Retrieve the plugin overrides for the given project and domain. -Here, the command gets the plugin overrides for the project flytectldemo and development domain. +Retrieves the plugin override for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get plugin-override -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command .. code-block:: json @@ -31,14 +31,14 @@ e.g. : output from the command }] } -Retrieves the plugin overrides for project, domain and workflow -Here the command gets the plugin overrides for project flytectldemo, development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves the plugin override for the given project, domain and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command: .. code-block:: json @@ -53,9 +53,9 @@ e.g. : output from the command }] } -Writing the plugin overrides to a file. If there are no plugin overrides, command would return an error. -Here the command gets plugin overrides and writes the config file to po.yaml -eg: content of po.yaml +Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. +Here, the config file is written to po.yaml, +e.g., content of po.yaml: :: @@ -78,7 +78,7 @@ Usage :: - flytectl get plugin-override [flags] + FlyteCTL get plugin-override [flags] Options ~~~~~~~ @@ -135,5 +135,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index ffebba44d6..cad73c12d6 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -1,54 +1,54 @@ -.. _flytectl_get_project: +.. _FlyteCTL_get_project: -flytectl get project +FlyteCTL get project -------------------- -Gets project resources +Get project resources Synopsis ~~~~~~~~ -Retrieves all the projects.(project,projects can be used interchangeably in these commands) +Retrieve all the projects. (project,projects can be used interchangeably in these commands): :: - bin/flytectl get project + flytectl get project -Retrieves project by name +Retrieve project by name: :: - bin/flytectl get project flytesnacks + flytectl get project flytesnacks -Retrieves all the projects with filters. +Retrieve all the projects with filters: :: - bin/flytectl get project --filter.fieldSelector="project.name=flytesnacks" + flytectl get project --filter.fieldSelector="project.name=flytesnacks" -Retrieves all the projects with limit and sorting. +Retrieve all the projects with limit and sorting: :: - bin/flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the projects in yaml format +Retrieve all the projects in yaml format: :: - bin/flytectl get project -o yaml + flytectl get project -o yaml -Retrieves all the projects in json format +Retrieve all the projects in json format: :: - bin/flytectl get project -o json + flytectl get project -o json Usage :: - flytectl get project [flags] + FlyteCTL get project [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 1122ce6411..384345cd0c 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -1,34 +1,34 @@ -.. _flytectl_get_task-resource-attribute: +.. _FlyteCTL_get_task-resource-attribute: -flytectl get task-resource-attribute +FlyteCTL get task-resource-attribute ------------------------------------ -Gets matchable resources of task attributes +Get matchable resources of task attributes Synopsis ~~~~~~~~ -Retrieve task resource attributes for the given project and domain. -Here, the command gets the task resource attributes for the project flytectldemo and development domain. +Retrieves task resource attributes for the given project and domain. +For project flytectldemo and development domain, it is: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g. : output from the command +e.g., output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieve task resource attributes for the given project, domain, and workflow. -Here, the command gets task resource attributes for the project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort'. +Retrieves task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g. : output from the command +e.g., output from the command: .. code-block:: json @@ -36,8 +36,8 @@ e.g. : output from the command Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here the command gets task resource attributes and writes the config file to tra.yaml -e.g. : content of tra.yaml +Here, the config file is written to tra.yaml, +e.g., content of tra.yaml: :: @@ -60,7 +60,7 @@ Usage :: - flytectl get task-resource-attribute [flags] + FlyteCTL get task-resource-attribute [flags] Options ~~~~~~~ @@ -117,5 +117,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 38db5a9318..cc76eff200 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -1,71 +1,71 @@ -.. _flytectl_get_task: +.. _FlyteCTL_get_task: -flytectl get task +FlyteCTL get task ----------------- -Gets task resources +Get task resources Synopsis ~~~~~~~~ -Retrieves all the task within project and domain.(task,tasks can be used interchangeably in these commands) +Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): :: - bin/flytectl get task -p flytesnacks -d development + flytectl get task -p flytesnacks -d development -Retrieves task by name within project and domain. +Retrieve task by name within project and domain: :: - bin/flytectl task -p flytesnacks -d development core.basic.lp.greet + flytectl task -p flytesnacks -d development core.basic.lp.greet -Retrieves latest version of task by name within project and domain. +Retrieve latest version of task by name within project and domain: :: flytectl get task -p flytesnacks -d development core.basic.lp.greet --latest -Retrieves particular version of task by name within project and domain. +Retrieve particular version of task by name within project and domain: :: flytectl get task -p flytesnacks -d development core.basic.lp.greet --version v2 -Retrieves all the tasks with filters. +Retrieve all the tasks with filters: :: - bin/flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" -Retrieve a specific task with filters. +Retrieve a specific task with filters: :: - bin/flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" -Retrieves all the task with limit and sorting. +Retrieve all the tasks with limit and sorting: :: - bin/flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the tasks within project and domain in yaml format. +Retrieve all the tasks within project and domain in yaml format: :: - bin/flytectl get task -p flytesnacks -d development -o yaml + flytectl get task -p flytesnacks -d development -o yaml -Retrieves all the tasks within project and domain in json format. +Retrieve all the tasks within project and domain in json format: :: - bin/flytectl get task -p flytesnacks -d development -o json + flytectl get task -p flytesnacks -d development -o json -Retrieves a tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution. +Retrieve tasks within project and domain for a version and generate the execution spec file for it to be used for launching the execution using create execution: :: - bin/flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 -The generated file would look similar to this +The generated file would look similar to this: .. code-block:: yaml @@ -88,7 +88,7 @@ Usage :: - flytectl get task [flags] + FlyteCTL get task [flags] Options ~~~~~~~ @@ -151,5 +151,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 1554f40e6a..12acb14f89 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -1,25 +1,24 @@ -.. _flytectl_get_workflow-execution-config: +.. _FlyteCTL_get_workflow-execution-config: -flytectl get workflow-execution-config +FlyteCTL get workflow-execution-config -------------------------------------- -Gets matchable resources of workflow execution config +Get matchable resources of workflow execution config Synopsis ~~~~~~~~ -Retrieves workflow execution config for given project and domain combination or additionally with workflow name. +Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. -Retrieves workflow execution config for project and domain -Here the command get workflow execution config for project flytectldemo and development domain. +For project flytectldemo and development domain, it is: :: flytectl get workflow-execution-config -p flytectldemo -d development -eg : output from the command +e.g., output from the command .. code-block:: json @@ -29,14 +28,14 @@ eg : output from the command "max_parallelism": 5 } -Retrieves workflow execution config for project and domain and workflow -Here the command get workflow execution config for project flytectldemo ,development domain and workflow core.control_flow.run_merge_sort.merge_sort +Retrieves workflow execution config for the project, domain and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -eg : output from the command +e.g., output from the command .. code-block:: json @@ -47,9 +46,9 @@ eg : output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, command would return an error. -Here the command gets workflow execution config and writes the config file to wec.yaml -eg: content of wec.yaml +Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. +Here, the config file is written to wec.yaml, +e.g., content of wec.yaml: :: @@ -67,7 +66,7 @@ Usage :: - flytectl get workflow-execution-config [flags] + FlyteCTL get workflow-execution-config [flags] Options ~~~~~~~ @@ -124,5 +123,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 031274ae61..6edd90c438 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -1,72 +1,72 @@ -.. _flytectl_get_workflow: +.. _FlyteCTL_get_workflow: -flytectl get workflow +FlyteCTL get workflow --------------------- -Gets workflow resources +Get workflow resources Synopsis ~~~~~~~~ -Retrieves all the workflows within project and domain.(workflow,workflows can be used interchangeably in these commands) +Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development -Retrieves workflow by name within project and domain. +Retrieve workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet -Retrieves latest version of workflow by name within project and domain. +Retrieve latest version of workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --latest -Retrieves particular version of workflow by name within project and domain. +Retrieve particular version of workflow by name within project and domain: :: flytectl get workflow -p flytesnacks -d development core.basic.lp.go_greet --version v2 -Retrieves all the workflows with filters. +Retrieve all the workflows with filters: :: - bin/flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" + flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" -Retrieve specific workflow with filters. +Retrieve specific workflow with filters: :: - bin/flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" + flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" -Retrieves all the workflows with limit and sorting. +Retrieve all the workflows with limit and sorting: :: - bin/flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc + flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the workflow within project and domain in yaml format. +Retrieve all the workflows within project and domain in yaml format: :: flytectl get workflow -p flytesnacks -d development -o yaml -Retrieves all the workflow within project and domain in json format. +Retrieve all the workflow within project and domain in json format: :: flytectl get workflow -p flytesnacks -d development -o json -Visualize the graph for a workflow within project and domain in dot format. +Visualize the graph for a workflow within project and domain in dot format: :: flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o dot -Visualize the graph for a workflow within project and domain in a dot content render. +Visualize the graph for a workflow within project and domain in a dot content render: :: @@ -77,7 +77,7 @@ Usage :: - flytectl get workflow [flags] + FlyteCTL get workflow [flags] Options ~~~~~~~ @@ -139,5 +139,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index e21ebd27c5..199911f0fd 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -1,9 +1,9 @@ -.. _flytectl_register: +.. _FlyteCTL_register: -flytectl register +FlyteCTL register ----------------- -Registers tasks/workflows/launchplans from list of generated serialized files. +Register tasks/workflows/launchplans from a list of generated serialized files. Synopsis ~~~~~~~~ @@ -11,9 +11,9 @@ Synopsis Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. -Currently these input files are protobuf files generated as output from flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1 -If the entities are already registered with flyte for the same version then registration would fail. +Currently, these input files are protobuf files generated as output from Flytekit serialize. +Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +If the entities are already registered with Flyte for the same version, the registration would fail. Options @@ -70,7 +70,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_register_examples` - Registers flytesnack example -* :doc:`flytectl_register_files` - Registers file resources +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_register_examples` - Register Flytesnacks example +* :doc:`FlyteCTL_register_files` - Register file resources diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 8a01a27d65..06ac0bec81 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -1,32 +1,32 @@ -.. _flytectl_register_examples: +.. _FlyteCTL_register_examples: -flytectl register examples +FlyteCTL register examples -------------------------- -Registers flytesnack example +Register Flytesnacks example Synopsis ~~~~~~~~ -Registers all latest flytesnacks example +Register all latest Flytesnacks examples: :: - bin/flytectl register examples -d development -p flytesnacks + flytectl register examples -d development -p flytesnacks -Registers specific release of flytesnacks example +Register specific release of Flytesnacks examples: :: - bin/flytectl register examples -d development -p flytesnacks --version v0.2.176 + flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: register command automatically override the version with release version +Note: The register command automatically override the version with release version Usage :: - flytectl register examples [flags] + FlyteCTL register examples [flags] Options ~~~~~~~ @@ -91,5 +91,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index f25b6597fb..b361d481c7 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -1,9 +1,9 @@ -.. _flytectl_register_files: +.. _FlyteCTL_register_files: -flytectl register files +FlyteCTL register files ----------------------- -Registers file resources +Register file resources Synopsis ~~~~~~~~ @@ -11,81 +11,81 @@ Synopsis Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. -If there are already registered entities with v1 version then the command will fail immediately on the first such encounter. +If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks + flytectl register file _pb_output/* -d development -p flytesnacks -There is no difference between registration and fast registration, In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If Flytectl finds any source code in users's input then it will consider registration as fast registration. Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also archive create source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, flytectl will create SourceUploadPath from your storage config. In case of s3 flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -In case of fast registration, If the SourceUploadPath flag is defined then In this case flytectl will not use the default directory for uploading the source code, it will override the destination path on the registration +In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" -Using archive file.Currently supported are .tgz and .tar extension files and can be local or remote file served through http/https. -Use --archive flag. +Using archive file. Currently supported extensions are .tgz and .tar. They can be local or remote files served through http/https. +Use --archive flag: :: - bin/flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive -Using local tgz file. +Using local tgz file: :: - bin/flytectl register files _pb_output.tgz -d development -p flytesnacks --archive + flytectl register files _pb_output.tgz -d development -p flytesnacks --archive -If you want to continue executing registration on other files ignoring the errors including version conflicts then pass in the continueOnError flag. +If you wish to continue executing registration on other files by ignoring the errors including the version conflicts, then send the continueOnError flag: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -Using short format of continueOnError flag +Using short format of continueOnError flag: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -Overriding the default version v1 using version string. +Override the default version v1 using version string: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -Change the o/p format has not effect on registration. The O/p is currently available only in table format. +Changing the o/p format has no effect on the registration. The O/p is currently available only in table format: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError -o yaml -Override IamRole during registration. +Override IamRole during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" -Override Kubernetes service account during registration. +Override Kubernetes service account during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" -Override Output location prefix during registration. +Override Output location prefix during registration: :: - bin/flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" Usage :: - flytectl register files [flags] + FlyteCTL register files [flags] Options ~~~~~~~ @@ -150,5 +150,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. +* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 3b77cb201e..05b115d066 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -1,6 +1,6 @@ -.. _flytectl_sandbox: +.. _FlyteCTL_sandbox: -flytectl sandbox +FlyteCTL sandbox ---------------- Used for sandbox interactions like start/teardown/status/exec. @@ -10,29 +10,29 @@ Synopsis -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Create sandbox cluster. +Create sandbox cluster: :: - bin/flytectl sandbox start + flytectl sandbox start -Remove sandbox cluster. +Remove sandbox cluster: :: - bin/flytectl sandbox teardown + flytectl sandbox teardown -Check status of sandbox container. +Check status of sandbox container: :: - bin/flytectl sandbox status + flytectl sandbox status -Execute command inside sandbox container. +Execute command inside sandbox container: :: - bin/flytectl sandbox exec -- pwd + flytectl sandbox exec -- pwd Options @@ -89,9 +89,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_sandbox_exec` - Execute non-interactive command inside the sandbox container -* :doc:`flytectl_sandbox_start` - Start the flyte sandbox cluster -* :doc:`flytectl_sandbox_status` - Get the status of the sandbox environment. -* :doc:`flytectl_sandbox_teardown` - Teardown will cleanup the sandbox environment +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_sandbox_exec` - Execute non-interactive command inside the sandbox container +* :doc:`FlyteCTL_sandbox_start` - Start the flyte sandbox cluster +* :doc:`FlyteCTL_sandbox_status` - Get status of the sandbox environment. +* :doc:`FlyteCTL_sandbox_teardown` - Teardown cleans up the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index bd9c0ec4e9..c89b580c0b 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -1,6 +1,6 @@ -.. _flytectl_sandbox_exec: +.. _FlyteCTL_sandbox_exec: -flytectl sandbox exec +FlyteCTL sandbox exec --------------------- Execute non-interactive command inside the sandbox container @@ -10,16 +10,16 @@ Synopsis -Execute command will run non-interactive command inside the sandbox container and return immediately with the output.By default flytectl exec in /root directory inside the sandbox container +Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. :: - bin/flytectl sandbox exec -- ls -al + flytectl sandbox exec -- ls -al Usage :: - flytectl sandbox exec [flags] + FlyteCTL sandbox exec [flags] Options ~~~~~~~ @@ -75,5 +75,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 3c48e3ad2b..1b7cd78ed8 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -1,6 +1,6 @@ -.. _flytectl_sandbox_start: +.. _FlyteCTL_sandbox_start: -flytectl sandbox start +FlyteCTL sandbox start ---------------------- Start the flyte sandbox cluster @@ -10,32 +10,32 @@ Synopsis -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. provides a simplified way of running flyte-sandbox as a single Docker container running locally. +The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Start sandbox cluster without any source code +Start sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox +Mount your source code repository inside sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of flyte. flytectl sandbox only support flyte version available in Github release https://github.com/flyteorg/flyte/tags +Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: Flytectl sandbox is only supported for Flyte versions > v0.10.0 +Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 -Specify a Flyte Sandbox compliant image with the registry. This is useful, in case you want to use an image from your registry. +Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: flytectl sandbox start --image docker.io/my-override:latest -Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never +Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always @@ -44,7 +44,7 @@ Usage :: - flytectl sandbox start [flags] + FlyteCTL sandbox start [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 017b0e0b0f..b61887f15c 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -1,28 +1,27 @@ -.. _flytectl_sandbox_status: +.. _FlyteCTL_sandbox_status: -flytectl sandbox status +FlyteCTL sandbox status ----------------------- -Get the status of the sandbox environment. +Get status of the sandbox environment. Synopsis ~~~~~~~~ -Status will retrieve the status of the Sandbox environment. Currently FlyteSandbox runs as a local docker container. -This will return the docker status for this container +Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. Usage :: - bin/flytectl sandbox status + flytectl sandbox status :: - flytectl sandbox status [flags] + FlyteCTL sandbox status [flags] Options ~~~~~~~ @@ -78,5 +77,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index b48d24452f..ca2a13d800 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -1,19 +1,19 @@ -.. _flytectl_sandbox_teardown: +.. _FlyteCTL_sandbox_teardown: -flytectl sandbox teardown +FlyteCTL sandbox teardown ------------------------- -Teardown will cleanup the sandbox environment +Teardown cleans up the sandbox environment Synopsis ~~~~~~~~ -Teardown will remove sandbox cluster and all the flyte config created by sandbox start +Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: :: - bin/flytectl sandbox teardown + flytectl sandbox teardown Usage @@ -21,7 +21,7 @@ Usage :: - flytectl sandbox teardown [flags] + FlyteCTL sandbox teardown [flags] Options ~~~~~~~ @@ -77,5 +77,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index cb65073fef..a4276dfa44 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -1,21 +1,21 @@ -.. _flytectl_update: +.. _FlyteCTL_update: -flytectl update +FlyteCTL update --------------- -Used for updating flyte resources eg: project. +Update Flyte resources e.g., project. Synopsis ~~~~~~~~ -Currently this command only provides subcommands to update project. -Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. -Example update project to activate it. +Currently, this command only provides subcommands to update project. +Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +To update a project: :: - bin/flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activateProject Options @@ -72,16 +72,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool -* :doc:`flytectl_update_cluster-resource-attribute` - Updates matchable resources of cluster attributes -* :doc:`flytectl_update_execution-cluster-label` - Updates matchable resources of execution cluster label -* :doc:`flytectl_update_execution-queue-attribute` - Updates matchable resources of execution queue attributes -* :doc:`flytectl_update_launchplan` - Updates launch plan status -* :doc:`flytectl_update_launchplan-meta` - Updates launch plan metadata -* :doc:`flytectl_update_plugin-override` - Updates matchable resources of plugin overrides -* :doc:`flytectl_update_project` - Updates project resources -* :doc:`flytectl_update_task-meta` - Updates task metadata -* :doc:`flytectl_update_task-resource-attribute` - Updates matchable resources of task attributes -* :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config -* :doc:`flytectl_update_workflow-meta` - Updates workflow metadata +* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`FlyteCTL_update_cluster-resource-attribute` - Update matchable resources of cluster attributes +* :doc:`FlyteCTL_update_execution-cluster-label` - Update matchable resources of execution cluster label +* :doc:`FlyteCTL_update_execution-queue-attribute` - Update matchable resources of execution queue attributes +* :doc:`FlyteCTL_update_launchplan` - Update launch plan status +* :doc:`FlyteCTL_update_launchplan-meta` - Update launch plan metadata +* :doc:`FlyteCTL_update_plugin-override` - Update matchable resources of plugin overrides +* :doc:`FlyteCTL_update_project` - Update project resources +* :doc:`FlyteCTL_update_task-meta` - Update task metadata +* :doc:`FlyteCTL_update_task-resource-attribute` - Update matchable resources of task attributes +* :doc:`FlyteCTL_update_workflow-execution-config` - Update matchable resources of workflow execution config +* :doc:`FlyteCTL_update_workflow-meta` - Update workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 9f1ca738f9..25b31bb004 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -1,9 +1,9 @@ -.. _flytectl_update_cluster-resource-attribute: +.. _FlyteCTL_update_cluster-resource-attribute: -flytectl update cluster-resource-attribute +FlyteCTL update cluster-resource-attribute ------------------------------------------ -Updates matchable resources of cluster attributes +Update matchable resources of cluster attributes Synopsis ~~~~~~~~ @@ -12,9 +12,9 @@ Synopsis Updates cluster resource attributes for given project and domain combination or additionally with workflow name. -Updating to the cluster resource attribute is only available from a generated file. See the get section for generating this file. -Here the command updates takes the input for cluster resource attributes from the config file cra.yaml -eg: content of cra.yaml +Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. +It takes input for cluster resource attributes from the config file cra.yaml, +e.g., content of cra.yaml: .. code-block:: yaml @@ -28,12 +28,12 @@ eg: content of cra.yaml flytectl update cluster-resource-attribute --attrFile cra.yaml -Updating cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values -Refer to get cluster-resource-attribute section on how to generate this file -Update the cluster resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. +Refer to get cluster-resource-attribute section on how to generate this file. +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -54,7 +54,7 @@ Usage :: - flytectl update cluster-resource-attribute [flags] + FlyteCTL update cluster-resource-attribute [flags] Options ~~~~~~~ @@ -112,5 +112,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 4fca7a3a9f..6086db5067 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -1,20 +1,20 @@ -.. _flytectl_update_execution-cluster-label: +.. _FlyteCTL_update_execution-cluster-label: -flytectl update execution-cluster-label +FlyteCTL update execution-cluster-label --------------------------------------- -Updates matchable resources of execution cluster label +Update matchable resources of execution cluster label Synopsis ~~~~~~~~ -Updates execution cluster label for given project and domain combination or additionally with workflow name. +Updates execution cluster label for the given project and domain combination or additionally with workflow name. -Updating to the execution cluster label is only available from a generated file. See the get section for generating this file. -Here the command updates takes the input for execution cluster label from the config file ecl.yaml -eg: content of ecl.yaml +Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. +It takes input for execution cluster label from the config file ecl.yaml +e.g., content of ecl.yaml: .. code-block:: yaml @@ -26,9 +26,9 @@ eg: content of ecl.yaml flytectl update execution-cluster-label --attrFile ecl.yaml -Updating execution cluster label for project and domain and workflow combination. This will take precedence over any other +Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. -Update the execution cluster label for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -47,7 +47,7 @@ Usage :: - flytectl update execution-cluster-label [flags] + FlyteCTL update execution-cluster-label [flags] Options ~~~~~~~ @@ -105,5 +105,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index ae9db9b656..849b54ab17 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -1,23 +1,23 @@ -.. _flytectl_update_execution-queue-attribute: +.. _FlyteCTL_update_execution-queue-attribute: -flytectl update execution-queue-attribute +FlyteCTL update execution-queue-attribute ----------------------------------------- -Updates matchable resources of execution queue attributes +Update matchable resources of execution queue attributes Synopsis ~~~~~~~~ -Updates execution queue attributes for given project and domain combination or additionally with workflow name. +Updates execution queue attributes for the given project and domain combination or additionally with workflow name. -Updating to the execution queue attribute is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values +Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file -Here the command updates takes the input for execution queue attributes from the config file era.yaml -eg: content of era.yaml +It takes input for execution queue attributes from the config file era.yaml, +e.g., content of era.yaml: .. code-block:: yaml @@ -33,9 +33,9 @@ eg: content of era.yaml flytectl update execution-queue-attribute --attrFile era.yaml -Updating execution queue attribute for project and domain and workflow combination. This will take precedence over any other +Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -Update the execution queue attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -58,7 +58,7 @@ Usage :: - flytectl update execution-queue-attribute [flags] + FlyteCTL update execution-queue-attribute [flags] Options ~~~~~~~ @@ -116,5 +116,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 14717eb90c..26fa58c7b4 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -1,26 +1,26 @@ -.. _flytectl_update_launchplan-meta: +.. _FlyteCTL_update_launchplan-meta: -flytectl update launchplan-meta +FlyteCTL update launchplan-meta ------------------------------- -Updates launch plan metadata +Update launch plan metadata Synopsis ~~~~~~~~ -Following command updates the description on the launchplan. +Update the description on the launch plan: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" -Archiving launchplan named entity is not supported and would throw an error. +Archiving launch plan named entity is not supported and would throw an error: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive -Activating launchplan named entity would be a noop. +Activating launch plan named entity would be a noop: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate @@ -30,7 +30,7 @@ Usage :: - flytectl update launchplan-meta [flags] + FlyteCTL update launchplan-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 41f7995b27..4213143d3a 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -1,21 +1,21 @@ -.. _flytectl_update_launchplan: +.. _FlyteCTL_update_launchplan: -flytectl update launchplan +FlyteCTL update launchplan -------------------------- -Updates launch plan status +Update launch plan status Synopsis ~~~~~~~~ -Activating launchplan activates the scheduled job associated with it +Activating launch plan activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launchplan deschedules any scheduled job associated with it +Archiving launch plan deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive @@ -26,7 +26,7 @@ Usage :: - flytectl update launchplan [flags] + FlyteCTL update launchplan [flags] Options ~~~~~~~ @@ -86,5 +86,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 3056208c60..33c765d247 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -1,9 +1,9 @@ -.. _flytectl_update_plugin-override: +.. _FlyteCTL_update_plugin-override: -flytectl update plugin-override +FlyteCTL update plugin-override ------------------------------- -Updates matchable resources of plugin overrides +Update matchable resources of plugin overrides Synopsis ~~~~~~~~ @@ -13,11 +13,11 @@ Synopsis Updates plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing plugins overrides on custom project and domain and workflow combination. -Would be preferable to do get and generate an plugin override file if there is an existing override already set and then update it to have new values +This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file -Here the command updates takes the input for plugin overrides from the config file po.yaml -eg: content of po.yaml +It takes input for plugin overrides from the config file po.yaml, +e.g., content of po.yaml: .. code-block:: yaml @@ -34,9 +34,9 @@ eg: content of po.yaml flytectl update plugin-override --attrFile po.yaml -Updating plugin override for project and domain and workflow combination. This will take precedence over any other +Updates plugin override for project, domain and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. -Update the plugin overrides for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo , development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -60,7 +60,7 @@ Usage :: - flytectl update plugin-override [flags] + FlyteCTL update plugin-override [flags] Options ~~~~~~~ @@ -118,5 +118,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index abbaaca825..1e13cac8fd 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -1,51 +1,51 @@ -.. _flytectl_update_project: +.. _FlyteCTL_update_project: -flytectl update project +FlyteCTL update project ----------------------- -Updates project resources +Update project resources Synopsis ~~~~~~~~ -Updates the project according the flags passed. Allows you to archive or activate a project. -Activates project named flytesnacks. +Updates the project according to the flags passed. Allows you to archive or activate a project. +Activate project flytesnacks: :: - bin/flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activateProject -Archives project named flytesnacks. +Archive project flytesnacks: :: - bin/flytectl update project -p flytesnacks --archiveProject + flytectl update project -p flytesnacks --archiveProject -Incorrect usage when passing both archive and activate. +Incorrect usage when passing both archive and activate: :: - bin/flytectl update project flytesnacks --archiveProject --activateProject + flytectl update project flytesnacks --archiveProject --activateProject -Incorrect usage when passing unknown-project. +Incorrect usage when passing unknown-project: :: - bin/flytectl update project unknown-project --archiveProject + flytectl update project unknown-project --archiveProject -Incorrect usage when passing valid project using -p option. +Incorrect usage when passing valid project using -p option: :: - bin/flytectl update project unknown-project --archiveProject -p known-project + flytectl update project unknown-project --archiveProject -p known-project Usage :: - flytectl update project [flags] + FlyteCTL update project [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index f25862a7f9..497f5edf00 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -1,26 +1,26 @@ -.. _flytectl_update_task-meta: +.. _FlyteCTL_update_task-meta: -flytectl update task-meta +FlyteCTL update task-meta ------------------------- -Updates task metadata +Update task metadata Synopsis ~~~~~~~~ -Following command updates the description on the task. +Updates the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" -Archiving task named entity is not supported and would throw an error. +Archiving task named entity is not supported and would throw an error: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive -Activating task named entity would be a noop as archiving is not possible. +Activating task named entity would be a noop since archiving is not possible: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate @@ -30,7 +30,7 @@ Usage :: - flytectl update task-meta [flags] + FlyteCTL update task-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 182c3cdf3f..856a267771 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -1,23 +1,23 @@ -.. _flytectl_update_task-resource-attribute: +.. _FlyteCTL_update_task-resource-attribute: -flytectl update task-resource-attribute +FlyteCTL update task-resource-attribute --------------------------------------- -Updates matchable resources of task attributes +Update matchable resources of task attributes Synopsis ~~~~~~~~ -Updates task resource attributes for given project and domain combination or additionally with workflow name. +Updates task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination attributes. -Would be preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values -Refer to get task-resource-attribute section on how to generate this file -Here the command updates takes the input for task resource attributes from the config file tra.yaml -eg: content of tra.yaml +This will completely overwrite any existing custom project, domain and workflow combination attributes. +It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. +Refer to get task-resource-attribute section on how to generate this file. +It takes input for task resource attributes from the config file tra.yaml, +e.g., content of tra.yaml: .. code-block:: yaml @@ -34,9 +34,9 @@ eg: content of tra.yaml flytectl update task-resource-attribute --attrFile tra.yaml -Updating task resource attribute for project and domain and workflow combination. This will take precedence over any other +Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -Update the resource attributes for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -60,7 +60,7 @@ Usage :: - flytectl update task-resource-attribute [flags] + FlyteCTL update task-resource-attribute [flags] Options ~~~~~~~ @@ -118,5 +118,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index cf66feece0..b10ca234a8 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -1,9 +1,9 @@ -.. _flytectl_update_workflow-execution-config: +.. _FlyteCTL_update_workflow-execution-config: -flytectl update workflow-execution-config +FlyteCTL update workflow-execution-config ----------------------------------------- -Updates matchable resources of workflow execution config +Update matchable resources of workflow execution config Synopsis ~~~~~~~~ @@ -13,11 +13,11 @@ Synopsis Updates workflow execution config for given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. -Also this will completely overwrite any existing custom project and domain and workflow combination execution config. -Would be preferable to do get and generate an config file if there is an existing execution config already set and then update it to have new values -Refer to get workflow-execution-config section on how to generate this file -Here the command updates takes the input for workflow execution config from the config file wec.yaml -eg: content of wec.yaml +This will completely overwrite any existing custom project and domain and workflow combination execution config. +It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. +Refer to get workflow-execution-config section on how to generate this file. +It takes input for workflow execution config from the config file wec.yaml, +e.g., content of wec.yaml: .. code-block:: yaml @@ -29,9 +29,9 @@ eg: content of wec.yaml flytectl update workflow-execution-config --attrFile wec.yaml -Updating workflow execution config for project and domain and workflow combination. This will take precedence over any other +Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other execution config defined at project domain level. -Update the workflow execution config for workflow core.control_flow.run_merge_sort.merge_sort in flytectldemo, development domain +For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: .. code-block:: yaml @@ -50,7 +50,7 @@ Usage :: - flytectl update workflow-execution-config [flags] + FlyteCTL update workflow-execution-config [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 404dd37b52..1e665e8958 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -1,26 +1,26 @@ -.. _flytectl_update_workflow-meta: +.. _FlyteCTL_update_workflow-meta: -flytectl update workflow-meta +FlyteCTL update workflow-meta ----------------------------- -Updates workflow metadata +Update workflow metadata Synopsis ~~~~~~~~ -Following command updates the description on the workflow. +Updates the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" -Archiving workflow named entity would cause this to disapper from flyteconsole UI. +Archiving workflow named entity would cause this to disapper from flyteconsole UI: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive -Activating workflow named entity +Activate workflow named entity: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate @@ -30,7 +30,7 @@ Usage :: - flytectl update workflow-meta [flags] + FlyteCTL update workflow-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - Used for updating flyte resources eg: project. +* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 63379360f4..b44d9c5e36 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -1,33 +1,33 @@ -.. _flytectl_upgrade: +.. _FlyteCTL_upgrade: -flytectl upgrade +FlyteCTL upgrade ---------------- -Used for upgrade/rollback flyte version +Upgrade/rollback to a Flyte version Synopsis ~~~~~~~~ -Upgrade flytectl +For FlyteCTL, it is: :: - bin/flytectl upgrade + flytectl upgrade -Note: Please use upgrade with sudo, Without sudo it will cause permission issue +Note: Please use upgrade with sudo. Without sudo it will cause permission issue. -Rollback flytectl binary +Rollback flytectl binary: :: - bin/flytectl upgrade rollback + flytectl upgrade rollback -Note: Upgrade is not available on windows +Note: Upgrade is not available on windows. :: - flytectl upgrade [flags] + FlyteCTL upgrade [flags] Options ~~~~~~~ @@ -83,5 +83,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool +* :doc:`FlyteCTL` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 43a1516515..5748697600 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -1,24 +1,24 @@ -.. _flytectl_version: +.. _FlyteCTL_version: -flytectl version +FlyteCTL version ---------------- -Used for fetching flyte version +Fetch Flyte version Synopsis ~~~~~~~~ -Example version. +For FlyteCTL version, it is: :: - bin/flytectl version + flytectl version :: - flytectl version [flags] + FlyteCTL version [flags] Options ~~~~~~~ @@ -74,5 +74,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - flyetcl CLI tool +* :doc:`FlyteCTL` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst new file mode 100644 index 0000000000..6adab05fb8 --- /dev/null +++ b/flytectl/docs/source/launchplan.rst @@ -0,0 +1,9 @@ +Launchplan +------ + +.. toctree:: + :maxdepth: 1 + :caption: Launchplan + + gen/FlyteCTL_get_launchplan + gen/FlyteCTL_update_launchplan \ No newline at end of file diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 0afad1c0c0..df3082ee2a 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -1,48 +1,24 @@ Nouns ------ -Flytectl noun specify the resource on which the action needs to be performed eg: resources like project/workflow/task/execution +Flytectl nouns specify the resource on which the action needs to be performed. +Example of resources include project, workflow, task, execution. .. toctree:: :maxdepth: 1 :caption: Nouns - - gen/flytectl_create_project - gen/flytectl_create_execution - gen/flytectl_get_execution - gen/flytectl_get_project - gen/flytectl_get_workflow - gen/flytectl_get_task - gen/flytectl_get_task-resource-attribute - gen/flytectl_get_cluster-resource-attribute - gen/flytectl_get_execution-cluster-label - gen/flytectl_get_execution-queue-attribute - gen/flytectl_get_plugin-override - gen/flytectl_get_launchplan - gen/flytectl_get_workflow-execution-config - gen/flytectl_update_launchplan - gen/flytectl_update_workflow - gen/flytectl_update_project - gen/flytectl_update_task - gen/flytectl_update_task-resource-attribute - gen/flytectl_update_cluster-resource-attribute - gen/flytectl_update_execution-cluster-label - gen/flytectl_update_execution-queue-attribute - gen/flytectl_update_plugin-override - gen/flytectl_update_workflow-execution-config - gen/flytectl_register_files - gen/flytectl_register_examples - gen/flytectl_delete_execution - gen/flytectl_delete_task-resource-attribute - gen/flytectl_delete_cluster-resource-attribute - gen/flytectl_delete_execution-cluster-label - gen/flytectl_delete_execution-queue-attribute - gen/flytectl_delete_plugin-override - gen/flytectl_delete_workflow-execution-config - gen/flytectl_config_validate - gen/flytectl_config_init - gen/flytectl_config_discover - gen/flytectl_sandbox_start - gen/flytectl_sandbox_status - gen/flytectl_sandbox_teardown - gen/flytectl_sandbox_exec - gen/flytectl_upgrade + + project + execution + workflow + task + task-resource-attribute + cluster-resource-attribute + execution-cluster-label + execution-queue-attribute + plugin-override + launchplan + workflow-execution-config + examples + files + config + sandbox diff --git a/flytectl/docs/source/plugin-override.rst b/flytectl/docs/source/plugin-override.rst new file mode 100644 index 0000000000..26ebd9e28d --- /dev/null +++ b/flytectl/docs/source/plugin-override.rst @@ -0,0 +1,10 @@ +Plugin override +------ + +.. toctree:: + :maxdepth: 1 + :caption: Plugin override + + gen/FlyteCTL_get_plugin-override + gen/FlyteCTL_update_plugin-override + gen/FlyteCTL_delete_plugin-override \ No newline at end of file diff --git a/flytectl/docs/source/project.rst b/flytectl/docs/source/project.rst new file mode 100644 index 0000000000..c81e4e785f --- /dev/null +++ b/flytectl/docs/source/project.rst @@ -0,0 +1,10 @@ +Project +------ + +.. toctree:: + :maxdepth: 1 + :caption: Project + + gen/FlyteCTL_create_project + gen/FlyteCTL_get_project + gen/FlyteCTL_update_project \ No newline at end of file diff --git a/flytectl/docs/source/sandbox.rst b/flytectl/docs/source/sandbox.rst new file mode 100644 index 0000000000..8cacd53ac0 --- /dev/null +++ b/flytectl/docs/source/sandbox.rst @@ -0,0 +1,11 @@ +Sandbox +------ + +.. toctree:: + :maxdepth: 1 + :caption: Sandbox + + gen/FlyteCTL_sandbox_start + gen/FlyteCTL_sandbox_status + gen/FlyteCTL_sandbox_teardown + gen/FlyteCTL_sandbox_exec \ No newline at end of file diff --git a/flytectl/docs/source/task-resource-attribute.rst b/flytectl/docs/source/task-resource-attribute.rst new file mode 100644 index 0000000000..95dca187cd --- /dev/null +++ b/flytectl/docs/source/task-resource-attribute.rst @@ -0,0 +1,11 @@ +Task resource attribute +------ + +.. toctree:: + :maxdepth: 1 + :caption: Task resource attribute + + gen/FlyteCTL_get_task-resource-attribute + gen/FlyteCTL_update_task-resource-attribute + gen/FlyteCTL_delete_task-resource-attribute + diff --git a/flytectl/docs/source/task.rst b/flytectl/docs/source/task.rst new file mode 100644 index 0000000000..1cf59495c0 --- /dev/null +++ b/flytectl/docs/source/task.rst @@ -0,0 +1,8 @@ +Task +------ + +.. toctree:: + :maxdepth: 1 + :caption: Task + + gen/FlyteCTL_get_task \ No newline at end of file diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index eab243c410..88d4dcefbb 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -1,18 +1,18 @@ Verbs ------ -Flytectl verbs specify the actions to be performed on the resources like create/get/update/delete +Flytectl verbs specify the actions to be performed on the resources. Ex: create, get, update, and delete. .. toctree:: :maxdepth: 1 :caption: Verbs - gen/flytectl_create - gen/flytectl_completion - gen/flytectl_get - gen/flytectl_update - gen/flytectl_delete - gen/flytectl_register - gen/flytectl_config - gen/flytectl_sandbox - gen/flytectl_version - gen/flytectl_upgrade + gen/FlyteCTL_flytectl_create + gen/FlyteCTL_flytectl_completion + gen/FlyteCTL_flytectl_get + gen/FlyteCTL_flytectl_update + gen/FlyteCTL_delete + gen/FlyteCTL_register + gen/FlyteCTL_config + gen/FlyteCTL_sandbox + gen/FlyteCTL_version + gen/FlyteCTL_upgrade diff --git a/flytectl/docs/source/workflow-execution-config.rst b/flytectl/docs/source/workflow-execution-config.rst new file mode 100644 index 0000000000..008864872b --- /dev/null +++ b/flytectl/docs/source/workflow-execution-config.rst @@ -0,0 +1,10 @@ +Workflow execution config +------ + +.. toctree:: + :maxdepth: 1 + :caption: Workflow execution config + + gen/FlyteCTL_get_workflow-execution-config + gen/FlyteCTL_update_workflow-execution-config + gen/FlyteCTL_delete_workflow-execution-config \ No newline at end of file diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst new file mode 100644 index 0000000000..b37dbad28f --- /dev/null +++ b/flytectl/docs/source/workflow.rst @@ -0,0 +1,8 @@ +Workflow +------ + +.. toctree:: + :maxdepth: 1 + :caption: Workflow + + gen/FlyteCTL_get_workflow \ No newline at end of file diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index 44420887a3..c0df7f9b31 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -65,17 +65,17 @@ func GetSandboxTemplate() string { return AdminConfigTemplate + StorageConfigTemplate } -// GetAWSCloudTemplate return aws flyte config with storage config +// GetAWSCloudTemplate return aws Flyte config with storage config func GetAWSCloudTemplate() string { return AdminConfigTemplate + StorageS3ConfigTemplate } -// GetGoogleCloudTemplate return google flyte config with storage config +// GetGoogleCloudTemplate return google Flyte config with storage config func GetGoogleCloudTemplate() string { return AdminConfigTemplate + StorageGCSConfigTemplate } -// SetupConfig download the flyte sandbox config +// SetupConfig download the Flyte sandbox config func SetupConfig(filename, templateStr string, templateSpec ConfigTemplateSpec) error { tmpl := template.New("config") tmpl, err := tmpl.Parse(templateStr) @@ -90,7 +90,7 @@ func SetupConfig(filename, templateStr string, templateSpec ConfigTemplateSpec) return tmpl.Execute(file, templateSpec) } -// ConfigCleanup will remove the sandbox config from flyte dir +// ConfigCleanup will remove the sandbox config from Flyte dir func ConfigCleanup() error { err := os.Remove(FlytectlConfig) if err != nil { diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index c123683e86..b97b11804e 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -24,34 +24,34 @@ func TestSetupFlyteDir(t *testing.T) { } func TestIsVersionGreaterThan(t *testing.T) { - t.Run("Compare flytectl version when upgrade available", func(t *testing.T) { + t.Run("Compare FlyteCTL version when upgrade available", func(t *testing.T) { _, err := IsVersionGreaterThan("v1.1.21", testVersion) assert.Nil(t, err) }) - t.Run("Compare flytectl version greater then", func(t *testing.T) { + t.Run("Compare FlyteCTL version greater then", func(t *testing.T) { ok, err := IsVersionGreaterThan("v1.1.21", testVersion) assert.Nil(t, err) assert.Equal(t, true, ok) }) - t.Run("Compare flytectl version greater then for equal value", func(t *testing.T) { + t.Run("Compare FlyteCTL version greater then for equal value", func(t *testing.T) { ok, err := IsVersionGreaterThan(testVersion, testVersion) assert.Nil(t, err) assert.Equal(t, false, ok) }) - t.Run("Compare flytectl version smaller then", func(t *testing.T) { + t.Run("Compare FlyteCTL version smaller then", func(t *testing.T) { ok, err := IsVersionGreaterThan("v0.1.19", testVersion) assert.Nil(t, err) assert.Equal(t, false, ok) }) - t.Run("Compare flytectl version", func(t *testing.T) { + t.Run("Compare FlyteCTL version", func(t *testing.T) { _, err := IsVersionGreaterThan(testVersion, testVersion) assert.Nil(t, err) }) - t.Run("Error in compare flytectl version", func(t *testing.T) { + t.Run("Error in compare FlyteCTL version", func(t *testing.T) { _, err := IsVersionGreaterThan("vvvvvvvv", testVersion) assert.NotNil(t, err) }) - t.Run("Error in compare flytectl version", func(t *testing.T) { + t.Run("Error in compare FlyteCTL version", func(t *testing.T) { _, err := IsVersionGreaterThan(testVersion, "vvvvvvvv") assert.NotNil(t, err) }) diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index abbf8c6bfb..f561707b4d 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -5,8 +5,8 @@ FlyteAdmin. We will start with gRPC endpoint as the client is easily generated a more SDK's in different languages we should support a common way of interacting with the API. This does no mean that some SDK's may provide native ways of interacting with the Admin API (for e.g. flytekit), but the intention is that we will eventually replace **flytekit/flyte-cli** with flytectl exclusively. -We also recommend that the design of flytectl is careful and it could helps us with delivering user features faster without having to rely on the UI. flytectl with follow standard oauth2 for -authentication already supported by flyteAdmin. Moreover, flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. +We also recommend that the design of FlyteCTL is careful and it could helps us with delivering user features faster without having to rely on the UI. FlyteCTL with follow standard oauth2 for +authentication already supported by flyteAdmin. Moreover, FlyteCTL should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. # Why One CLI? @@ -24,7 +24,7 @@ As we build multiple SDK's they need a native way of interacting with the API. H - kubectl is a stellar example of a cli done well ## Generating Swagger code -We started exploring this (flytetools)[https://github.com/lyft/flytetools#tools] has some work. We also got approached by the swagger code gen maintainer to see if they can help. +We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. We also got approached by the swagger code gen maintainer to see if they can help. # API @@ -41,7 +41,7 @@ $ flytectl [options] ``` ### base options -- *endpoint* endpoint where flyteadmin is available +- *endpoint* endpoint where Flyteadmin is available - *insecure* use if Oauth is not available - optional *project* project for which we need to retrieve details - optional *domain* domain for which we need to retrieve details @@ -51,7 +51,7 @@ $ flytectl [options] returns the version of the CLI, version of Admin service and version of the Platform that is deployed ### configure -Allows configuring flytectl for your own usage (low pri). Needed for especially storing Auth tokens. +Allows configuring FlyteCTL for your own usage (low pri). Needed for especially storing Auth tokens. ### get/delete Get retrieves a list of resources that is qualified by a further sub-command. for example From 3064b009a51f354889a32dc268efcf9fb6687339 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 9 Dec 2021 21:49:46 -0800 Subject: [PATCH 180/356] Update documentation (#233) Signed-off-by: Flyte-Bot Co-authored-by: SmritiSatyanV --- flytectl/docs/source/gen/{flytectl.rst => FlyteCTL.rst} | 0 .../gen/{flytectl_completion.rst => FlyteCTL_completion.rst} | 0 .../source/gen/{flytectl_config.rst => FlyteCTL_config.rst} | 0 ...lytectl_config_discover.rst => FlyteCTL_config_discover.rst} | 0 .../gen/{flytectl_config_init.rst => FlyteCTL_config_init.rst} | 0 ...lytectl_config_validate.rst => FlyteCTL_config_validate.rst} | 0 .../source/gen/{flytectl_create.rst => FlyteCTL_create.rst} | 0 ...tectl_create_execution.rst => FlyteCTL_create_execution.rst} | 2 +- ...{flytectl_create_project.rst => FlyteCTL_create_project.rst} | 0 .../source/gen/{flytectl_delete.rst => FlyteCTL_delete.rst} | 0 ...ibute.rst => FlyteCTL_delete_cluster-resource-attribute.rst} | 0 ...er-label.rst => FlyteCTL_delete_execution-cluster-label.rst} | 0 ...ribute.rst => FlyteCTL_delete_execution-queue-attribute.rst} | 0 ...tectl_delete_execution.rst => FlyteCTL_delete_execution.rst} | 0 ..._plugin-override.rst => FlyteCTL_delete_plugin-override.rst} | 0 ...ttribute.rst => FlyteCTL_delete_task-resource-attribute.rst} | 0 ...config.rst => FlyteCTL_delete_workflow-execution-config.rst} | 0 flytectl/docs/source/gen/{flytectl_get.rst => FlyteCTL_get.rst} | 0 ...ttribute.rst => FlyteCTL_get_cluster-resource-attribute.rst} | 0 ...uster-label.rst => FlyteCTL_get_execution-cluster-label.rst} | 0 ...attribute.rst => FlyteCTL_get_execution-queue-attribute.rst} | 0 .../{flytectl_get_execution.rst => FlyteCTL_get_execution.rst} | 0 ...{flytectl_get_launchplan.rst => FlyteCTL_get_launchplan.rst} | 0 ...get_plugin-override.rst => FlyteCTL_get_plugin-override.rst} | 0 .../gen/{flytectl_get_project.rst => FlyteCTL_get_project.rst} | 0 ...e-attribute.rst => FlyteCTL_get_task-resource-attribute.rst} | 0 .../source/gen/{flytectl_get_task.rst => FlyteCTL_get_task.rst} | 0 ...on-config.rst => FlyteCTL_get_workflow-execution-config.rst} | 0 .../{flytectl_get_workflow.rst => FlyteCTL_get_workflow.rst} | 0 .../source/gen/{flytectl_register.rst => FlyteCTL_register.rst} | 0 ...ctl_register_examples.rst => FlyteCTL_register_examples.rst} | 0 ...{flytectl_register_files.rst => FlyteCTL_register_files.rst} | 0 .../source/gen/{flytectl_sandbox.rst => FlyteCTL_sandbox.rst} | 0 .../{flytectl_sandbox_exec.rst => FlyteCTL_sandbox_exec.rst} | 0 .../{flytectl_sandbox_start.rst => FlyteCTL_sandbox_start.rst} | 0 ...{flytectl_sandbox_status.rst => FlyteCTL_sandbox_status.rst} | 0 ...tectl_sandbox_teardown.rst => FlyteCTL_sandbox_teardown.rst} | 0 .../source/gen/{flytectl_update.rst => FlyteCTL_update.rst} | 0 ...ibute.rst => FlyteCTL_update_cluster-resource-attribute.rst} | 0 ...er-label.rst => FlyteCTL_update_execution-cluster-label.rst} | 0 ...ribute.rst => FlyteCTL_update_execution-queue-attribute.rst} | 0 ..._launchplan-meta.rst => FlyteCTL_update_launchplan-meta.rst} | 0 ...ctl_update_launchplan.rst => FlyteCTL_update_launchplan.rst} | 0 ..._plugin-override.rst => FlyteCTL_update_plugin-override.rst} | 0 ...{flytectl_update_project.rst => FlyteCTL_update_project.rst} | 0 ...tectl_update_task-meta.rst => FlyteCTL_update_task-meta.rst} | 0 ...ttribute.rst => FlyteCTL_update_task-resource-attribute.rst} | 0 ...config.rst => FlyteCTL_update_workflow-execution-config.rst} | 0 ...date_workflow-meta.rst => FlyteCTL_update_workflow-meta.rst} | 0 .../source/gen/{flytectl_upgrade.rst => FlyteCTL_upgrade.rst} | 0 .../source/gen/{flytectl_version.rst => FlyteCTL_version.rst} | 0 51 files changed, 1 insertion(+), 1 deletion(-) rename flytectl/docs/source/gen/{flytectl.rst => FlyteCTL.rst} (100%) rename flytectl/docs/source/gen/{flytectl_completion.rst => FlyteCTL_completion.rst} (100%) rename flytectl/docs/source/gen/{flytectl_config.rst => FlyteCTL_config.rst} (100%) rename flytectl/docs/source/gen/{flytectl_config_discover.rst => FlyteCTL_config_discover.rst} (100%) rename flytectl/docs/source/gen/{flytectl_config_init.rst => FlyteCTL_config_init.rst} (100%) rename flytectl/docs/source/gen/{flytectl_config_validate.rst => FlyteCTL_config_validate.rst} (100%) rename flytectl/docs/source/gen/{flytectl_create.rst => FlyteCTL_create.rst} (100%) rename flytectl/docs/source/gen/{flytectl_create_execution.rst => FlyteCTL_create_execution.rst} (99%) rename flytectl/docs/source/gen/{flytectl_create_project.rst => FlyteCTL_create_project.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete.rst => FlyteCTL_delete.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_cluster-resource-attribute.rst => FlyteCTL_delete_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_execution-cluster-label.rst => FlyteCTL_delete_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_execution-queue-attribute.rst => FlyteCTL_delete_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_execution.rst => FlyteCTL_delete_execution.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_plugin-override.rst => FlyteCTL_delete_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_task-resource-attribute.rst => FlyteCTL_delete_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_delete_workflow-execution-config.rst => FlyteCTL_delete_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get.rst => FlyteCTL_get.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_cluster-resource-attribute.rst => FlyteCTL_get_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_execution-cluster-label.rst => FlyteCTL_get_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_execution-queue-attribute.rst => FlyteCTL_get_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_execution.rst => FlyteCTL_get_execution.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_launchplan.rst => FlyteCTL_get_launchplan.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_plugin-override.rst => FlyteCTL_get_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_project.rst => FlyteCTL_get_project.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_task-resource-attribute.rst => FlyteCTL_get_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_task.rst => FlyteCTL_get_task.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_workflow-execution-config.rst => FlyteCTL_get_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{flytectl_get_workflow.rst => FlyteCTL_get_workflow.rst} (100%) rename flytectl/docs/source/gen/{flytectl_register.rst => FlyteCTL_register.rst} (100%) rename flytectl/docs/source/gen/{flytectl_register_examples.rst => FlyteCTL_register_examples.rst} (100%) rename flytectl/docs/source/gen/{flytectl_register_files.rst => FlyteCTL_register_files.rst} (100%) rename flytectl/docs/source/gen/{flytectl_sandbox.rst => FlyteCTL_sandbox.rst} (100%) rename flytectl/docs/source/gen/{flytectl_sandbox_exec.rst => FlyteCTL_sandbox_exec.rst} (100%) rename flytectl/docs/source/gen/{flytectl_sandbox_start.rst => FlyteCTL_sandbox_start.rst} (100%) rename flytectl/docs/source/gen/{flytectl_sandbox_status.rst => FlyteCTL_sandbox_status.rst} (100%) rename flytectl/docs/source/gen/{flytectl_sandbox_teardown.rst => FlyteCTL_sandbox_teardown.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update.rst => FlyteCTL_update.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_cluster-resource-attribute.rst => FlyteCTL_update_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_execution-cluster-label.rst => FlyteCTL_update_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_execution-queue-attribute.rst => FlyteCTL_update_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_launchplan-meta.rst => FlyteCTL_update_launchplan-meta.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_launchplan.rst => FlyteCTL_update_launchplan.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_plugin-override.rst => FlyteCTL_update_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_project.rst => FlyteCTL_update_project.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_task-meta.rst => FlyteCTL_update_task-meta.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_task-resource-attribute.rst => FlyteCTL_update_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_workflow-execution-config.rst => FlyteCTL_update_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{flytectl_update_workflow-meta.rst => FlyteCTL_update_workflow-meta.rst} (100%) rename flytectl/docs/source/gen/{flytectl_upgrade.rst => FlyteCTL_upgrade.rst} (100%) rename flytectl/docs/source/gen/{flytectl_version.rst => FlyteCTL_version.rst} (100%) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/FlyteCTL.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl.rst rename to flytectl/docs/source/gen/FlyteCTL.rst diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/FlyteCTL_completion.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_completion.rst rename to flytectl/docs/source/gen/FlyteCTL_completion.rst diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/FlyteCTL_config.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_config.rst rename to flytectl/docs/source/gen/FlyteCTL_config.rst diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/FlyteCTL_config_discover.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_config_discover.rst rename to flytectl/docs/source/gen/FlyteCTL_config_discover.rst diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/FlyteCTL_config_init.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_config_init.rst rename to flytectl/docs/source/gen/FlyteCTL_config_init.rst diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/FlyteCTL_config_validate.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_config_validate.rst rename to flytectl/docs/source/gen/FlyteCTL_config_validate.rst diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/FlyteCTL_create.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_create.rst rename to flytectl/docs/source/gen/FlyteCTL_create.rst diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/FlyteCTL_create_execution.rst similarity index 99% rename from flytectl/docs/source/gen/flytectl_create_execution.rst rename to flytectl/docs/source/gen/FlyteCTL_create_execution.rst index 2d502a4209..72337bd67e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/FlyteCTL_create_execution.rst @@ -150,7 +150,7 @@ Options --targetDomain string project where execution needs to be created.If not specified configured domain would be used. --targetProject string project where execution needs to be created.If not specified configured project would be used. --task string - --version string + --version string specify version of execution workflow/task. --workflow string Options inherited from parent commands diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/FlyteCTL_create_project.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_create_project.rst rename to flytectl/docs/source/gen/FlyteCTL_create_project.rst diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/FlyteCTL_delete.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete.rst rename to flytectl/docs/source/gen/FlyteCTL_delete.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_execution.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_execution.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_plugin-override.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst rename to flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/FlyteCTL_get.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get.rst rename to flytectl/docs/source/gen/FlyteCTL_get.rst diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst rename to flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_execution.rst rename to flytectl/docs/source/gen/FlyteCTL_get_execution.rst diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_launchplan.rst rename to flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_plugin-override.rst rename to flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/FlyteCTL_get_project.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_project.rst rename to flytectl/docs/source/gen/FlyteCTL_get_project.rst diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/FlyteCTL_get_task.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_task.rst rename to flytectl/docs/source/gen/FlyteCTL_get_task.rst diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst rename to flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_get_workflow.rst rename to flytectl/docs/source/gen/FlyteCTL_get_workflow.rst diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/FlyteCTL_register.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_register.rst rename to flytectl/docs/source/gen/FlyteCTL_register.rst diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/FlyteCTL_register_examples.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_register_examples.rst rename to flytectl/docs/source/gen/FlyteCTL_register_examples.rst diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/FlyteCTL_register_files.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_register_files.rst rename to flytectl/docs/source/gen/FlyteCTL_register_files.rst diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_sandbox.rst rename to flytectl/docs/source/gen/FlyteCTL_sandbox.rst diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_sandbox_exec.rst rename to flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_sandbox_start.rst rename to flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_sandbox_status.rst rename to flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_sandbox_teardown.rst rename to flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/FlyteCTL_update.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update.rst rename to flytectl/docs/source/gen/FlyteCTL_update.rst diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst rename to flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst rename to flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_launchplan.rst rename to flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_plugin-override.rst rename to flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/FlyteCTL_update_project.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_project.rst rename to flytectl/docs/source/gen/FlyteCTL_update_project.rst diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_task-meta.rst rename to flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst rename to flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst rename to flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_update_workflow-meta.rst rename to flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/FlyteCTL_upgrade.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_upgrade.rst rename to flytectl/docs/source/gen/FlyteCTL_upgrade.rst diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/FlyteCTL_version.rst similarity index 100% rename from flytectl/docs/source/gen/flytectl_version.rst rename to flytectl/docs/source/gen/FlyteCTL_version.rst From e3977b117a06a1da75cbcb905f32c1abbe93e3af Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Fri, 10 Dec 2021 19:19:05 +0530 Subject: [PATCH 181/356] Changes to 'use' in cmd folder (#235) * Update nouns.rst * removed html links Created separate rst file for each noun and referenced it in the nouns.rst file. * Update verbs.rst * Deleted newly added rst files error with codecov, so deleted the newly added rst files. * Delete verbs.rst * Created separate rst files for every resource * Changes to files in cmd folder * Update create_test.go * cmd folders * Update cmd/create/execution.go Co-authored-by: Samhita Alla * Added verbs.rst * changes to cmd folder files /bin removed, * Update based on review * Update cmd/create/project.go Co-authored-by: Samhita Alla * Update cmd/create/create.go Co-authored-by: Samhita Alla * Update cmd/create/create_test.go Co-authored-by: Samhita Alla * Update cmd/delete/delete.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Changes to delete - matchable_plugin_override * Changes to .go files in cmd * Changed flytesnack to Flytesnack * Creates to create * Update cmd/get/launch_plan.go Co-authored-by: Samhita Alla * Changed 'launchplan' to 'launch plan' * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/files.go Co-authored-by: Samhita Alla * Update cmd/register/register.go Co-authored-by: Samhita Alla * Update cmd/register/register_test.go Co-authored-by: Samhita Alla * Update cmd/sandbox/sandbox.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/status.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_cluster_label.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_queue_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_plugin_override.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/version/version.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Resolved changes * Changed 'delte' to 'delete' * Updated rst files Created rst files for every noun, and linked the associated verbs with it * Trial * Removed the extra whitespace * Changed 'delte' to 'delete' * Changed 'use' in some cmd folders * Description to rst files * Resolved conflicts Co-authored-by: Samhita Alla --- ...atchable_workflow_execution_config_test.go | 4 +-- .../matchable_execution_cluster_label_test.go | 4 +-- flytectl/cmd/root.go | 2 +- flytectl/cmd/sandbox/start.go | 2 +- flytectl/cmd/upgrade/upgrade_test.go | 2 +- flytectl/cmd/version/version_test.go | 2 +- .../source/cluster-resource-attribute.rst | 11 ++++++-- flytectl/docs/source/config.rst | 7 +++-- flytectl/docs/source/examples.rst | 5 +++- .../docs/source/execution-cluster-label.rst | 10 +++++-- .../docs/source/execution-queue-attribute.rst | 10 +++++-- flytectl/docs/source/execution.rst | 10 +++++-- flytectl/docs/source/files.rst | 4 ++- flytectl/docs/source/gen/FlyteCTL.rst | 26 ++++++++--------- .../docs/source/gen/FlyteCTL_completion.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_config.rst | 12 ++++---- .../source/gen/FlyteCTL_config_discover.rst | 8 +++--- .../docs/source/gen/FlyteCTL_config_init.rst | 8 +++--- .../source/gen/FlyteCTL_config_validate.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_create.rst | 10 +++---- .../source/gen/FlyteCTL_create_execution.rst | 8 +++--- .../source/gen/FlyteCTL_create_project.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_delete.rst | 20 ++++++------- ...eCTL_delete_cluster-resource-attribute.rst | 8 +++--- ...lyteCTL_delete_execution-cluster-label.rst | 8 +++--- ...teCTL_delete_execution-queue-attribute.rst | 8 +++--- .../source/gen/FlyteCTL_delete_execution.rst | 8 +++--- .../gen/FlyteCTL_delete_plugin-override.rst | 8 +++--- ...lyteCTL_delete_task-resource-attribute.rst | 8 +++--- ...teCTL_delete_workflow-execution-config.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_get.rst | 28 +++++++++---------- ...lyteCTL_get_cluster-resource-attribute.rst | 8 +++--- .../FlyteCTL_get_execution-cluster-label.rst | 8 +++--- ...FlyteCTL_get_execution-queue-attribute.rst | 8 +++--- .../source/gen/FlyteCTL_get_execution.rst | 8 +++--- .../source/gen/FlyteCTL_get_launchplan.rst | 8 +++--- .../gen/FlyteCTL_get_plugin-override.rst | 8 +++--- .../docs/source/gen/FlyteCTL_get_project.rst | 8 +++--- .../FlyteCTL_get_task-resource-attribute.rst | 8 +++--- .../docs/source/gen/FlyteCTL_get_task.rst | 8 +++--- ...FlyteCTL_get_workflow-execution-config.rst | 8 +++--- .../docs/source/gen/FlyteCTL_get_workflow.rst | 8 +++--- .../docs/source/gen/FlyteCTL_register.rst | 10 +++---- .../source/gen/FlyteCTL_register_examples.rst | 8 +++--- .../source/gen/FlyteCTL_register_files.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_sandbox.rst | 14 +++++----- .../docs/source/gen/FlyteCTL_sandbox_exec.rst | 8 +++--- .../source/gen/FlyteCTL_sandbox_start.rst | 10 +++---- .../source/gen/FlyteCTL_sandbox_status.rst | 8 +++--- .../source/gen/FlyteCTL_sandbox_teardown.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_update.rst | 28 +++++++++---------- ...eCTL_update_cluster-resource-attribute.rst | 8 +++--- ...lyteCTL_update_execution-cluster-label.rst | 8 +++--- ...teCTL_update_execution-queue-attribute.rst | 8 +++--- .../gen/FlyteCTL_update_launchplan-meta.rst | 8 +++--- .../source/gen/FlyteCTL_update_launchplan.rst | 8 +++--- .../gen/FlyteCTL_update_plugin-override.rst | 8 +++--- .../source/gen/FlyteCTL_update_project.rst | 8 +++--- .../source/gen/FlyteCTL_update_task-meta.rst | 8 +++--- ...lyteCTL_update_task-resource-attribute.rst | 8 +++--- ...teCTL_update_workflow-execution-config.rst | 8 +++--- .../gen/FlyteCTL_update_workflow-meta.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_upgrade.rst | 8 +++--- flytectl/docs/source/gen/FlyteCTL_version.rst | 8 +++--- flytectl/docs/source/launchplan.rst | 7 +++-- flytectl/docs/source/nouns.rst | 3 +- flytectl/docs/source/plugin-override.rst | 10 +++++-- flytectl/docs/source/project.rst | 11 ++++++-- flytectl/docs/source/sandbox.rst | 13 ++++++--- .../docs/source/task-resource-attribute.rst | 10 +++++-- flytectl/docs/source/task.rst | 4 ++- flytectl/docs/source/verbs.rst | 23 +++++++-------- .../docs/source/workflow-execution-config.rst | 11 ++++++-- flytectl/docs/source/workflow.rst | 4 ++- 74 files changed, 359 insertions(+), 304 deletions(-) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index bb706f5e67..acebc7d06b 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -41,10 +41,10 @@ func TestDeleteWorkflowExecutionConfig(t *testing.T) { deleteWorkflowExecutionConfigSetup() // No args implying project domain attribute deletion u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) + mock.Anything).Return(fmt.Errorf("failed to delete project domain attributes")) err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) + assert.Equal(t, fmt.Errorf("failed to delete project domain attributes"), err) u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index 04231373a3..b49aab9d8b 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -92,7 +92,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) tearDownAndVerify(t, ``) }) - t.Run("failed get project domain attribute", func(t *testing.T) { + t.Run("failed to get project domain attribute", func(t *testing.T) { var args []string setup() getExecutionClusterLabelSetup() @@ -120,7 +120,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { admin.MatchableResource_EXECUTION_CLUSTER_LABEL) tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) }) - t.Run("failed get workflow attribute", func(t *testing.T) { + t.Run("failed to get workflow attribute", func(t *testing.T) { var args []string setup() getExecutionClusterLabelSetup() diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 98c646c37a..f9286950b7 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -44,7 +44,7 @@ func newRootCmd() *cobra.Command { PersistentPreRunE: initConfig, Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", Short: "FlyteCTL CLI tool", - Use: "FlyteCTL", + Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 73f1a083be..95edcff8dd 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -30,7 +30,7 @@ import ( ) const ( - startShort = "Start the flyte sandbox cluster" + startShort = "Start the Flyte Sandbox cluster" startLong = ` The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 17584822a7..9708bc43fd 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -29,7 +29,7 @@ func TestUpgradeCommand(t *testing.T) { rootCmd := &cobra.Command{ Long: "FlyteCTL is CLI tool written in go to interact with flyteadmin service", Short: "FlyteCTL CLI tool", - Use: "FlyteCTL", + Use: "flytectl", DisableAutoGenTag: true, } upgradeCmd := SelfUpgrade(rootCmd) diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 2b83ff9403..8bc2511a3a 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -33,7 +33,7 @@ func TestVersionCommand(t *testing.T) { rootCmd := &cobra.Command{ Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", Short: "FlyteCTL CLI tool", - Use: "FlyteCTL", + Use: "flytectl", DisableAutoGenTag: true, } versionCommand := GetVersionCommand(rootCmd) diff --git a/flytectl/docs/source/cluster-resource-attribute.rst b/flytectl/docs/source/cluster-resource-attribute.rst index bfbd2b0ffa..4b655f8dfa 100644 --- a/flytectl/docs/source/cluster-resource-attribute.rst +++ b/flytectl/docs/source/cluster-resource-attribute.rst @@ -1,9 +1,14 @@ Cluster resource attribute ------ +It specifies the actions to be performed on the 'cluster-resource-attribute'. + .. toctree:: :maxdepth: 1 :caption: Cluster resource attribute - gen/FlyteCTL_get_cluster-resource-attribute - gen/FlyteCTL_delete_cluster-resource-attribute - gen/FlyteCTL_update_cluster-resource-attribute + gen/flytectl_get_cluster-resource-attribute + gen/flytectl_delete_cluster-resource-attribute + gen/flytectl_update_cluster-resource-attribute + gen/flytectl_get_cluster-resource-attribute + gen/flytectl_delete_cluster-resource-attribute + gen/flytectl_update_cluster-resource-attribute diff --git a/flytectl/docs/source/config.rst b/flytectl/docs/source/config.rst index bf112114f8..dd558c988c 100644 --- a/flytectl/docs/source/config.rst +++ b/flytectl/docs/source/config.rst @@ -1,10 +1,13 @@ Config ------ +It specifies the actions to be performed on the resource 'config'. .. toctree:: :maxdepth: 1 :caption: Config - gen/FlyteCTL_config_validate - gen/FlyteCTL_config_init + gen/flytectl_config_validate + gen/flytectl_config_init + gen/flytectl_config_validate + gen/flytectl_config_init gen/flytectl_config_discover diff --git a/flytectl/docs/source/examples.rst b/flytectl/docs/source/examples.rst index a854e2349b..da62f2988f 100644 --- a/flytectl/docs/source/examples.rst +++ b/flytectl/docs/source/examples.rst @@ -1,8 +1,11 @@ Examples ------ +It specifies the actions to be performed on the resource 'examples'. + .. toctree:: :maxdepth: 1 :caption: Examples - gen/FlyteCTL_register_examples \ No newline at end of file + gen/flytectl_register_examples + gen/flytectl_register_examples diff --git a/flytectl/docs/source/execution-cluster-label.rst b/flytectl/docs/source/execution-cluster-label.rst index e0dae2adbc..8bd483f17e 100644 --- a/flytectl/docs/source/execution-cluster-label.rst +++ b/flytectl/docs/source/execution-cluster-label.rst @@ -1,10 +1,14 @@ Execution cluster label ------ +It specifies the actions to be performed on the resource 'execution-cluster-label'. .. toctree:: :maxdepth: 1 :caption: Execution cluster label - gen/FlyteCTL_get_execution-cluster-label - gen/FlyteCTL_update_execution-cluster-label - gen/FlyteCTL_delete_execution-cluster-label \ No newline at end of file + gen/flytectl_get_execution-cluster-label + gen/flytectl_update_execution-cluster-label + gen/flytectl_delete_execution-cluster-label + gen/flytectl_get_execution-cluster-label + gen/flytectl_update_execution-cluster-label + gen/flytectl_delete_execution-cluster-label diff --git a/flytectl/docs/source/execution-queue-attribute.rst b/flytectl/docs/source/execution-queue-attribute.rst index 92ba2502c0..207118cdb9 100644 --- a/flytectl/docs/source/execution-queue-attribute.rst +++ b/flytectl/docs/source/execution-queue-attribute.rst @@ -1,10 +1,14 @@ Execution queue attribute ------ +It specifies the actions to be performed on the resource 'execution-queue-attribute'. .. toctree:: :maxdepth: 1 :caption: Execution queue attribute - gen/FlyteCTL_get_execution-queue-attribute - gen/FlyteCTL_delete_execution-queue-attribute - gen/FlyteCTL_update_execution-queue-attribute \ No newline at end of file + gen/flytectl_get_execution-queue-attribute + gen/flytectl_delete_execution-queue-attribute + gen/flytectl_update_execution-queue-attribute + gen/flytectl_get_execution-queue-attribute + gen/flytectl_delete_execution-queue-attribute + gen/flytectl_update_execution-queue-attribute diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst index b7857e7103..717c697db8 100644 --- a/flytectl/docs/source/execution.rst +++ b/flytectl/docs/source/execution.rst @@ -1,10 +1,14 @@ Execution ------ +It specifies the actions to be performed on the resource 'execution'. .. toctree:: :maxdepth: 1 :caption: Execution - gen/FlyteCTL_create_execution - gen/FlyteCTL_get_execution - gen/FlyteCTL_delete_execution \ No newline at end of file + gen/flytectl_create_execution + gen/flytectl_get_execution + gen/flytectl_delete_execution + gen/flytectl_create_execution + gen/flytectl_get_execution + gen/flytectl_delete_execution diff --git a/flytectl/docs/source/files.rst b/flytectl/docs/source/files.rst index b7216fbcae..afdb7e8e66 100644 --- a/flytectl/docs/source/files.rst +++ b/flytectl/docs/source/files.rst @@ -1,10 +1,12 @@ Files ------ +It specifies the actions to be performed on the resource 'files'. .. toctree:: :maxdepth: 1 :caption: Files - gen/FlyteCTL_register_files + gen/flytectl_register_files + gen/flytectl_register_files Note: It allows the user to register local files diff --git a/flytectl/docs/source/gen/FlyteCTL.rst b/flytectl/docs/source/gen/FlyteCTL.rst index d11e9d5bbf..9d7eec1e80 100644 --- a/flytectl/docs/source/gen/FlyteCTL.rst +++ b/flytectl/docs/source/gen/FlyteCTL.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL: +.. _flytectl: -FlyteCTL +flytectl -------- FlyteCTL CLI tool @@ -33,7 +33,7 @@ Options --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. - -h, --help help for FlyteCTL + -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. @@ -59,14 +59,14 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_completion` - Generate completion script -* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. -* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. -* :doc:`FlyteCTL_upgrade` - Upgrade/rollback to a Flyte version -* :doc:`FlyteCTL_version` - Fetch Flyte version +* :doc:`flytectl_completion` - Generate completion script +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_upgrade` - Upgrade/rollback to a Flyte version +* :doc:`flytectl_version` - Fetch Flyte version diff --git a/flytectl/docs/source/gen/FlyteCTL_completion.rst b/flytectl/docs/source/gen/FlyteCTL_completion.rst index 1e4ed90351..20f9b52f89 100644 --- a/flytectl/docs/source/gen/FlyteCTL_completion.rst +++ b/flytectl/docs/source/gen/FlyteCTL_completion.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_completion: +.. _flytectl_completion: -FlyteCTL completion +flytectl completion ------------------- Generate completion script @@ -51,7 +51,7 @@ PowerShell: :: - FlyteCTL completion [bash|zsh|fish|powershell] + flytectl completion [bash|zsh|fish|powershell] Options ~~~~~~~ @@ -107,5 +107,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`flytectl` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/gen/FlyteCTL_config.rst b/flytectl/docs/source/gen/FlyteCTL_config.rst index 3df3187008..7d4e25cef6 100644 --- a/flytectl/docs/source/gen/FlyteCTL_config.rst +++ b/flytectl/docs/source/gen/FlyteCTL_config.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_config: +.. _flytectl_config: -FlyteCTL config +flytectl config --------------- Runs various config commands, look at the help of this command to get a list of available commands.. @@ -67,8 +67,8 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_config_discover` - Searches for a config in one of the default search paths. -* :doc:`FlyteCTL_config_init` - Generates FlyteCTL config file in the user's home directory. -* :doc:`FlyteCTL_config_validate` - Validates the loaded config. +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. +* :doc:`flytectl_config_init` - Generates FlyteCTL config file in the user's home directory. +* :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/FlyteCTL_config_discover.rst b/flytectl/docs/source/gen/FlyteCTL_config_discover.rst index a91147e3d4..8550321470 100644 --- a/flytectl/docs/source/gen/FlyteCTL_config_discover.rst +++ b/flytectl/docs/source/gen/FlyteCTL_config_discover.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_config_discover: +.. _flytectl_config_discover: -FlyteCTL config discover +flytectl config discover ------------------------ Searches for a config in one of the default search paths. @@ -13,7 +13,7 @@ Searches for a config in one of the default search paths. :: - FlyteCTL config discover [flags] + flytectl config discover [flags] Options ~~~~~~~ @@ -71,5 +71,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/FlyteCTL_config_init.rst b/flytectl/docs/source/gen/FlyteCTL_config_init.rst index 3ba2564ca2..2540c588af 100644 --- a/flytectl/docs/source/gen/FlyteCTL_config_init.rst +++ b/flytectl/docs/source/gen/FlyteCTL_config_init.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_config_init: +.. _flytectl_config_init: -FlyteCTL config init +flytectl config init -------------------- Generates FlyteCTL config file in the user's home directory. @@ -31,7 +31,7 @@ Generates FlyteCTL config with a storage provider :: - FlyteCTL config init [flags] + flytectl config init [flags] Options ~~~~~~~ @@ -92,5 +92,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/FlyteCTL_config_validate.rst b/flytectl/docs/source/gen/FlyteCTL_config_validate.rst index 461e625269..51a3a7e443 100644 --- a/flytectl/docs/source/gen/FlyteCTL_config_validate.rst +++ b/flytectl/docs/source/gen/FlyteCTL_config_validate.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_config_validate: +.. _flytectl_config_validate: -FlyteCTL config validate +flytectl config validate ------------------------ Validates the loaded config. @@ -13,7 +13,7 @@ Validates the loaded config. :: - FlyteCTL config validate [flags] + flytectl config validate [flags] Options ~~~~~~~ @@ -73,5 +73,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. diff --git a/flytectl/docs/source/gen/FlyteCTL_create.rst b/flytectl/docs/source/gen/FlyteCTL_create.rst index d389ea2c0d..1405e2c25a 100644 --- a/flytectl/docs/source/gen/FlyteCTL_create.rst +++ b/flytectl/docs/source/gen/FlyteCTL_create.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_create: +.. _flytectl_create: -FlyteCTL create +flytectl create --------------- Create various Flyte resources including tasks/workflows/launchplans/executions/project. @@ -70,7 +70,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_create_execution` - Create execution resources -* :doc:`FlyteCTL_create_project` - Create project resources +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_create_execution` - Create execution resources +* :doc:`flytectl_create_project` - Create project resources diff --git a/flytectl/docs/source/gen/FlyteCTL_create_execution.rst b/flytectl/docs/source/gen/FlyteCTL_create_execution.rst index 72337bd67e..962f7749ac 100644 --- a/flytectl/docs/source/gen/FlyteCTL_create_execution.rst +++ b/flytectl/docs/source/gen/FlyteCTL_create_execution.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_create_execution: +.. _flytectl_create_execution: -FlyteCTL create execution +flytectl create execution ------------------------- Create execution resources @@ -133,7 +133,7 @@ Usage :: - FlyteCTL create execution [flags] + flytectl create execution [flags] Options ~~~~~~~ @@ -200,5 +200,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_create_project.rst b/flytectl/docs/source/gen/FlyteCTL_create_project.rst index 49d244f310..4c42f59c44 100644 --- a/flytectl/docs/source/gen/FlyteCTL_create_project.rst +++ b/flytectl/docs/source/gen/FlyteCTL_create_project.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_create_project: +.. _flytectl_create_project: -FlyteCTL create project +flytectl create project ----------------------- Create project resources @@ -33,7 +33,7 @@ Create a project by definition file. Note: The name shouldn't contain any whites :: - FlyteCTL create project [flags] + flytectl create project [flags] Options ~~~~~~~ @@ -95,5 +95,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete.rst b/flytectl/docs/source/gen/FlyteCTL_delete.rst index b675158f7a..60bef4e19d 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete: +.. _flytectl_delete: -FlyteCTL delete +flytectl delete --------------- Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. @@ -70,12 +70,12 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_delete_cluster-resource-attribute` - Delete matchable resources of cluster attributes -* :doc:`FlyteCTL_delete_execution` - Terminate/Delete execution resources. -* :doc:`FlyteCTL_delete_execution-cluster-label` - Delete matchable resources of execution cluster label -* :doc:`FlyteCTL_delete_execution-queue-attribute` - Delete matchable resources of execution queue attributes -* :doc:`FlyteCTL_delete_plugin-override` - Delete matchable resources of plugin overrides -* :doc:`FlyteCTL_delete_task-resource-attribute` - Delete matchable resources of task attributes -* :doc:`FlyteCTL_delete_workflow-execution-config` - Delete matchable resources of workflow execution config +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_delete_cluster-resource-attribute` - Delete matchable resources of cluster attributes +* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. +* :doc:`flytectl_delete_execution-cluster-label` - Delete matchable resources of execution cluster label +* :doc:`flytectl_delete_execution-queue-attribute` - Delete matchable resources of execution queue attributes +* :doc:`flytectl_delete_plugin-override` - Delete matchable resources of plugin overrides +* :doc:`flytectl_delete_task-resource-attribute` - Delete matchable resources of task attributes +* :doc:`flytectl_delete_workflow-execution-config` - Delete matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst index 80d749a821..0572aac149 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_cluster-resource-attribute: +.. _flytectl_delete_cluster-resource-attribute: -FlyteCTL delete cluster-resource-attribute +flytectl delete cluster-resource-attribute ------------------------------------------ Delete matchable resources of cluster attributes @@ -48,7 +48,7 @@ Usage :: - FlyteCTL delete cluster-resource-attribute [flags] + flytectl delete cluster-resource-attribute [flags] Options ~~~~~~~ @@ -106,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst index 1938d47b4a..32206f7c2b 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_execution-cluster-label: +.. _flytectl_delete_execution-cluster-label: -FlyteCTL delete execution-cluster-label +flytectl delete execution-cluster-label --------------------------------------- Delete matchable resources of execution cluster label @@ -46,7 +46,7 @@ Usage :: - FlyteCTL delete execution-cluster-label [flags] + flytectl delete execution-cluster-label [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst index 3f84f50441..cf6bc31ed3 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_execution-queue-attribute: +.. _flytectl_delete_execution-queue-attribute: -FlyteCTL delete execution-queue-attribute +flytectl delete execution-queue-attribute ----------------------------------------- Delete matchable resources of execution queue attributes @@ -50,7 +50,7 @@ Usage :: - FlyteCTL delete execution-queue-attribute [flags] + flytectl delete execution-queue-attribute [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst b/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst index d84c5d3b55..25bec01c32 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_execution: +.. _flytectl_delete_execution: -FlyteCTL delete execution +flytectl delete execution ------------------------- Terminate/Delete execution resources. @@ -56,7 +56,7 @@ Usage :: - FlyteCTL delete execution [flags] + flytectl delete execution [flags] Options ~~~~~~~ @@ -113,5 +113,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst index baa2d4355c..cbf85e2288 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_plugin-override: +.. _flytectl_delete_plugin-override: -FlyteCTL delete plugin-override +flytectl delete plugin-override ------------------------------- Delete matchable resources of plugin overrides @@ -50,7 +50,7 @@ Usage :: - FlyteCTL delete plugin-override [flags] + flytectl delete plugin-override [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst index 1800977e0f..c673e19a4e 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_task-resource-attribute: +.. _flytectl_delete_task-resource-attribute: -FlyteCTL delete task-resource-attribute +flytectl delete task-resource-attribute --------------------------------------- Delete matchable resources of task attributes @@ -51,7 +51,7 @@ Usage :: - FlyteCTL delete task-resource-attribute [flags] + flytectl delete task-resource-attribute [flags] Options ~~~~~~~ @@ -109,5 +109,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst index 5d23c0547b..7647c0cb36 100644 --- a/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_delete_workflow-execution-config: +.. _flytectl_delete_workflow-execution-config: -FlyteCTL delete workflow-execution-config +flytectl delete workflow-execution-config ----------------------------------------- Delete matchable resources of workflow execution config @@ -46,7 +46,7 @@ Usage :: - FlyteCTL delete workflow-execution-config [flags] + flytectl delete workflow-execution-config [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get.rst b/flytectl/docs/source/gen/FlyteCTL_get.rst index d27ae935a2..14db227b12 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get: +.. _flytectl_get: -FlyteCTL get +flytectl get ------------ Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. @@ -70,16 +70,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_get_cluster-resource-attribute` - Get matchable resources of cluster resource attributes. -* :doc:`FlyteCTL_get_execution` - Get execution resources -* :doc:`FlyteCTL_get_execution-cluster-label` - Get matchable resources of execution cluster label. -* :doc:`FlyteCTL_get_execution-queue-attribute` - Get matchable resources of execution queue attributes -* :doc:`FlyteCTL_get_launchplan` - Get launch plan resources -* :doc:`FlyteCTL_get_plugin-override` - Get matchable resources of plugin override -* :doc:`FlyteCTL_get_project` - Get project resources -* :doc:`FlyteCTL_get_task` - Get task resources -* :doc:`FlyteCTL_get_task-resource-attribute` - Get matchable resources of task attributes -* :doc:`FlyteCTL_get_workflow` - Get workflow resources -* :doc:`FlyteCTL_get_workflow-execution-config` - Get matchable resources of workflow execution config +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_get_cluster-resource-attribute` - Get matchable resources of cluster resource attributes. +* :doc:`flytectl_get_execution` - Get execution resources +* :doc:`flytectl_get_execution-cluster-label` - Get matchable resources of execution cluster label. +* :doc:`flytectl_get_execution-queue-attribute` - Get matchable resources of execution queue attributes +* :doc:`flytectl_get_launchplan` - Get launch plan resources +* :doc:`flytectl_get_plugin-override` - Get matchable resources of plugin override +* :doc:`flytectl_get_project` - Get project resources +* :doc:`flytectl_get_task` - Get task resources +* :doc:`flytectl_get_task-resource-attribute` - Get matchable resources of task attributes +* :doc:`flytectl_get_workflow` - Get workflow resources +* :doc:`flytectl_get_workflow-execution-config` - Get matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst index 059cfe64a5..1a0e26cad6 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_cluster-resource-attribute: +.. _flytectl_get_cluster-resource-attribute: -FlyteCTL get cluster-resource-attribute +flytectl get cluster-resource-attribute --------------------------------------- Get matchable resources of cluster resource attributes. @@ -56,7 +56,7 @@ Usage :: - FlyteCTL get cluster-resource-attribute [flags] + flytectl get cluster-resource-attribute [flags] Options ~~~~~~~ @@ -113,5 +113,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst index 1db5d7980c..e027c3f899 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_execution-cluster-label: +.. _flytectl_get_execution-cluster-label: -FlyteCTL get execution-cluster-label +flytectl get execution-cluster-label ------------------------------------ Get matchable resources of execution cluster label. @@ -55,7 +55,7 @@ Usage :: - FlyteCTL get execution-cluster-label [flags] + flytectl get execution-cluster-label [flags] Options ~~~~~~~ @@ -112,5 +112,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst index e56c92e39e..d5fbb275e2 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_execution-queue-attribute: +.. _flytectl_get_execution-queue-attribute: -FlyteCTL get execution-queue-attribute +flytectl get execution-queue-attribute -------------------------------------- Get matchable resources of execution queue attributes @@ -58,7 +58,7 @@ Usage :: - FlyteCTL get execution-queue-attribute [flags] + flytectl get execution-queue-attribute [flags] Options ~~~~~~~ @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution.rst b/flytectl/docs/source/gen/FlyteCTL_get_execution.rst index 714a6ddeae..a727191707 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_execution.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_execution.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_execution: +.. _flytectl_get_execution: -FlyteCTL get execution +flytectl get execution ---------------------- Get execution resources @@ -75,7 +75,7 @@ Usage :: - FlyteCTL get execution [flags] + flytectl get execution [flags] Options ~~~~~~~ @@ -137,5 +137,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst b/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst index 6d2c4fcafa..a8708be99a 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_launchplan: +.. _flytectl_get_launchplan: -FlyteCTL get launchplan +flytectl get launchplan ----------------------- Get launch plan resources @@ -92,7 +92,7 @@ Usage :: - FlyteCTL get launchplan [flags] + flytectl get launchplan [flags] Options ~~~~~~~ @@ -155,5 +155,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst index 30d89032b1..3b99af6a8b 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_plugin-override: +.. _flytectl_get_plugin-override: -FlyteCTL get plugin-override +flytectl get plugin-override ---------------------------- Get matchable resources of plugin override @@ -78,7 +78,7 @@ Usage :: - FlyteCTL get plugin-override [flags] + flytectl get plugin-override [flags] Options ~~~~~~~ @@ -135,5 +135,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_project.rst b/flytectl/docs/source/gen/FlyteCTL_get_project.rst index cad73c12d6..cd967a7ee6 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_project.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_project.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_project: +.. _flytectl_get_project: -FlyteCTL get project +flytectl get project -------------------- Get project resources @@ -48,7 +48,7 @@ Usage :: - FlyteCTL get project [flags] + flytectl get project [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst index 384345cd0c..e27aa5532b 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_task-resource-attribute: +.. _flytectl_get_task-resource-attribute: -FlyteCTL get task-resource-attribute +flytectl get task-resource-attribute ------------------------------------ Get matchable resources of task attributes @@ -60,7 +60,7 @@ Usage :: - FlyteCTL get task-resource-attribute [flags] + flytectl get task-resource-attribute [flags] Options ~~~~~~~ @@ -117,5 +117,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_task.rst b/flytectl/docs/source/gen/FlyteCTL_get_task.rst index cc76eff200..2848c36a2a 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_task.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_task.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_task: +.. _flytectl_get_task: -FlyteCTL get task +flytectl get task ----------------- Get task resources @@ -88,7 +88,7 @@ Usage :: - FlyteCTL get task [flags] + flytectl get task [flags] Options ~~~~~~~ @@ -151,5 +151,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst index 12acb14f89..f3108b567a 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_workflow-execution-config: +.. _flytectl_get_workflow-execution-config: -FlyteCTL get workflow-execution-config +flytectl get workflow-execution-config -------------------------------------- Get matchable resources of workflow execution config @@ -66,7 +66,7 @@ Usage :: - FlyteCTL get workflow-execution-config [flags] + flytectl get workflow-execution-config [flags] Options ~~~~~~~ @@ -123,5 +123,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst b/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst index 6edd90c438..4cb6dd7e71 100644 --- a/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst +++ b/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_get_workflow: +.. _flytectl_get_workflow: -FlyteCTL get workflow +flytectl get workflow --------------------- Get workflow resources @@ -77,7 +77,7 @@ Usage :: - FlyteCTL get workflow [flags] + flytectl get workflow [flags] Options ~~~~~~~ @@ -139,5 +139,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. diff --git a/flytectl/docs/source/gen/FlyteCTL_register.rst b/flytectl/docs/source/gen/FlyteCTL_register.rst index 199911f0fd..5c3200f533 100644 --- a/flytectl/docs/source/gen/FlyteCTL_register.rst +++ b/flytectl/docs/source/gen/FlyteCTL_register.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_register: +.. _flytectl_register: -FlyteCTL register +flytectl register ----------------- Register tasks/workflows/launchplans from a list of generated serialized files. @@ -70,7 +70,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_register_examples` - Register Flytesnacks example -* :doc:`FlyteCTL_register_files` - Register file resources +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_register_examples` - Register Flytesnacks example +* :doc:`flytectl_register_files` - Register file resources diff --git a/flytectl/docs/source/gen/FlyteCTL_register_examples.rst b/flytectl/docs/source/gen/FlyteCTL_register_examples.rst index 06ac0bec81..92d00b3bf1 100644 --- a/flytectl/docs/source/gen/FlyteCTL_register_examples.rst +++ b/flytectl/docs/source/gen/FlyteCTL_register_examples.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_register_examples: +.. _flytectl_register_examples: -FlyteCTL register examples +flytectl register examples -------------------------- Register Flytesnacks example @@ -26,7 +26,7 @@ Usage :: - FlyteCTL register examples [flags] + flytectl register examples [flags] Options ~~~~~~~ @@ -91,5 +91,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/FlyteCTL_register_files.rst b/flytectl/docs/source/gen/FlyteCTL_register_files.rst index b361d481c7..7e73e6d955 100644 --- a/flytectl/docs/source/gen/FlyteCTL_register_files.rst +++ b/flytectl/docs/source/gen/FlyteCTL_register_files.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_register_files: +.. _flytectl_register_files: -FlyteCTL register files +flytectl register files ----------------------- Register file resources @@ -85,7 +85,7 @@ Usage :: - FlyteCTL register files [flags] + flytectl register files [flags] Options ~~~~~~~ @@ -150,5 +150,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox.rst index 05b115d066..34d11c5c93 100644 --- a/flytectl/docs/source/gen/FlyteCTL_sandbox.rst +++ b/flytectl/docs/source/gen/FlyteCTL_sandbox.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_sandbox: +.. _flytectl_sandbox: -FlyteCTL sandbox +flytectl sandbox ---------------- Used for sandbox interactions like start/teardown/status/exec. @@ -89,9 +89,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_sandbox_exec` - Execute non-interactive command inside the sandbox container -* :doc:`FlyteCTL_sandbox_start` - Start the flyte sandbox cluster -* :doc:`FlyteCTL_sandbox_status` - Get status of the sandbox environment. -* :doc:`FlyteCTL_sandbox_teardown` - Teardown cleans up the sandbox environment +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_sandbox_exec` - Execute non-interactive command inside the sandbox container +* :doc:`flytectl_sandbox_start` - Start the Flyte Sandbox cluster +* :doc:`flytectl_sandbox_status` - Get status of the sandbox environment. +* :doc:`flytectl_sandbox_teardown` - Teardown cleans up the sandbox environment diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst index c89b580c0b..aa868e7c19 100644 --- a/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst +++ b/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_sandbox_exec: +.. _flytectl_sandbox_exec: -FlyteCTL sandbox exec +flytectl sandbox exec --------------------- Execute non-interactive command inside the sandbox container @@ -19,7 +19,7 @@ Usage :: - FlyteCTL sandbox exec [flags] + flytectl sandbox exec [flags] Options ~~~~~~~ @@ -75,5 +75,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst index 1b7cd78ed8..8f6feea066 100644 --- a/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst +++ b/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst @@ -1,9 +1,9 @@ -.. _FlyteCTL_sandbox_start: +.. _flytectl_sandbox_start: -FlyteCTL sandbox start +flytectl sandbox start ---------------------- -Start the flyte sandbox cluster +Start the Flyte Sandbox cluster Synopsis ~~~~~~~~ @@ -44,7 +44,7 @@ Usage :: - FlyteCTL sandbox start [flags] + flytectl sandbox start [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst index b61887f15c..2249ab17ee 100644 --- a/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst +++ b/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_sandbox_status: +.. _flytectl_sandbox_status: -FlyteCTL sandbox status +flytectl sandbox status ----------------------- Get status of the sandbox environment. @@ -21,7 +21,7 @@ Usage :: - FlyteCTL sandbox status [flags] + flytectl sandbox status [flags] Options ~~~~~~~ @@ -77,5 +77,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst b/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst index ca2a13d800..ede1979d2f 100644 --- a/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_sandbox_teardown: +.. _flytectl_sandbox_teardown: -FlyteCTL sandbox teardown +flytectl sandbox teardown ------------------------- Teardown cleans up the sandbox environment @@ -21,7 +21,7 @@ Usage :: - FlyteCTL sandbox teardown [flags] + flytectl sandbox teardown [flags] Options ~~~~~~~ @@ -77,5 +77,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. diff --git a/flytectl/docs/source/gen/FlyteCTL_update.rst b/flytectl/docs/source/gen/FlyteCTL_update.rst index a4276dfa44..232876c1d3 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update: +.. _flytectl_update: -FlyteCTL update +flytectl update --------------- Update Flyte resources e.g., project. @@ -72,16 +72,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool -* :doc:`FlyteCTL_update_cluster-resource-attribute` - Update matchable resources of cluster attributes -* :doc:`FlyteCTL_update_execution-cluster-label` - Update matchable resources of execution cluster label -* :doc:`FlyteCTL_update_execution-queue-attribute` - Update matchable resources of execution queue attributes -* :doc:`FlyteCTL_update_launchplan` - Update launch plan status -* :doc:`FlyteCTL_update_launchplan-meta` - Update launch plan metadata -* :doc:`FlyteCTL_update_plugin-override` - Update matchable resources of plugin overrides -* :doc:`FlyteCTL_update_project` - Update project resources -* :doc:`FlyteCTL_update_task-meta` - Update task metadata -* :doc:`FlyteCTL_update_task-resource-attribute` - Update matchable resources of task attributes -* :doc:`FlyteCTL_update_workflow-execution-config` - Update matchable resources of workflow execution config -* :doc:`FlyteCTL_update_workflow-meta` - Update workflow metadata +* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl_update_cluster-resource-attribute` - Update matchable resources of cluster attributes +* :doc:`flytectl_update_execution-cluster-label` - Update matchable resources of execution cluster label +* :doc:`flytectl_update_execution-queue-attribute` - Update matchable resources of execution queue attributes +* :doc:`flytectl_update_launchplan` - Update launch plan status +* :doc:`flytectl_update_launchplan-meta` - Update launch plan metadata +* :doc:`flytectl_update_plugin-override` - Update matchable resources of plugin overrides +* :doc:`flytectl_update_project` - Update project resources +* :doc:`flytectl_update_task-meta` - Update task metadata +* :doc:`flytectl_update_task-resource-attribute` - Update matchable resources of task attributes +* :doc:`flytectl_update_workflow-execution-config` - Update matchable resources of workflow execution config +* :doc:`flytectl_update_workflow-meta` - Update workflow metadata diff --git a/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst index 25b31bb004..b102e6b8aa 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_cluster-resource-attribute: +.. _flytectl_update_cluster-resource-attribute: -FlyteCTL update cluster-resource-attribute +flytectl update cluster-resource-attribute ------------------------------------------ Update matchable resources of cluster attributes @@ -54,7 +54,7 @@ Usage :: - FlyteCTL update cluster-resource-attribute [flags] + flytectl update cluster-resource-attribute [flags] Options ~~~~~~~ @@ -112,5 +112,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst b/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst index 6086db5067..4da8a7c242 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_execution-cluster-label: +.. _flytectl_update_execution-cluster-label: -FlyteCTL update execution-cluster-label +flytectl update execution-cluster-label --------------------------------------- Update matchable resources of execution cluster label @@ -47,7 +47,7 @@ Usage :: - FlyteCTL update execution-cluster-label [flags] + flytectl update execution-cluster-label [flags] Options ~~~~~~~ @@ -105,5 +105,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst index 849b54ab17..9db12f7afb 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_execution-queue-attribute: +.. _flytectl_update_execution-queue-attribute: -FlyteCTL update execution-queue-attribute +flytectl update execution-queue-attribute ----------------------------------------- Update matchable resources of execution queue attributes @@ -58,7 +58,7 @@ Usage :: - FlyteCTL update execution-queue-attribute [flags] + flytectl update execution-queue-attribute [flags] Options ~~~~~~~ @@ -116,5 +116,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst index 26fa58c7b4..b3c11b6d57 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_launchplan-meta: +.. _flytectl_update_launchplan-meta: -FlyteCTL update launchplan-meta +flytectl update launchplan-meta ------------------------------- Update launch plan metadata @@ -30,7 +30,7 @@ Usage :: - FlyteCTL update launchplan-meta [flags] + flytectl update launchplan-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst b/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst index 4213143d3a..b2b64722cb 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_launchplan: +.. _flytectl_update_launchplan: -FlyteCTL update launchplan +flytectl update launchplan -------------------------- Update launch plan status @@ -26,7 +26,7 @@ Usage :: - FlyteCTL update launchplan [flags] + flytectl update launchplan [flags] Options ~~~~~~~ @@ -86,5 +86,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst b/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst index 33c765d247..7a0b81f1a5 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_plugin-override: +.. _flytectl_update_plugin-override: -FlyteCTL update plugin-override +flytectl update plugin-override ------------------------------- Update matchable resources of plugin overrides @@ -60,7 +60,7 @@ Usage :: - FlyteCTL update plugin-override [flags] + flytectl update plugin-override [flags] Options ~~~~~~~ @@ -118,5 +118,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_project.rst b/flytectl/docs/source/gen/FlyteCTL_update_project.rst index 1e13cac8fd..38042f4b9b 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_project.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_project.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_project: +.. _flytectl_update_project: -FlyteCTL update project +flytectl update project ----------------------- Update project resources @@ -45,7 +45,7 @@ Usage :: - FlyteCTL update project [flags] + flytectl update project [flags] Options ~~~~~~~ @@ -104,5 +104,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst index 497f5edf00..45287308ab 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_task-meta: +.. _flytectl_update_task-meta: -FlyteCTL update task-meta +flytectl update task-meta ------------------------- Update task metadata @@ -30,7 +30,7 @@ Usage :: - FlyteCTL update task-meta [flags] + flytectl update task-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst b/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst index 856a267771..fe12a27559 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_task-resource-attribute: +.. _flytectl_update_task-resource-attribute: -FlyteCTL update task-resource-attribute +flytectl update task-resource-attribute --------------------------------------- Update matchable resources of task attributes @@ -60,7 +60,7 @@ Usage :: - FlyteCTL update task-resource-attribute [flags] + flytectl update task-resource-attribute [flags] Options ~~~~~~~ @@ -118,5 +118,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst b/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst index b10ca234a8..66f46455e2 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_workflow-execution-config: +.. _flytectl_update_workflow-execution-config: -FlyteCTL update workflow-execution-config +flytectl update workflow-execution-config ----------------------------------------- Update matchable resources of workflow execution config @@ -50,7 +50,7 @@ Usage :: - FlyteCTL update workflow-execution-config [flags] + flytectl update workflow-execution-config [flags] Options ~~~~~~~ @@ -108,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst b/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst index 1e665e8958..c6dca84ae0 100644 --- a/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_update_workflow-meta: +.. _flytectl_update_workflow-meta: -FlyteCTL update workflow-meta +flytectl update workflow-meta ----------------------------- Update workflow metadata @@ -30,7 +30,7 @@ Usage :: - FlyteCTL update workflow-meta [flags] + flytectl update workflow-meta [flags] Options ~~~~~~~ @@ -90,5 +90,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL_update` - Update Flyte resources e.g., project. +* :doc:`flytectl_update` - Update Flyte resources e.g., project. diff --git a/flytectl/docs/source/gen/FlyteCTL_upgrade.rst b/flytectl/docs/source/gen/FlyteCTL_upgrade.rst index b44d9c5e36..837a27dd4a 100644 --- a/flytectl/docs/source/gen/FlyteCTL_upgrade.rst +++ b/flytectl/docs/source/gen/FlyteCTL_upgrade.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_upgrade: +.. _flytectl_upgrade: -FlyteCTL upgrade +flytectl upgrade ---------------- Upgrade/rollback to a Flyte version @@ -27,7 +27,7 @@ Note: Upgrade is not available on windows. :: - FlyteCTL upgrade [flags] + flytectl upgrade [flags] Options ~~~~~~~ @@ -83,5 +83,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`flytectl` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/gen/FlyteCTL_version.rst b/flytectl/docs/source/gen/FlyteCTL_version.rst index 5748697600..ba7aeb4d94 100644 --- a/flytectl/docs/source/gen/FlyteCTL_version.rst +++ b/flytectl/docs/source/gen/FlyteCTL_version.rst @@ -1,6 +1,6 @@ -.. _FlyteCTL_version: +.. _flytectl_version: -FlyteCTL version +flytectl version ---------------- Fetch Flyte version @@ -18,7 +18,7 @@ For FlyteCTL version, it is: :: - FlyteCTL version [flags] + flytectl version [flags] Options ~~~~~~~ @@ -74,5 +74,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`FlyteCTL` - FlyteCTL CLI tool +* :doc:`flytectl` - FlyteCTL CLI tool diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst index 6adab05fb8..f469b98563 100644 --- a/flytectl/docs/source/launchplan.rst +++ b/flytectl/docs/source/launchplan.rst @@ -1,9 +1,12 @@ Launchplan ------ +It specifies the actions to be performed on the resource 'launchplan'. .. toctree:: :maxdepth: 1 :caption: Launchplan - gen/FlyteCTL_get_launchplan - gen/FlyteCTL_update_launchplan \ No newline at end of file + gen/flytectl_get_launchplan + gen/flytectl_update_launchplan + gen/flytectl_get_launchplan + gen/flytectl_update_launchplan diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index df3082ee2a..c61cfbf640 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -1,7 +1,6 @@ Nouns ------ -Flytectl nouns specify the resource on which the action needs to be performed. -Example of resources include project, workflow, task, execution. +FlyteCTL nouns specify the resource on which the action needs to be performed. Example of resources include project, workflow, task, execution. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/plugin-override.rst b/flytectl/docs/source/plugin-override.rst index 26ebd9e28d..6e77ceb748 100644 --- a/flytectl/docs/source/plugin-override.rst +++ b/flytectl/docs/source/plugin-override.rst @@ -1,10 +1,14 @@ Plugin override ------ +It specifies the actions to be performed on the resource 'plugin-override'. .. toctree:: :maxdepth: 1 :caption: Plugin override - gen/FlyteCTL_get_plugin-override - gen/FlyteCTL_update_plugin-override - gen/FlyteCTL_delete_plugin-override \ No newline at end of file + gen/flytectl_get_plugin-override + gen/flytectl_update_plugin-override + gen/flytectl_delete_plugin-override + gen/flytectl_get_plugin-override + gen/flytectl_update_plugin-override + gen/flytectl_delete_plugin-override diff --git a/flytectl/docs/source/project.rst b/flytectl/docs/source/project.rst index c81e4e785f..ed2f4d2b27 100644 --- a/flytectl/docs/source/project.rst +++ b/flytectl/docs/source/project.rst @@ -1,10 +1,15 @@ Project ------ +It specifies the actions to be performed on the resource 'project'. + .. toctree:: :maxdepth: 1 :caption: Project - gen/FlyteCTL_create_project - gen/FlyteCTL_get_project - gen/FlyteCTL_update_project \ No newline at end of file + gen/flytectl_create_project + gen/flytectl_get_project + gen/flytectl_update_project + gen/flytectl_create_project + gen/flytectl_get_project + gen/flytectl_update_project diff --git a/flytectl/docs/source/sandbox.rst b/flytectl/docs/source/sandbox.rst index 8cacd53ac0..a0fb7b21d8 100644 --- a/flytectl/docs/source/sandbox.rst +++ b/flytectl/docs/source/sandbox.rst @@ -1,11 +1,16 @@ Sandbox ------ +It specifies the actions to be performed on the resource 'sandbox'. .. toctree:: :maxdepth: 1 :caption: Sandbox - gen/FlyteCTL_sandbox_start - gen/FlyteCTL_sandbox_status - gen/FlyteCTL_sandbox_teardown - gen/FlyteCTL_sandbox_exec \ No newline at end of file + gen/flytectl_sandbox_start + gen/flytectl_sandbox_status + gen/flytectl_sandbox_teardown + gen/flytectl_sandbox_exec + gen/flytectl_sandbox_start + gen/flytectl_sandbox_status + gen/flytectl_sandbox_teardown + gen/flytectl_sandbox_exec diff --git a/flytectl/docs/source/task-resource-attribute.rst b/flytectl/docs/source/task-resource-attribute.rst index 95dca187cd..ee827b775b 100644 --- a/flytectl/docs/source/task-resource-attribute.rst +++ b/flytectl/docs/source/task-resource-attribute.rst @@ -1,11 +1,15 @@ Task resource attribute ------ +It specifies the actions to be performed on the resource 'task-resource-attribute'. .. toctree:: :maxdepth: 1 :caption: Task resource attribute - gen/FlyteCTL_get_task-resource-attribute - gen/FlyteCTL_update_task-resource-attribute - gen/FlyteCTL_delete_task-resource-attribute + gen/flytectl_get_task-resource-attribute + gen/flytectl_update_task-resource-attribute + gen/flytectl_delete_task-resource-attribute + gen/flytectl_get_task-resource-attribute + gen/flytectl_update_task-resource-attribute + gen/flytectl_delete_task-resource-attribute diff --git a/flytectl/docs/source/task.rst b/flytectl/docs/source/task.rst index 1cf59495c0..2b19b358d5 100644 --- a/flytectl/docs/source/task.rst +++ b/flytectl/docs/source/task.rst @@ -1,8 +1,10 @@ Task ------ +It specifies the actions to be performed on the resource 'task'. .. toctree:: :maxdepth: 1 :caption: Task - gen/FlyteCTL_get_task \ No newline at end of file + gen/flytectl_get_task + gen/flytectl_get_task diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index 88d4dcefbb..a286d313e6 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -1,18 +1,19 @@ Verbs ------ -Flytectl verbs specify the actions to be performed on the resources. Ex: create, get, update, and delete. +FlyteCTL verbs specify the actions to be performed on the resources. Ex: create, get, update, and delete. + .. toctree:: :maxdepth: 1 :caption: Verbs - gen/FlyteCTL_flytectl_create - gen/FlyteCTL_flytectl_completion - gen/FlyteCTL_flytectl_get - gen/FlyteCTL_flytectl_update - gen/FlyteCTL_delete - gen/FlyteCTL_register - gen/FlyteCTL_config - gen/FlyteCTL_sandbox - gen/FlyteCTL_version - gen/FlyteCTL_upgrade + gen/flytectl_create + gen/flytectl_completion + gen/flytectl_get + gen/flytectl_update + gen/flytectl_delete + gen/flytectl_register + gen/flytectl_config + gen/flytectl_sandbox + gen/flytectl_version + gen/flytectl_upgrade diff --git a/flytectl/docs/source/workflow-execution-config.rst b/flytectl/docs/source/workflow-execution-config.rst index 008864872b..bcca57b854 100644 --- a/flytectl/docs/source/workflow-execution-config.rst +++ b/flytectl/docs/source/workflow-execution-config.rst @@ -1,10 +1,15 @@ Workflow execution config ------ +It specifies the actions to be performed on the resource 'workflow-execution-config'. + .. toctree:: :maxdepth: 1 :caption: Workflow execution config - gen/FlyteCTL_get_workflow-execution-config - gen/FlyteCTL_update_workflow-execution-config - gen/FlyteCTL_delete_workflow-execution-config \ No newline at end of file + gen/flytectl_get_workflow-execution-config + gen/flytectl_update_workflow-execution-config + gen/flytectl_delete_workflow-execution-config + gen/flytectl_get_workflow-execution-config + gen/flytectl_update_workflow-execution-config + gen/flytectl_delete_workflow-execution-config diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst index b37dbad28f..e77bb0f92c 100644 --- a/flytectl/docs/source/workflow.rst +++ b/flytectl/docs/source/workflow.rst @@ -1,8 +1,10 @@ Workflow ------ +It specifies the actions to be performed on the resource 'workflow'. .. toctree:: :maxdepth: 1 :caption: Workflow - gen/FlyteCTL_get_workflow \ No newline at end of file + gen/flytectl_get_workflow + gen/flytectl_get_workflow From 325b1065e01340bd0fd2aaef13416ad955ed7ddd Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Sat, 11 Dec 2021 17:06:33 +0530 Subject: [PATCH 182/356] The rst file names are in upper case (#237) * Update nouns.rst * removed html links Created separate rst file for each noun and referenced it in the nouns.rst file. * Update verbs.rst * Deleted newly added rst files error with codecov, so deleted the newly added rst files. * Delete verbs.rst * Created separate rst files for every resource * Changes to files in cmd folder * Update create_test.go * cmd folders * Update cmd/create/execution.go Co-authored-by: Samhita Alla * Added verbs.rst * changes to cmd folder files /bin removed, * Update based on review * Update cmd/create/project.go Co-authored-by: Samhita Alla * Update cmd/create/create.go Co-authored-by: Samhita Alla * Update cmd/create/create_test.go Co-authored-by: Samhita Alla * Update cmd/delete/delete.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/delete/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Changes to delete - matchable_plugin_override * Changes to .go files in cmd * Changed flytesnack to Flytesnack * Creates to create * Update cmd/get/launch_plan.go Co-authored-by: Samhita Alla * Changed 'launchplan' to 'launch plan' * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/examples.go Co-authored-by: Samhita Alla * Update cmd/register/files.go Co-authored-by: Samhita Alla * Update cmd/register/register.go Co-authored-by: Samhita Alla * Update cmd/register/register_test.go Co-authored-by: Samhita Alla * Update cmd/sandbox/sandbox.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/start.go Co-authored-by: Samhita Alla * Update cmd/sandbox/status.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_cluster_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_cluster_label.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_execution_queue_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_plugin_override.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_workflow_execution_config.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/upgrade/upgrade.go Co-authored-by: Samhita Alla * Update cmd/version/version.go Co-authored-by: Samhita Alla * Update cmd/update/matchable_task_resource_attribute.go Co-authored-by: Samhita Alla * Update cmd/update/update.go Co-authored-by: Samhita Alla * Resolved changes * Changed 'delte' to 'delete' * Updated rst files Created rst files for every noun, and linked the associated verbs with it * Trial * Removed the extra whitespace * Changed 'delte' to 'delete' * Changed 'use' in some cmd folders * Description to rst files * Resolved conflicts * Removed extra spaces * deleted flyte-ctl files * restored flytectl files * deleted one file * Resolved conflicts-2 Co-authored-by: Samhita Alla --- flytectl/docs/source/examples.rst | 1 - flytectl/docs/source/gen/{FlyteCTL.rst => flytectl.rst} | 0 .../gen/{FlyteCTL_completion.rst => flytectl_completion.rst} | 0 .../source/gen/{FlyteCTL_config.rst => flytectl_config.rst} | 0 ...teCTL_config_discover.rst => flytectl_config_discover.rst} | 0 .../{FlyteCTL_config_init.rst => flytectl_config_init.rst} | 0 ...teCTL_config_validate.rst => flytectl_config_validate.rst} | 0 .../source/gen/{FlyteCTL_create.rst => flytectl_create.rst} | 0 ...CTL_create_execution.rst => flytectl_create_execution.rst} | 0 ...lyteCTL_create_project.rst => flytectl_create_project.rst} | 0 .../source/gen/{FlyteCTL_delete.rst => flytectl_delete.rst} | 0 ...ute.rst => flytectl_delete_cluster-resource-attribute.rst} | 0 ...-label.rst => flytectl_delete_execution-cluster-label.rst} | 0 ...bute.rst => flytectl_delete_execution-queue-attribute.rst} | 0 ...CTL_delete_execution.rst => flytectl_delete_execution.rst} | 0 ...lugin-override.rst => flytectl_delete_plugin-override.rst} | 0 ...ribute.rst => flytectl_delete_task-resource-attribute.rst} | 0 ...nfig.rst => flytectl_delete_workflow-execution-config.rst} | 0 .../docs/source/gen/{FlyteCTL_get.rst => flytectl_get.rst} | 0 ...ribute.rst => flytectl_get_cluster-resource-attribute.rst} | 0 ...ter-label.rst => flytectl_get_execution-cluster-label.rst} | 0 ...tribute.rst => flytectl_get_execution-queue-attribute.rst} | 0 ...{FlyteCTL_get_execution.rst => flytectl_get_execution.rst} | 0 ...lyteCTL_get_launchplan.rst => flytectl_get_launchplan.rst} | 0 ...t_plugin-override.rst => flytectl_get_plugin-override.rst} | 0 .../{FlyteCTL_get_project.rst => flytectl_get_project.rst} | 0 ...attribute.rst => flytectl_get_task-resource-attribute.rst} | 0 .../gen/{FlyteCTL_get_task.rst => flytectl_get_task.rst} | 0 ...-config.rst => flytectl_get_workflow-execution-config.rst} | 0 .../{FlyteCTL_get_workflow.rst => flytectl_get_workflow.rst} | 0 .../gen/{FlyteCTL_register.rst => flytectl_register.rst} | 0 ...L_register_examples.rst => flytectl_register_examples.rst} | 0 ...lyteCTL_register_files.rst => flytectl_register_files.rst} | 0 .../source/gen/{FlyteCTL_sandbox.rst => flytectl_sandbox.rst} | 0 .../{FlyteCTL_sandbox_exec.rst => flytectl_sandbox_exec.rst} | 0 ...{FlyteCTL_sandbox_start.rst => flytectl_sandbox_start.rst} | 0 ...lyteCTL_sandbox_status.rst => flytectl_sandbox_status.rst} | 0 ...CTL_sandbox_teardown.rst => flytectl_sandbox_teardown.rst} | 0 .../source/gen/{FlyteCTL_update.rst => flytectl_update.rst} | 0 ...ute.rst => flytectl_update_cluster-resource-attribute.rst} | 0 ...-label.rst => flytectl_update_execution-cluster-label.rst} | 0 ...bute.rst => flytectl_update_execution-queue-attribute.rst} | 0 ...aunchplan-meta.rst => flytectl_update_launchplan-meta.rst} | 0 ...L_update_launchplan.rst => flytectl_update_launchplan.rst} | 0 ...lugin-override.rst => flytectl_update_plugin-override.rst} | 0 ...lyteCTL_update_project.rst => flytectl_update_project.rst} | 0 ...CTL_update_task-meta.rst => flytectl_update_task-meta.rst} | 0 ...ribute.rst => flytectl_update_task-resource-attribute.rst} | 0 ...nfig.rst => flytectl_update_workflow-execution-config.rst} | 0 ...te_workflow-meta.rst => flytectl_update_workflow-meta.rst} | 0 .../source/gen/{FlyteCTL_upgrade.rst => flytectl_upgrade.rst} | 0 .../source/gen/{FlyteCTL_version.rst => flytectl_version.rst} | 0 flytectl/docs/source/project.rst | 3 --- flytectl/docs/source/workflow-execution-config.rst | 4 ---- 54 files changed, 8 deletions(-) rename flytectl/docs/source/gen/{FlyteCTL.rst => flytectl.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_completion.rst => flytectl_completion.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_config.rst => flytectl_config.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_config_discover.rst => flytectl_config_discover.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_config_init.rst => flytectl_config_init.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_config_validate.rst => flytectl_config_validate.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_create.rst => flytectl_create.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_create_execution.rst => flytectl_create_execution.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_create_project.rst => flytectl_create_project.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete.rst => flytectl_delete.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_cluster-resource-attribute.rst => flytectl_delete_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_execution-cluster-label.rst => flytectl_delete_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_execution-queue-attribute.rst => flytectl_delete_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_execution.rst => flytectl_delete_execution.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_plugin-override.rst => flytectl_delete_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_task-resource-attribute.rst => flytectl_delete_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_delete_workflow-execution-config.rst => flytectl_delete_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get.rst => flytectl_get.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_cluster-resource-attribute.rst => flytectl_get_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_execution-cluster-label.rst => flytectl_get_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_execution-queue-attribute.rst => flytectl_get_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_execution.rst => flytectl_get_execution.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_launchplan.rst => flytectl_get_launchplan.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_plugin-override.rst => flytectl_get_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_project.rst => flytectl_get_project.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_task-resource-attribute.rst => flytectl_get_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_task.rst => flytectl_get_task.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_workflow-execution-config.rst => flytectl_get_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_get_workflow.rst => flytectl_get_workflow.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_register.rst => flytectl_register.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_register_examples.rst => flytectl_register_examples.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_register_files.rst => flytectl_register_files.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_sandbox.rst => flytectl_sandbox.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_sandbox_exec.rst => flytectl_sandbox_exec.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_sandbox_start.rst => flytectl_sandbox_start.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_sandbox_status.rst => flytectl_sandbox_status.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_sandbox_teardown.rst => flytectl_sandbox_teardown.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update.rst => flytectl_update.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_cluster-resource-attribute.rst => flytectl_update_cluster-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_execution-cluster-label.rst => flytectl_update_execution-cluster-label.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_execution-queue-attribute.rst => flytectl_update_execution-queue-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_launchplan-meta.rst => flytectl_update_launchplan-meta.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_launchplan.rst => flytectl_update_launchplan.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_plugin-override.rst => flytectl_update_plugin-override.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_project.rst => flytectl_update_project.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_task-meta.rst => flytectl_update_task-meta.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_task-resource-attribute.rst => flytectl_update_task-resource-attribute.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_workflow-execution-config.rst => flytectl_update_workflow-execution-config.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_update_workflow-meta.rst => flytectl_update_workflow-meta.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_upgrade.rst => flytectl_upgrade.rst} (100%) rename flytectl/docs/source/gen/{FlyteCTL_version.rst => flytectl_version.rst} (100%) diff --git a/flytectl/docs/source/examples.rst b/flytectl/docs/source/examples.rst index da62f2988f..b57b7e5965 100644 --- a/flytectl/docs/source/examples.rst +++ b/flytectl/docs/source/examples.rst @@ -8,4 +8,3 @@ It specifies the actions to be performed on the resource 'examples'. gen/flytectl_register_examples - gen/flytectl_register_examples diff --git a/flytectl/docs/source/gen/FlyteCTL.rst b/flytectl/docs/source/gen/flytectl.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL.rst rename to flytectl/docs/source/gen/flytectl.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_completion.rst rename to flytectl/docs/source/gen/flytectl_completion.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_config.rst b/flytectl/docs/source/gen/flytectl_config.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_config.rst rename to flytectl/docs/source/gen/flytectl_config.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_config_discover.rst rename to flytectl/docs/source/gen/flytectl_config_discover.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_config_init.rst rename to flytectl/docs/source/gen/flytectl_config_init.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_config_validate.rst rename to flytectl/docs/source/gen/flytectl_config_validate.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_create.rst b/flytectl/docs/source/gen/flytectl_create.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_create.rst rename to flytectl/docs/source/gen/flytectl_create.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_create_execution.rst rename to flytectl/docs/source/gen/flytectl_create_execution.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_create_project.rst rename to flytectl/docs/source/gen/flytectl_create_project.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete.rst rename to flytectl/docs/source/gen/flytectl_delete.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_execution-cluster-label.rst rename to flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_execution-queue-attribute.rst rename to flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_execution.rst rename to flytectl/docs/source/gen/flytectl_delete_execution.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_plugin-override.rst rename to flytectl/docs/source/gen/flytectl_delete_plugin-override.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_task-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_delete_workflow-execution-config.rst rename to flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get.rst b/flytectl/docs/source/gen/flytectl_get.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get.rst rename to flytectl/docs/source/gen/flytectl_get.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_execution-cluster-label.rst rename to flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_execution-queue-attribute.rst rename to flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_execution.rst rename to flytectl/docs/source/gen/flytectl_get_execution.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_launchplan.rst rename to flytectl/docs/source/gen/flytectl_get_launchplan.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_plugin-override.rst rename to flytectl/docs/source/gen/flytectl_get_plugin-override.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_project.rst rename to flytectl/docs/source/gen/flytectl_get_project.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_task-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_task.rst rename to flytectl/docs/source/gen/flytectl_get_task.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_workflow-execution-config.rst rename to flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_get_workflow.rst rename to flytectl/docs/source/gen/flytectl_get_workflow.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_register.rst b/flytectl/docs/source/gen/flytectl_register.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_register.rst rename to flytectl/docs/source/gen/flytectl_register.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_register_examples.rst rename to flytectl/docs/source/gen/flytectl_register_examples.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_register_files.rst rename to flytectl/docs/source/gen/flytectl_register_files.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_sandbox.rst rename to flytectl/docs/source/gen/flytectl_sandbox.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_sandbox_exec.rst rename to flytectl/docs/source/gen/flytectl_sandbox_exec.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_sandbox_start.rst rename to flytectl/docs/source/gen/flytectl_sandbox_start.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_sandbox_status.rst rename to flytectl/docs/source/gen/flytectl_sandbox_status.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_sandbox_teardown.rst rename to flytectl/docs/source/gen/flytectl_sandbox_teardown.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update.rst b/flytectl/docs/source/gen/flytectl_update.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update.rst rename to flytectl/docs/source/gen/flytectl_update.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_cluster-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_execution-cluster-label.rst rename to flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_execution-queue-attribute.rst rename to flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_launchplan-meta.rst rename to flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_launchplan.rst rename to flytectl/docs/source/gen/flytectl_update_launchplan.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_plugin-override.rst rename to flytectl/docs/source/gen/flytectl_update_plugin-override.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_project.rst rename to flytectl/docs/source/gen/flytectl_update_project.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_task-meta.rst rename to flytectl/docs/source/gen/flytectl_update_task-meta.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_task-resource-attribute.rst rename to flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_workflow-execution-config.rst rename to flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_update_workflow-meta.rst rename to flytectl/docs/source/gen/flytectl_update_workflow-meta.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_upgrade.rst rename to flytectl/docs/source/gen/flytectl_upgrade.rst diff --git a/flytectl/docs/source/gen/FlyteCTL_version.rst b/flytectl/docs/source/gen/flytectl_version.rst similarity index 100% rename from flytectl/docs/source/gen/FlyteCTL_version.rst rename to flytectl/docs/source/gen/flytectl_version.rst diff --git a/flytectl/docs/source/project.rst b/flytectl/docs/source/project.rst index ed2f4d2b27..b98d7909c2 100644 --- a/flytectl/docs/source/project.rst +++ b/flytectl/docs/source/project.rst @@ -10,6 +10,3 @@ It specifies the actions to be performed on the resource 'project'. gen/flytectl_create_project gen/flytectl_get_project gen/flytectl_update_project - gen/flytectl_create_project - gen/flytectl_get_project - gen/flytectl_update_project diff --git a/flytectl/docs/source/workflow-execution-config.rst b/flytectl/docs/source/workflow-execution-config.rst index bcca57b854..0ae96cbb87 100644 --- a/flytectl/docs/source/workflow-execution-config.rst +++ b/flytectl/docs/source/workflow-execution-config.rst @@ -2,7 +2,6 @@ Workflow execution config ------ It specifies the actions to be performed on the resource 'workflow-execution-config'. - .. toctree:: :maxdepth: 1 :caption: Workflow execution config @@ -10,6 +9,3 @@ It specifies the actions to be performed on the resource 'workflow-execution-con gen/flytectl_get_workflow-execution-config gen/flytectl_update_workflow-execution-config gen/flytectl_delete_workflow-execution-config - gen/flytectl_get_workflow-execution-config - gen/flytectl_update_workflow-execution-config - gen/flytectl_delete_workflow-execution-config From 2766c18b2abe4f91ca5d7fa618f3f0656375c74d Mon Sep 17 00:00:00 2001 From: Nishant Mittal Date: Sat, 11 Dec 2021 18:22:26 +0530 Subject: [PATCH 183/356] #minor feat: pagination support for get commands (#234) * feat: pagination support for get commands Signed-off-by: Nishant Mittal --- .../subcommand/execution/config_flags.go | 1 + .../subcommand/execution/config_flags_test.go | 14 ++++++++++++++ .../subcommand/launchplan/config_flags.go | 1 + .../launchplan/config_flags_test.go | 14 ++++++++++++++ .../config/subcommand/project/config_flags.go | 1 + .../subcommand/project/config_flags_test.go | 14 ++++++++++++++ .../config/subcommand/task/config_flags.go | 1 + .../subcommand/task/config_flags_test.go | 14 ++++++++++++++ .../subcommand/workflow/config_flags.go | 1 + .../subcommand/workflow/config_flags_test.go | 14 ++++++++++++++ flytectl/cmd/get/execution.go | 14 +++++++++----- flytectl/cmd/get/launch_plan.go | 18 +++++++++++------- flytectl/cmd/get/project.go | 11 ++++++++--- flytectl/cmd/get/task.go | 19 ++++++++++++------- flytectl/cmd/get/workflow.go | 15 ++++++++++----- flytectl/pkg/filters/type.go | 7 ++++--- flytectl/pkg/filters/util.go | 12 ++++++++++++ flytectl/pkg/filters/util_test.go | 3 +++ 18 files changed, 144 insertions(+), 30 deletions(-) diff --git a/flytectl/cmd/config/subcommand/execution/config_flags.go b/flytectl/cmd/config/subcommand/execution/config_flags.go index 7f07f23bf7..9f47f721f9 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags.go @@ -54,6 +54,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") cmdFlags.BoolVar(&DefaultConfig.Details, fmt.Sprintf("%v%v", prefix, "details"), DefaultConfig.Details, "gets node execution details. Only applicable for single execution name i.e get execution name --details") cmdFlags.StringVar(&DefaultConfig.NodeID, fmt.Sprintf("%v%v", prefix, "nodeID"), DefaultConfig.NodeID, "get task executions for given node name.") return cmdFlags diff --git a/flytectl/cmd/config/subcommand/execution/config_flags_test.go b/flytectl/cmd/config/subcommand/execution/config_flags_test.go index 57fc69dd42..ea72babe75 100755 --- a/flytectl/cmd/config/subcommand/execution/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/execution/config_flags_test.go @@ -155,6 +155,20 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_filter.page", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.page", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.page"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Page) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_details", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags.go b/flytectl/cmd/config/subcommand/launchplan/config_flags.go index e41777eebc..3348bff7ee 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags.go @@ -57,5 +57,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go index d2ccb2715d..afcd0597dd 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go @@ -197,4 +197,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_filter.page", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.page", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.page"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Page) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/project/config_flags.go b/flytectl/cmd/config/subcommand/project/config_flags.go index ca18dca630..ec92b98635 100755 --- a/flytectl/cmd/config/subcommand/project/config_flags.go +++ b/flytectl/cmd/config/subcommand/project/config_flags.go @@ -54,5 +54,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/project/config_flags_test.go b/flytectl/cmd/config/subcommand/project/config_flags_test.go index 52668bcf14..78bd4ca726 100755 --- a/flytectl/cmd/config/subcommand/project/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/project/config_flags_test.go @@ -155,4 +155,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_filter.page", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.page", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.page"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Page) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/task/config_flags.go b/flytectl/cmd/config/subcommand/task/config_flags.go index 3138439017..ee181f076f 100755 --- a/flytectl/cmd/config/subcommand/task/config_flags.go +++ b/flytectl/cmd/config/subcommand/task/config_flags.go @@ -57,5 +57,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/task/config_flags_test.go b/flytectl/cmd/config/subcommand/task/config_flags_test.go index 844d031a5a..52651e144c 100755 --- a/flytectl/cmd/config/subcommand/task/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/task/config_flags_test.go @@ -197,4 +197,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_filter.page", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.page", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.page"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Page) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags.go b/flytectl/cmd/config/subcommand/workflow/config_flags.go index 29bc7fca54..f0f1064aff 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags.go @@ -56,5 +56,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Filter.SortBy, fmt.Sprintf("%v%v", prefix, "filter.sortBy"), DefaultConfig.Filter.SortBy, "Specifies which field to sort results ") cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") + cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go index 4011d8e4f3..46d13aeb87 100755 --- a/flytectl/cmd/config/subcommand/workflow/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflow/config_flags_test.go @@ -183,4 +183,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_filter.page", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("filter.page", testValue) + if vInt32, err := cmdFlags.GetInt32("filter.page"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vInt32), &actual.Filter.Page) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 3dcf3f34ae..9f8f6a66d7 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -30,15 +30,19 @@ Retrieve executions by name within the project and domain: Retrieve all the executions with filters: :: - - flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" - + flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + + Retrieve executions as per the specified limit and sorting parameters: :: - + flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc - + +Retrieves all the executions on other pages. +:: + + flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 Retrieve executions within the project and domain in YAML format: diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 531504d41c..d228ed3459 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -42,20 +42,24 @@ Retrieve a particular version of the launch plan by name within the project and Retrieve all the launch plans with filters: :: - + flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" - + Retrieve launch plans entity search across all versions with filters: :: - + flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" - - + + Retrieve all the launch plans with limit and sorting: :: - + flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc - + +Retrieves all the launch plans on other pages. +:: + + flytectl get -p flytesnacks -d development launchplan --filter.limit=10 --filter.page=2 Retrieve all launch plans within the project and domain in YAML format: diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 4912d4b5fc..2718a54a9c 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -30,14 +30,19 @@ Retrieve project by name: Retrieve all the projects with filters: :: - + flytectl get project --filter.fieldSelector="project.name=flytesnacks" - + Retrieve all the projects with limit and sorting: :: - + flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieves all the projects on other pages. +:: + + flytectl get project --filter.limit=10 --filter.page=2 + Retrieve all the projects in yaml format: :: diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index c1f103dea4..43eec8b1a3 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -41,19 +41,24 @@ Retrieve particular version of task by name within project and domain: Retrieve all the tasks with filters: :: - - flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" - + + flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + Retrieve a specific task with filters: :: - - flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" - + + flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + Retrieve all the tasks with limit and sorting: :: - + flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieves all the task on other pages. +:: + + flytectl get -p flytesnacks -d development task --filter.limit=10 --filter.page=2 + Retrieve all the tasks within project and domain in yaml format: :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 0b80e652e3..5d3c7364b9 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -43,19 +43,24 @@ Retrieve particular version of workflow by name within project and domain: Retrieve all the workflows with filters: :: - + flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" - + Retrieve specific workflow with filters: :: - + flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" - + Retrieve all the workflows with limit and sorting: :: - + flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieves all the workflows on other pages. +:: + + flytectl get -p flytesnacks -d development workflow --filter.limit=10 --filter.page 2 + Retrieve all the workflows within project and domain in yaml format: :: diff --git a/flytectl/pkg/filters/type.go b/flytectl/pkg/filters/type.go index 6dabc0904d..1a46a4fa2c 100644 --- a/flytectl/pkg/filters/type.go +++ b/flytectl/pkg/filters/type.go @@ -4,6 +4,7 @@ var ( DefaultLimit int32 = 100 DefaultFilter = Filters{ Limit: DefaultLimit, + Page: 1, SortBy: "created_at", Asc: false, } @@ -12,7 +13,7 @@ var ( type Filters struct { FieldSelector string `json:"fieldSelector" pflag:",Specifies the Field selector"` SortBy string `json:"sortBy" pflag:",Specifies which field to sort results "` - // TODO: Support paginated queries - Limit int32 `json:"limit" pflag:",Specifies the limit"` - Asc bool `json:"asc" pflag:",Specifies the sorting order. By default flytectl sort result in descending order"` + Limit int32 `json:"limit" pflag:",Specifies the limit"` + Asc bool `json:"asc" pflag:",Specifies the sorting order. By default flytectl sort result in descending order"` + Page int32 `json:"page" pflag:",Specifies the page number, in case there are multiple pages of results"` } diff --git a/flytectl/pkg/filters/util.go b/flytectl/pkg/filters/util.go index 2c2515326a..6d2501e4d5 100644 --- a/flytectl/pkg/filters/util.go +++ b/flytectl/pkg/filters/util.go @@ -1,6 +1,8 @@ package filters import ( + "strconv" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) @@ -11,6 +13,7 @@ func BuildResourceListRequestWithName(c Filters, project, domain, name string) ( } request := &admin.ResourceListRequest{ Limit: uint32(c.Limit), + Token: getToken(c), Filters: fieldSelector, Id: &admin.NamedEntityIdentifier{ Project: project, @@ -33,6 +36,7 @@ func BuildProjectListRequest(c Filters) (*admin.ProjectListRequest, error) { } request := &admin.ProjectListRequest{ Limit: uint32(c.Limit), + Token: getToken(c), Filters: fieldSelector, SortBy: buildSortingRequest(c), } @@ -52,3 +56,11 @@ func buildSortingRequest(c Filters) *admin.Sort { } return nil } + +func getToken(c Filters) string { + token := int(c.Page-1) * int(c.Limit) + if token <= 0 { + return "" + } + return strconv.Itoa(token) +} diff --git a/flytectl/pkg/filters/util_test.go b/flytectl/pkg/filters/util_test.go index 6edcc79786..98cb98985c 100644 --- a/flytectl/pkg/filters/util_test.go +++ b/flytectl/pkg/filters/util_test.go @@ -47,11 +47,13 @@ func TestProjectListRequestFunc(t *testing.T) { config.GetConfig().Domain = domain filter := Filters{ Limit: 100, + Page: 2, SortBy: "created_at", } request, err := BuildProjectListRequest(filter) expectedResponse := &admin.ProjectListRequest{ Limit: 100, + Token: "100", Filters: "", SortBy: &admin.Sort{ Key: "created_at", @@ -80,6 +82,7 @@ func TestListRequestWithNameFunc(t *testing.T) { filter := Filters{ Limit: 100, SortBy: "created_at", + Page: 1, } request, err := BuildResourceListRequestWithName(filter, project, domain, name) expectedResponse := &admin.ResourceListRequest{ From cb3193a78fe45c84db415141f6953e63eec29177 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Sun, 12 Dec 2021 23:49:21 -0800 Subject: [PATCH 184/356] Update documentation (#239) * Update documentation Signed-off-by: Flyte-Bot * update Signed-off-by: Samhita Alla * make gendocs Signed-off-by: Samhita Alla Co-authored-by: evalsocket Co-authored-by: Samhita Alla --- flytectl/cmd/get/execution.go | 3 ++- flytectl/cmd/get/launch_plan.go | 2 +- flytectl/cmd/get/project.go | 2 +- flytectl/cmd/get/task.go | 2 +- flytectl/cmd/get/workflow.go | 2 +- .../source/gen/flytectl_get_execution.rst | 16 ++++++++++----- .../source/gen/flytectl_get_launchplan.rst | 19 +++++++++++------- .../docs/source/gen/flytectl_get_project.rst | 12 ++++++++--- .../docs/source/gen/flytectl_get_task.rst | 20 ++++++++++++------- .../docs/source/gen/flytectl_get_workflow.rst | 16 ++++++++++----- 10 files changed, 62 insertions(+), 32 deletions(-) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 9f8f6a66d7..3c53b714b2 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -39,7 +39,8 @@ Retrieve executions as per the specified limit and sorting parameters: flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the executions on other pages. +Retrieve executions present in other pages by specifying the limit and page number: + :: flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index d228ed3459..1700f4c04e 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -56,7 +56,7 @@ Retrieve all the launch plans with limit and sorting: flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the launch plans on other pages. +Retrieve launch plans present in other pages by specifying the limit and page number: :: flytectl get -p flytesnacks -d development launchplan --filter.limit=10 --filter.page=2 diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 2718a54a9c..8855b020b2 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -38,7 +38,7 @@ Retrieve all the projects with limit and sorting: flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the projects on other pages. +Retrieve projects present in other pages by specifying the limit and page number: :: flytectl get project --filter.limit=10 --filter.page=2 diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 43eec8b1a3..dfb03c337c 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -54,7 +54,7 @@ Retrieve all the tasks with limit and sorting: flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the task on other pages. +Retrieve tasks present in other pages by specifying the limit and page number: :: flytectl get -p flytesnacks -d development task --filter.limit=10 --filter.page=2 diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 5d3c7364b9..1a51974b75 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -56,7 +56,7 @@ Retrieve all the workflows with limit and sorting: flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieves all the workflows on other pages. +Retrieve workflows present in other pages by specifying the limit and page number: :: flytectl get -p flytesnacks -d development workflow --filter.limit=10 --filter.page 2 diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index a727191707..0d6a903604 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -23,15 +23,20 @@ Retrieve executions by name within the project and domain: Retrieve all the executions with filters: :: - - flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" - + flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" + + Retrieve executions as per the specified limit and sorting parameters: :: - + flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc - + +Retrieve executions present in other pages by specifying the limit and page number: + +:: + + flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 Retrieve executions within the project and domain in YAML format: @@ -86,6 +91,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) + --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for execution --nodeID string get task executions for given node name. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index a8708be99a..2876f26774 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -36,20 +36,24 @@ Retrieve a particular version of the launch plan by name within the project and Retrieve all the launch plans with filters: :: - + flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" - + Retrieve launch plans entity search across all versions with filters: :: - + flytectl get launchplan -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="version=v1" - - + + Retrieve all the launch plans with limit and sorting: :: - + flytectl get launchplan -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc - + +Retrieve launch plans present in other pages by specifying the limit and page number: +:: + + flytectl get -p flytesnacks -d development launchplan --filter.limit=10 --filter.page=2 Retrieve all launch plans within the project and domain in YAML format: @@ -103,6 +107,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) + --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for launchplan --latest flag to indicate to fetch the latest version, version flag will be ignored in this case diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index cd967a7ee6..c68aa1b6d4 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -23,14 +23,19 @@ Retrieve project by name: Retrieve all the projects with filters: :: - + flytectl get project --filter.fieldSelector="project.name=flytesnacks" - + Retrieve all the projects with limit and sorting: :: - + flytectl get project --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieve projects present in other pages by specifying the limit and page number: +:: + + flytectl get project --filter.limit=10 --filter.page=2 + Retrieve all the projects in yaml format: :: @@ -58,6 +63,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) + --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for project diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 2848c36a2a..0b7d3d461f 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -35,19 +35,24 @@ Retrieve particular version of task by name within project and domain: Retrieve all the tasks with filters: :: - - flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" - + + flytectl get task -p flytesnacks -d development --filter.fieldSelector="task.name=k8s_spark.pyspark_pi.print_every_time,task.version=v1" + Retrieve a specific task with filters: :: - - flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" - + + flytectl get task -p flytesnacks -d development k8s_spark.pyspark_pi.print_every_time --filter.fieldSelector="task.version=v1,created_at>=2021-05-24T21:43:12.325335Z" + Retrieve all the tasks with limit and sorting: :: - + flytectl get -p flytesnacks -d development task --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieve tasks present in other pages by specifying the limit and page number: +:: + + flytectl get -p flytesnacks -d development task --filter.limit=10 --filter.page=2 + Retrieve all the tasks within project and domain in yaml format: :: @@ -99,6 +104,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) + --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for task --latest flag to indicate to fetch the latest version, version flag will be ignored in this case diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 4cb6dd7e71..d89e372bb1 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -35,19 +35,24 @@ Retrieve particular version of workflow by name within project and domain: Retrieve all the workflows with filters: :: - + flytectl get workflow -p flytesnacks -d development --filter.fieldSelector="workflow.name=k8s_spark.dataframe_passing.my_smart_schema" - + Retrieve specific workflow with filters: :: - + flytectl get workflow -p flytesnacks -d development k8s_spark.dataframe_passing.my_smart_schema --filter.fieldSelector="workflow.version=v1" - + Retrieve all the workflows with limit and sorting: :: - + flytectl get -p flytesnacks -d development workflow --filter.sortBy=created_at --filter.limit=1 --filter.asc +Retrieve workflows present in other pages by specifying the limit and page number: +:: + + flytectl get -p flytesnacks -d development workflow --filter.limit=10 --filter.page 2 + Retrieve all the workflows within project and domain in yaml format: :: @@ -87,6 +92,7 @@ Options --filter.asc Specifies the sorting order. By default flytectl sort result in descending order --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) + --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) --filter.sortBy string Specifies which field to sort results (default "created_at") -h, --help help for workflow --latest flag to indicate to fetch the latest version, version flag will be ignored in this case From da9d46764143063c12d7a7869b9b8495e869c757 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Sat, 18 Dec 2021 09:06:43 +0000 Subject: [PATCH 185/356] fix: doc-requirements.txt to reduce vulnerabilities (#240) The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-LXML-2316995 Signed-off-by: Yuvraj --- flytectl/doc-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index e3c954b328..36f0a08186 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -31,7 +31,7 @@ imagesize==1.2.0 # via sphinx jinja2==3.0.1 # via sphinx -lxml==4.6.3 +lxml==4.6.5 # via sphinx-material markupsafe==2.0.1 # via jinja2 From 2d93fcfabafdf0a569e48f6c91df514e26464e5e Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 21 Dec 2021 21:14:02 +0800 Subject: [PATCH 186/356] Update sandbox default config in the docs (#243) Signed-off-by: Kevin Su --- flytectl/docs/source/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 4ea8589032..47dcb78db1 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -1,7 +1,7 @@ .. flytectl doc ###################### -``Flytectl`` Reference +Flytectl Reference ###################### Overview @@ -59,7 +59,7 @@ Flytectl configuration admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 - insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment) authType: Pkce # authType: Pkce # if using authentication or just drop this. storage: connection: From 51226d564b39b0bb366c4f71586c1071526f9e7b Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 22 Dec 2021 21:11:46 +0530 Subject: [PATCH 187/356] Fixed the version bug and also added force flag (#246) Signed-off-by: Prafulla Mahindrakar --- .../subcommand/register/files_config.go | 3 +- .../subcommand/register/filesconfig_flags.go | 3 +- .../register/filesconfig_flags_test.go | 14 +++++++ flytectl/cmd/register/register_util.go | 41 ++++++++++--------- flytectl/cmd/register/register_util_test.go | 4 +- 5 files changed, 41 insertions(+), 24 deletions(-) diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index 9c17c958c8..0db9aa6102 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -11,7 +11,8 @@ var ( // FilesConfig containing flags used for registration type FilesConfig struct { - Version string `json:"version" pflag:",version of the entity to be registered with flyte."` + Version string `json:"version" pflag:",version of the entity to be registered with flyte which are un-versioned after serialization."` + Force bool `json:"force" pflag:",force use of version number on entities registered with flyte."` ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` AssumableIamRole string `json:"assumableIamRole" pflag:", custom assumable iam auth role to register launch plans with."` diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index 5727138104..7e196e89d5 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -50,7 +50,8 @@ func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultFilesConfig.Version, "version of the entity to be registered with flyte.") + cmdFlags.StringVar(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultFilesConfig.Version, "version of the entity to be registered with flyte which are un-versioned after serialization.") + cmdFlags.BoolVar(&DefaultFilesConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultFilesConfig.Force, "force use of version number on entities registered with flyte.") cmdFlags.BoolVar(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") cmdFlags.BoolVar(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") cmdFlags.StringVar(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), DefaultFilesConfig.AssumableIamRole, " custom assumable iam auth role to register launch plans with.") diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 6f46245d9f..024bb0783b 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -113,6 +113,20 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_continueOnError", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 2e8d3cf6e8..de2ce65de5 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -97,7 +97,7 @@ func unMarshalContents(ctx context.Context, fileContents []byte, fname string) ( } -func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun bool, version string) error { +func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun bool) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) @@ -112,7 +112,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: launchPlan.Id.Name, - Version: version, + Version: launchPlan.Id.Version, }, Spec: launchPlan.Spec, }) @@ -130,7 +130,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: workflowSpec.Template.Id.Name, - Version: version, + Version: workflowSpec.Template.Id.Version, }, Spec: workflowSpec, }) @@ -148,7 +148,7 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: taskSpec.Template.Id.Name, - Version: version, + Version: taskSpec.Template.Id.Version, }, Spec: taskSpec, }) @@ -158,33 +158,33 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command } } -func hydrateNode(node *core.Node, version string) error { +func hydrateNode(node *core.Node, version string, force bool) error { targetNode := node.Target switch v := targetNode.(type) { case *core.Node_TaskNode: taskNodeWrapper := targetNode.(*core.Node_TaskNode) taskNodeReference := taskNodeWrapper.TaskNode.Reference.(*core.TaskNode_ReferenceId) - hydrateIdentifier(taskNodeReference.ReferenceId, version) + hydrateIdentifier(taskNodeReference.ReferenceId, version, force) case *core.Node_WorkflowNode: workflowNodeWrapper := targetNode.(*core.Node_WorkflowNode) switch workflowNodeWrapper.WorkflowNode.Reference.(type) { case *core.WorkflowNode_SubWorkflowRef: subWorkflowNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_SubWorkflowRef) - hydrateIdentifier(subWorkflowNodeReference.SubWorkflowRef, version) + hydrateIdentifier(subWorkflowNodeReference.SubWorkflowRef, version, force) case *core.WorkflowNode_LaunchplanRef: launchPlanNodeReference := workflowNodeWrapper.WorkflowNode.Reference.(*core.WorkflowNode_LaunchplanRef) - hydrateIdentifier(launchPlanNodeReference.LaunchplanRef, version) + hydrateIdentifier(launchPlanNodeReference.LaunchplanRef, version, force) default: return fmt.Errorf("unknown type %T", workflowNodeWrapper.WorkflowNode.Reference) } case *core.Node_BranchNode: branchNodeWrapper := targetNode.(*core.Node_BranchNode) - if err := hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode, version); err != nil { + if err := hydrateNode(branchNodeWrapper.BranchNode.IfElse.Case.ThenNode, version, force); err != nil { return fmt.Errorf("failed to hydrateNode") } if len(branchNodeWrapper.BranchNode.IfElse.Other) > 0 { for _, ifBlock := range branchNodeWrapper.BranchNode.IfElse.Other { - if err := hydrateNode(ifBlock.ThenNode, version); err != nil { + if err := hydrateNode(ifBlock.ThenNode, version, force); err != nil { return fmt.Errorf("failed to hydrateNode") } } @@ -192,7 +192,7 @@ func hydrateNode(node *core.Node, version string) error { switch branchNodeWrapper.BranchNode.IfElse.Default.(type) { case *core.IfElseBlock_ElseNode: elseNodeReference := branchNodeWrapper.BranchNode.IfElse.Default.(*core.IfElseBlock_ElseNode) - if err := hydrateNode(elseNodeReference.ElseNode, version); err != nil { + if err := hydrateNode(elseNodeReference.ElseNode, version, force); err != nil { return fmt.Errorf("failed to hydrateNode") } @@ -207,14 +207,14 @@ func hydrateNode(node *core.Node, version string) error { return nil } -func hydrateIdentifier(identifier *core.Identifier, version string) { +func hydrateIdentifier(identifier *core.Identifier, version string, force bool) { if identifier.Project == "" || identifier.Project == registrationProjectPattern { identifier.Project = config.GetConfig().Project } if identifier.Domain == "" || identifier.Domain == registrationDomainPattern { identifier.Domain = config.GetConfig().Domain } - if identifier.Version == "" || identifier.Version == registrationVersionPattern { + if force || identifier.Version == "" || identifier.Version == registrationVersionPattern { identifier.Version = version } } @@ -315,29 +315,30 @@ func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesC switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) - hydrateIdentifier(launchPlan.Spec.WorkflowId, config.Version) + hydrateIdentifier(launchPlan.Id, config.Version, config.Force) + hydrateIdentifier(launchPlan.Spec.WorkflowId, config.Version, config.Force) if err := hydrateLaunchPlanSpec(config.AssumableIamRole, config.K8sServiceAccount, config.OutputLocationPrefix, launchPlan.Spec); err != nil { return err } case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) for _, Noderef := range workflowSpec.Template.Nodes { - if err := hydrateNode(Noderef, config.Version); err != nil { + if err := hydrateNode(Noderef, config.Version, config.Force); err != nil { return err } } - hydrateIdentifier(workflowSpec.Template.Id, config.Version) + hydrateIdentifier(workflowSpec.Template.Id, config.Version, config.Force) for _, subWorkflow := range workflowSpec.SubWorkflows { for _, Noderef := range subWorkflow.Nodes { - if err := hydrateNode(Noderef, config.Version); err != nil { + if err := hydrateNode(Noderef, config.Version, config.Force); err != nil { return err } } - hydrateIdentifier(subWorkflow.Id, config.Version) + hydrateIdentifier(subWorkflow.Id, config.Version, config.Force) } case *admin.TaskSpec: taskSpec := message.(*admin.TaskSpec) - hydrateIdentifier(taskSpec.Template.Id, config.Version) + hydrateIdentifier(taskSpec.Template.Id, config.Version, config.Force) // In case of fast serialize input proto also have on additional variable to substitute i.e destination bucket for source code if err := hydrateTaskSpec(taskSpec, sourceCode, config.SourceUploadPath, config.Version); err != nil { return err @@ -465,7 +466,7 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) - if err := register(ctx, spec, cmdCtx, config.DryRun, config.Version); err != nil { + if err := register(ctx, spec, cmdCtx, config.DryRun); err != nil { // If error is AlreadyExists then dont consider this to be an error but just a warning state if grpcError := status.Code(err); grpcError == codes.AlreadyExists { registerResult = Result{Name: fileName, Status: "Success", Info: fmt.Sprintf("%v", grpcError.String())} diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index fcbff5a802..eb53ab32f7 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -478,7 +478,7 @@ func TestRegister(t *testing.T) { setup() registerFilesSetup() node := &admin.NodeExecution{} - err := register(ctx, node, cmdCtx, rconfig.DefaultFilesConfig.DryRun, rconfig.DefaultFilesConfig.Version) + err := register(ctx, node, cmdCtx, rconfig.DefaultFilesConfig.DryRun) assert.NotNil(t, err) }) } @@ -488,7 +488,7 @@ func TestHydrateNode(t *testing.T) { setup() registerFilesSetup() node := &core.Node{} - err := hydrateNode(node, rconfig.DefaultFilesConfig.Version) + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) assert.NotNil(t, err) }) From 04d2c53009d94e869031b81c16c131fea89ca788 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 22 Dec 2021 08:08:44 -0800 Subject: [PATCH 188/356] Update documentation (#247) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_register_examples.rst | 3 ++- flytectl/docs/source/gen/flytectl_register_files.rst | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 92d00b3bf1..323c62e0af 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -37,12 +37,13 @@ Options --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. --dryRun execute command without making any modifications. + --force force use of version number on entities registered with flyte. -h, --help help for examples --k8ServiceAccount string deprecated. Please use --K8sServiceAccount --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte. + --version string version of the entity to be registered with flyte which are un-versioned after serialization. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 7e73e6d955..8ccc1a91a7 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -96,12 +96,13 @@ Options --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. --dryRun execute command without making any modifications. + --force force use of version number on entities registered with flyte. -h, --help help for files --k8ServiceAccount string deprecated. Please use --K8sServiceAccount --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte. + --version string version of the entity to be registered with flyte which are un-versioned after serialization. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From d087f3552adf4c682ab54ad726d29b4ca2d6f6f4 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 27 Dec 2021 18:42:45 +0530 Subject: [PATCH 189/356] Improve flytectl config init UX (#241) * Fix flytectl ux issue Signed-off-by: Yuvraj --- .../config/subcommand/config/init_flags.go | 2 +- flytectl/cmd/configuration/configuration.go | 51 ++++++++++++++++--- .../cmd/configuration/configuration_test.go | 18 ++++++- 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index 029b92baf4..cb2047dec6 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -3,7 +3,7 @@ package config //go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( DefaultConfig = &Config{ - Insecure: true, + Insecure: false, Storage: false, } ) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index cbf0b8bf36..bdc2fe83a1 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -2,9 +2,12 @@ package configuration import ( "context" + "errors" "fmt" "io" + "net" "os" + "regexp" "strings" "github.com/flyteorg/flytestdlib/logger" @@ -31,18 +34,24 @@ Generates sandbox config. Flyte Sandbox is a fully standalone minimal environmen :: - flytectl configuration config + flytectl config init -Generates remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html :: - flytectl configuration config --host=flyte.myexample.com - + flytectl config init --host=flyte.myexample.com + +Generates remote cluster config with insecure connection + +:: + + flytectl config init --host=flyte.myexample.com --insecure + Generates FlyteCTL config with a storage provider :: - flytectl configuration config --host=flyte.myexample.com --storage + flytectl config init --host=flyte.myexample.com --storage ` ) @@ -51,6 +60,8 @@ var prompt = promptui.Select{ Items: []string{"S3", "GCS"}, } +var endpointPrefix = [3]string{"dns://", "http://", "https://"} + // CreateConfigCommand will return configuration command func CreateConfigCommand() *cobra.Command { configCmd := viper.GetConfigCommand() @@ -77,12 +88,18 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { templateValues := configutil.ConfigTemplateSpec{ Host: "dns:///localhost:30081", - Insecure: initConfig.DefaultConfig.Insecure, + Insecure: true, } templateStr := configutil.GetSandboxTemplate() if len(initConfig.DefaultConfig.Host) > 0 { - templateValues.Host = fmt.Sprintf("dns:///%v", initConfig.DefaultConfig.Host) + trimHost := trim(initConfig.DefaultConfig.Host) + host := strings.Split(trimHost, ":") + if !validateEndpointName(host[0]) { + return errors.New("Please use a valid endpoint") + } + templateValues.Host = fmt.Sprintf("dns://%s", trimHost) + templateValues.Insecure = initConfig.DefaultConfig.Insecure templateStr = configutil.AdminConfigTemplate if initConfig.DefaultConfig.Storage { templateStr = configutil.GetAWSCloudTemplate() @@ -114,3 +131,23 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { fmt.Printf("Init flytectl config file at [%s]", configutil.ConfigFile) return nil } + +func trim(hostname string) string { + for _, prefix := range endpointPrefix { + hostname = strings.TrimPrefix(hostname, prefix) + } + return hostname + +} + +func validateEndpointName(domain string) bool { + RegExp := regexp.MustCompile(`^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z + ]{2,3})$`) + if RegExp.MatchString(domain) || domain == "localhost" { + return true + } + if net.ParseIP(domain) == nil { + return false + } + return true +} diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 5e84f00505..ce2d2ca1bf 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -56,8 +56,24 @@ func TestSetupConfigFunc(t *testing.T) { assert.Nil(t, initFlytectlConfig(ctx, yes)) assert.Nil(t, initFlytectlConfig(ctx, yes)) assert.Nil(t, initFlytectlConfig(ctx, no)) - initConfig.DefaultConfig.Host = "test" + initConfig.DefaultConfig.Host = "flyte.org" + assert.Nil(t, initFlytectlConfig(ctx, no)) + initConfig.DefaultConfig.Host = "localhost:30081" assert.Nil(t, initFlytectlConfig(ctx, no)) initConfig.DefaultConfig.Storage = true assert.NotNil(t, initFlytectlConfig(ctx, yes)) } + +func TestTrimFunc(t *testing.T) { + assert.Equal(t, trim("dns://localhost"), "localhost") + assert.Equal(t, trim("http://localhost"), "localhost") + assert.Equal(t, trim("https://localhost"), "localhost") +} + +func TestValidateEndpointName(t *testing.T) { + assert.Equal(t, validateEndpointName("127.0.0.1"), true) + assert.Equal(t, validateEndpointName("127.0.0.1.0"), false) + assert.Equal(t, validateEndpointName("localhost"), true) + assert.Equal(t, validateEndpointName("flyte.org"), true) + assert.Equal(t, validateEndpointName("flyte"), false) +} From 6453ad84938363a8002af24d6969b8f36a504585 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 29 Dec 2021 03:26:41 -0800 Subject: [PATCH 190/356] Update documentation (#249) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- .../docs/source/gen/flytectl_config_init.rst | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 2540c588af..796a17864b 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -15,18 +15,24 @@ Generates sandbox config. Flyte Sandbox is a fully standalone minimal environmen :: - flytectl configuration config + flytectl config init -Generates remote cluster config. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html :: - flytectl configuration config --host=flyte.myexample.com - + flytectl config init --host=flyte.myexample.com + +Generates remote cluster config with insecure connection + +:: + + flytectl config init --host=flyte.myexample.com --insecure + Generates FlyteCTL config with a storage provider :: - flytectl configuration config --host=flyte.myexample.com --storage + flytectl config init --host=flyte.myexample.com --storage :: @@ -40,7 +46,7 @@ Options -h, --help help for init --host string Endpoint of flyte admin - --insecure Enable insecure mode (default true) + --insecure Enable insecure mode --storage Enable storage provider config Options inherited from parent commands From 409c01c24390055796eb4e123f9c86b615d9f3b1 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 29 Dec 2021 20:51:08 +0530 Subject: [PATCH 191/356] Hotfix/config init validation (#250) * fix config endpoint validation Signed-off-by: Yuvraj --- flytectl/cmd/configuration/configuration.go | 37 ++++++++++++------- .../cmd/configuration/configuration_test.go | 21 +++++++---- flytectl/go.mod | 1 + flytectl/go.sum | 4 ++ 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index bdc2fe83a1..680b6c8896 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -5,9 +5,7 @@ import ( "errors" "fmt" "io" - "net" "os" - "regexp" "strings" "github.com/flyteorg/flytestdlib/logger" @@ -20,8 +18,8 @@ import ( cmdcore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flytestdlib/config/viper" + "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/manifoldco/promptui" - "github.com/spf13/cobra" ) @@ -93,9 +91,8 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { templateStr := configutil.GetSandboxTemplate() if len(initConfig.DefaultConfig.Host) > 0 { - trimHost := trim(initConfig.DefaultConfig.Host) - host := strings.Split(trimHost, ":") - if !validateEndpointName(host[0]) { + trimHost := trimEndpoint(initConfig.DefaultConfig.Host) + if !validateEndpointName(trimHost) { return errors.New("Please use a valid endpoint") } templateValues.Host = fmt.Sprintf("dns://%s", trimHost) @@ -132,7 +129,7 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { return nil } -func trim(hostname string) string { +func trimEndpoint(hostname string) string { for _, prefix := range endpointPrefix { hostname = strings.TrimPrefix(hostname, prefix) } @@ -140,14 +137,28 @@ func trim(hostname string) string { } -func validateEndpointName(domain string) bool { - RegExp := regexp.MustCompile(`^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z - ]{2,3})$`) - if RegExp.MatchString(domain) || domain == "localhost" { +func validateEndpointName(endPoint string) bool { + var validate = false + if endPoint == "localhost" { return true } - if net.ParseIP(domain) == nil { + if err := is.URL.Validate(endPoint); err != nil { return false } - return true + endPointParts := strings.Split(endPoint, ":") + if len(endPointParts) <= 2 && len(endPointParts) > 0 { + if err := is.DNSName.Validate(endPointParts[0]); !errors.Is(err, is.ErrDNSName) && err == nil { + validate = true + } + if err := is.IP.Validate(endPointParts[0]); !errors.Is(err, is.ErrIP) && err == nil { + validate = true + } + if len(endPointParts) == 2 { + if err := is.Port.Validate(endPointParts[1]); err != nil { + return false + } + } + } + + return validate } diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index ce2d2ca1bf..00fbfc29b6 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -65,15 +65,20 @@ func TestSetupConfigFunc(t *testing.T) { } func TestTrimFunc(t *testing.T) { - assert.Equal(t, trim("dns://localhost"), "localhost") - assert.Equal(t, trim("http://localhost"), "localhost") - assert.Equal(t, trim("https://localhost"), "localhost") + assert.Equal(t, trimEndpoint("dns://localhost"), "localhost") + assert.Equal(t, trimEndpoint("http://localhost"), "localhost") + assert.Equal(t, trimEndpoint("https://localhost"), "localhost") } func TestValidateEndpointName(t *testing.T) { - assert.Equal(t, validateEndpointName("127.0.0.1"), true) - assert.Equal(t, validateEndpointName("127.0.0.1.0"), false) - assert.Equal(t, validateEndpointName("localhost"), true) - assert.Equal(t, validateEndpointName("flyte.org"), true) - assert.Equal(t, validateEndpointName("flyte"), false) + assert.Equal(t, true, validateEndpointName("8093405779.ap-northeast-2.elb.amazonaws.com:81")) + assert.Equal(t, true, validateEndpointName("8093405779.ap-northeast-2.elb.amazonaws.com")) + assert.Equal(t, false, validateEndpointName("8093405779.ap-northeast-2.elb.amazonaws.com:81/console")) + assert.Equal(t, true, validateEndpointName("localhost")) + assert.Equal(t, true, validateEndpointName("127.0.0.1")) + assert.Equal(t, true, validateEndpointName("127.0.0.1:30086")) + assert.Equal(t, true, validateEndpointName("112.11.1.1")) + assert.Equal(t, true, validateEndpointName("112.11.1.1:8080")) + assert.Equal(t, false, validateEndpointName("112.11.1.1:8080/console")) + assert.Equal(t, false, validateEndpointName("flyte")) } diff --git a/flytectl/go.mod b/flytectl/go.mod index c4c7eb3fa2..e7bbcdf52f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -14,6 +14,7 @@ require ( github.com/flyteorg/flyteidl v0.21.5 github.com/flyteorg/flytestdlib v0.4.0 github.com/ghodss/yaml v1.0.0 + github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.0 github.com/google/go-github v17.0.0+incompatible github.com/google/go-github/v37 v37.0.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 9de725ed5f..130ebc8fd0 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -123,6 +123,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= @@ -391,6 +393,8 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= +github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= From 2762f976278e4a0471fb2cf236c8d69a6df5f3a7 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 30 Dec 2021 03:02:20 +0530 Subject: [PATCH 192/356] Added support for pyflyte serialize fast register (#248) * Added support for pyflyte serialize fast register (#239) Signed-off-by: Yuvraj --- .../subcommand/register/files_config.go | 1 + .../subcommand/register/filesconfig_flags.go | 1 + .../register/filesconfig_flags_test.go | 14 ++++++++++++++ flytectl/cmd/register/files.go | 12 +++++++++--- flytectl/cmd/register/register_util.go | 19 ++++++++++++++++--- flytectl/cmd/register/register_util_test.go | 2 +- 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index 0db9aa6102..ae618d3380 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -20,5 +20,6 @@ type FilesConfig struct { K8ServiceAccount string `json:"k8ServiceAccount" pflag:", deprecated. Please use --K8sServiceAccount"` OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` SourceUploadPath string `json:"sourceUploadPath" pflag:", Location for source code in storage."` + DestinationDirectory string `json:"destinationDirectory" pflag:", Location of source code in container."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index 7e196e89d5..910245ee9f 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -59,6 +59,7 @@ func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " deprecated. Please use --K8sServiceAccount") cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") + cmdFlags.StringVar(&DefaultFilesConfig.DestinationDirectory, fmt.Sprintf("%v%v", prefix, "destinationDirectory"), DefaultFilesConfig.DestinationDirectory, " Location of source code in container.") cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 024bb0783b..29c5494a67 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -225,6 +225,20 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_destinationDirectory", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("destinationDirectory", testValue) + if vString, err := cmdFlags.GetString("destinationDirectory"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.DestinationDirectory) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_dryRun", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b2801d53ef..895d2f5aa5 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -72,19 +72,25 @@ Override IamRole during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --assumableIamRole "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --k8sServiceAccount "kubernetes-service-account" Override Output location prefix during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --outputLocationPrefix "s3://dummy/prefix" + +Override Destination dir of source code in container during registration: + +:: + + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --destinationDirectory "/root" Usage ` diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index de2ce65de5..d8b11c8d08 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -45,6 +45,7 @@ const registrationVersionPattern = "{{ registration.version }}" // Additional variable define in fast serialized proto that needs to be replace in registration time const registrationRemotePackagePattern = "{{ .remote_package_path }}" +const registrationDestDirPattern = "{{ .dest_dir }}" // All supported extensions for compress var supportedExtensions = []string{".tar", ".tgz", ".tar.gz"} @@ -219,16 +220,22 @@ func hydrateIdentifier(identifier *core.Identifier, version string, force bool) } } -func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string, sourceUploadPath string, version string) error { +func hydrateTaskSpec(task *admin.TaskSpec, sourceCode, sourceUploadPath, version, destinationDir string) error { if task.Template.GetContainer() != nil { for k := range task.Template.GetContainer().Args { - if task.Template.GetContainer().Args[k] == "" || task.Template.GetContainer().Args[k] == registrationRemotePackagePattern { + if task.Template.GetContainer().Args[k] == registrationRemotePackagePattern { remotePath, err := getRemoteStoragePath(context.Background(), Client, sourceUploadPath, sourceCode, version) if err != nil { return err } task.Template.GetContainer().Args[k] = string(remotePath) } + if task.Template.GetContainer().Args[k] == registrationDestDirPattern { + task.Template.GetContainer().Args[k] = "." + if len(destinationDir) > 0 { + task.Template.GetContainer().Args[k] = destinationDir + } + } } } else if task.Template.GetK8SPod() != nil && task.Template.GetK8SPod().PodSpec != nil { var podSpec = v1.PodSpec{} @@ -245,6 +252,12 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode string, sourceUploadPath s } podSpec.Containers[containerIdx].Args[argIdx] = string(remotePath) } + if arg == registrationDestDirPattern { + podSpec.Containers[containerIdx].Args[argIdx] = "." + if len(destinationDir) > 0 { + podSpec.Containers[containerIdx].Args[argIdx] = destinationDir + } + } } } podSpecStruct, err := utils.MarshalObjToStruct(podSpec) @@ -340,7 +353,7 @@ func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesC taskSpec := message.(*admin.TaskSpec) hydrateIdentifier(taskSpec.Template.Id, config.Version, config.Force) // In case of fast serialize input proto also have on additional variable to substitute i.e destination bucket for source code - if err := hydrateTaskSpec(taskSpec, sourceCode, config.SourceUploadPath, config.Version); err != nil { + if err := hydrateTaskSpec(taskSpec, sourceCode, config.SourceUploadPath, config.Version, config.DestinationDirectory); err != nil { return err } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index eb53ab32f7..f3af72c5ff 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -544,7 +544,7 @@ func TestHydrateTaskSpec(t *testing.T) { }, }, } - err = hydrateTaskSpec(task, "sourcey", rconfig.DefaultFilesConfig.SourceUploadPath, rconfig.DefaultFilesConfig.Version) + err = hydrateTaskSpec(task, "sourcey", rconfig.DefaultFilesConfig.SourceUploadPath, rconfig.DefaultFilesConfig.Version, "") assert.NoError(t, err) var hydratedPodSpec = v1.PodSpec{} err = utils.UnmarshalStructToObj(task.Template.GetK8SPod().PodSpec, &hydratedPodSpec) From 1a904e0b3119fe1918630cb0510aa08197910596 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 30 Dec 2021 09:23:47 +0530 Subject: [PATCH 193/356] Added flag to pass in CAcerts (#245) --- flytectl/go.mod | 2 ++ flytectl/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index e7bbcdf52f..27f1f9ebd4 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -55,3 +55,5 @@ require ( k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) + +replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08 diff --git a/flytectl/go.sum b/flytectl/go.sum index 130ebc8fd0..c4201d372e 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -354,8 +354,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.5 h1:ietcyEpQ0C1FYDTUauo7h4yS792PAeiJYs0mQJ/j+8k= -github.com/flyteorg/flyteidl v0.21.5/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08 h1:tefRGxALrl5RmfTxbPr0+MUmfOuPREgYmvfvRrM4lbA= +github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From a2954286e4bacf898937ae607a10169cada1dbf0 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 30 Dec 2021 09:51:54 +0530 Subject: [PATCH 194/356] Using released IDL version for CACaert flag (#254) --- flytectl/go.mod | 4 +--- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 27f1f9ebd4..d60e10cf05 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.21.5 + github.com/flyteorg/flyteidl v0.21.14 github.com/flyteorg/flytestdlib v0.4.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 @@ -55,5 +55,3 @@ require ( k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) - -replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08 diff --git a/flytectl/go.sum b/flytectl/go.sum index c4201d372e..02e6c276e8 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -354,8 +354,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08 h1:tefRGxALrl5RmfTxbPr0+MUmfOuPREgYmvfvRrM4lbA= -github.com/flyteorg/flyteidl v0.21.8-0.20211222073222-e8a6c7184c08/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.14 h1:uOc3u0DFkFPag5fOQ8LMmMBBZqHy19ikxShnRlRAzZ0= +github.com/flyteorg/flyteidl v0.21.14/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From 37847d4cafc32df6ad3a09e10010c034f15d8e1d Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 4 Jan 2022 11:18:29 +0530 Subject: [PATCH 195/356] Updates the local kubecontext with that of sandbox and switches to it (#255) * Updates the local kubecontext with that of sandbox and switches to it Signed-off-by: Prafulla Mahindrakar * Removed map delete Signed-off-by: Prafulla Mahindrakar * Added context default for the sandbox test which is checked during context switch Signed-off-by: Prafulla Mahindrakar * Moved copy context to k8s util Signed-off-by: Prafulla Mahindrakar * Removing context during teardown Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/sandbox/start.go | 18 ++++++++ flytectl/cmd/sandbox/start_test.go | 12 ++--- flytectl/cmd/sandbox/teardown.go | 10 +++++ flytectl/pkg/k8s/k8s.go | 70 ++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 95edcff8dd..2023806dd5 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -27,6 +27,7 @@ import ( cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/util" + "k8s.io/client-go/tools/clientcmd" ) const ( @@ -70,6 +71,8 @@ Usage sandboxSupportedVersion = "v0.10.0" diskPressureTaint = "node.kubernetes.io/disk-pressure" taintEffect = "NoSchedule" + sandboxContextName = "flyte-sandbox" + sandboxDockerContext = "default" ) type ExecResult struct { @@ -104,6 +107,10 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if err != nil { return err } + if err = updateLocalKubeContext(); err != nil { + return err + } + if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } @@ -112,6 +119,17 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm return nil } +func updateLocalKubeContext() error { + localConfigAccess := clientcmd.NewDefaultPathOptions() + + dockerConfigAccess := &clientcmd.PathOptions{ + GlobalFile: docker.Kubeconfig, + LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), + } + + return k8s.CopyKubeContext(dockerConfigAccess, localConfigAccess, sandboxDockerContext, sandboxContextName) +} + func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index d15ee17ef4..ca64917914 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -40,17 +40,17 @@ clusters: extension: audience: foo other: bar - name: foo-cluster + name: default contexts: - context: - cluster: foo-cluster - user: foo-user + cluster: default + user: default namespace: bar - name: foo-context -current-context: foo-context + name: default +current-context: default kind: Config users: -- name: foo-user +- name: default user: exec: apiVersion: client.authentication.k8s.io/v1alpha1 diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 3d42e7c7c5..bce078b788 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -12,6 +12,8 @@ import ( "github.com/enescakir/emoji" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/k8s" + "k8s.io/client-go/tools/clientcmd" ) const ( @@ -48,6 +50,14 @@ func tearDownSandbox(ctx context.Context, cli docker.Docker) error { if err := configutil.ConfigCleanup(); err != nil { fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) } + if err := removeSandboxKubeContext(); err != nil { + fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) + } fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) return nil } + +func removeSandboxKubeContext() error { + localConfigAccess := clientcmd.NewDefaultPathOptions() + return k8s.RemoveKubeContext(localConfigAccess, sandboxContextName) +} diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index f17082dbe0..74086d76a2 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -1,12 +1,14 @@ package k8s import ( + "fmt" "os" "github.com/pkg/errors" "k8s.io/client-go/kubernetes" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type K8s interface { @@ -31,3 +33,71 @@ func GetK8sClient(cfg, master string) (K8s, error) { } return Client, nil } + +// CopyKubeContext copies context fromContext part of fromConfigAccess to toContext part of toConfigAccess. +func CopyKubeContext(fromConfigAccess, toConfigAccess clientcmd.ConfigAccess, fromContext, toContext string) error { + _, err := toConfigAccess.GetStartingConfig() + if err != nil { + return err + } + + fromStartingConfig, err := fromConfigAccess.GetStartingConfig() + if err != nil { + return err + } + _, exists := fromStartingConfig.Contexts[fromContext] + if !exists { + return fmt.Errorf("context %v doesn't exist", fromContext) + } + + toStartingConfig, err := toConfigAccess.GetStartingConfig() + if err != nil { + return err + } + + _, exists = toStartingConfig.Contexts[toContext] + if exists { + fmt.Printf("context %v already exist. Overwriting it\n", toContext) + } else { + toStartingConfig.Contexts[toContext] = clientcmdapi.NewContext() + } + + toStartingConfig.Clusters[toContext] = fromStartingConfig.Clusters[fromContext] + toStartingConfig.Clusters[toContext].LocationOfOrigin = toConfigAccess.GetDefaultFilename() + toStartingConfig.AuthInfos[toContext] = fromStartingConfig.AuthInfos[fromContext] + toStartingConfig.AuthInfos[toContext].LocationOfOrigin = toConfigAccess.GetDefaultFilename() + toStartingConfig.Contexts[toContext].Cluster = toContext + toStartingConfig.Contexts[toContext].AuthInfo = toContext + toStartingConfig.CurrentContext = toContext + + if err := clientcmd.ModifyConfig(toConfigAccess, *toStartingConfig, true); err != nil { + return err + } + + fmt.Printf("context modified for %q and switched over to it.\n", toContext) + return nil +} + +// RemoveKubeContext removes the contextToRemove from the kubeContext pointed to be fromConfigAccess +func RemoveKubeContext(fromConfigAccess clientcmd.ConfigAccess, contextToRemove string) error { + fromStartingConfig, err := fromConfigAccess.GetStartingConfig() + if err != nil { + return err + } + _, exists := fromStartingConfig.Contexts[contextToRemove] + if !exists { + return fmt.Errorf("context %v doesn't exist", contextToRemove) + } + + delete(fromStartingConfig.Clusters, contextToRemove) + delete(fromStartingConfig.AuthInfos, contextToRemove) + delete(fromStartingConfig.Contexts, contextToRemove) + fromStartingConfig.CurrentContext = "" + + if err := clientcmd.ModifyConfig(fromConfigAccess, *fromStartingConfig, true); err != nil { + return err + } + + fmt.Printf("context removed for %q.\n", contextToRemove) + return nil +} From 60b0f1c276c036ad5a71fae451947d46dc88766f Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 4 Jan 2022 02:18:33 -0800 Subject: [PATCH 196/356] Update documentation (#253) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl.rst | 2 ++ flytectl/docs/source/gen/flytectl_completion.rst | 2 ++ flytectl/docs/source/gen/flytectl_config.rst | 2 ++ .../docs/source/gen/flytectl_config_discover.rst | 2 ++ flytectl/docs/source/gen/flytectl_config_init.rst | 2 ++ .../docs/source/gen/flytectl_config_validate.rst | 2 ++ flytectl/docs/source/gen/flytectl_create.rst | 2 ++ .../docs/source/gen/flytectl_create_execution.rst | 2 ++ .../docs/source/gen/flytectl_create_project.rst | 2 ++ flytectl/docs/source/gen/flytectl_delete.rst | 2 ++ ...flytectl_delete_cluster-resource-attribute.rst | 2 ++ .../flytectl_delete_execution-cluster-label.rst | 2 ++ .../flytectl_delete_execution-queue-attribute.rst | 2 ++ .../docs/source/gen/flytectl_delete_execution.rst | 2 ++ .../gen/flytectl_delete_plugin-override.rst | 2 ++ .../flytectl_delete_task-resource-attribute.rst | 2 ++ .../flytectl_delete_workflow-execution-config.rst | 2 ++ flytectl/docs/source/gen/flytectl_get.rst | 2 ++ .../flytectl_get_cluster-resource-attribute.rst | 2 ++ .../gen/flytectl_get_execution-cluster-label.rst | 2 ++ .../flytectl_get_execution-queue-attribute.rst | 2 ++ .../docs/source/gen/flytectl_get_execution.rst | 2 ++ .../docs/source/gen/flytectl_get_launchplan.rst | 2 ++ .../source/gen/flytectl_get_plugin-override.rst | 2 ++ flytectl/docs/source/gen/flytectl_get_project.rst | 2 ++ .../gen/flytectl_get_task-resource-attribute.rst | 2 ++ flytectl/docs/source/gen/flytectl_get_task.rst | 2 ++ .../flytectl_get_workflow-execution-config.rst | 2 ++ .../docs/source/gen/flytectl_get_workflow.rst | 2 ++ flytectl/docs/source/gen/flytectl_register.rst | 2 ++ .../source/gen/flytectl_register_examples.rst | 3 +++ .../docs/source/gen/flytectl_register_files.rst | 15 ++++++++++++--- flytectl/docs/source/gen/flytectl_sandbox.rst | 2 ++ .../docs/source/gen/flytectl_sandbox_exec.rst | 2 ++ .../docs/source/gen/flytectl_sandbox_start.rst | 2 ++ .../docs/source/gen/flytectl_sandbox_status.rst | 2 ++ .../docs/source/gen/flytectl_sandbox_teardown.rst | 2 ++ flytectl/docs/source/gen/flytectl_update.rst | 2 ++ ...flytectl_update_cluster-resource-attribute.rst | 2 ++ .../flytectl_update_execution-cluster-label.rst | 2 ++ .../flytectl_update_execution-queue-attribute.rst | 2 ++ .../gen/flytectl_update_launchplan-meta.rst | 2 ++ .../source/gen/flytectl_update_launchplan.rst | 2 ++ .../gen/flytectl_update_plugin-override.rst | 2 ++ .../docs/source/gen/flytectl_update_project.rst | 2 ++ .../docs/source/gen/flytectl_update_task-meta.rst | 2 ++ .../flytectl_update_task-resource-attribute.rst | 2 ++ .../flytectl_update_workflow-execution-config.rst | 2 ++ .../source/gen/flytectl_update_workflow-meta.rst | 2 ++ flytectl/docs/source/gen/flytectl_upgrade.rst | 2 ++ flytectl/docs/source/gen/flytectl_version.rst | 2 ++ 51 files changed, 113 insertions(+), 3 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 9d7eec1e80..f3cf8c06f6 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -18,8 +18,10 @@ Options --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 20f9b52f89..33dea6e177 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -67,8 +67,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 7d4e25cef6..c8590d9ac1 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -27,8 +27,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 8550321470..a2c248fdac 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -29,8 +29,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 796a17864b..a7274917da 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -56,8 +56,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 51a3a7e443..bcb53f6e61 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -31,8 +31,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 1405e2c25a..1fcc9387db 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -30,8 +30,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 962f7749ac..9e0d33530e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -160,8 +160,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 4c42f59c44..ef5ed2853d 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -55,8 +55,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 60bef4e19d..4bf0a412a6 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -30,8 +30,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 0572aac149..e606a9fd2e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -66,8 +66,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 32206f7c2b..de963af2ce 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -64,8 +64,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index cf6bc31ed3..30849c67d8 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -68,8 +68,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 25bec01c32..9831831e98 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -73,8 +73,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index cbf85e2288..e54b428707 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -68,8 +68,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index c673e19a4e..96f726900a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -69,8 +69,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 7647c0cb36..fc586192f5 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -64,8 +64,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 14db227b12..b129cecbb2 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -30,8 +30,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 1a0e26cad6..de78a8ceac 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -73,8 +73,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index e027c3f899..84109db997 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -72,8 +72,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index d5fbb275e2..ecb63556bc 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -75,8 +75,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 0d6a903604..e77bcb8dc0 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -103,8 +103,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 2876f26774..cb527a26b0 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -120,8 +120,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 3b99af6a8b..eafa654f20 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -95,8 +95,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index c68aa1b6d4..c1e67c5ce3 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -74,8 +74,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index e27aa5532b..2bc62dd00a 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -77,8 +77,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 0b7d3d461f..473030b128 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -117,8 +117,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index f3108b567a..eaa12eef0d 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -83,8 +83,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index d89e372bb1..b3e8fc5738 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -105,8 +105,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 5c3200f533..56c795d3c3 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -30,8 +30,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 323c62e0af..a53c63669f 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -36,6 +36,7 @@ Options --archive pass in archive file either an http link or local path. --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. + --destinationDirectory string Location of source code in container. --dryRun execute command without making any modifications. --force force use of version number on entities registered with flyte. -h, --help help for examples @@ -52,8 +53,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 8ccc1a91a7..cc62e457db 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -66,19 +66,25 @@ Override IamRole during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -i "arn:aws:iam::123456789:role/dummy" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --assumableIamRole "arn:aws:iam::123456789:role/dummy" Override Kubernetes service account during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -k "kubernetes-service-account" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --k8sServiceAccount "kubernetes-service-account" Override Output location prefix during registration: :: - flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 -l "s3://dummy/prefix" + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --outputLocationPrefix "s3://dummy/prefix" + +Override Destination dir of source code in container during registration: + +:: + + flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --destinationDirectory "/root" Usage @@ -95,6 +101,7 @@ Options --archive pass in archive file either an http link or local path. --assumableIamRole string custom assumable iam auth role to register launch plans with. --continueOnError continue on error when registering files. + --destinationDirectory string Location of source code in container. --dryRun execute command without making any modifications. --force force use of version number on entities registered with flyte. -h, --help help for files @@ -111,8 +118,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 34d11c5c93..e9ff4c3a02 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -49,8 +49,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index aa868e7c19..d377d26950 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -35,8 +35,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 8f6feea066..217b7da4b5 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -64,8 +64,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 2249ab17ee..6b7637cb3b 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -37,8 +37,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index ede1979d2f..5958285fae 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -37,8 +37,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 232876c1d3..0e903ed9e2 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -32,8 +32,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index b102e6b8aa..b976c3486a 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -72,8 +72,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 4da8a7c242..265a274589 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -65,8 +65,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 9db12f7afb..e12e6ff614 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -76,8 +76,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index b3c11b6d57..2ac0f7c1ff 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -50,8 +50,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index b2b64722cb..fd64182bd3 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -46,8 +46,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 7a0b81f1a5..41c04f73ce 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -78,8 +78,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 38042f4b9b..b8baaa4349 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -64,8 +64,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 45287308ab..06ad150dc1 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -50,8 +50,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index fe12a27559..c788249f3b 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -78,8 +78,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 66f46455e2..90f3815857 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -68,8 +68,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index c6dca84ae0..07a7340fbd 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -50,8 +50,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 837a27dd4a..bea19096ad 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -43,8 +43,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index ba7aeb4d94..de9d2d6d6c 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -34,8 +34,10 @@ Options inherited from parent commands --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' From ef0e4352b6a90d34ff3fecb75c83735ca11e363c Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 4 Jan 2022 20:39:54 +0530 Subject: [PATCH 197/356] Linked configurable options for flytectl config.yaml (#251) * Linked configurable options for flytectl config.yaml Signed-off-by: Prafulla Mahindrakar * Incorporated feedback Signed-off-by: Prafulla Mahindrakar * Incorporated feedback Signed-off-by: Prafulla Mahindrakar --- flytectl/docs/source/cluster-resource-attribute.rst | 5 +---- flytectl/docs/source/execution-cluster-label.rst | 5 +---- flytectl/docs/source/execution.rst | 5 +---- flytectl/docs/source/index.rst | 7 ++++++- flytectl/docs/source/launchplan.rst | 5 ++--- flytectl/docs/source/plugin-override.rst | 5 +---- flytectl/docs/source/sandbox.rst | 6 +----- flytectl/docs/source/task-resource-attribute.rst | 5 +---- flytectl/docs/source/task.rst | 2 +- flytectl/docs/source/workflow.rst | 4 ++-- 10 files changed, 17 insertions(+), 32 deletions(-) diff --git a/flytectl/docs/source/cluster-resource-attribute.rst b/flytectl/docs/source/cluster-resource-attribute.rst index 4b655f8dfa..c4b89458c8 100644 --- a/flytectl/docs/source/cluster-resource-attribute.rst +++ b/flytectl/docs/source/cluster-resource-attribute.rst @@ -1,5 +1,5 @@ Cluster resource attribute ------- +-------------------------- It specifies the actions to be performed on the 'cluster-resource-attribute'. .. toctree:: @@ -9,6 +9,3 @@ It specifies the actions to be performed on the 'cluster-resource-attribute'. gen/flytectl_get_cluster-resource-attribute gen/flytectl_delete_cluster-resource-attribute gen/flytectl_update_cluster-resource-attribute - gen/flytectl_get_cluster-resource-attribute - gen/flytectl_delete_cluster-resource-attribute - gen/flytectl_update_cluster-resource-attribute diff --git a/flytectl/docs/source/execution-cluster-label.rst b/flytectl/docs/source/execution-cluster-label.rst index 8bd483f17e..2a27e87e52 100644 --- a/flytectl/docs/source/execution-cluster-label.rst +++ b/flytectl/docs/source/execution-cluster-label.rst @@ -1,5 +1,5 @@ Execution cluster label ------- +----------------------- It specifies the actions to be performed on the resource 'execution-cluster-label'. .. toctree:: @@ -9,6 +9,3 @@ It specifies the actions to be performed on the resource 'execution-cluster-labe gen/flytectl_get_execution-cluster-label gen/flytectl_update_execution-cluster-label gen/flytectl_delete_execution-cluster-label - gen/flytectl_get_execution-cluster-label - gen/flytectl_update_execution-cluster-label - gen/flytectl_delete_execution-cluster-label diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst index 717c697db8..4e3d1cbff3 100644 --- a/flytectl/docs/source/execution.rst +++ b/flytectl/docs/source/execution.rst @@ -1,5 +1,5 @@ Execution ------- +--------- It specifies the actions to be performed on the resource 'execution'. .. toctree:: @@ -9,6 +9,3 @@ It specifies the actions to be performed on the resource 'execution'. gen/flytectl_create_execution gen/flytectl_get_execution gen/flytectl_delete_execution - gen/flytectl_create_execution - gen/flytectl_get_execution - gen/flytectl_delete_execution diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 47dcb78db1..2c59eaa031 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -48,7 +48,11 @@ on command-line. The following configuration is useful to setup. Basic Configuration -------------------- -Flytectl configuration +For full list of configurable options available can be found by running ``flytectl --help`` and can be alternately be found `here `__ + +.. NOTE:: + + Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in config file .. tabbed:: Local Flyte Sandbox @@ -141,6 +145,7 @@ Flytectl configuration :hidden: Install and Configure + gen/flytectl verbs nouns contribute diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst index f469b98563..7755b8eaba 100644 --- a/flytectl/docs/source/launchplan.rst +++ b/flytectl/docs/source/launchplan.rst @@ -1,5 +1,5 @@ Launchplan ------- +---------- It specifies the actions to be performed on the resource 'launchplan'. .. toctree:: @@ -8,5 +8,4 @@ It specifies the actions to be performed on the resource 'launchplan'. gen/flytectl_get_launchplan gen/flytectl_update_launchplan - gen/flytectl_get_launchplan - gen/flytectl_update_launchplan + gen/flytectl_update_launchplan-meta diff --git a/flytectl/docs/source/plugin-override.rst b/flytectl/docs/source/plugin-override.rst index 6e77ceb748..ed016543c5 100644 --- a/flytectl/docs/source/plugin-override.rst +++ b/flytectl/docs/source/plugin-override.rst @@ -1,5 +1,5 @@ Plugin override ------- +--------------- It specifies the actions to be performed on the resource 'plugin-override'. .. toctree:: @@ -9,6 +9,3 @@ It specifies the actions to be performed on the resource 'plugin-override'. gen/flytectl_get_plugin-override gen/flytectl_update_plugin-override gen/flytectl_delete_plugin-override - gen/flytectl_get_plugin-override - gen/flytectl_update_plugin-override - gen/flytectl_delete_plugin-override diff --git a/flytectl/docs/source/sandbox.rst b/flytectl/docs/source/sandbox.rst index a0fb7b21d8..e6de8cafa5 100644 --- a/flytectl/docs/source/sandbox.rst +++ b/flytectl/docs/source/sandbox.rst @@ -1,5 +1,5 @@ Sandbox ------- +------- It specifies the actions to be performed on the resource 'sandbox'. .. toctree:: @@ -10,7 +10,3 @@ It specifies the actions to be performed on the resource 'sandbox'. gen/flytectl_sandbox_status gen/flytectl_sandbox_teardown gen/flytectl_sandbox_exec - gen/flytectl_sandbox_start - gen/flytectl_sandbox_status - gen/flytectl_sandbox_teardown - gen/flytectl_sandbox_exec diff --git a/flytectl/docs/source/task-resource-attribute.rst b/flytectl/docs/source/task-resource-attribute.rst index ee827b775b..3a4c0d5e8d 100644 --- a/flytectl/docs/source/task-resource-attribute.rst +++ b/flytectl/docs/source/task-resource-attribute.rst @@ -1,5 +1,5 @@ Task resource attribute ------- +----------------------- It specifies the actions to be performed on the resource 'task-resource-attribute'. .. toctree:: @@ -9,7 +9,4 @@ It specifies the actions to be performed on the resource 'task-resource-attribut gen/flytectl_get_task-resource-attribute gen/flytectl_update_task-resource-attribute gen/flytectl_delete_task-resource-attribute - gen/flytectl_get_task-resource-attribute - gen/flytectl_update_task-resource-attribute - gen/flytectl_delete_task-resource-attribute diff --git a/flytectl/docs/source/task.rst b/flytectl/docs/source/task.rst index 2b19b358d5..14f1c58f41 100644 --- a/flytectl/docs/source/task.rst +++ b/flytectl/docs/source/task.rst @@ -7,4 +7,4 @@ It specifies the actions to be performed on the resource 'task'. :caption: Task gen/flytectl_get_task - gen/flytectl_get_task + gen/flytectl_update_task-meta diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst index e77bb0f92c..91332dc281 100644 --- a/flytectl/docs/source/workflow.rst +++ b/flytectl/docs/source/workflow.rst @@ -1,5 +1,5 @@ Workflow ------- +-------- It specifies the actions to be performed on the resource 'workflow'. .. toctree:: @@ -7,4 +7,4 @@ It specifies the actions to be performed on the resource 'workflow'. :caption: Workflow gen/flytectl_get_workflow - gen/flytectl_get_workflow + gen/flytectl_update_workflow-meta From 2cec59ba2e44a16763a0918bb81056e0383a0e28 Mon Sep 17 00:00:00 2001 From: Sandra Youssef <80421934+SandraGH5@users.noreply.github.com> Date: Tue, 4 Jan 2022 15:41:53 -0800 Subject: [PATCH 198/356] Editorial review (#256) Adding some syntax edits. The content has not been changed. --- flytectl/docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 2c59eaa031..f572de1ee2 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -48,7 +48,7 @@ on command-line. The following configuration is useful to setup. Basic Configuration -------------------- -For full list of configurable options available can be found by running ``flytectl --help`` and can be alternately be found `here `__ +The full list of available configurable options can be found by running ``flytectl --help``, or alternately `here `__ .. NOTE:: From 3da647f8915b49cd331bbdbc4d61426481996c71 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 5 Jan 2022 21:45:23 +0530 Subject: [PATCH 199/356] Adding flytectl.rst to index (#257) * Adding flytectl.rst to index Signed-off-by: Prafulla Mahindrakar * Update index.rst Co-authored-by: Niels Bantilan --- flytectl/docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index f572de1ee2..88a895f174 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -145,7 +145,7 @@ The full list of available configurable options can be found by running ``flytec :hidden: Install and Configure - gen/flytectl + CLI Entrypoint verbs nouns contribute From 40e2b3844271bb54f342fcf77711572ff5fb27ff Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Fri, 7 Jan 2022 23:32:38 +0530 Subject: [PATCH 200/356] bump docsearch version (#258) Signed-off-by: Samhita Alla --- flytectl/doc-requirements.txt | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 36f0a08186..7998e241d3 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -13,9 +13,9 @@ beautifulsoup4==4.10.0 # furo # sphinx-code-include # sphinx-material -certifi==2021.5.30 +certifi==2021.10.8 # via requests -charset-normalizer==2.0.4 +charset-normalizer==2.0.10 # via requests css-html-js-minify==2.5.5 # via sphinx-material @@ -23,39 +23,39 @@ docutils==0.17.1 # via # sphinx # sphinx-panels -git+git://github.com/flyteorg/furo@main +furo @ git+git://github.com/flyteorg/furo@main # via -r doc-requirements.in -idna==3.2 +idna==3.3 # via requests -imagesize==1.2.0 +imagesize==1.3.0 # via sphinx -jinja2==3.0.1 +jinja2==3.0.3 # via sphinx -lxml==4.6.5 +lxml==4.7.1 # via sphinx-material markupsafe==2.0.1 # via jinja2 -packaging==21.0 +packaging==21.3 # via sphinx -pygments==2.10.0 +pygments==2.11.2 # via # sphinx # sphinx-prompt -pyparsing==2.4.7 +pyparsing==3.0.6 # via packaging python-slugify[unidecode]==5.0.2 # via sphinx-material -pytz==2021.1 +pytz==2021.3 # via babel -requests==2.26.0 +requests==2.27.1 # via sphinx six==1.16.0 # via sphinx-code-include -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via sphinx -soupsieve==2.2.1 +soupsieve==2.3.1 # via beautifulsoup4 -sphinx==4.1.2 +sphinx==4.3.2 # via # -r doc-requirements.in # furo @@ -72,7 +72,7 @@ sphinx-copybutton==0.4.0 # via -r doc-requirements.in sphinx-fontawesome==0.0.6 # via -r doc-requirements.in -sphinx-material==0.0.34 +sphinx-material==0.0.35 # via -r doc-requirements.in sphinx-panels==0.6.0 # via -r doc-requirements.in @@ -94,9 +94,9 @@ sphinxcontrib-yt==0.2.2 # via -r doc-requirements.in text-unidecode==1.3 # via python-slugify -unidecode==1.3.0 +unidecode==1.3.2 # via python-slugify -urllib3==1.26.6 +urllib3==1.26.7 # via requests # The following packages are considered to be unsafe in a requirements file: From 4a1ff5e04f7b4d2becdda64c6e31931b46e4843e Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Fri, 7 Jan 2022 19:19:12 -0500 Subject: [PATCH 201/356] update flytectl for new navbar (#259) --- flytectl/docs/source/conf.py | 3 ++- flytectl/docs/source/contribute.rst | 2 +- flytectl/docs/source/index.rst | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 6767fad9e7..aeaa2ae410 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -89,8 +89,9 @@ # a list of builtin themes. # html_theme = "furo" -html_title = "Flyte Docs" +html_title = "Flyte" html_logo = "flyte_circle_gradient_1_4x4.png" +html_favicon = "flyte_circle_gradient_1_4x4.png" html_theme_options = { "light_css_variables": { diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst index a623d3f159..864fda4e61 100644 --- a/flytectl/docs/source/contribute.rst +++ b/flytectl/docs/source/contribute.rst @@ -1,5 +1,5 @@ ########################### -FlyteCTL Contribution Guide +Contributing Guide ########################### First off, thank you for thinking about contributing! diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 88a895f174..3f73b6b834 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -1,8 +1,8 @@ .. flytectl doc -###################### -Flytectl Reference -###################### +#################################################### +Flytectl: The Official Flyte Command-line Interface +#################################################### Overview ========= @@ -139,12 +139,15 @@ The full list of available configurable options can be found by running ``flytec |book| API Reference |hands-helping| Community + +.. NOTE: the caption text is important for the sphinx theme to correctly render the nav header +.. https://github.com/flyteorg/furo .. toctree:: :maxdepth: -1 :caption: Flytectl :hidden: - Install and Configure + Flytectl CLI Entrypoint verbs nouns From f079e1d931161a6936bccaefc1073dc3161dc308 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 11 Jan 2022 20:28:16 +0530 Subject: [PATCH 202/356] bump containderd version (#262) * bump containerd Signed-off-by: Yuvraj --- flytectl/doc-requirements.in | 2 +- flytectl/doc-requirements.txt | 2 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index bb24b9a7b1..1bcf77f9be 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -1,4 +1,4 @@ -git+git://github.com/flyteorg/furo@main +git+https://github.com/flyteorg/furo@main sphinx sphinx-prompt sphinx-material diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 7998e241d3..549d2907c6 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -23,7 +23,7 @@ docutils==0.17.1 # via # sphinx # sphinx-panels -furo @ git+git://github.com/flyteorg/furo@main +git+https://github.com/flyteorg/furo@main # via -r doc-requirements.in idna==3.3 # via requests diff --git a/flytectl/go.mod b/flytectl/go.mod index d60e10cf05..19376fa17a 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible - github.com/containerd/containerd v1.5.8 // indirect + github.com/containerd/containerd v1.5.9 // indirect github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 02e6c276e8..9445a185c3 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -216,8 +216,8 @@ github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7 github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.8 h1:NmkCC1/QxyZFBny8JogwLpOy2f+VEbO/f6bV2Mqtwuw= -github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= +github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4= +github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= From a101cd6f527b9d7dc54f0579c748775fa0201034 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 12 Jan 2022 15:04:36 +0530 Subject: [PATCH 203/356] Added Update Execution cli (#261) * Added Update Execution cli Signed-off-by: Prafulla Mahindrakar * Added unit tests Signed-off-by: Prafulla Mahindrakar * reset Signed-off-by: Prafulla Mahindrakar * nit Signed-off-by: Prafulla Mahindrakar --- flytectl/clierrors/errors.go | 3 + .../subcommand/execution/update_config.go | 13 ++ .../execution/updateconfig_flags.go | 57 +++++++ .../execution/updateconfig_flags_test.go | 144 ++++++++++++++++++ flytectl/cmd/update/execution.go | 73 +++++++++ flytectl/cmd/update/execution_test.go | 71 +++++++++ flytectl/cmd/update/update.go | 3 + flytectl/cmd/update/update_test.go | 10 +- flytectl/go.mod | 2 + flytectl/go.sum | 4 +- 10 files changed, 373 insertions(+), 7 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/execution/update_config.go create mode 100755 flytectl/cmd/config/subcommand/execution/updateconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go create mode 100644 flytectl/cmd/update/execution.go create mode 100644 flytectl/cmd/update/execution_test.go diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index 0085d1711c..44e7368c05 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -10,6 +10,9 @@ var ( ErrLPVersionNotPassed = "Launch plan version not passed\n" //nolint ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" + ErrExecutionNotPassed = "Execution name not passed\n" + ErrFailedExecutionUpdate = "Execution %v failed to get updated due to %v\n" + ErrWorkflowNotPassed = "Workflow name not passed\n" ErrFailedWorkflowUpdate = "Workflow %v failed to get updated to due to %v\n" diff --git a/flytectl/cmd/config/subcommand/execution/update_config.go b/flytectl/cmd/config/subcommand/execution/update_config.go new file mode 100644 index 0000000000..8623435784 --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/update_config.go @@ -0,0 +1,13 @@ +package execution + +//go:generate pflags UpdateConfig --default-var UConfig --bind-default-var +var ( + UConfig = &UpdateConfig{} +) + +// UpdateConfig +type UpdateConfig struct { + Archive bool `json:"archive" pflag:",archive execution."` + Activate bool `json:"activate" pflag:",activate execution."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` +} diff --git a/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go b/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go new file mode 100755 index 0000000000..03c9d0f90b --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go @@ -0,0 +1,57 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (UpdateConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (UpdateConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (UpdateConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in UpdateConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("UpdateConfig", pflag.ExitOnError) + cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "archive execution.") + cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate execution.") + cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go b/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go new file mode 100755 index 0000000000..6c65c2d14b --- /dev/null +++ b/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go @@ -0,0 +1,144 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package execution + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsUpdateConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementUpdateConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsUpdateConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookUpdateConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementUpdateConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_UpdateConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookUpdateConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_UpdateConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_UpdateConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_UpdateConfig(val, result)) +} + +func testDecodeRaw_UpdateConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_UpdateConfig(vStringSlice, result)) +} + +func TestUpdateConfig_GetPFlagSet(t *testing.T) { + val := UpdateConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestUpdateConfig_SetFlags(t *testing.T) { + actual := UpdateConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_archive", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Archive) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_activate", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go new file mode 100644 index 0000000000..a91653afb6 --- /dev/null +++ b/flytectl/cmd/update/execution.go @@ -0,0 +1,73 @@ +package update + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytestdlib/logger" +) + +const ( + updateExecutionShort = "Update execution status" + updateExecutionLong = ` +Activating an execution shows it in the cli and UI: +:: + + flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate + +Archiving execution hides it from cli and UI: +:: + + flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive + + +Usage +` +) + +func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrExecutionNotPassed) + } + executionName := args[0] + activateExec := execution.UConfig.Activate + archiveExec := execution.UConfig.Archive + if activateExec && archiveExec { + return fmt.Errorf(clierrors.ErrInvalidStateUpdate) + } + + var executionState admin.ExecutionStatus_ExecutionState + if activateExec { + executionState = admin.ExecutionStatus_EXECUTION_ACTIVE + } else if archiveExec { + executionState = admin.ExecutionStatus_EXECUTION_ARCHIVED + } + + if execution.UConfig.DryRun { + logger.Debugf(ctx, "skipping UpdateExecution request (DryRun)") + } else { + _, err := cmdCtx.AdminClient().UpdateExecution(ctx, &admin.ExecutionUpdateRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: executionName, + }, + Status: &admin.ExecutionStatus{State: executionState}, + }) + if err != nil { + fmt.Printf(clierrors.ErrFailedExecutionUpdate, executionName, err) + return err + } + } + fmt.Printf("updated execution %s successfully to state %s\n", executionName, executionState.String()) + + return nil +} diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go new file mode 100644 index 0000000000..2f7e5423ba --- /dev/null +++ b/flytectl/cmd/update/execution_test.go @@ -0,0 +1,71 @@ +package update + +import ( + "fmt" + "testing" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func UpdateExecutionSetup() { + ctx = testutils.Ctx + cmdCtx = testutils.CmdCtx + mockClient = testutils.MockClient +} + +func TestExecutionUpdate(t *testing.T) { + testutils.Setup() + UpdateExecutionSetup() + args = []string{"execution1"} + // Activate + execution.UConfig.Activate = true + mockClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(&admin.ExecutionUpdateResponse{}, nil) + assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) + // Archive + execution.UConfig.Activate = false + execution.UConfig.Archive = true + assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) + // Reset + execution.UConfig.Activate = false + execution.UConfig.Archive = false + + // Dry run + execution.UConfig.DryRun = true + assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) + mockClient.AssertNotCalled(t, "UpdateExecution", mock.Anything) + + // Reset + execution.UConfig.DryRun = false +} + +func TestExecutionUpdateValidationFailure(t *testing.T) { + testutils.Setup() + UpdateExecutionSetup() + args = []string{"execution1"} + execution.UConfig.Activate = true + execution.UConfig.Archive = true + assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) + // Reset + execution.UConfig.Activate = false + execution.UConfig.Archive = false +} + +func TestExecutionUpdateFail(t *testing.T) { + testutils.Setup() + UpdateExecutionSetup() + args = []string{"execution1"} + mockClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) +} + +func TestExecutionUpdateInvalidArgs(t *testing.T) { + testutils.Setup() + UpdateExecutionSetup() + args = []string{} + assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) +} diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 60603a7dbe..57a391b2a6 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -2,6 +2,7 @@ package update import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" @@ -41,6 +42,8 @@ func CreateUpdateCommand() *cobra.Command { Short: updateLPMetaShort, Long: updateLPMetaLong}, "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: DefaultProjectConfig, Short: projectShort, Long: projectLong}, + "execution": {CmdFunc: updateExecutionFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: execution.UConfig, + Short: updateExecutionShort, Long: updateExecutionLong}, "task-meta": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateTaskShort, Long: updateTaskLong}, "workflow-meta": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 8cf80f3f73..b289b0a4cd 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -32,18 +32,18 @@ func TestUpdateCommand(t *testing.T) { assert.Equal(t, updateCommand.Use, updateUse) assert.Equal(t, updateCommand.Short, updateShort) assert.Equal(t, updateCommand.Long, updatecmdLong) - assert.Equal(t, len(updateCommand.Commands()), 11) + assert.Equal(t, len(updateCommand.Commands()), 12) cmdNouns := updateCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - useArray := []string{"cluster-resource-attribute", "execution-cluster-label", "execution-queue-attribute", "launchplan", + useArray := []string{"cluster-resource-attribute", "execution", "execution-cluster-label", "execution-queue-attribute", "launchplan", "launchplan-meta", "plugin-override", "project", "task-meta", "task-resource-attribute", "workflow-execution-config", "workflow-meta"} - aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}} - shortArray := []string{clusterResourceAttributesShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, updateLPMetaShort, + aliases := [][]string{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}} + shortArray := []string{clusterResourceAttributesShort, updateExecutionShort, executionClusterLabelShort, executionQueueAttributesShort, updateLPShort, updateLPMetaShort, pluginOverrideShort, projectShort, updateTaskShort, taskResourceAttributesShort, workflowExecutionConfigShort, updateWorkflowShort} - longArray := []string{clusterResourceAttributesLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, updateLPMetaLong, + longArray := []string{clusterResourceAttributesLong, updateExecutionLong, executionClusterLabelLong, executionQueueAttributesLong, updateLPLong, updateLPMetaLong, pluginOverrideLong, projectLong, updateTaskLong, taskResourceAttributesLong, workflowExecutionConfigLong, updateWorkflowLong} for i := range cmdNouns { assert.Equal(t, cmdNouns[i].Use, useArray[i]) diff --git a/flytectl/go.mod b/flytectl/go.mod index 19376fa17a..16f5ab8964 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -55,3 +55,5 @@ require ( k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) + +replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330 diff --git a/flytectl/go.sum b/flytectl/go.sum index 9445a185c3..a32df294d5 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -354,8 +354,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.14 h1:uOc3u0DFkFPag5fOQ8LMmMBBZqHy19ikxShnRlRAzZ0= -github.com/flyteorg/flyteidl v0.21.14/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330 h1:pHiSSq3bVs9bKTc2SVnd7oLLuEn4uyXmx54bZqGZJ5M= +github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From 1784a382b03dfd937a63bc55d038d275ba4a8527 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 12 Jan 2022 02:38:42 -0800 Subject: [PATCH 204/356] Update documentation (#263) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_update.rst | 1 + .../source/gen/flytectl_update_execution.rst | 91 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 flytectl/docs/source/gen/flytectl_update_execution.rst diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 0e903ed9e2..e0ed691ea5 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -76,6 +76,7 @@ SEE ALSO * :doc:`flytectl` - FlyteCTL CLI tool * :doc:`flytectl_update_cluster-resource-attribute` - Update matchable resources of cluster attributes +* :doc:`flytectl_update_execution` - Update execution status * :doc:`flytectl_update_execution-cluster-label` - Update matchable resources of execution cluster label * :doc:`flytectl_update_execution-queue-attribute` - Update matchable resources of execution queue attributes * :doc:`flytectl_update_launchplan` - Update launch plan status diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst new file mode 100644 index 0000000000..7bb7ebee56 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -0,0 +1,91 @@ +.. _flytectl_update_execution: + +flytectl update execution +------------------------- + +Update execution status + +Synopsis +~~~~~~~~ + + + +Activating an execution shows it in the cli and UI: +:: + + flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate + +Archiving execution hides it from cli and UI: +:: + + flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive + + +Usage + + +:: + + flytectl update execution [flags] + +Options +~~~~~~~ + +:: + + --activate activate execution. + --archive archive execution. + --dryRun execute command without making any modifications. + -h, --help help for execution + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_update` - Update Flyte resources e.g., project. + From dec585d44621c15c235f27857066d98da87cd4af Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Thu, 20 Jan 2022 00:03:37 -0800 Subject: [PATCH 205/356] add port (#265) Signed-off-by: Yee Hing Tong --- flytectl/pkg/docker/docker_util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 29551decab..e0edaeb148 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -85,7 +85,8 @@ func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, e "0.0.0.0:30082:30082", // Flyteadmin Port "0.0.0.0:30084:30084", // Minio API Port "0.0.0.0:30086:30086", // K8s Dashboard Port - "0.0.0.0:30087:30087", // Minio Console Port + "0.0.0.0:30087:30087", // Old Minio Console Port, keeping around for old images + "0.0.0.0:30088:30088", // Minio Console Port }) } From e6855b46329813425dfdddede6cfed9c8280549d Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 21 Jan 2022 14:05:00 +0530 Subject: [PATCH 206/356] Added endpoint suffix to service user for pkce token saved in token cache (#264) * Added endpoint suffix to service user for pkce token saved in token cache Signed-off-by: Prafulla Mahindrakar * nits Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/core/cmd.go | 3 ++- flytectl/cmd/core/cmd_test.go | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 flytectl/cmd/core/cmd_test.go diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 54483c5c8f..c1121355fb 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -58,9 +58,10 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] return err } + adminCfg := admin.GetConfig(ctx) clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). WithTokenCache(pkce.TokenCacheKeyringProvider{ - ServiceUser: pkce.KeyRingServiceUser, + ServiceUser: fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), ServiceName: pkce.KeyRingServiceName, }).Build(ctx) if err != nil { diff --git a/flytectl/cmd/core/cmd_test.go b/flytectl/cmd/core/cmd_test.go new file mode 100644 index 0000000000..f0bab3bc53 --- /dev/null +++ b/flytectl/cmd/core/cmd_test.go @@ -0,0 +1,27 @@ +package cmdcore + +import ( + "context" + "net/url" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flytestdlib/config" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" +) + +func testCommandFunc(ctx context.Context, args []string, cmdCtx CommandContext) error { + return nil +} + +func TestGenerateCommandFunc(t *testing.T) { + adminCfg := admin.GetConfig(context.Background()) + adminCfg.Endpoint = config.URL{URL: url.URL{Host: "dummyHost"}} + adminCfg.AuthType = admin.AuthTypePkce + rootCmd := &cobra.Command{} + cmdEntry := CommandEntry{CmdFunc: testCommandFunc, ProjectDomainNotRequired: true} + fn := generateCommandFunc(cmdEntry) + assert.Nil(t, fn(rootCmd, []string{})) +} From 6f1622ffb76f9904034192bb8c3e3ca76251d9ab Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 21 Jan 2022 16:25:19 +0530 Subject: [PATCH 207/356] update execution for state changes (#267) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/update/execution.go | 8 ++++---- flytectl/go.mod | 4 +--- flytectl/go.sum | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index a91653afb6..cd8a7ad209 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -44,11 +44,11 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } - var executionState admin.ExecutionStatus_ExecutionState + var executionState admin.ExecutionState if activateExec { - executionState = admin.ExecutionStatus_EXECUTION_ACTIVE + executionState = admin.ExecutionState_EXECUTION_ACTIVE } else if archiveExec { - executionState = admin.ExecutionStatus_EXECUTION_ARCHIVED + executionState = admin.ExecutionState_EXECUTION_ARCHIVED } if execution.UConfig.DryRun { @@ -60,7 +60,7 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm Domain: domain, Name: executionName, }, - Status: &admin.ExecutionStatus{State: executionState}, + State: executionState, }) if err != nil { fmt.Printf(clierrors.ErrFailedExecutionUpdate, executionName, err) diff --git a/flytectl/go.mod b/flytectl/go.mod index 16f5ab8964..cc8a7bb50f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.21.14 + github.com/flyteorg/flyteidl v0.21.24 github.com/flyteorg/flytestdlib v0.4.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 @@ -55,5 +55,3 @@ require ( k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) - -replace github.com/flyteorg/flyteidl => github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330 diff --git a/flytectl/go.sum b/flytectl/go.sum index a32df294d5..9945f3089d 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -354,8 +354,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330 h1:pHiSSq3bVs9bKTc2SVnd7oLLuEn4uyXmx54bZqGZJ5M= -github.com/flyteorg/flyteidl v0.21.20-0.20220111070000-bdd241a81330/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.21.24 h1:e2wPBK4aiLE+fw2zmhUDNg39QoJk6Lf5lQRvj8XgtFk= +github.com/flyteorg/flyteidl v0.21.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= From 0e61f13541608839270efc64a98d7e073f881b9b Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sun, 23 Jan 2022 21:59:15 +0530 Subject: [PATCH 208/356] Migrated github methods to githubutil (#268) Signed-off-by: Yuvraj --- flytectl/cmd/register/examples.go | 13 ++++----- flytectl/cmd/register/examples_test.go | 4 +-- flytectl/cmd/register/register_util.go | 32 ++++++++++++--------- flytectl/cmd/register/register_util_test.go | 10 +++---- flytectl/pkg/util/githubutil/githubutil.go | 12 ++++++++ 5 files changed, 42 insertions(+), 29 deletions(-) diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index c27ca67409..d19641fd85 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flytestdlib/logger" - "github.com/google/go-github/github" + "github.com/google/go-github/v37/github" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -31,24 +31,23 @@ Usage ) var ( - githubOrg = "flyteorg" - flytesnacksRepository = "flytesnacks" + flytesnacks = "flytesnacks" ) func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - var examples []github.ReleaseAsset + var examples []*github.ReleaseAsset // Deprecated checks for --k8Service deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) - examples, tag, err := getAllFlytesnacksExample(githubOrg, flytesnacksRepository, rconfig.DefaultFilesConfig.Version) + examples, tag, err := getAllExample(flytesnacks, rconfig.DefaultFilesConfig.Version) if err != nil { return err } - logger.Infof(ctx, "Register started for %s %s release https://github.com/%s/%s/releases/tag/%s", flytesnacksRepository, tag, githubOrg, flytesnacksRepository, tag) + logger.Infof(ctx, "Register started for %s %s release https://github.com/flyteorg/%s/releases/tag/%s", flytesnacks, tag, flytesnacks, tag) rconfig.DefaultFilesConfig.Archive = true - rconfig.DefaultFilesConfig.Version = tag + rconfig.DefaultFilesConfig.Version = *tag.TagName for _, v := range examples { args := []string{ *v.BrowserDownloadURL, diff --git a/flytectl/cmd/register/examples_test.go b/flytectl/cmd/register/examples_test.go index 5b38de8196..f405d44284 100644 --- a/flytectl/cmd/register/examples_test.go +++ b/flytectl/cmd/register/examples_test.go @@ -16,11 +16,11 @@ func TestRegisterExamplesFunc(t *testing.T) { func TestRegisterExamplesFuncErr(t *testing.T) { setup() registerFilesSetup() - flytesnacksRepository = "testingsnacks" + flytesnacks = "testingsnacks" args = []string{""} err := registerExamplesFunc(ctx, args, cmdCtx) // TODO (Yuvraj) make test to success after fixing flytesnacks bug assert.NotNil(t, err) - flytesnacksRepository = "flytesnacks" + flytesnacks = "flytesnacks" } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index d8b11c8d08..30f2ae8350 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -15,13 +15,13 @@ import ( "sort" "strings" + "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" "github.com/flyteorg/flytestdlib/utils" - "github.com/google/go-github/github" - "github.com/flyteorg/flytectl/cmd/config" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -30,6 +30,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/storage" + "github.com/google/go-github/v37/github" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" @@ -541,8 +542,8 @@ func getJSONSpec(message proto.Message) string { return jsonSpec } -func filterExampleFromRelease(releases github.RepositoryRelease) []github.ReleaseAsset { - var assets []github.ReleaseAsset +func filterExampleFromRelease(releases *github.RepositoryRelease) []*github.ReleaseAsset { + var assets []*github.ReleaseAsset for _, v := range releases.Assets { isValid, _ := checkSupportedExtensionForCompress(*v.Name) if isValid { @@ -552,24 +553,27 @@ func filterExampleFromRelease(releases github.RepositoryRelease) []github.Releas return assets } -func getAllFlytesnacksExample(org, repository, version string) ([]github.ReleaseAsset, string, error) { - c := github.NewClient(nil) - opt := &github.ListOptions{Page: 1, PerPage: 1} +func getAllExample(repository, version string) ([]*github.ReleaseAsset, *github.RepositoryRelease, error) { if len(version) > 0 { - releases, _, err := c.Repositories.GetReleaseByTag(context.Background(), org, repository, version) + release, err := githubutil.CheckVersionExist(version, repository) if err != nil { - return nil, "", err + return nil, nil, err } - return filterExampleFromRelease(*releases), version, nil + return filterExampleFromRelease(release), release, nil } - releases, _, err := c.Repositories.ListReleases(context.Background(), org, repository, opt) + releases, err := githubutil.GetListRelease(repository) if err != nil { - return nil, "", err + return nil, nil, err } if len(releases) == 0 { - return nil, "", fmt.Errorf("repository doesn't have any release") + return nil, nil, fmt.Errorf("repository doesn't have any release") + } + for _, v := range releases { + if !*v.Prerelease { + return filterExampleFromRelease(v), v, nil + } } - return filterExampleFromRelease(*releases[0]), *releases[0].TagName, nil + return nil, nil, nil } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index f3af72c5ff..a711495293 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -456,19 +456,17 @@ func TestGetStorageClient(t *testing.T) { func TestGetAllFlytesnacksExample(t *testing.T) { t.Run("Failed to get manifest with wrong name", func(t *testing.T) { - _, tag, err := getAllFlytesnacksExample("no////ne", "no////ne", "") + _, _, err := getAllExample("no////ne", "") assert.NotNil(t, err) - assert.Equal(t, len(tag), 0) }) t.Run("Failed to get release", func(t *testing.T) { - _, tag, err := getAllFlytesnacksExample("flyteorg", "homebrew-tap", "") + _, _, err := getAllExample("homebrew-tap", "") assert.NotNil(t, err) - assert.Equal(t, len(tag), 0) }) t.Run("Successfully get examples", func(t *testing.T) { - assets, tag, err := getAllFlytesnacksExample("flyteorg", "flytesnacks", "v0.2.175") + assets, r, err := getAllExample("flytesnacks", "v0.2.175") assert.Nil(t, err) - assert.Greater(t, len(tag), 0) + assert.Greater(t, len(*r.TagName), 0) assert.Greater(t, len(assets), 0) }) } diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/util/githubutil/githubutil.go index ba51c160db..109b6daec1 100644 --- a/flytectl/pkg/util/githubutil/githubutil.go +++ b/flytectl/pkg/util/githubutil/githubutil.go @@ -62,6 +62,18 @@ func GetLatestVersion(repository string) (*github.RepositoryRelease, error) { return release, err } +// GetListRelease returns the list of release of provided repository +func GetListRelease(repository string) ([]*github.RepositoryRelease, error) { + client := GetGHClient() + releases, _, err := client.Repositories.ListReleases(context.Background(), owner, repository, &github.ListOptions{ + PerPage: 100, + }) + if err != nil { + return nil, err + } + return releases, err +} + func getFlytectlAssetName() string { if arch == platformutil.ArchAmd64 { arch = platformutil.ArchX86 From cfde70d50da3e12680af99002bdfd0750e2a2205 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Mon, 24 Jan 2022 15:53:45 +0530 Subject: [PATCH 209/356] Added option to update labels & description in project (#260) * wip: Add project label & description in update command Signed-off-by: Yuvraj --- flytectl/clierrors/errors.go | 5 +- .../subcommand/project/configproject_flags.go | 64 ++++++++ .../project/configproject_flags_test.go} | 114 ++++++++++---- .../subcommand/project/project_config.go | 77 +++++++++- .../subcommand/project/project_config_test.go | 27 ++++ .../subcommand/project/testdata/project.yaml | 14 ++ .../project/testdata/project_error.yaml | 1 + flytectl/cmd/create/create.go | 3 +- flytectl/cmd/create/project.go | 67 +++----- flytectl/cmd/create/project_test.go | 32 ++-- flytectl/cmd/create/projectconfig_flags.go | 60 -------- flytectl/cmd/create/type.go | 8 - flytectl/cmd/get/project.go | 4 +- flytectl/cmd/update/project.go | 96 +++++++----- flytectl/cmd/update/project_test.go | 70 ++++++--- flytectl/cmd/update/projectconfig_flags.go | 57 ------- .../cmd/update/projectconfig_flags_test.go | 144 ------------------ flytectl/cmd/update/update.go | 3 +- flytectl/doc-requirements.txt | 2 +- flytectl/pkg/util/util.go | 1 + 20 files changed, 426 insertions(+), 423 deletions(-) create mode 100755 flytectl/cmd/config/subcommand/project/configproject_flags.go rename flytectl/cmd/{create/projectconfig_flags_test.go => config/subcommand/project/configproject_flags_test.go} (57%) create mode 100644 flytectl/cmd/config/subcommand/project/project_config_test.go create mode 100644 flytectl/cmd/config/subcommand/project/testdata/project.yaml create mode 100644 flytectl/cmd/config/subcommand/project/testdata/project_error.yaml delete mode 100755 flytectl/cmd/create/projectconfig_flags.go delete mode 100644 flytectl/cmd/create/type.go delete mode 100755 flytectl/cmd/update/projectconfig_flags.go delete mode 100755 flytectl/cmd/update/projectconfig_flags_test.go diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index 44e7368c05..4f22acf5af 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -3,8 +3,9 @@ package clierrors var ( ErrInvalidStateUpdate = "Invalid state passed. Specify either activate or archive\n" - ErrProjectNotPassed = "Project not passed\n" - ErrFailedProjectUpdate = "Project %v failed to get updated to %v state due to %v\n" + ErrProjectNotPassed = "Project not passed\n" + ErrProjectNameNotPassed = "project name is required flag" + ErrFailedProjectUpdate = "Project %v failed to get updated due to %v\n" ErrLPNotPassed = "Launch plan name not passed\n" ErrLPVersionNotPassed = "Launch plan version not passed\n" //nolint diff --git a/flytectl/cmd/config/subcommand/project/configproject_flags.go b/flytectl/cmd/config/subcommand/project/configproject_flags.go new file mode 100755 index 0000000000..e0e1c75f08 --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/configproject_flags.go @@ -0,0 +1,64 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package project + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ConfigProject) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ConfigProject) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (ConfigProject) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ConfigProject and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ConfigProject) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ConfigProject", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultProjectConfig.ID, fmt.Sprintf("%v%v", prefix, "id"), DefaultProjectConfig.ID, "id for the project specified as argument.") + cmdFlags.BoolVar(&DefaultProjectConfig.ActivateProject, fmt.Sprintf("%v%v", prefix, "activateProject"), DefaultProjectConfig.ActivateProject, "(Deprecated) Activates the project specified as argument. Only used in update") + cmdFlags.BoolVar(&DefaultProjectConfig.ArchiveProject, fmt.Sprintf("%v%v", prefix, "archiveProject"), DefaultProjectConfig.ArchiveProject, "(Deprecated) Archives the project specified as argument. Only used in update") + cmdFlags.BoolVar(&DefaultProjectConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), DefaultProjectConfig.Activate, "Activates the project specified as argument. Only used in update") + cmdFlags.BoolVar(&DefaultProjectConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultProjectConfig.Archive, "Archives the project specified as argument. Only used in update") + cmdFlags.StringVar(&DefaultProjectConfig.Name, fmt.Sprintf("%v%v", prefix, "name"), DefaultProjectConfig.Name, "name for the project specified as argument.") + cmdFlags.BoolVar(&DefaultProjectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultProjectConfig.DryRun, "execute command without making any modifications.") + cmdFlags.StringVar(&DefaultProjectConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), DefaultProjectConfig.Description, "description for the project specified as argument.") + cmdFlags.StringToStringVar(&DefaultProjectConfig.Labels, fmt.Sprintf("%v%v", prefix, "labels"), DefaultProjectConfig.Labels, "labels for the project specified as argument.") + cmdFlags.StringVar(&DefaultProjectConfig.File, fmt.Sprintf("%v%v", prefix, "file"), DefaultProjectConfig.File, "file for the project definition.") + return cmdFlags +} diff --git a/flytectl/cmd/create/projectconfig_flags_test.go b/flytectl/cmd/config/subcommand/project/configproject_flags_test.go similarity index 57% rename from flytectl/cmd/create/projectconfig_flags_test.go rename to flytectl/cmd/config/subcommand/project/configproject_flags_test.go index e05f201be8..abe5e1e627 100755 --- a/flytectl/cmd/create/projectconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/project/configproject_flags_test.go @@ -1,7 +1,7 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots. -package create +package project import ( "encoding/json" @@ -14,22 +14,22 @@ import ( "github.com/stretchr/testify/assert" ) -var dereferencableKindsProjectConfig = map[reflect.Kind]struct{}{ +var dereferencableKindsConfigProject = map[reflect.Kind]struct{}{ reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, } // Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementProjectConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsProjectConfig[t] +func canGetElementConfigProject(t reflect.Kind) bool { + _, exists := dereferencableKindsConfigProject[t] return exists } // This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the // object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookProjectConfig(_, to reflect.Type, data interface{}) (interface{}, error) { +func jsonUnmarshalerHookConfigProject(_, to reflect.Type, data interface{}) (interface{}, error) { unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementProjectConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + (canGetElementConfigProject(to.Kind()) && to.Elem().Implements(unmarshalerType)) { raw, err := json.Marshal(data) if err != nil { @@ -50,7 +50,7 @@ func jsonUnmarshalerHookProjectConfig(_, to reflect.Type, data interface{}) (int return data, nil } -func decode_ProjectConfig(input, result interface{}) error { +func decode_ConfigProject(input, result interface{}) error { config := &mapstructure.DecoderConfig{ TagName: "json", WeaklyTypedInput: true, @@ -58,7 +58,7 @@ func decode_ProjectConfig(input, result interface{}) error { DecodeHook: mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookProjectConfig, + jsonUnmarshalerHookConfigProject, ), } @@ -70,7 +70,7 @@ func decode_ProjectConfig(input, result interface{}) error { return decoder.Decode(input) } -func join_ProjectConfig(arr interface{}, sep string) string { +func join_ConfigProject(arr interface{}, sep string) string { listValue := reflect.ValueOf(arr) strs := make([]string, 0, listValue.Len()) for i := 0; i < listValue.Len(); i++ { @@ -80,22 +80,22 @@ func join_ProjectConfig(arr interface{}, sep string) string { return strings.Join(strs, sep) } -func testDecodeJson_ProjectConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_ProjectConfig(val, result)) +func testDecodeJson_ConfigProject(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ConfigProject(val, result)) } -func testDecodeRaw_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_ProjectConfig(vStringSlice, result)) +func testDecodeRaw_ConfigProject(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ConfigProject(vStringSlice, result)) } -func TestProjectConfig_GetPFlagSet(t *testing.T) { - val := ProjectConfig{} +func TestConfigProject_GetPFlagSet(t *testing.T) { + val := ConfigProject{} cmdFlags := val.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) } -func TestProjectConfig_SetFlags(t *testing.T) { - actual := ProjectConfig{} +func TestConfigProject_SetFlags(t *testing.T) { + actual := ConfigProject{} cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) @@ -106,7 +106,63 @@ func TestProjectConfig_SetFlags(t *testing.T) { cmdFlags.Set("id", testValue) if vString, err := cmdFlags.GetString("id"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.ID) + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vString), &actual.ID) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_activateProject", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activateProject", testValue) + if vBool, err := cmdFlags.GetBool("activateProject"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.ActivateProject) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_archiveProject", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archiveProject", testValue) + if vBool, err := cmdFlags.GetBool("archiveProject"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.ArchiveProject) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_activate", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.Activate) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_archive", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("archive", testValue) + if vBool, err := cmdFlags.GetBool("archive"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.Archive) } else { assert.FailNow(t, err.Error()) @@ -120,21 +176,21 @@ func TestProjectConfig_SetFlags(t *testing.T) { cmdFlags.Set("name", testValue) if vString, err := cmdFlags.GetString("name"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.Name) + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vString), &actual.Name) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_file", func(t *testing.T) { + t.Run("Test_dryRun", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("file", testValue) - if vString, err := cmdFlags.GetString("file"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.File) + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.DryRun) } else { assert.FailNow(t, err.Error()) @@ -148,7 +204,7 @@ func TestProjectConfig_SetFlags(t *testing.T) { cmdFlags.Set("description", testValue) if vString, err := cmdFlags.GetString("description"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vString), &actual.Description) + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vString), &actual.Description) } else { assert.FailNow(t, err.Error()) @@ -162,21 +218,21 @@ func TestProjectConfig_SetFlags(t *testing.T) { cmdFlags.Set("labels", testValue) if vStringToString, err := cmdFlags.GetStringToString("labels"); err == nil { - testDecodeRaw_ProjectConfig(t, vStringToString, &actual.Labels) + testDecodeRaw_ConfigProject(t, vStringToString, &actual.Labels) } else { assert.FailNow(t, err.Error()) } }) }) - t.Run("Test_dryRun", func(t *testing.T) { + t.Run("Test_file", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("dryRun", testValue) - if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + cmdFlags.Set("file", testValue) + if vString, err := cmdFlags.GetString("file"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vString), &actual.File) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 8692a746cd..87b9d190ed 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -1,7 +1,14 @@ package project import ( + "fmt" + "io/ioutil" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "gopkg.in/yaml.v2" ) //go:generate pflags Config --default-var DefaultConfig --bind-default-var @@ -11,7 +18,75 @@ var ( } ) -// Config +// Config holds the flag for get project type Config struct { Filter filters.Filters `json:"filter" pflag:","` } + +//go:generate pflags ConfigProject --default-var DefaultProjectConfig --bind-default-var + +// ConfigProject hold configuration for project update flags. +type ConfigProject struct { + ID string `json:"id" pflag:",id for the project specified as argument."` + ActivateProject bool `json:"activateProject" pflag:",(Deprecated) Activates the project specified as argument. Only used in update"` + ArchiveProject bool `json:"archiveProject" pflag:",(Deprecated) Archives the project specified as argument. Only used in update"` + Activate bool `json:"activate" pflag:",Activates the project specified as argument. Only used in update"` + Archive bool `json:"archive" pflag:",Archives the project specified as argument. Only used in update"` + Name string `json:"name" pflag:",name for the project specified as argument."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Description string `json:"description" pflag:",description for the project specified as argument."` + Labels map[string]string `json:"labels" pflag:",labels for the project specified as argument."` + File string `json:"file" pflag:",file for the project definition."` +} + +var DefaultProjectConfig = &ConfigProject{ + Description: "", + Labels: map[string]string{}, +} + +//GetProjectSpec return project spec from a file/flags +func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { + projectSpec := admin.Project{} + if len(c.File) > 0 { + yamlFile, err := ioutil.ReadFile(c.File) + if err != nil { + return nil, err + } + err = yaml.Unmarshal(yamlFile, &projectSpec) + if err != nil { + return nil, err + } + return &projectSpec, nil + } + + projectSpec.Id = id + projectSpec.Name = c.Name + projectSpec.Description = c.Description + projectSpec.Labels = &admin.Labels{ + Values: c.Labels, + } + return &projectSpec, nil +} + +//MapToAdminState return project spec from a file/flags +func (c *ConfigProject) MapToAdminState() (admin.Project_ProjectState, error) { + if c.ActivateProject { + c.Activate = c.ActivateProject + } + if c.ArchiveProject { + c.Archive = c.ArchiveProject + } + + activate := c.Activate + archive := c.Archive + + if activate || archive { + if activate == archive { + return admin.Project_ACTIVE, fmt.Errorf(clierrors.ErrInvalidStateUpdate) + } + if archive { + return admin.Project_ARCHIVED, nil + } + } + return admin.Project_ACTIVE, nil +} diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go new file mode 100644 index 0000000000..fdad3cc33a --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -0,0 +1,27 @@ +package project + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGetProjectSpec(t *testing.T) { + t.Run("Successful get project spec", func(t *testing.T) { + c := &ConfigProject{ + Name: "flytesnacks", + } + response, err := c.GetProjectSpec("flytesnacks") + assert.Nil(t, err) + assert.NotNil(t, response) + }) + t.Run("Successful get request spec from file", func(t *testing.T) { + c := &ConfigProject{ + File: "testdata/project.yaml", + } + response, err := c.GetProjectSpec("flytesnacks") + assert.Nil(t, err) + assert.Equal(t, "flytesnacks", response.Name) + assert.Equal(t, "flytesnacks test", response.Description) + }) +} diff --git a/flytectl/cmd/config/subcommand/project/testdata/project.yaml b/flytectl/cmd/config/subcommand/project/testdata/project.yaml new file mode 100644 index 0000000000..8b5fd32841 --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/testdata/project.yaml @@ -0,0 +1,14 @@ +description: flytesnacks test +domains: + - id: development + name: development + - id: staging + name: staging + - id: production + name: production +id: flytesnacks +labels: + values: + team: flytesnacks +name: flytesnacks + diff --git a/flytectl/cmd/config/subcommand/project/testdata/project_error.yaml b/flytectl/cmd/config/subcommand/project/testdata/project_error.yaml new file mode 100644 index 0000000000..0b7088ec63 --- /dev/null +++ b/flytectl/cmd/config/subcommand/project/testdata/project_error.yaml @@ -0,0 +1 @@ +Data diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 54ad53cf22..20cbefb54e 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -1,6 +1,7 @@ package create import ( + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" @@ -25,7 +26,7 @@ func RemoteCreateCommand() *cobra.Command { Long: createCmdLong, } createResourcesFuncs := map[string]cmdcore.CommandEntry{ - "project": {CmdFunc: createProjectsCommand, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: projectConfig, Short: projectShort, + "project": {CmdFunc: createProjectsCommand, Aliases: []string{"projects"}, ProjectDomainNotRequired: true, PFlagProvider: project.DefaultProjectConfig, Short: projectShort, Long: projectLong}, "execution": {CmdFunc: createExecutionCommand, Aliases: []string{"executions"}, ProjectDomainNotRequired: false, PFlagProvider: executionConfig, Short: executionShort, Long: executionLong}, diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index dec5a7322d..9cc2ecf68a 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -3,10 +3,12 @@ package create import ( "context" "fmt" - "io/ioutil" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "gopkg.in/yaml.v2" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytestdlib/logger" @@ -31,65 +33,34 @@ Create a project by definition file. Note: The name shouldn't contain any whites id: "project-unique-id" name: "Name" labels: - app: flyte + values: + app: flyte description: "Some description for the project" ` ) -//go:generate pflags ProjectConfig --default-var projectConfig --bind-default-var - -// ProjectConfig Config hold configuration for project create flags. -type ProjectConfig struct { - ID string `json:"id" pflag:",id for the project specified as argument."` - Name string `json:"name" pflag:",name for the project specified as argument."` - File string `json:"file" pflag:",file for the project definition."` - Description string `json:"description" pflag:",description for the project specified as argument."` - Labels map[string]string `json:"labels" pflag:",labels for the project specified as argument."` - DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` -} - -var ( - projectConfig = &ProjectConfig{ - Description: "", - Labels: map[string]string{}, - } -) - func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - project := projectDefinition{} - if projectConfig.File != "" { - yamlFile, err := ioutil.ReadFile(projectConfig.File) - if err != nil { - return err - } - err = yaml.Unmarshal(yamlFile, &project) - if err != nil { - return err - } - } else { - project.ID = projectConfig.ID - project.Name = projectConfig.Name - project.Description = projectConfig.Description - project.Labels = projectConfig.Labels + projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig().Project) + if err != nil { + return err } - if project.ID == "" { - return fmt.Errorf("project ID is required flag") + if projectSpec.Id == "" { + return fmt.Errorf(clierrors.ErrProjectNotPassed) } - if project.Name == "" { - return fmt.Errorf("project name is required flag") + if projectSpec.Name == "" { + return fmt.Errorf(clierrors.ErrProjectNameNotPassed) } - if projectConfig.DryRun { + + if project.DefaultProjectConfig.DryRun { logger.Debugf(ctx, "skipping RegisterProject request (DryRun)") } else { _, err := cmdCtx.AdminClient().RegisterProject(ctx, &admin.ProjectRegisterRequest{ Project: &admin.Project{ - Id: project.ID, - Name: project.Name, - Description: project.Description, - Labels: &admin.Labels{ - Values: project.Labels, - }, + Id: projectSpec.Id, + Name: projectSpec.Name, + Description: projectSpec.Description, + Labels: projectSpec.Labels, }, }) if err != nil { diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 8f4bb309b0..ef55e5b365 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -1,9 +1,14 @@ package create import ( + "errors" "fmt" "testing" + "github.com/flyteorg/flytectl/clierrors" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -31,19 +36,19 @@ func createProjectSetup() { }, }, } - projectConfig.ID = "" - projectConfig.Name = "" - projectConfig.Labels = map[string]string{} - projectConfig.Description = "" + project.DefaultProjectConfig.ID = "" + project.DefaultProjectConfig.Name = "" + project.DefaultProjectConfig.Labels = map[string]string{} + project.DefaultProjectConfig.Description = "" } func TestCreateProjectFunc(t *testing.T) { setup() createProjectSetup() defer tearDownAndVerify(t, "project Created successfully") - projectConfig.ID = projectValue - projectConfig.Name = projectValue - projectConfig.Labels = map[string]string{} - projectConfig.Description = "" + project.DefaultProjectConfig.ID = projectValue + project.DefaultProjectConfig.Name = projectValue + project.DefaultProjectConfig.Labels = map[string]string{} + project.DefaultProjectConfig.Description = "" mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) assert.Nil(t, err) @@ -54,11 +59,10 @@ func TestEmptyProjectID(t *testing.T) { setup() createProjectSetup() defer tearDownAndVerify(t, "") - projectConfig.Name = projectValue - projectConfig.Labels = map[string]string{} + project.DefaultProjectConfig = &project.ConfigProject{} mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Equal(t, fmt.Errorf("project ID is required flag"), err) + assert.Equal(t, errors.New(clierrors.ErrProjectNameNotPassed), err) mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } @@ -66,9 +70,9 @@ func TestEmptyProjectName(t *testing.T) { setup() createProjectSetup() defer tearDownAndVerify(t, "") - projectConfig.ID = projectValue - projectConfig.Labels = map[string]string{} - projectConfig.Description = "" + project.DefaultProjectConfig.ID = projectValue + project.DefaultProjectConfig.Labels = map[string]string{} + project.DefaultProjectConfig.Description = "" mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) assert.Equal(t, fmt.Errorf("project name is required flag"), err) diff --git a/flytectl/cmd/create/projectconfig_flags.go b/flytectl/cmd/create/projectconfig_flags.go deleted file mode 100755 index b9e0c0607c..0000000000 --- a/flytectl/cmd/create/projectconfig_flags.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package create - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (ProjectConfig) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (ProjectConfig) mustJsonMarshal(v interface{}) string { - raw, err := json.Marshal(v) - if err != nil { - panic(err) - } - - return string(raw) -} - -func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in ProjectConfig and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) - cmdFlags.StringVar(&projectConfig.ID, fmt.Sprintf("%v%v", prefix, "id"), projectConfig.ID, "id for the project specified as argument.") - cmdFlags.StringVar(&projectConfig.Name, fmt.Sprintf("%v%v", prefix, "name"), projectConfig.Name, "name for the project specified as argument.") - cmdFlags.StringVar(&projectConfig.File, fmt.Sprintf("%v%v", prefix, "file"), projectConfig.File, "file for the project definition.") - cmdFlags.StringVar(&projectConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), projectConfig.Description, "description for the project specified as argument.") - cmdFlags.StringToStringVar(&projectConfig.Labels, fmt.Sprintf("%v%v", prefix, "labels"), projectConfig.Labels, "labels for the project specified as argument.") - cmdFlags.BoolVar(&projectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), projectConfig.DryRun, "execute command without making any modifications.") - return cmdFlags -} diff --git a/flytectl/cmd/create/type.go b/flytectl/cmd/create/type.go deleted file mode 100644 index 61709eb6ef..0000000000 --- a/flytectl/cmd/create/type.go +++ /dev/null @@ -1,8 +0,0 @@ -package create - -type projectDefinition struct { - ID string `yaml:"id"` - Name string `yaml:"name"` - Description string `yaml:"description"` - Labels map[string]string `yaml:"labels"` -} diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 8855b020b2..03f1826059 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -82,10 +82,10 @@ func getProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } if len(args) == 1 { - name := args[0] + id := args[0] logger.Debugf(ctx, "Retrieved %v projects", len(projects.Projects)) for _, v := range projects.Projects { - if v.Name == name { + if v.Id == id { err := adminPrinter.Print(config.GetConfig().MustOutputFormat(), projectColumns, v) if err != nil { return err diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 330afe395c..fd5ff592ff 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -4,23 +4,14 @@ import ( "context" "fmt" - "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/cmd/config" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" ) -//go:generate pflags ProjectConfig --default-var DefaultProjectConfig --bind-default-var - -// Config hold configuration for project update flags. -type ProjectConfig struct { - ActivateProject bool `json:"activateProject" pflag:",Activates the project specified as argument."` - ArchiveProject bool `json:"archiveProject" pflag:",Archives the project specified as argument."` - DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` -} - const ( projectShort = "Update project resources" projectLong = ` @@ -28,65 +19,96 @@ Updates the project according to the flags passed. Allows you to archive or acti Activate project flytesnacks: :: - flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activate Archive project flytesnacks: :: - flytectl update project -p flytesnacks --archiveProject + flytectl update project -p flytesnacks --archive Incorrect usage when passing both archive and activate: :: - flytectl update project flytesnacks --archiveProject --activateProject + flytectl update project -p flytesnacks --archiveProject --activate Incorrect usage when passing unknown-project: +:: + + flytectl update project unknown-project --archive + +project ID is required flag + :: flytectl update project unknown-project --archiveProject -Incorrect usage when passing valid project using -p option: +Update projects.(project/projects can be used interchangeably in these commands) + +:: + + flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte + +Update a project by definition file. Note: The name shouldn't contain any whitespace characters. +:: + + flytectl update project --file project.yaml + +.. code-block:: yaml + id: "project-unique-id" + name: "Name" + labels: + values: + app: flyte + description: "Some description for the project" + +Update a project state by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project unknown-project --archiveProject -p known-project + flytectl update project --file project.yaml --archive + +.. code-block:: yaml + + id: "project-unique-id" + name: "Name" + labels: + values: + app: flyte + description: "Some description for the project" Usage ` ) -var DefaultProjectConfig = &ProjectConfig{} - func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - id := config.GetConfig().Project - if id == "" { - fmt.Printf(clierrors.ErrProjectNotPassed) - return nil + projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig().Project) + if err != nil { + return err + } + if projectSpec.Id == "" { + return fmt.Errorf(clierrors.ErrProjectNotPassed) } - archiveProject := DefaultProjectConfig.ArchiveProject - activateProject := DefaultProjectConfig.ActivateProject - if activateProject == archiveProject { - return fmt.Errorf(clierrors.ErrInvalidStateUpdate) + if projectSpec.Name == "" { + return fmt.Errorf(clierrors.ErrProjectNameNotPassed) } - projectState := admin.Project_ACTIVE - if archiveProject { - projectState = admin.Project_ARCHIVED + + state, err := project.DefaultProjectConfig.MapToAdminState() + if err != nil { + return err } - if DefaultProjectConfig.DryRun { + projectSpec.State = state + if project.DefaultProjectConfig.DryRun { logger.Infof(ctx, "skipping UpdateProject request (dryRun)") } else { - _, err := cmdCtx.AdminClient().UpdateProject(ctx, &admin.Project{ - Id: id, - State: projectState, - }) + _, err := cmdCtx.AdminClient().UpdateProject(ctx, projectSpec) if err != nil { - fmt.Printf(clierrors.ErrFailedProjectUpdate, id, projectState, err) + fmt.Printf(clierrors.ErrFailedProjectUpdate, projectSpec.Id, err) return err } } - fmt.Printf("Project %v updated to %v state\n", id, projectState) + fmt.Printf("Project %v updated\n", projectSpec.Id) return nil } diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 9db9f8cf46..b6b16702b6 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -5,6 +5,8 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" u "github.com/flyteorg/flytectl/cmd/testutils" @@ -37,75 +39,107 @@ func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProjec func TestActivateProjectFunc(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) + config.GetConfig().Project = projectValue + project.DefaultProjectConfig.Name = projectValue + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) + projectUpdateRequest = &admin.Project{ + Id: projectValue, + Name: projectValue, + Labels: &admin.Labels{ + Values: map[string]string{}, + }, + State: admin.Project_ACTIVE, + } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject updated to ACTIVE state\n") + tearDownAndVerify(t, "Project dummyProject updated\n") } func TestActivateProjectFuncWithError(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) + config.GetConfig().Project = projectValue + project.DefaultProjectConfig.Name = projectValue + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) + projectUpdateRequest = &admin.Project{ + Id: projectValue, + Name: projectValue, + Labels: &admin.Labels{ + Values: map[string]string{}, + }, + State: admin.Project_ACTIVE, + } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated to ACTIVE state due to Error Updating Project\n") + tearDownAndVerify(t, "Project dummyProject failed to get updated due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), true, &(DefaultProjectConfig.ActivateProject), false) + config.GetConfig().Project = projectValue + project.DefaultProjectConfig = &project.ConfigProject{} + project.DefaultProjectConfig.Name = projectValue + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), false) projectUpdateRequest = &admin.Project{ - Id: projectValue, + Id: projectValue, + Name: projectValue, + Labels: &admin.Labels{ + Values: nil, + }, State: admin.Project_ARCHIVED, } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) err = updateProjectsFunc(ctx, args, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject updated to ARCHIVED state\n") + tearDownAndVerify(t, "Project dummyProject updated\n") } func TestArchiveProjectFuncWithError(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), true, &(DefaultProjectConfig.ActivateProject), false) + project.DefaultProjectConfig.Name = projectValue + project.DefaultProjectConfig.Labels = map[string]string{} + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), false) projectUpdateRequest = &admin.Project{ - Id: projectValue, + Id: projectValue, + Name: projectValue, + Labels: &admin.Labels{ + Values: map[string]string{}, + }, State: admin.Project_ARCHIVED, } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated to ARCHIVED state due to Error Updating Project\n") + tearDownAndVerify(t, "Project dummyProject failed to get updated"+ + " due to Error Updating Project\n") } func TestEmptyProjectInput(t *testing.T) { setup() updateProjectSetup() config.GetConfig().Project = "" - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), true) - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) err = updateProjectsFunc(ctx, args, cmdCtx) - assert.Nil(t, err) - mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project not passed") + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf(clierrors.ErrProjectNotPassed), err) } func TestInvalidInput(t *testing.T) { setup() updateProjectSetup() - modifyProjectFlags(&(DefaultProjectConfig.ArchiveProject), false, &(DefaultProjectConfig.ActivateProject), false) - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) + config.GetConfig().Project = projectValue + project.DefaultProjectConfig.Name = projectValue + modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), true) err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) - mockClient.AssertNotCalled(t, "UpdateProject", ctx, projectUpdateRequest) tearDownAndVerify(t, "") } diff --git a/flytectl/cmd/update/projectconfig_flags.go b/flytectl/cmd/update/projectconfig_flags.go deleted file mode 100755 index 9c700f5e7c..0000000000 --- a/flytectl/cmd/update/projectconfig_flags.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package update - -import ( - "encoding/json" - "reflect" - - "fmt" - - "github.com/spf13/pflag" -) - -// If v is a pointer, it will get its element value or the zero value of the element type. -// If v is not a pointer, it will return it as is. -func (ProjectConfig) elemValueOrNil(v interface{}) interface{} { - if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { - if reflect.ValueOf(v).IsNil() { - return reflect.Zero(t.Elem()).Interface() - } else { - return reflect.ValueOf(v).Interface() - } - } else if v == nil { - return reflect.Zero(t).Interface() - } - - return v -} - -func (ProjectConfig) mustJsonMarshal(v interface{}) string { - raw, err := json.Marshal(v) - if err != nil { - panic(err) - } - - return string(raw) -} - -func (ProjectConfig) mustMarshalJSON(v json.Marshaler) string { - raw, err := v.MarshalJSON() - if err != nil { - panic(err) - } - - return string(raw) -} - -// GetPFlagSet will return strongly types pflags for all fields in ProjectConfig and its nested types. The format of the -// flags is json-name.json-sub-name... etc. -func (cfg ProjectConfig) GetPFlagSet(prefix string) *pflag.FlagSet { - cmdFlags := pflag.NewFlagSet("ProjectConfig", pflag.ExitOnError) - cmdFlags.BoolVar(&DefaultProjectConfig.ActivateProject, fmt.Sprintf("%v%v", prefix, "activateProject"), DefaultProjectConfig.ActivateProject, "Activates the project specified as argument.") - cmdFlags.BoolVar(&DefaultProjectConfig.ArchiveProject, fmt.Sprintf("%v%v", prefix, "archiveProject"), DefaultProjectConfig.ArchiveProject, "Archives the project specified as argument.") - cmdFlags.BoolVar(&DefaultProjectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultProjectConfig.DryRun, "execute command without making any modifications.") - return cmdFlags -} diff --git a/flytectl/cmd/update/projectconfig_flags_test.go b/flytectl/cmd/update/projectconfig_flags_test.go deleted file mode 100755 index cfcf48b4c4..0000000000 --- a/flytectl/cmd/update/projectconfig_flags_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by robots. - -package update - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" - "testing" - - "github.com/mitchellh/mapstructure" - "github.com/stretchr/testify/assert" -) - -var dereferencableKindsProjectConfig = map[reflect.Kind]struct{}{ - reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, -} - -// Checks if t is a kind that can be dereferenced to get its underlying type. -func canGetElementProjectConfig(t reflect.Kind) bool { - _, exists := dereferencableKindsProjectConfig[t] - return exists -} - -// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the -// object. Otherwise, it'll just pass on the original data. -func jsonUnmarshalerHookProjectConfig(_, to reflect.Type, data interface{}) (interface{}, error) { - unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() - if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || - (canGetElementProjectConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { - - raw, err := json.Marshal(data) - if err != nil { - fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) - return data, nil - } - - res := reflect.New(to).Interface() - err = json.Unmarshal(raw, &res) - if err != nil { - fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) - return data, nil - } - - return res, nil - } - - return data, nil -} - -func decode_ProjectConfig(input, result interface{}) error { - config := &mapstructure.DecoderConfig{ - TagName: "json", - WeaklyTypedInput: true, - Result: result, - DecodeHook: mapstructure.ComposeDecodeHookFunc( - mapstructure.StringToTimeDurationHookFunc(), - mapstructure.StringToSliceHookFunc(","), - jsonUnmarshalerHookProjectConfig, - ), - } - - decoder, err := mapstructure.NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -func join_ProjectConfig(arr interface{}, sep string) string { - listValue := reflect.ValueOf(arr) - strs := make([]string, 0, listValue.Len()) - for i := 0; i < listValue.Len(); i++ { - strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) - } - - return strings.Join(strs, sep) -} - -func testDecodeJson_ProjectConfig(t *testing.T, val, result interface{}) { - assert.NoError(t, decode_ProjectConfig(val, result)) -} - -func testDecodeRaw_ProjectConfig(t *testing.T, vStringSlice, result interface{}) { - assert.NoError(t, decode_ProjectConfig(vStringSlice, result)) -} - -func TestProjectConfig_GetPFlagSet(t *testing.T) { - val := ProjectConfig{} - cmdFlags := val.GetPFlagSet("") - assert.True(t, cmdFlags.HasFlags()) -} - -func TestProjectConfig_SetFlags(t *testing.T) { - actual := ProjectConfig{} - cmdFlags := actual.GetPFlagSet("") - assert.True(t, cmdFlags.HasFlags()) - - t.Run("Test_activateProject", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("activateProject", testValue) - if vBool, err := cmdFlags.GetBool("activateProject"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.ActivateProject) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) - t.Run("Test_archiveProject", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("archiveProject", testValue) - if vBool, err := cmdFlags.GetBool("archiveProject"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.ArchiveProject) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) - t.Run("Test_dryRun", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("dryRun", testValue) - if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { - testDecodeJson_ProjectConfig(t, fmt.Sprintf("%v", vBool), &actual.DryRun) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) -} diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 57a391b2a6..ef1c2b66a8 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -7,6 +7,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -40,7 +41,7 @@ func CreateUpdateCommand() *cobra.Command { Short: updateLPShort, Long: updateLPLong}, "launchplan-meta": {CmdFunc: updateLPMetaFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateLPMetaShort, Long: updateLPMetaLong}, - "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: DefaultProjectConfig, + "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: project.DefaultProjectConfig, Short: projectShort, Long: projectLong}, "execution": {CmdFunc: updateExecutionFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: execution.UConfig, Short: updateExecutionShort, Long: updateExecutionLong}, diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 549d2907c6..f0ff7cad16 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -23,7 +23,7 @@ docutils==0.17.1 # via # sphinx # sphinx-panels -git+https://github.com/flyteorg/furo@main +furo @ git+https://github.com/flyteorg/furo@main # via -r doc-requirements.in idna==3.3 # via requests diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 9dbc7e7c62..31c01db225 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -5,6 +5,7 @@ import ( "io" "io/ioutil" "net/http" + "os" "strings" From f72902eeb666e9775a8fe4d1898391004a105faf Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 24 Jan 2022 07:34:08 -0800 Subject: [PATCH 210/356] Update documentation (#270) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- .../source/gen/flytectl_create_project.rst | 7 ++- .../source/gen/flytectl_update_project.rst | 59 ++++++++++++++++--- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index ef5ed2853d..ba6b813e40 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -26,7 +26,8 @@ Create a project by definition file. Note: The name shouldn't contain any whites id: "project-unique-id" name: "Name" labels: - app: flyte + values: + app: flyte description: "Some description for the project" @@ -40,6 +41,10 @@ Options :: + --activate Activates the project specified as argument. Only used in update + --activateProject (Deprecated) Activates the project specified as argument. Only used in update + --archive Archives the project specified as argument. Only used in update + --archiveProject (Deprecated) Archives the project specified as argument. Only used in update --description string description for the project specified as argument. --dryRun execute command without making any modifications. --file string file for the project definition. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index b8baaa4349..1c05bdbbc9 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -14,31 +14,65 @@ Updates the project according to the flags passed. Allows you to archive or acti Activate project flytesnacks: :: - flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activate Archive project flytesnacks: :: - flytectl update project -p flytesnacks --archiveProject + flytectl update project -p flytesnacks --archive Incorrect usage when passing both archive and activate: :: - flytectl update project flytesnacks --archiveProject --activateProject + flytectl update project -p flytesnacks --archiveProject --activate Incorrect usage when passing unknown-project: +:: + + flytectl update project unknown-project --archive + +project ID is required flag + :: flytectl update project unknown-project --archiveProject -Incorrect usage when passing valid project using -p option: +Update projects.(project/projects can be used interchangeably in these commands) + +:: + + flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte +Update a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project unknown-project --archiveProject -p known-project + flytectl update project --file project.yaml + +.. code-block:: yaml + + id: "project-unique-id" + name: "Name" + labels: + values: + app: flyte + description: "Some description for the project" + +Update a project state by definition file. Note: The name shouldn't contain any whitespace characters. +:: + + flytectl update project --file project.yaml --archive + +.. code-block:: yaml + + id: "project-unique-id" + name: "Name" + labels: + values: + app: flyte + description: "Some description for the project" Usage @@ -52,10 +86,17 @@ Options :: - --activateProject Activates the project specified as argument. - --archiveProject Archives the project specified as argument. - --dryRun execute command without making any modifications. - -h, --help help for project + --activate Activates the project specified as argument. Only used in update + --activateProject (Deprecated) Activates the project specified as argument. Only used in update + --archive Archives the project specified as argument. Only used in update + --archiveProject (Deprecated) Archives the project specified as argument. Only used in update + --description string description for the project specified as argument. + --dryRun execute command without making any modifications. + --file string file for the project definition. + -h, --help help for project + --id string id for the project specified as argument. + --labels stringToString labels for the project specified as argument. (default []) + --name string name for the project specified as argument. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 5af33e330dec068a87f7325136d251d8ef494c45 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 25 Jan 2022 11:53:43 +0530 Subject: [PATCH 211/356] Always use sha for sandbox image (#266) * Always use sha for sandbox image Signed-off-by: Yuvraj * Upgrade go 1.17 Signed-off-by: Yuvraj --- flytectl/.github/workflows/build.yaml | 40 +++++- flytectl/.github/workflows/generate-docs.yaml | 2 +- flytectl/.github/workflows/release.yml | 2 +- .../workflows/update-flyte-component.yml | 2 +- .../subcommand/project/project_config_test.go | 41 ++++++ .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 14 +++ .../subcommand/sandbox/sandbox_config.go | 3 + flytectl/cmd/register/examples.go | 2 +- flytectl/cmd/register/register_util.go | 2 +- flytectl/cmd/sandbox/start.go | 65 +++------- flytectl/cmd/sandbox/start_test.go | 96 ++++++++------ flytectl/cmd/upgrade/upgrade.go | 1 + flytectl/go.mod | 118 +++++++++++++++--- flytectl/go.sum | 14 +-- flytectl/pkg/docker/docker_util.go | 37 +++--- flytectl/pkg/docker/docker_util_test.go | 13 +- flytectl/pkg/util/githubutil/githubutil.go | 92 +++++++++++--- flytectl/pkg/util/util.go | 29 ++--- flytectl/pkg/util/util_test.go | 48 +++---- 20 files changed, 427 insertions(+), 195 deletions(-) diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml index 148963bd0c..736cd5e0bb 100644 --- a/flytectl/.github/workflows/build.yaml +++ b/flytectl/.github/workflows/build.yaml @@ -6,8 +6,8 @@ on: - master jobs: - build: - name: Run tests and lint + dry-run-goreleaser: + name: Dry Run Goreleaser runs-on: ubuntu-latest steps: - name: Checkout @@ -22,16 +22,35 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: version: latest args: --snapshot --skip-publish --rm-dist + + unit-test: + name: Run unit test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "2" + - uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - uses: actions/setup-go@v2 + with: + go-version: '1.17' - name: Unit Tests env: GO111MODULE: "on" CI_ENV: "true" + GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} run: make install && make test_unit_without_flag - name: Push CodeCov uses: codecov/codecov-action@v1.0.5 @@ -39,6 +58,19 @@ jobs: file: coverage.txt flags: unittests fail_ci_if_error: true + + + lint: + name: Run Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "2" + - uses: actions/setup-go@v2 + with: + go-version: '1.17' - name: Lint env: GO111MODULE: "on" @@ -50,6 +82,6 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Go generate and diff run: DELTA_CHECK=true make generate \ No newline at end of file diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml index 1c442ea4f8..853aefe30e 100644 --- a/flytectl/.github/workflows/generate-docs.yaml +++ b/flytectl/.github/workflows/generate-docs.yaml @@ -15,7 +15,7 @@ jobs: lfs: true - uses: actions/setup-go@v1 with: - go-version: '1.16' + go-version: '1.17' - uses: actions/setup-python@v1 with: python-version: 3.8 diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml index 7137ab353c..47d6863674 100644 --- a/flytectl/.github/workflows/release.yml +++ b/flytectl/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: "0" - uses: actions/setup-go@v2 with: - go-version: '1.16' + go-version: '1.17' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: diff --git a/flytectl/.github/workflows/update-flyte-component.yml b/flytectl/.github/workflows/update-flyte-component.yml index 7893e4fb8b..ec765da89f 100644 --- a/flytectl/.github/workflows/update-flyte-component.yml +++ b/flytectl/.github/workflows/update-flyte-component.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - uses: crazy-max/ghaction-import-gpg@v3 with: gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go index fdad3cc33a..a44cd0b423 100644 --- a/flytectl/cmd/config/subcommand/project/project_config_test.go +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -1,8 +1,12 @@ package project import ( + "errors" "testing" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" ) @@ -25,3 +29,40 @@ func TestGetProjectSpec(t *testing.T) { assert.Equal(t, "flytesnacks test", response.Description) }) } + +func TestMapToAdminState(t *testing.T) { + t.Run("Successful mapToAdminState with archive", func(t *testing.T) { + c := &ConfigProject{ + Archive: true, + } + state, err := c.MapToAdminState() + assert.Nil(t, err) + assert.Equal(t, admin.Project_ARCHIVED, state) + }) + t.Run("Successful mapToAdminState with activate", func(t *testing.T) { + c := &ConfigProject{ + Activate: true, + } + state, err := c.MapToAdminState() + assert.Nil(t, err) + assert.Equal(t, admin.Project_ACTIVE, state) + }) + t.Run("Invalid state", func(t *testing.T) { + c := &ConfigProject{ + Activate: true, + Archive: true, + } + state, err := c.MapToAdminState() + assert.NotNil(t, err) + assert.Equal(t, errors.New(clierrors.ErrInvalidStateUpdate), err) + assert.Equal(t, admin.Project_ACTIVE, state) + }) + t.Run("deprecated Flags Test", func(t *testing.T) { + c := &ConfigProject{ + ActivateProject: true, + } + state, err := c.MapToAdminState() + assert.Nil(t, err) + assert.Equal(t, admin.Project_ACTIVE, state) + }) +} diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 5339211026..5e4451b922 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -53,6 +53,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, "Path of your source code") cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") + cmdFlags.BoolVar(&DefaultConfig.Prerelease, fmt.Sprintf("%v%v", prefix, "pre"), DefaultConfig.Prerelease, "Optional. Pre release Version of flyte will be used for sandbox.") cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 4e1410c228..da98f59320 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -141,6 +141,20 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_pre", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("pre", testValue) + if vBool, err := cmdFlags.GetBool("pre"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Prerelease) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_imagePullPolicy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index ff7559b562..77246f09d0 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -44,6 +44,9 @@ type Config struct { // from there. Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."` + // Default value false represents that flytectl will not use latest pre release if exist + Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."` + // Optionally it is possible to use local sandbox image // If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index d19641fd85..845dcc417c 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flytestdlib/logger" - "github.com/google/go-github/v37/github" + "github.com/google/go-github/v42/github" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 30f2ae8350..29e83c698d 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -30,7 +30,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/logger" "github.com/flyteorg/flytestdlib/storage" - "github.com/google/go-github/v37/github" + "github.com/google/go-github/v42/github" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 2023806dd5..00c445d509 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -9,10 +9,10 @@ import ( "path/filepath" "time" - "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/pkg/util/githubutil" "github.com/avast/retry-go" + "github.com/flyteorg/flytectl/clierrors" "github.com/olekukonko/tablewriter" corev1api "k8s.io/api/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -64,15 +64,13 @@ Specify a Flyte Sandbox image pull policy. Possible pull policy values are Alway flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always Usage ` - k8sEndpoint = "https://127.0.0.1:30086" - flyteNamespace = "flyte" - flyteRepository = "flyte" - dind = "dind" - sandboxSupportedVersion = "v0.10.0" - diskPressureTaint = "node.kubernetes.io/disk-pressure" - taintEffect = "NoSchedule" - sandboxContextName = "flyte-sandbox" - sandboxDockerContext = "default" + k8sEndpoint = "https://127.0.0.1:30086" + flyteNamespace = "flyte" + diskPressureTaint = "node.kubernetes.io/disk-pressure" + taintEffect = "NoSchedule" + sandboxContextName = "flyte-sandbox" + sandboxDockerContext = "default" + imageName = "cr.flyte.org/flyteorg/flyte-sandbox" ) type ExecResult struct { @@ -160,20 +158,23 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } else if vol != nil { volumes = append(volumes, *vol) } - - image, err := getSandboxImage(sandboxConfig.DefaultConfig.Version, sandboxConfig.DefaultConfig.Image) - if err != nil { - return nil, err + sandboxImage := sandboxConfig.DefaultConfig.Image + if len(sandboxConfig.DefaultConfig.Image) == 0 { + image, version, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) + if err != nil { + return nil, err + } + sandboxImage = image + fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) } - fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, image) - - if err := docker.PullDockerImage(ctx, cli, image, sandboxConfig.DefaultConfig.ImagePullPolicy); err != nil { + fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, sandboxImage) + if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.DefaultConfig.ImagePullPolicy); err != nil { return nil, err } fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() - ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, image) + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, sandboxImage) if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return nil, err @@ -187,34 +188,6 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return logReader, nil } -// Returns the alternate image if specified, else -// if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind is used -// else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. -func getSandboxImage(version string, alternateImage string) (string, error) { - - if len(alternateImage) > 0 { - return alternateImage, nil - } - - var tag = dind - if len(version) > 0 { - isGreater, err := util.IsVersionGreaterThan(version, sandboxSupportedVersion) - if err != nil { - return "", err - } - if !isGreater { - return "", fmt.Errorf("version flag only supported with flyte %s+ release", sandboxSupportedVersion) - } - sha, err := githubutil.GetSHAFromVersion(version, flyteRepository) - if err != nil { - return "", err - } - tag = fmt.Sprintf("%s-%s", dind, sha) - } - - return docker.GetSandboxImage(tag), nil -} - func mountVolume(file, destination string) (*mount.Mount, error) { if len(file) > 0 { source, err := filepath.Abs(file) diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index ca64917914..71c3e45ffb 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -87,11 +87,13 @@ func TestStartSandboxFunc(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) - sandboxConfig.DefaultConfig.Version = "" + sandboxConfig.DefaultConfig.Version = "v0.19.1" bodyStatus := make(chan container.ContainerWaitOKBody) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -111,17 +113,19 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully exit when sandbox cluster exist", func(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -165,9 +169,11 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -187,7 +193,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully run sandbox cluster with abs path of source code", func(t *testing.T) { @@ -205,9 +211,11 @@ func TestStartSandboxFunc(t *testing.T) { Source: absPath, Target: docker.Source, }) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -235,16 +243,15 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.15.0" + sandboxConfig.DefaultConfig.Version = "v0.18.0" sandboxConfig.DefaultConfig.Source = "" - sha, err := githubutil.GetSHAFromVersion(sandboxConfig.DefaultConfig.Version, "flyte") + image, _, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) assert.Nil(t, err) - volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(fmt.Sprintf("%s-%s", dind, sha)), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -274,10 +281,12 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -297,7 +306,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) t.Run("Error in pulling image", func(t *testing.T) { @@ -305,7 +314,8 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := docker.Volumes volumes = append(volumes, mount.Mount{ @@ -315,7 +325,7 @@ func TestStartSandboxFunc(t *testing.T) { }) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -335,7 +345,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) t.Run("Error in removing existing cluster", func(t *testing.T) { @@ -350,9 +360,11 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -380,7 +392,7 @@ func TestStartSandboxFunc(t *testing.T) { }).Return(nil, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("error")) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, strings.NewReader("y")) + _, err = startSandbox(ctx, mockDocker, strings.NewReader("y")) assert.NotNil(t, err) }) t.Run("Error in start container", func(t *testing.T) { @@ -390,9 +402,11 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -412,7 +426,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) t.Run("Error in reading logs", func(t *testing.T) { @@ -427,9 +441,11 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -449,7 +465,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, fmt.Errorf("error")) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.NotNil(t, err) }) t.Run("Error in list container", func(t *testing.T) { @@ -465,9 +481,11 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -487,7 +505,7 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(nil, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err := startSandbox(ctx, mockDocker, os.Stdin) + _, err = startSandbox(ctx, mockDocker, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully run sandbox cluster command", func(t *testing.T) { @@ -507,10 +525,12 @@ func TestStartSandboxFunc(t *testing.T) { if err != nil { t.Error(err) } + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -545,9 +565,11 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) + image, _, err := githubutil.GetSandboxImage("", imageName) + assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, - Image: docker.GetSandboxImage(dind), + Image: image, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -571,7 +593,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" - err := startSandboxCluster(ctx, []string{}, cmdCtx) + err = startSandboxCluster(ctx, []string{}, cmdCtx) assert.NotNil(t, err) }) } @@ -678,33 +700,27 @@ func TestGetNodeTaintStatus(t *testing.T) { func TestGetSandboxImage(t *testing.T) { t.Run("Get Latest sandbox", func(t *testing.T) { - image, err := getSandboxImage("", "") + image, _, err := githubutil.GetSandboxImage("", imageName) assert.Nil(t, err) - assert.Equal(t, docker.GetSandboxImage(dind), image) + assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox:dind-")) }) t.Run("Get sandbox image with version ", func(t *testing.T) { - image, err := getSandboxImage("v0.14.0", "") + image, _, err := githubutil.GetSandboxImage("v0.14.0", imageName) assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, docker.ImageName)) + assert.Equal(t, true, strings.HasPrefix(image, imageName)) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, err := getSandboxImage("v100.1.0", "") + _, _, err := githubutil.GetSandboxImage("v100.1.0", imageName) assert.NotNil(t, err) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, err := getSandboxImage("aaaaaa", "") + _, _, err := githubutil.GetSandboxImage("aaaaaa", imageName) assert.NotNil(t, err) }) t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - _, err := getSandboxImage("v0.10.0", "") + _, _, err := githubutil.GetSandboxImage("v0.10.0", imageName) assert.NotNil(t, err) }) - t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - img := "docker.io/my-override:latest" - i, err := getSandboxImage("v0.11.0", img) - assert.Nil(t, err) - assert.Equal(t, i, img) - }) } diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 7fdd6d5f82..b0965f20d9 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/flyteorg/flytectl/pkg/util" + stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/flyteorg/flytectl/pkg/util/githubutil" diff --git a/flytectl/go.mod b/flytectl/go.mod index cc8a7bb50f..3481e540f0 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -1,12 +1,10 @@ module github.com/flyteorg/flytectl -go 1.16 +go 1.17 require ( - github.com/Microsoft/go-winio v0.5.0 // indirect github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible - github.com/containerd/containerd v1.5.9 // indirect github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 @@ -16,20 +14,13 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.0 - github.com/google/go-github v17.0.0+incompatible - github.com/google/go-github/v37 v37.0.0 - github.com/google/go-querystring v1.1.0 // indirect + github.com/google/go-github/v42 v42.0.0 github.com/google/uuid v1.2.0 - github.com/gorilla/mux v1.8.0 // indirect github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/manifoldco/promptui v0.8.0 - github.com/mattn/go-isatty v0.0.13 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/mapstructure v1.4.1 - github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect - github.com/morikuni/aec v1.0.0 // indirect github.com/mouuff/go-rocket-update v1.5.1 github.com/olekukonko/tablewriter v0.0.5 github.com/opencontainers/image-spec v1.0.2 @@ -41,10 +32,7 @@ require ( github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 - golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 @@ -55,3 +43,105 @@ require ( k8s.io/client-go v0.21.3 sigs.k8s.io/yaml v1.2.0 ) + +require ( + cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go/storage v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect + github.com/aws/aws-sdk-go v1.37.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/containerd/containerd v1.5.9 // indirect + github.com/coocood/freecache v1.1.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/danieljoos/wincred v1.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/evanphx/json-patch v4.9.0+incompatible // indirect + github.com/fatih/color v1.10.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/godbus/dbus/v5 v5.0.4 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gnostic v0.4.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/graymeta/stow v0.2.7 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.10 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect + github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect + github.com/magiconair/properties v1.8.4 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.13 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/ncw/swift v1.0.53 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.9.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.15.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/russross/blackfriday/v2 v2.0.1 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/spf13/afero v1.5.1 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/viper v1.7.1 // indirect + github.com/stretchr/objx v0.3.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + go.opencensus.io v0.22.6 // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/mod v0.4.1 // indirect + golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect + golang.org/x/tools v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.38.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + k8s.io/klog/v2 v2.8.0 // indirect + k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect + k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect +) diff --git a/flytectl/go.sum b/flytectl/go.sum index 9945f3089d..a1093f10c1 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -149,6 +149,7 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bradleyfalzon/ghinstallation/v2 v2.0.3/go.mod h1:tlgi+JWCXnKFx/Y4WtnDbZEINo31N5bcvnCoqieefmk= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -417,6 +418,7 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -463,11 +465,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-github/v37 v37.0.0 h1:rCspN8/6kB1BAJWZfuafvHhyfIo5fkAulaP/3bOQ/tM= -github.com/google/go-github/v37 v37.0.0/go.mod h1:LM7in3NmXDrX58GbEHy7FtNLbI2JijX93RnMKvWG3m4= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-github/v39 v39.0.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= +github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= +github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -985,8 +985,8 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index e0edaeb148..a1d952475f 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -9,6 +9,9 @@ import ( "os" "strings" + "github.com/docker/docker/client" + "github.com/enescakir/emoji" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flytectl/clierrors" @@ -16,10 +19,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" - "github.com/enescakir/emoji" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) @@ -27,7 +28,6 @@ import ( var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") SuccessMessage = "Deploying Flyte..." - ImageName = "cr.flyte.org/flyteorg/flyte-sandbox" FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} Source = "/root" @@ -51,6 +51,19 @@ var ( StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 ) +// GetDockerClient will returns the docker client +func GetDockerClient() (Docker, error) { + if Client == nil { + cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) + if err != nil { + fmt.Printf("%v Please Check your docker client %v \n", emoji.GrimacingFace, emoji.Whale) + return nil, err + } + return cli, nil + } + return Client, nil +} + // GetSandbox will return sandbox container if it exist func GetSandbox(ctx context.Context, cli Docker) *types.Container { containers, _ := cli.ContainerList(ctx, types.ContainerListOptions{ @@ -166,19 +179,6 @@ func WaitForSandbox(reader *bufio.Scanner, message string) bool { return false } -// GetDockerClient will returns the docker client -func GetDockerClient() (Docker, error) { - if Client == nil { - cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - if err != nil { - fmt.Printf("%v Please Check your docker client %v \n", emoji.GrimacingFace, emoji.Whale) - return nil, err - } - return cli, nil - } - return Client, nil -} - // ExecCommend will execute a command in container and returns an execution id func ExecCommend(ctx context.Context, cli Docker, containerID string, command []string) (types.IDResponse, error) { ExecConfig.Cmd = command @@ -200,8 +200,3 @@ func InspectExecResp(ctx context.Context, cli Docker, containerID string) error } return nil } - -// GetSandboxImage will return the sandbox image with tag -func GetSandboxImage(tag string) string { - return fmt.Sprintf("%s:%s", ImageName, tag) -} diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 0a40d55ea2..cc27fd8af4 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -26,6 +26,7 @@ import ( var ( cmdCtx cmdCore.CommandContext containers []types.Container + imageName = "cr.flyte.org/flyteorg/flyte-sandbox" ) func setupSandbox() { @@ -154,7 +155,7 @@ func TestStartContainer(t *testing.T) { // Verify the attributes mockDocker.OnContainerCreate(context, &container.Config{ Env: Environment, - Image: ImageName, + Image: imageName, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -165,7 +166,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") @@ -179,7 +180,7 @@ func TestStartContainer(t *testing.T) { // Verify the attributes mockDocker.OnContainerCreate(context, &container.Config{ Env: Environment, - Image: ImageName, + Image: imageName, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -190,7 +191,7 @@ func TestStartContainer(t *testing.T) { ID: "", }, fmt.Errorf("error")) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") @@ -204,7 +205,7 @@ func TestStartContainer(t *testing.T) { // Verify the attributes mockDocker.OnContainerCreate(context, &container.Config{ Env: Environment, - Image: ImageName, + Image: imageName, Tty: false, ExposedPorts: p1, }, &container.HostConfig{ @@ -215,7 +216,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", ImageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/util/githubutil/githubutil.go index 109b6daec1..075b1cc8df 100644 --- a/flytectl/pkg/util/githubutil/githubutil.go +++ b/flytectl/pkg/util/githubutil/githubutil.go @@ -3,34 +3,42 @@ package githubutil import ( "context" "net/http" + "os" "path/filepath" "runtime" "strings" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + + "github.com/flyteorg/flytectl/pkg/util" + + "github.com/flyteorg/flytestdlib/logger" + + "golang.org/x/oauth2" + "github.com/flyteorg/flytectl/pkg/util/platformutil" stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/mouuff/go-rocket-update/pkg/provider" "github.com/mouuff/go-rocket-update/pkg/updater" - "github.com/flyteorg/flytectl/pkg/util" - "fmt" - "github.com/google/go-github/v37/github" + "github.com/google/go-github/v42/github" ) const ( - owner = "flyteorg" - flyte = "flyte" - sandboxManifest = "flyte_sandbox_manifest.yaml" - flytectl = "flytectl" - flytectlRepository = "github.com/flyteorg/flytectl" - commonMessage = "\n A new release of flytectl is available: %s → %s \n" - brewMessage = "To upgrade, run: brew update && brew upgrade flytectl \n" - linuxMessage = "To upgrade, run: flytectl upgrade \n" - darwinMessage = "To upgrade, run: flytectl upgrade \n" - releaseURL = "https://github.com/flyteorg/flytectl/releases/tag/%s \n" - brewInstallDirectory = "/Cellar/flytectl" + owner = "flyteorg" + flyte = "flyte" + sandboxManifest = "flyte_sandbox_manifest.yaml" + flytectl = "flytectl" + sandboxSupportedVersion = "v0.10.0" + flytectlRepository = "github.com/flyteorg/flytectl" + commonMessage = "\n A new release of flytectl is available: %s → %s \n" + brewMessage = "To upgrade, run: brew update && brew upgrade flytectl \n" + linuxMessage = "To upgrade, run: flytectl upgrade \n" + darwinMessage = "To upgrade, run: flytectl upgrade \n" + releaseURL = "https://github.com/flyteorg/flytectl/releases/tag/%s \n" + brewInstallDirectory = "/Cellar/flytectl" ) // FlytectlReleaseConfig represent the updater config for flytectl binary @@ -49,6 +57,11 @@ var ( //GetGHClient will return github client func GetGHClient() *github.Client { + if len(os.Getenv("GITHUB_TOKEN")) > 0 { + return github.NewClient(oauth2.NewClient(context.Background(), oauth2.StaticTokenSource( + &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")}, + ))) + } return github.NewClient(&http.Client{}) } @@ -74,6 +87,45 @@ func GetListRelease(repository string) ([]*github.RepositoryRelease, error) { return releases, err } +// GetSandboxImageSha returns the sha as per input +func GetSandboxImageSha(version string, pre bool) (string, string, error) { + var release *github.RepositoryRelease + if len(version) == 0 { + releases, err := GetListRelease(flyte) + if err != nil { + return "", release.GetTagName(), err + } + for _, v := range releases { + if *v.Prerelease && pre { + release = v + break + } else if !*v.Prerelease && !pre { + release = v + break + } + } + logger.Infof(context.Background(), "sandbox started with release %s", release.GetTagName()) + } else if len(version) > 0 { + r, err := CheckVersionExist(version, flyte) + if err != nil { + return "", r.GetTagName(), err + } + release = r + } + isGreater, err := util.IsVersionGreaterThan(release.GetTagName(), sandboxSupportedVersion) + if err != nil { + return "", release.GetTagName(), err + } + if !isGreater { + return "", release.GetTagName(), fmt.Errorf("version flag only supported with flyte %s+ release", sandboxSupportedVersion) + } + sha, err := GetSHAFromVersion(release.GetTagName(), flyte) + if err != nil { + return "", release.GetTagName(), err + } + return sha, release.GetTagName(), nil +} + func getFlytectlAssetName() string { if arch == platformutil.ArchAmd64 { arch = platformutil.ArchX86 @@ -159,3 +211,15 @@ func CheckBrewInstall(goos platformutil.Platform) (string, error) { } return "", nil } + +// GetSandboxImage Returns the alternate image if specified, else +// if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} is used +// else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. +func GetSandboxImage(version, image string) (string, string, error) { + sha, version, err := GetSandboxImageSha(version, sandboxConfig.DefaultConfig.Prerelease) + if err != nil { + return "", version, err + } + + return fmt.Sprintf("%s:%s", image, fmt.Sprintf("dind-%s", sha)), version, nil +} diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 31c01db225..c5f5470dc0 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -9,11 +9,12 @@ import ( "os" "strings" + hversion "github.com/hashicorp/go-version" + "github.com/enescakir/emoji" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" f "github.com/flyteorg/flytectl/pkg/filesystemutils" - hversion "github.com/hashicorp/go-version" ) const ( @@ -49,19 +50,6 @@ func SetupFlyteDir() error { return nil } -// IsVersionGreaterThan check version if it's greater then other -func IsVersionGreaterThan(version1, version2 string) (bool, error) { - semanticVersion1, err := hversion.NewVersion(version1) - if err != nil { - return false, err - } - semanticVersion2, err := hversion.NewVersion(version2) - if err != nil { - return false, err - } - return semanticVersion1.GreaterThan(semanticVersion2), nil -} - // PrintSandboxMessage will print sandbox success message func PrintSandboxMessage() { kubeconfig := strings.Join([]string{ @@ -89,3 +77,16 @@ func SendRequest(method, url string, option io.Reader) (*http.Response, error) { } return response, nil } + +// IsVersionGreaterThan check version if it's greater then other +func IsVersionGreaterThan(version1, version2 string) (bool, error) { + semanticVersion1, err := hversion.NewVersion(version1) + if err != nil { + return false, err + } + semanticVersion2, err := hversion.NewVersion(version2) + if err != nil { + return false, err + } + return semanticVersion1.GreaterThan(semanticVersion2), nil +} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index b97b11804e..185b20db82 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -23,6 +23,30 @@ func TestSetupFlyteDir(t *testing.T) { assert.Nil(t, SetupFlyteDir()) } +func TestPrintSandboxMessage(t *testing.T) { + t.Run("Print Sandbox Message", func(t *testing.T) { + PrintSandboxMessage() + }) +} + +func TestSendRequest(t *testing.T) { + t.Run("Successful get request", func(t *testing.T) { + response, err := SendRequest("GET", "https://github.com", nil) + assert.Nil(t, err) + assert.NotNil(t, response) + }) + t.Run("Successful get request failed", func(t *testing.T) { + response, err := SendRequest("GET", "htp://github.com", nil) + assert.NotNil(t, err) + assert.Nil(t, response) + }) + t.Run("Successful get request failed", func(t *testing.T) { + response, err := SendRequest("GET", "https://github.com/evalsocket/flyte/archive/refs/tags/source-code.zip", nil) + assert.NotNil(t, err) + assert.Nil(t, response) + }) +} + func TestIsVersionGreaterThan(t *testing.T) { t.Run("Compare FlyteCTL version when upgrade available", func(t *testing.T) { _, err := IsVersionGreaterThan("v1.1.21", testVersion) @@ -56,27 +80,3 @@ func TestIsVersionGreaterThan(t *testing.T) { assert.NotNil(t, err) }) } - -func TestPrintSandboxMessage(t *testing.T) { - t.Run("Print Sandbox Message", func(t *testing.T) { - PrintSandboxMessage() - }) -} - -func TestSendRequest(t *testing.T) { - t.Run("Successful get request", func(t *testing.T) { - response, err := SendRequest("GET", "https://github.com", nil) - assert.Nil(t, err) - assert.NotNil(t, response) - }) - t.Run("Successful get request failed", func(t *testing.T) { - response, err := SendRequest("GET", "htp://github.com", nil) - assert.NotNil(t, err) - assert.Nil(t, response) - }) - t.Run("Successful get request failed", func(t *testing.T) { - response, err := SendRequest("GET", "https://github.com/evalsocket/flyte/archive/refs/tags/source-code.zip", nil) - assert.NotNil(t, err) - assert.Nil(t, response) - }) -} From f2ad7195694e18d519fe41b4198ff2db30a870da Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 25 Jan 2022 01:02:40 -0800 Subject: [PATCH 212/356] Update documentation (#271) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket --- flytectl/docs/source/gen/flytectl_sandbox_start.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 217b7da4b5..402342248a 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -54,6 +54,7 @@ Options -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) + --pre Optional. Pre release Version of flyte will be used for sandbox. --source string Path of your source code --version string Version of flyte. Only supports flyte releases greater than v0.10.0 From 7f2214330450eb7baec2b236da937b17c2937158 Mon Sep 17 00:00:00 2001 From: Rodrigo Baron Date: Sat, 5 Feb 2022 22:19:12 -0300 Subject: [PATCH 213/356] fix: use 'dns:///' instead of 'dns://' (#274) --- flytectl/cmd/configuration/configuration.go | 4 ++-- flytectl/cmd/configuration/configuration_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 680b6c8896..be8421a640 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -58,7 +58,7 @@ var prompt = promptui.Select{ Items: []string{"S3", "GCS"}, } -var endpointPrefix = [3]string{"dns://", "http://", "https://"} +var endpointPrefix = [3]string{"dns:///", "http://", "https://"} // CreateConfigCommand will return configuration command func CreateConfigCommand() *cobra.Command { @@ -95,7 +95,7 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { if !validateEndpointName(trimHost) { return errors.New("Please use a valid endpoint") } - templateValues.Host = fmt.Sprintf("dns://%s", trimHost) + templateValues.Host = fmt.Sprintf("dns:///%s", trimHost) templateValues.Insecure = initConfig.DefaultConfig.Insecure templateStr = configutil.AdminConfigTemplate if initConfig.DefaultConfig.Storage { diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 00fbfc29b6..4f6e6a6186 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -65,7 +65,7 @@ func TestSetupConfigFunc(t *testing.T) { } func TestTrimFunc(t *testing.T) { - assert.Equal(t, trimEndpoint("dns://localhost"), "localhost") + assert.Equal(t, trimEndpoint("dns:///localhost"), "localhost") assert.Equal(t, trimEndpoint("http://localhost"), "localhost") assert.Equal(t, trimEndpoint("https://localhost"), "localhost") } From 6947a2afdf10997480831c994bfd85a5041e0777 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 10 Feb 2022 09:02:30 +0530 Subject: [PATCH 214/356] Added reuseable workflow (#276) * Added reuseable workflow Signed-off-by: Yuvraj --- .../workflows/boilerplate-automation.yml | 42 ----- flytectl/.github/workflows/build.yaml | 87 ----------- flytectl/.github/workflows/checks.yml | 147 ++++++++++++++++++ flytectl/.github/workflows/generate-docs.yaml | 60 ------- flytectl/.github/workflows/master.yml | 27 ---- flytectl/.github/workflows/release.yml | 26 ---- flytectl/.github/workflows/sandbox.yaml | 30 ---- .../workflows/update-flyte-component.yml | 50 ------ .../.github/workflows/upgrade_automtion.yml | 21 +++ flytectl/cmd/sandbox/start_test.go | 2 +- 10 files changed, 169 insertions(+), 323 deletions(-) delete mode 100644 flytectl/.github/workflows/boilerplate-automation.yml delete mode 100644 flytectl/.github/workflows/build.yaml create mode 100644 flytectl/.github/workflows/checks.yml delete mode 100644 flytectl/.github/workflows/generate-docs.yaml delete mode 100644 flytectl/.github/workflows/master.yml delete mode 100644 flytectl/.github/workflows/release.yml delete mode 100644 flytectl/.github/workflows/sandbox.yaml delete mode 100644 flytectl/.github/workflows/update-flyte-component.yml create mode 100644 flytectl/.github/workflows/upgrade_automtion.yml diff --git a/flytectl/.github/workflows/boilerplate-automation.yml b/flytectl/.github/workflows/boilerplate-automation.yml deleted file mode 100644 index 1692c7059e..0000000000 --- a/flytectl/.github/workflows/boilerplate-automation.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Update Boilerplate Automation -on: - workflow_dispatch: - -jobs: - update-boilerplate: - name: Update Boilerplate - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - uses: crazy-max/ghaction-import-gpg@v3 - with: - gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} - git-user-signingkey: true - git-commit-gpgsign: true - - name: Update Boilerplate - run: | - make update_boilerplate - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update Boilerplate - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-boilerplate - delete-branch: true - title: 'Update Boilerplate' - body: | - Update Boilerplate - - Auto-generated by [flyte-bot] - labels: | - boilerplate - team-reviewers: | - owners - maintainers - draft: false \ No newline at end of file diff --git a/flytectl/.github/workflows/build.yaml b/flytectl/.github/workflows/build.yaml deleted file mode 100644 index 736cd5e0bb..0000000000 --- a/flytectl/.github/workflows/build.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: build - -on: - pull_request: - branches: - - master - -jobs: - dry-run-goreleaser: - name: Dry Run Goreleaser - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "2" - - uses: actions/cache@v2 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Run GoReleaser dry run - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: --snapshot --skip-publish --rm-dist - - unit-test: - name: Run unit test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "2" - - uses: actions/cache@v2 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Unit Tests - env: - GO111MODULE: "on" - CI_ENV: "true" - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} - run: make install && make test_unit_without_flag - - name: Push CodeCov - uses: codecov/codecov-action@v1.0.5 - with: - file: coverage.txt - flags: unittests - fail_ci_if_error: true - - - lint: - name: Run Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "2" - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Lint - env: - GO111MODULE: "on" - run: make install && make lint - - generate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Go generate and diff - run: DELTA_CHECK=true make generate \ No newline at end of file diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml new file mode 100644 index 0000000000..b7f29f1dc5 --- /dev/null +++ b/flytectl/.github/workflows/checks.yml @@ -0,0 +1,147 @@ +name: Flytectl Checks + +on: + workflow_dispatch: + pull_request: + branches: + - master + paths-ignore: + - "docs/**" + - "boilerplate/**" + push: + branches: + - master + paths-ignore: + - "docs/**" + - "boilerplate/**" + +jobs: + lint: + name: Lint + uses: flyteorg/flytetools/.github/workflows/lint.yml@master + + tests: + name: Unit Tests + uses: flyteorg/flytetools/.github/workflows/tests.yml@master + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + + generate: + name: Check Go Gennerate + uses: flyteorg/flytetools/.github/workflows/go_generate.yml@master + + dry_run_goreleaser: + name: Dry Run Goreleaser + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: "2" + - uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: --snapshot --skip-publish --rm-dist + + sandbox: + name: Test Getting started + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - name: Build Flytectl binary + run: make compile + - name: Create a sandbox cluster + run: bin/flytectl sandbox start + - name: Setup flytectl config + run: bin/flytectl config init + - name: Register cookbook + run: bin/flytectl register examples -d development -p flytesnacks + - name: Teardown Sandbox cluster + run: bin/flytectl sandbox teardown + + bump_version: + name: Bump Version + if: ${{ github.event_name != 'pull_request' }} + needs: [ lint, tests, generate, dry_run_goreleaser, sandbox ] # Only to ensure it can successfully build + uses: flyteorg/flytetools/.github/workflows/bump_version.yml@master + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + + generate_docs: + name: Generate documentation + needs: [ bump_version ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + lfs: true + - uses: actions/setup-go@v1 + with: + go-version: '1.17' + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: docs-pip-${{ runner.os }}-${{ hashFiles('doc-requirements.txt') }}-${{ hashFiles('doc-requirements.in') }} + restore-keys: docs-pip- + - uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} + git-user-signingkey: true + git-commit-gpgsign: true + - name: Install Dependencies + run: | + # Install all requirments + pip install -r doc-requirements.txt + - name: Generate documentation + run: | + make -C docs gendocs + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.FLYTE_BOT_PAT }} + commit-message: Update documentation + committer: Flyte-Bot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: true + branch: flyte-bot-update-documentation + delete-branch: true + title: 'Update documentation' + body: | + Update documentation + - Auto-generated by [flyte-bot] + labels: | + documentation + team-reviewers: | + owners + maintainers + draft: false + + goreleaser: + name: Goreleaser + needs: [ bump_version ] # Only to ensure it can successfully build + uses: flyteorg/flytetools/.github/workflows/goreleaser.yml@master + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + diff --git a/flytectl/.github/workflows/generate-docs.yaml b/flytectl/.github/workflows/generate-docs.yaml deleted file mode 100644 index 853aefe30e..0000000000 --- a/flytectl/.github/workflows/generate-docs.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Generate Documentation - -on: - push: - branches: - - master - -jobs: - generate-docs: - name: Generate documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - lfs: true - - uses: actions/setup-go@v1 - with: - go-version: '1.17' - - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: docs-pip-${{ runner.os }}-${{ hashFiles('doc-requirements.txt') }}-${{ hashFiles('doc-requirements.in') }} - restore-keys: docs-pip- - - uses: crazy-max/ghaction-import-gpg@v3 - with: - gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} - git-user-signingkey: true - git-commit-gpgsign: true - - name: Install Dependencies - run: | - # Install all requirments - pip install -r doc-requirements.txt - - name: Generate documentation - run: | - make -C docs gendocs - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update documentation - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-documentation - delete-branch: true - title: 'Update documentation' - body: | - Update documentation - - Auto-generated by [flyte-bot] - labels: | - documentation - team-reviewers: | - owners - maintainers - draft: false diff --git a/flytectl/.github/workflows/master.yml b/flytectl/.github/workflows/master.yml deleted file mode 100644 index 5a414d6b62..0000000000 --- a/flytectl/.github/workflows/master.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Bump Version - -on: - push: - branches: - - master - paths-ignore: - - "docs/**" - - "boilerplate/**" - -jobs: - bump-version: - name: Bump Version - runs-on: ubuntu-latest - outputs: - version: ${{ steps.bump-version.outputs.tag }} - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Bump version and push tag - id: bump-version - uses: anothrNick/github-tag-action@1.17.2 - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} - WITH_V: true - DEFAULT_BUMP: patch diff --git a/flytectl/.github/workflows/release.yml b/flytectl/.github/workflows/release.yml deleted file mode 100644 index 47d6863674..0000000000 --- a/flytectl/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release Flytectl - -on: - push: - tags: - - 'v*' - -jobs: - releaser: - name: Release flytectl - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - uses: actions/setup-go@v2 - with: - go-version: '1.17' - - name: Run GoReleaser dry run - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} diff --git a/flytectl/.github/workflows/sandbox.yaml b/flytectl/.github/workflows/sandbox.yaml deleted file mode 100644 index cb72047995..0000000000 --- a/flytectl/.github/workflows/sandbox.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Test Getting started - -on: - pull_request: - branches: - - master - -jobs: - sandbox: - name: Test Getting started - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/cache@v2 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - - name: Build Flytectl binary - run: make compile - - name: Create a sandbox cluster - run: bin/flytectl sandbox start - - name: Setup flytectl config - run: bin/flytectl config init - - name: Register cookbook - run: bin/flytectl register examples -d development -p flytesnacks - - name: Teardown Sandbox cluster - run: bin/flytectl sandbox teardown diff --git a/flytectl/.github/workflows/update-flyte-component.yml b/flytectl/.github/workflows/update-flyte-component.yml deleted file mode 100644 index ec765da89f..0000000000 --- a/flytectl/.github/workflows/update-flyte-component.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Update Flyte component -on: - workflow_dispatch: - -jobs: - update-flyte-releases: - name: Update Flyte component - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: "0" - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - uses: crazy-max/ghaction-import-gpg@v3 - with: - gpg-private-key: ${{ secrets.FLYTE_BOT_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.FLYTE_BOT_GPG_PASSPHRASE }} - git-user-signingkey: true - git-commit-gpgsign: true - - name: Update Flyte component - run: | - FLYTEIDL_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flyteidl/releases/latest" | jq -r .tag_name) - FLYTESTDLIB_VERSION=$(curl --silent "https://api.github.com/repos/flyteorg/flytestdlib/releases/latest" | jq -r .tag_name) - go get -u github.com/flyteorg/flyteidl@$FLYTEIDL_VERSION - go get -u github.com/flyteorg/flytestdlib@$FLYTESTDLIB_VERSION - go mod tidy - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.FLYTE_BOT_PAT }} - commit-message: Update Flyteidl version - committer: Flyte-Bot - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: true - branch: flyte-bot-update-flyteidl - delete-branch: true - title: 'Update Flyteidl version' - body: | - Update Flyteidl version - - Auto-generated by [flyte-bot] - labels: | - flyteidl - team-reviewers: | - owners - maintainers - draft: false \ No newline at end of file diff --git a/flytectl/.github/workflows/upgrade_automtion.yml b/flytectl/.github/workflows/upgrade_automtion.yml new file mode 100644 index 0000000000..a087b8fd04 --- /dev/null +++ b/flytectl/.github/workflows/upgrade_automtion.yml @@ -0,0 +1,21 @@ +name: Upgrade Automation +on: + workflow_dispatch: + inputs: + component: + description: "Name of Flyte component" + required: true + default: "boilerplate" + type: choice + options: + - boilerplate + - flyteidl + - flytestdlib +jobs: + trigger-upgrade: + name: ${{ github.event.inputs.component }} Upgrade + uses: flyteorg/flytetools/.github/workflows/flyte_automation.yml@master + with: + component: ${{ github.event.inputs.component }} + secrets: + FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 71c3e45ffb..fc5e18936e 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -89,7 +89,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) sandboxConfig.DefaultConfig.Version = "v0.19.1" bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, From f3f6765a3222d7ccb60baa1f3719e207f82fbeb1 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Sat, 12 Feb 2022 05:43:35 +0530 Subject: [PATCH 215/356] Fixed create project (#277) * Fixed create project Signed-off-by: Yuvraj * Fixed unit test Signed-off-by: Yuvraj --- flytectl/clierrors/errors.go | 2 +- flytectl/cmd/config/subcommand/project/project_config.go | 4 ++++ flytectl/cmd/create/project.go | 4 +--- flytectl/cmd/create/project_test.go | 2 +- flytectl/cmd/update/project.go | 3 --- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index 4f22acf5af..c3515bf212 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -3,7 +3,7 @@ package clierrors var ( ErrInvalidStateUpdate = "Invalid state passed. Specify either activate or archive\n" - ErrProjectNotPassed = "Project not passed\n" + ErrProjectNotPassed = "Project id not passed\n" // #nosec ErrProjectNameNotPassed = "project name is required flag" ErrFailedProjectUpdate = "Project %v failed to get updated due to %v\n" diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 87b9d190ed..e4c9bfb649 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -56,6 +56,10 @@ func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { if err != nil { return nil, err } + if projectSpec.Id == id { + return &projectSpec, nil + } + projectSpec.Id = id return &projectSpec, nil } diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 9cc2ecf68a..95c4909c59 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -5,8 +5,6 @@ import ( "fmt" "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -41,7 +39,7 @@ Create a project by definition file. Note: The name shouldn't contain any whites ) func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig().Project) + projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(project.DefaultProjectConfig.ID) if err != nil { return err } diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index ef55e5b365..867894c4b7 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -62,7 +62,7 @@ func TestEmptyProjectID(t *testing.T) { project.DefaultProjectConfig = &project.ConfigProject{} mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Equal(t, errors.New(clierrors.ErrProjectNameNotPassed), err) + assert.Equal(t, errors.New(clierrors.ErrProjectNotPassed), err) mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index fd5ff592ff..d63bcb80d3 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -91,9 +91,6 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma if projectSpec.Id == "" { return fmt.Errorf(clierrors.ErrProjectNotPassed) } - if projectSpec.Name == "" { - return fmt.Errorf(clierrors.ErrProjectNameNotPassed) - } state, err := project.DefaultProjectConfig.MapToAdminState() if err != nil { From f4ed59fff8b2b95348f9407225efa70d1599796e Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Tue, 15 Feb 2022 18:01:53 -0800 Subject: [PATCH 216/356] Use GetLatestRelease to list latest non-pre-release flytesnacks version #minor (#279) * Use GetLatestRelease to list latest non-pre-release flytesnacks version Signed-off-by: Eduardo Apolinario * Use GetLatestVersion Signed-off-by: Eduardo Apolinario * Move GetLatestVersion to its original place Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/cmd/register/register_util.go | 13 ++----------- flytectl/pkg/util/githubutil/githubutil.go | 3 ++- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 29e83c698d..c94c990ee2 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -561,20 +561,11 @@ func getAllExample(repository, version string) ([]*github.ReleaseAsset, *github. } return filterExampleFromRelease(release), release, nil } - releases, err := githubutil.GetListRelease(repository) + release, err := githubutil.GetLatestVersion(repository) if err != nil { return nil, nil, err } - if len(releases) == 0 { - return nil, nil, fmt.Errorf("repository doesn't have any release") - } - for _, v := range releases { - if !*v.Prerelease { - return filterExampleFromRelease(v), v, nil - } - } - return nil, nil, nil - + return filterExampleFromRelease(release), release, nil } func getRemoteStoragePath(ctx context.Context, s *storage.DataStore, remoteLocation, file, identifier string) (storage.DataReference, error) { diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/util/githubutil/githubutil.go index 075b1cc8df..257eaad970 100644 --- a/flytectl/pkg/util/githubutil/githubutil.go +++ b/flytectl/pkg/util/githubutil/githubutil.go @@ -65,7 +65,8 @@ func GetGHClient() *github.Client { return github.NewClient(&http.Client{}) } -// GetLatestVersion returns the latest version of provided repository +// GetLatestVersion returns the latest non-prerelease version of provided repository, as +// described in https://docs.github.com/en/rest/reference/releases#get-the-latest-release func GetLatestVersion(repository string) (*github.RepositoryRelease, error) { client := GetGHClient() release, _, err := client.Repositories.GetLatestRelease(context.Background(), owner, repository) From 69c6afa4ab36b093112b9a7cd3284c223c52fe01 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Thu, 17 Feb 2022 17:59:47 +0530 Subject: [PATCH 217/356] Refactor (#275) * refactor packages Signed-off-by: Yuvraj --- flytectl/cmd/register/register_util.go | 2 +- flytectl/cmd/sandbox/start.go | 18 ++++++--- flytectl/cmd/sandbox/start_test.go | 40 +++++++++---------- flytectl/cmd/upgrade/upgrade.go | 4 +- flytectl/cmd/upgrade/upgrade_test.go | 4 +- flytectl/cmd/version/version.go | 4 +- .../pkg/{util => }/githubutil/githubutil.go | 13 +++--- .../{util => }/githubutil/githubutil_test.go | 25 +++++++++++- .../{util => }/platformutil/platformutil.go | 0 .../platformutil/platformutil_test.go | 0 10 files changed, 70 insertions(+), 40 deletions(-) rename flytectl/pkg/{util => }/githubutil/githubutil.go (93%) rename flytectl/pkg/{util => }/githubutil/githubutil_test.go (75%) rename flytectl/pkg/{util => }/platformutil/platformutil.go (100%) rename flytectl/pkg/{util => }/platformutil/platformutil_test.go (100%) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index c94c990ee2..9f3b678794 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -15,7 +15,7 @@ import ( "sort" "strings" - "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 00c445d509..a946601c5c 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -9,10 +9,10 @@ import ( "path/filepath" "time" - "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/avast/retry-go" - "github.com/flyteorg/flytectl/clierrors" "github.com/olekukonko/tablewriter" corev1api "k8s.io/api/core/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -52,11 +52,19 @@ Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version avai Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +Run latest pre release of Flyte. +:: + + flytectl sandbox start --pre + +Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. + Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: flytectl sandbox start --image docker.io/my-override:latest +Note: If image flag is passed then Flytectl will ignore version and pre flags. Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: @@ -70,7 +78,7 @@ Usage taintEffect = "NoSchedule" sandboxContextName = "flyte-sandbox" sandboxDockerContext = "default" - imageName = "cr.flyte.org/flyteorg/flyte-sandbox" + sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" ) type ExecResult struct { @@ -159,8 +167,8 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu volumes = append(volumes, *vol) } sandboxImage := sandboxConfig.DefaultConfig.Image - if len(sandboxConfig.DefaultConfig.Image) == 0 { - image, version, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) + if len(sandboxImage) == 0 { + image, version, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease) if err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index fc5e18936e..a70e136334 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytectl/pkg/k8s" @@ -89,7 +89,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) sandboxConfig.DefaultConfig.Version = "v0.19.1" bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) + image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -120,7 +120,7 @@ func TestStartSandboxFunc(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -169,7 +169,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -211,7 +211,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: absPath, Target: docker.Source, }) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -246,7 +246,7 @@ func TestStartSandboxFunc(t *testing.T) { sandboxConfig.DefaultConfig.Version = "v0.18.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetSandboxImage(sandboxConfig.DefaultConfig.Version, imageName) + image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -281,7 +281,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -314,7 +314,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := docker.Volumes @@ -360,7 +360,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -402,7 +402,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -441,7 +441,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -481,7 +481,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -525,7 +525,7 @@ func TestStartSandboxFunc(t *testing.T) { if err != nil { t.Error(err) } - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -565,7 +565,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -700,26 +700,26 @@ func TestGetNodeTaintStatus(t *testing.T) { func TestGetSandboxImage(t *testing.T) { t.Run("Get Latest sandbox", func(t *testing.T) { - image, _, err := githubutil.GetSandboxImage("", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox:dind-")) }) t.Run("Get sandbox image with version ", func(t *testing.T) { - image, _, err := githubutil.GetSandboxImage("v0.14.0", imageName) + image, _, err := githubutil.GetFullyQualifiedImageName("v0.14.0", sandboxImageName, false) assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, imageName)) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetSandboxImage("v100.1.0", imageName) + _, _, err := githubutil.GetFullyQualifiedImageName("v100.1.0", sandboxImageName, false) assert.NotNil(t, err) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetSandboxImage("aaaaaa", imageName) + _, _, err := githubutil.GetFullyQualifiedImageName("aaaaaa", sandboxImageName, false) assert.NotNil(t, err) }) t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - _, _, err := githubutil.GetSandboxImage("v0.10.0", imageName) + _, _, err := githubutil.GetFullyQualifiedImageName("v0.10.0", sandboxImageName, false) assert.NotNil(t, err) }) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index b0965f20d9..37ae2feb73 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -12,13 +12,13 @@ import ( stdlibversion "github.com/flyteorg/flytestdlib/version" - "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytestdlib/logger" "github.com/mouuff/go-rocket-update/pkg/updater" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/flyteorg/flytectl/pkg/platformutil" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 9708bc43fd..d89f93aecf 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -5,10 +5,10 @@ import ( "sort" "testing" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flytectl/pkg/util/githubutil" - "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/flyteorg/flytectl/pkg/platformutil" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" stdlibversion "github.com/flyteorg/flytestdlib/version" diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index f52dd27407..2f5d9f3f62 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -6,9 +6,9 @@ import ( "fmt" "runtime" - "github.com/flyteorg/flytectl/pkg/util/githubutil" + "github.com/flyteorg/flytectl/pkg/githubutil" - "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/flyteorg/flytectl/pkg/platformutil" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" diff --git a/flytectl/pkg/util/githubutil/githubutil.go b/flytectl/pkg/githubutil/githubutil.go similarity index 93% rename from flytectl/pkg/util/githubutil/githubutil.go rename to flytectl/pkg/githubutil/githubutil.go index 257eaad970..b948fe880d 100644 --- a/flytectl/pkg/util/githubutil/githubutil.go +++ b/flytectl/pkg/githubutil/githubutil.go @@ -8,15 +8,13 @@ import ( "runtime" "strings" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytestdlib/logger" "golang.org/x/oauth2" - "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/flyteorg/flytectl/pkg/platformutil" stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/mouuff/go-rocket-update/pkg/provider" "github.com/mouuff/go-rocket-update/pkg/updater" @@ -105,7 +103,7 @@ func GetSandboxImageSha(version string, pre bool) (string, string, error) { break } } - logger.Infof(context.Background(), "sandbox started with release %s", release.GetTagName()) + logger.Infof(context.Background(), "starting with release %s", release.GetTagName()) } else if len(version) > 0 { r, err := CheckVersionExist(version, flyte) if err != nil { @@ -213,11 +211,12 @@ func CheckBrewInstall(goos platformutil.Platform) (string, error) { return "", nil } -// GetSandboxImage Returns the alternate image if specified, else +// GetFullyQualifiedImageName Returns the sandbox image, version and error // if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} is used // else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. -func GetSandboxImage(version, image string) (string, string, error) { - sha, version, err := GetSandboxImageSha(version, sandboxConfig.DefaultConfig.Prerelease) +// If pre release is true then use latest pre release of Flyte, In that case User don't need to pass version +func GetFullyQualifiedImageName(version, image string, pre bool) (string, string, error) { + sha, version, err := GetSandboxImageSha(version, pre) if err != nil { return "", version, err } diff --git a/flytectl/pkg/util/githubutil/githubutil_test.go b/flytectl/pkg/githubutil/githubutil_test.go similarity index 75% rename from flytectl/pkg/util/githubutil/githubutil_test.go rename to flytectl/pkg/githubutil/githubutil_test.go index 2f2eb64345..70f383034d 100644 --- a/flytectl/pkg/util/githubutil/githubutil_test.go +++ b/flytectl/pkg/githubutil/githubutil_test.go @@ -8,11 +8,13 @@ import ( stdlibversion "github.com/flyteorg/flytestdlib/version" - "github.com/flyteorg/flytectl/pkg/util/platformutil" + "github.com/flyteorg/flytectl/pkg/platformutil" "github.com/stretchr/testify/assert" ) +var sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" + func TestGetLatestVersion(t *testing.T) { t.Run("Get latest release with wrong url", func(t *testing.T) { _, err := GetLatestVersion("fl") @@ -42,6 +44,27 @@ func TestCheckVersionExist(t *testing.T) { }) } +func TestGetFullyQualifiedImageName(t *testing.T) { + t.Run("Get tFully Qualified Image Name ", func(t *testing.T) { + image, tag, err := GetFullyQualifiedImageName("", sandboxImageName, false) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(tag, "v")) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) + t.Run("Get tFully Qualified Image Name with pre release", func(t *testing.T) { + image, tag, err := GetFullyQualifiedImageName("", sandboxImageName, true) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(tag, "v")) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) + t.Run("Get tFully Qualified Image Name with specific version", func(t *testing.T) { + image, tag, err := GetFullyQualifiedImageName("v0.19.0", sandboxImageName, true) + assert.Nil(t, err) + assert.Equal(t, "v0.19.0", tag) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) +} + func TestGetSHAFromVersion(t *testing.T) { t.Run("Invalid Tag", func(t *testing.T) { _, err := GetSHAFromVersion("v100.0.0", "flyte") diff --git a/flytectl/pkg/util/platformutil/platformutil.go b/flytectl/pkg/platformutil/platformutil.go similarity index 100% rename from flytectl/pkg/util/platformutil/platformutil.go rename to flytectl/pkg/platformutil/platformutil.go diff --git a/flytectl/pkg/util/platformutil/platformutil_test.go b/flytectl/pkg/platformutil/platformutil_test.go similarity index 100% rename from flytectl/pkg/util/platformutil/platformutil_test.go rename to flytectl/pkg/platformutil/platformutil_test.go From 3199afa1b80dba319fe483c76597a30599974d26 Mon Sep 17 00:00:00 2001 From: Alekhya Sai Date: Thu, 17 Feb 2022 20:19:04 +0530 Subject: [PATCH 218/356] Modified latest version message (#283) Signed-off-by: Alekhya Sai Punnamaraju --- flytectl/cmd/upgrade/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 37ae2feb73..89963b3b71 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -115,7 +115,7 @@ func isUpgradeSupported(goos platformutil.Platform) (bool, error) { if isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version); err != nil { return false, err } else if !isGreater { - fmt.Println("You have already latest version of flytectl") + fmt.Println("You already have the latest version of flytectl") return false, nil } From 5d691856f16913ed004742a07a774565e24d2005 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 18 Feb 2022 08:01:13 +0530 Subject: [PATCH 219/356] bump docker/distribution (#281) Signed-off-by: Yuvraj --- flytectl/go.mod | 2 +- flytectl/go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 3481e540f0..b34924a30d 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -66,7 +66,7 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/danieljoos/wincred v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/evanphx/json-patch v4.9.0+incompatible // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index a1093f10c1..9787249411 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -314,8 +314,9 @@ github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= +github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= From 7992166921f620dd42a043b1e8bd4a643306e3e4 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 17 Feb 2022 18:42:32 -0800 Subject: [PATCH 220/356] Update documentation (#282) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_sandbox_start.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 402342248a..ec6fa871cf 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -29,11 +29,19 @@ Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version avai Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +Run latest pre release of Flyte. +:: + + flytectl sandbox start --pre + +Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. + Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: flytectl sandbox start --image docker.io/my-override:latest +Note: If image flag is passed then Flytectl will ignore version and pre flags. Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: From fc506a38d69aa6b836d227adc69adac27afb728a Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Thu, 17 Feb 2022 21:15:13 -0800 Subject: [PATCH 221/356] Update documentation (#284) Signed-off-by: Flyte-Bot Co-authored-by: evalsocket From 9cb07f9a14d46dc3151c4be33c631d0a70e198e0 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 19 Feb 2022 09:16:53 +0530 Subject: [PATCH 222/356] Fixed validation logic for launch plan schedule registration (#280) --- flytectl/cmd/register/register_util.go | 119 ++++- flytectl/cmd/register/register_util_test.go | 442 ++++++++++++++---- .../testdata/152_my_cron_scheduled_lp_3.pb | Bin 0 -> 373 bytes 3 files changed, 442 insertions(+), 119 deletions(-) create mode 100644 flytectl/cmd/register/testdata/152_my_cron_scheduled_lp_3.pb diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 9f3b678794..f81c438fec 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -275,39 +275,94 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode, sourceUploadPath, version return nil } -func validateLaunchSpec(lpSpec *admin.LaunchPlanSpec) error { - if lpSpec == nil { - return nil - } - if lpSpec.EntityMetadata != nil && lpSpec.EntityMetadata.Schedule != nil { - schedule := lpSpec.EntityMetadata.Schedule - var scheduleFixedParams []string - if lpSpec.DefaultInputs != nil { - for paramKey := range lpSpec.DefaultInputs.Parameters { - if paramKey != schedule.KickoffTimeInputArg { - scheduleFixedParams = append(scheduleFixedParams, paramKey) - } +func validateLPWithSchedule(lpSpec *admin.LaunchPlanSpec, wf *admin.Workflow) error { + schedule := lpSpec.EntityMetadata.Schedule + var scheduleRequiredParams []string + if wf != nil && wf.Closure != nil && wf.Closure.CompiledWorkflow != nil && + wf.Closure.CompiledWorkflow.Primary != nil && wf.Closure.CompiledWorkflow.Primary.Template != nil && + wf.Closure.CompiledWorkflow.Primary.Template.Interface != nil && + wf.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs != nil { + variables := wf.Closure.CompiledWorkflow.Primary.Template.Interface.Inputs.Variables + for varName := range variables { + if varName != schedule.KickoffTimeInputArg { + scheduleRequiredParams = append(scheduleRequiredParams, varName) } } - if (lpSpec.FixedInputs == nil && len(scheduleFixedParams) > 0) || - (len(scheduleFixedParams) > len(lpSpec.FixedInputs.Literals)) { - fixedInputLen := 0 - if lpSpec.FixedInputs != nil { - fixedInputLen = len(lpSpec.FixedInputs.Literals) + + } + // Either the scheduled param should have default or fixed values + var scheduleParamsWithValues []string + // Check for default values + if lpSpec.DefaultInputs != nil { + for paramName := range lpSpec.DefaultInputs.Parameters { + if paramName != schedule.KickoffTimeInputArg { + scheduleParamsWithValues = append(scheduleParamsWithValues, paramName) } - return fmt.Errorf("param values are missing on scheduled workflow."+ - "additional args other than %v on scheduled workflow are %v > %v fixed values", schedule.KickoffTimeInputArg, - len(scheduleFixedParams), fixedInputLen) } } + // Check for fixed values + if lpSpec.FixedInputs != nil && lpSpec.FixedInputs.Literals != nil { + for fixedLiteralName := range lpSpec.FixedInputs.Literals { + scheduleParamsWithValues = append(scheduleParamsWithValues, fixedLiteralName) + } + } + + diffSet := leftDiff(scheduleRequiredParams, scheduleParamsWithValues) + if len(diffSet) > 0 { + return fmt.Errorf("param values are missing on scheduled workflow "+ + "for the following params %v. Either specify them having a default or fixed value", diffSet) + } return nil } -func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccount string, configOutputLocationPrefix string, lpSpec *admin.LaunchPlanSpec) error { - - if err := validateLaunchSpec(lpSpec); err != nil { +func validateLaunchSpec(ctx context.Context, lpSpec *admin.LaunchPlanSpec, cmdCtx cmdCore.CommandContext) error { + if lpSpec == nil || lpSpec.WorkflowId == nil || lpSpec.EntityMetadata == nil || + lpSpec.EntityMetadata.Schedule == nil { + return nil + } + // Fetch the workflow spec using the identifier + workflowID := lpSpec.WorkflowId + wf, err := cmdCtx.AdminFetcherExt().FetchWorkflowVersion(ctx, workflowID.Name, workflowID.Version, + workflowID.Project, workflowID.Domain) + if err != nil { return err } + + return validateLPWithSchedule(lpSpec, wf) +} + +// Finds the left diff between to two string slices +// If a and b are two sets then the o/p c is defined as : +// c = a - a ^ b +// where ^ is intersection slice of a and b +// and - removes all the common elements and returns a new slice +// a= {1,2,3} +// b = {3,4,5} +// o/p c = {1,2} +func leftDiff(a, b []string) []string { + m := make(map[string]bool) + + for _, item := range a { + m[item] = true + } + + for _, item := range b { + delete(m, item) + } + // nil semantics on return + if len(m) == 0 { + return nil + } + c := make([]string, len(m)) + index := 0 + for item := range m { + c[index] = item + index++ + } + return c +} + +func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccount string, configOutputLocationPrefix string, lpSpec *admin.LaunchPlanSpec) error { assumableIamRole := len(configAssumableIamRole) > 0 k8sServiceAcct := len(configK8sServiceAccount) > 0 outputLocationPrefix := len(configOutputLocationPrefix) > 0 @@ -325,6 +380,18 @@ func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccoun return nil } +// Validate the spec before sending it to admin. +func validateSpec(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext) error { + switch v := message.(type) { + case *admin.LaunchPlan: + launchPlan := v + if err := validateLaunchSpec(ctx, launchPlan.Spec, cmdCtx); err != nil { + return err + } + } + return nil +} + func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesConfig) error { switch v := message.(type) { case *admin.LaunchPlan: @@ -479,7 +546,11 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu } logger.Debugf(ctx, "Hydrated spec : %v", getJSONSpec(spec)) - + if err = validateSpec(ctx, spec, cmdCtx); err != nil { + registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} + registerResults = append(registerResults, registerResult) + return registerResults, err + } if err := register(ctx, spec, cmdCtx, config.DryRun); err != nil { // If error is AlreadyExists then dont consider this to be an error but just a warning state if grpcError := status.Code(err); grpcError == codes.AlreadyExists { diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index a711495293..15a14a8887 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -1,11 +1,13 @@ package register import ( + "context" "errors" "fmt" "net/http" "os" "path/filepath" + "sort" "strings" "testing" @@ -13,7 +15,6 @@ import ( v1 "k8s.io/api/core/v1" - "github.com/flyteorg/flyteidl/clients/go/coreutils" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" "github.com/flyteorg/flytestdlib/promutils/labeled" @@ -224,6 +225,61 @@ func TestRegisterFile(t *testing.T) { assert.Equal(t, 1, len(results)) assert.Nil(t, err) }) + t.Run("Failed Scheduled launch plan registration", func(t *testing.T) { + setup() + registerFilesSetup() + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var1", + }, + "var2": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var2 long descriptions probably needs truncate", + }, + } + wf := &admin.Workflow{ + Closure: &admin.WorkflowClosure{ + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Primary: &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + }, + } + mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + args = []string{"testdata/152_my_cron_scheduled_lp_3.pb"} + var registerResults []Result + results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + assert.Equal(t, 1, len(results)) + assert.Equal(t, "Failed", results[0].Status) + assert.Equal(t, "Error hydrating spec due to param values are missing on scheduled workflow for"+ + " the following params [var1 var2]. Either specify them having a default or fixed value", results[0].Info) + assert.NotNil(t, err) + }) t.Run("Non existent file", func(t *testing.T) { setup() registerFilesSetup() @@ -313,100 +369,6 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { assert.Nil(t, err) assert.Equal(t, &admin.RawOutputDataConfig{OutputLocationPrefix: "prefix"}, lpSpec.RawOutputDataConfig) }) - t.Run("Validation successful", func(t *testing.T) { - lpSpec := &admin.LaunchPlanSpec{ - EntityMetadata: &admin.LaunchPlanMetadata{ - Schedule: &admin.Schedule{ - ScheduleExpression: &admin.Schedule_CronExpression{ - CronExpression: "foo", - }, - KickoffTimeInputArg: "kickoff_time_arg", - }, - }, - FixedInputs: &core.LiteralMap{ - Literals: map[string]*core.Literal{}, - }, - } - err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) - assert.Nil(t, err) - }) - t.Run("Validation failure", func(t *testing.T) { - lpSpec := &admin.LaunchPlanSpec{ - EntityMetadata: &admin.LaunchPlanMetadata{ - Schedule: &admin.Schedule{ - ScheduleExpression: &admin.Schedule_CronExpression{ - CronExpression: "expr", - }, - KickoffTimeInputArg: "kickoff_time_arg", - }, - }, - DefaultInputs: &core.ParameterMap{ - Parameters: map[string]*core.Parameter{ - "bar": { - Var: &core.Variable{ - Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, - }, - }, - }, - }, - FixedInputs: &core.LiteralMap{ - Literals: map[string]*core.Literal{}, - }, - } - err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) - assert.NotNil(t, err) - }) - t.Run("Validation failed with fixed inputs empty", func(t *testing.T) { - lpSpec := &admin.LaunchPlanSpec{ - EntityMetadata: &admin.LaunchPlanMetadata{ - Schedule: &admin.Schedule{ - ScheduleExpression: &admin.Schedule_CronExpression{ - CronExpression: "expr", - }, - KickoffTimeInputArg: "kickoff_time_arg", - }, - }, - DefaultInputs: &core.ParameterMap{ - Parameters: map[string]*core.Parameter{ - "bar": { - Var: &core.Variable{ - Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, - }, - }, - }, - }, - } - err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) - assert.NotNil(t, err) - }) - t.Run("Validation success with fixed", func(t *testing.T) { - lpSpec := &admin.LaunchPlanSpec{ - EntityMetadata: &admin.LaunchPlanMetadata{ - Schedule: &admin.Schedule{ - ScheduleExpression: &admin.Schedule_CronExpression{ - CronExpression: "expr", - }, - KickoffTimeInputArg: "kickoff_time_arg", - }, - }, - DefaultInputs: &core.ParameterMap{ - Parameters: map[string]*core.Parameter{ - "bar": { - Var: &core.Variable{ - Type: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}, - }, - }, - }, - }, - FixedInputs: &core.LiteralMap{ - Literals: map[string]*core.Literal{ - "bar": coreutils.MustMakeLiteral("bar-value"), - }, - }, - } - err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) - assert.Nil(t, err) - }) } func TestUploadFastRegisterArtifact(t *testing.T) { @@ -550,3 +512,293 @@ func TestHydrateTaskSpec(t *testing.T) { assert.Len(t, hydratedPodSpec.Containers[1].Args, 2) assert.True(t, strings.HasSuffix(hydratedPodSpec.Containers[1].Args[1], "sourcey")) } + +func TestLeftDiff(t *testing.T) { + t.Run("empty slices", func(t *testing.T) { + c := leftDiff(nil, nil) + assert.Empty(t, c) + }) + t.Run("right empty slice", func(t *testing.T) { + a := []string{"1", "2", "3"} + c := leftDiff(a, nil) + sort.Strings(a) + sort.Strings(c) + assert.Equal(t, a, c) + }) + t.Run("non empty slices without intersection", func(t *testing.T) { + a := []string{"1", "2", "3"} + b := []string{"5", "6", "7"} + c := leftDiff(a, b) + sort.Strings(a) + sort.Strings(c) + assert.Equal(t, a, c) + }) + t.Run("non empty slices with some intersection", func(t *testing.T) { + a := []string{"1", "2", "3"} + b := []string{"2", "5", "7"} + c := leftDiff(a, b) + expected := []string{"1", "3"} + sort.Strings(expected) + sort.Strings(c) + assert.Equal(t, expected, c) + }) + + t.Run("non empty slices with full intersection same order", func(t *testing.T) { + a := []string{"1", "2", "3"} + b := []string{"1", "2", "3"} + c := leftDiff(a, b) + var expected []string + sort.Strings(c) + assert.Equal(t, expected, c) + }) + + t.Run("non empty slices with full intersection diff order", func(t *testing.T) { + a := []string{"1", "2", "3"} + b := []string{"2", "3", "1"} + c := leftDiff(a, b) + var expected []string + sort.Strings(c) + assert.Equal(t, expected, c) + }) +} + +func TestValidateLaunchSpec(t *testing.T) { + ctx := context.Background() + t.Run("nil launchplan spec", func(t *testing.T) { + registerFilesSetup() + err := validateLaunchSpec(ctx, nil, cmdCtx) + assert.Nil(t, err) + }) + t.Run("launchplan spec with nil workflow id", func(t *testing.T) { + registerFilesSetup() + lpSpec := &admin.LaunchPlanSpec{} + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.Nil(t, err) + }) + t.Run("launchplan spec with empty metadata", func(t *testing.T) { + registerFilesSetup() + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + } + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.Nil(t, err) + }) + t.Run("launchplan spec with metadata and empty schedule", func(t *testing.T) { + registerFilesSetup() + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{}, + } + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.Nil(t, err) + }) + t.Run("validate spec failed to fetch workflow", func(t *testing.T) { + setup() + registerFilesSetup() + + mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + KickoffTimeInputArg: "kick_off_time_arg", + }, + }, + } + lp := &admin.LaunchPlan{ + Spec: lpSpec, + } + err := validateSpec(ctx, lp, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, "failed", err.Error()) + }) + t.Run("failed to fetch workflow", func(t *testing.T) { + setup() + registerFilesSetup() + + mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + KickoffTimeInputArg: "kick_off_time_arg", + }, + }, + } + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, "failed", err.Error()) + }) + t.Run("launchplan spec missing required param schedule", func(t *testing.T) { + setup() + registerFilesSetup() + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var1", + }, + "var2": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var2 long descriptions probably needs truncate", + }, + } + wf := &admin.Workflow{ + Closure: &admin.WorkflowClosure{ + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Primary: &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + }, + } + mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + KickoffTimeInputArg: "kick_off_time_arg", + }, + }, + } + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, "param values are missing on scheduled workflow for the following params [var1 var2]."+ + " Either specify them having a default or fixed value", err.Error()) + }) + t.Run("launchplan spec non empty schedule required param success", func(t *testing.T) { + setup() + registerFilesSetup() + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var1", + }, + "var2": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var2 long descriptions probably needs truncate", + }, + } + wf := &admin.Workflow{ + Closure: &admin.WorkflowClosure{ + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Primary: &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + }, + } + mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + KickoffTimeInputArg: "kick_off_time_arg", + }, + }, + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{ + "var1": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}, + }, + }, + }, + }, + }, + FixedInputs: &core.LiteralMap{ + Literals: map[string]*core.Literal{ + "var2": { + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + }, + }, + }, + }, + } + err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + assert.Nil(t, err) + }) +} diff --git a/flytectl/cmd/register/testdata/152_my_cron_scheduled_lp_3.pb b/flytectl/cmd/register/testdata/152_my_cron_scheduled_lp_3.pb new file mode 100644 index 0000000000000000000000000000000000000000..9f56c79ae1e1a3344fb64aea12dd0ffc20d17da3 GIT binary patch literal 373 zcmbV|%}N6?5XX~Rp^P7gAf*P1%N{)JVMQ;3C(ph_2-!)EyV)$0=pv;r;K5hcprF)3 z4>G5jAO8;q+S!4S>vci6axsxkF7)+4;R#JDHXC{Vmo>p_*Jo6o`B!Bq^eUQ1Y@R!8 zR5w&RW-mxFn`VXh;PB38lm7pmDO!B|Jwgrbv*b<64h|CYg)^)*4cEj%2 M1AF64P6d Date: Fri, 4 Mar 2022 19:50:37 +0530 Subject: [PATCH 223/356] Added env flag for sandbox start (#273) * Added env flag for sandbox start Signed-off-by: Prafulla Mahindrakar * ADDED docs for FLYTE_TIMEOUT Signed-off-by: Prafulla Mahindrakar * Fixed validation logic for launch plan schedule registration (#280) Signed-off-by: Prafulla Mahindrakar Signed-off-by: pmahindrakar-oss * boilerplate updates Signed-off-by: Prafulla Mahindrakar * fixed unit test after stdlib upgrade Signed-off-by: Prafulla Mahindrakar * fixed unit test Signed-off-by: Prafulla Mahindrakar --- .../flyte/golang_support_tools/go.mod | 182 +++++++++++++++++- .../flyte/golang_support_tools/tools.go | 2 +- .../golang_test_targets/download_tooling.sh | 4 +- .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 14 ++ .../subcommand/sandbox/sandbox_config.go | 3 + .../cmd/configuration/configuration_test.go | 17 +- flytectl/cmd/register/register_util_test.go | 6 +- flytectl/cmd/sandbox/start.go | 29 ++- .../source/gen/flytectl_sandbox_start.rst | 23 +++ flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- flytectl/pkg/docker/docker_util.go | 5 +- flytectl/pkg/docker/docker_util_test.go | 36 +++- 14 files changed, 303 insertions(+), 25 deletions(-) diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 13941936c5..307398c89e 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -1,13 +1,191 @@ module github.com/flyteorg/boilerplate -go 1.16 +go 1.17 require ( github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.4.7 github.com/golangci/golangci-lint v1.38.0 + github.com/pseudomuto/protoc-gen-doc v1.4.1 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 - github.com/pseudomuto/protoc-gen-doc v0.1.1 // indirect +) + +require ( + 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect + cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go/storage v1.12.0 // indirect + github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.17 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.15.0+incompatible // indirect + github.com/OpenPeeDeeP/depguard v1.0.1 // indirect + github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/aokoli/goutils v1.0.1 // indirect + github.com/ashanbrown/forbidigo v1.1.0 // indirect + github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a // indirect + github.com/aws/aws-sdk-go v1.37.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.0 // indirect + github.com/bombsimon/wsl/v3 v3.2.0 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/charithe/durationcheck v0.0.6 // indirect + github.com/coocood/freecache v1.1.1 // indirect + github.com/daixiang0/gci v0.2.8 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/denis-tingajkin/go-header v0.4.2 // indirect + github.com/envoyproxy/protoc-gen-validate v0.3.0-java // indirect + github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 // indirect + github.com/esimonov/ifshort v1.0.1 // indirect + github.com/fatih/color v1.10.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fzipp/gocyclo v0.3.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-critic/go-critic v0.5.4 // indirect + github.com/go-logr/logr v0.4.0 // indirect + github.com/go-toolsmith/astcast v1.0.0 // indirect + github.com/go-toolsmith/astcopy v1.0.0 // indirect + github.com/go-toolsmith/astequal v1.0.0 // indirect + github.com/go-toolsmith/astfmt v1.0.0 // indirect + github.com/go-toolsmith/astp v1.0.0 // indirect + github.com/go-toolsmith/strparse v1.0.0 // indirect + github.com/go-toolsmith/typep v1.0.2 // indirect + github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.8.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.4.3 // indirect + github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect + github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect + github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect + github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect + github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect + github.com/golangci/misspell v0.3.5 // indirect + github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 // indirect + github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/google/go-cmp v0.5.4 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 // indirect + github.com/gostaticanalysis/analysisutil v0.4.1 // indirect + github.com/gostaticanalysis/comment v1.4.1 // indirect + github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect + github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/graymeta/stow v0.2.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/huandu/xstrings v1.0.0 // indirect + github.com/imdario/mergo v0.3.5 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jgautheron/goconst v1.4.0 // indirect + github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d // indirect + github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jstemmer/go-junit-report v0.9.1 // indirect + github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 // indirect + github.com/kisielk/errcheck v1.6.0 // indirect + github.com/kisielk/gotool v1.0.0 // indirect + github.com/kulti/thelper v0.4.0 // indirect + github.com/kunwardeep/paralleltest v1.0.2 // indirect + github.com/kyoh86/exportloopref v0.1.8 // indirect + github.com/magefile/mage v1.10.0 // indirect + github.com/magiconair/properties v1.8.4 // indirect + github.com/maratori/testpackage v1.0.1 // indirect + github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mbilski/exhaustivestruct v1.2.0 // indirect + github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 // indirect + github.com/mgechev/revive v1.0.3 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/moricho/tparallel v0.2.1 // indirect + github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect + github.com/nakabonne/nestif v0.3.0 // indirect + github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 // indirect + github.com/ncw/swift v1.0.53 // indirect + github.com/nishanths/exhaustive v0.1.0 // indirect + github.com/nishanths/predeclared v0.2.1 // indirect + github.com/olekukonko/tablewriter v0.0.4 // indirect + github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect + github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f // indirect + github.com/prometheus/client_golang v1.9.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.15.0 // indirect + github.com/prometheus/procfs v0.3.0 // indirect + github.com/pseudomuto/protokit v0.2.0 // indirect + github.com/quasilyte/go-ruleguard v0.3.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect + github.com/ryancurrah/gomodguard v1.2.0 // indirect + github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect + github.com/sanposhiho/wastedassign v0.1.3 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/securego/gosec/v2 v2.6.1 // indirect + github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect + github.com/sirupsen/logrus v1.8.0 // indirect + github.com/sonatard/noctx v0.0.1 // indirect + github.com/sourcegraph/go-diff v0.6.1 // indirect + github.com/spf13/afero v1.5.1 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/cobra v1.1.3 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.7.1 // indirect + github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect + github.com/stretchr/objx v0.3.0 // indirect + github.com/stretchr/testify v1.7.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect + github.com/tetafro/godot v1.4.4 // indirect + github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect + github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.3.1 // indirect + github.com/ultraware/funlen v0.0.3 // indirect + github.com/ultraware/whitespace v0.0.4 // indirect + github.com/uudashr/gocognit v1.0.1 // indirect + go.opencensus.io v0.22.6 // indirect + golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/mod v0.4.1 // indirect + golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect + golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + golang.org/x/tools v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/api v0.38.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect + google.golang.org/grpc v1.35.0 // indirect + google.golang.org/protobuf v1.25.0 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + honnef.co/go/tools v0.1.2 // indirect + k8s.io/apimachinery v0.20.2 // indirect + k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 // indirect + k8s.io/klog/v2 v2.5.0 // indirect + mvdan.cc/gofumpt v0.1.0 // indirect + mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect + mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect + mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect ) replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index eee691d8c3..d970d2106a 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -7,5 +7,5 @@ import ( _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/vektra/mockery/cmd/mockery" - - "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" + _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index c0ab06b063..02fb004881 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -17,8 +17,8 @@ set -e # In the format of ":" or ":" if no cli tools=( "github.com/vektra/mockery/cmd/mockery" - "github.com/flyteorg/flytestdlib/cli/pflags" - "github.com/golangci/golangci-lint/cmd/golangci-lint" + "github.com/flyteorg/flytestdlib/cli/pflags@latest" + "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 5e4451b922..0355ee08f5 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -54,6 +54,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") cmdFlags.BoolVar(&DefaultConfig.Prerelease, fmt.Sprintf("%v%v", prefix, "pre"), DefaultConfig.Prerelease, "Optional. Pre release Version of flyte will be used for sandbox.") + cmdFlags.StringSliceVar(&DefaultConfig.Env, fmt.Sprintf("%v%v", prefix, "env"), DefaultConfig.Env, "Optional. Provide Env variable in key=value format which can be passed to sandbox container.") cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index da98f59320..6433a3e647 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -155,6 +155,20 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_env", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := join_Config(DefaultConfig.Env, ",") + + cmdFlags.Set("env", testValue) + if vStringSlice, err := cmdFlags.GetStringSlice("env"); err == nil { + testDecodeRaw_Config(t, join_Config(vStringSlice, ","), &actual.Env) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_imagePullPolicy", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 77246f09d0..be553a4efc 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -47,6 +47,9 @@ type Config struct { // Default value false represents that flytectl will not use latest pre release if exist Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."` + // Optionally it is possible to pass in environment variables to sandbox container. + Env []string `json:"env" pflag:",Optional. Provide Env variable in key=value format which can be passed to sandbox container."` + // Optionally it is possible to use local sandbox image // If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 4f6e6a6186..bb2d256229 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -23,19 +23,22 @@ func TestCreateInitCommand(t *testing.T) { assert.Equal(t, configCmd.Use, "config") assert.Equal(t, configCmd.Short, "Runs various config commands, look at the help of this command to get a list of available commands..") fmt.Println(configCmd.Commands()) - assert.Equal(t, len(configCmd.Commands()), 3) + assert.Equal(t, 4, len(configCmd.Commands())) cmdNouns := configCmd.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { return cmdNouns[i].Use < cmdNouns[j].Use }) - assert.Equal(t, cmdNouns[0].Use, "discover") - assert.Equal(t, cmdNouns[0].Short, "Searches for a config in one of the default search paths.") - assert.Equal(t, cmdNouns[1].Use, "init") - assert.Equal(t, cmdNouns[1].Short, initCmdShort) - assert.Equal(t, cmdNouns[2].Use, "validate") - assert.Equal(t, cmdNouns[2].Short, "Validates the loaded config.") + assert.Equal(t, "discover", cmdNouns[0].Use) + assert.Equal(t, "Searches for a config in one of the default search paths.", cmdNouns[0].Short) + assert.Equal(t, "docs", cmdNouns[1].Use) + assert.Equal(t, "Generate configuration documetation in rst format", cmdNouns[1].Short) + + assert.Equal(t, "init", cmdNouns[2].Use) + assert.Equal(t, initCmdShort, cmdNouns[2].Short) + assert.Equal(t, "validate", cmdNouns[3].Use) + assert.Equal(t, "Validates the loaded config.", cmdNouns[3].Short) } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 15a14a8887..491c0c1f98 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -276,8 +276,7 @@ func TestRegisterFile(t *testing.T) { results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) - assert.Equal(t, "Error hydrating spec due to param values are missing on scheduled workflow for"+ - " the following params [var1 var2]. Either specify them having a default or fixed value", results[0].Info) + assert.Contains(t, results[0].Info, "param values are missing on scheduled workflow for the following params") assert.NotNil(t, err) }) t.Run("Non existent file", func(t *testing.T) { @@ -709,8 +708,7 @@ func TestValidateLaunchSpec(t *testing.T) { } err := validateLaunchSpec(ctx, lpSpec, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, "param values are missing on scheduled workflow for the following params [var1 var2]."+ - " Either specify them having a default or fixed value", err.Error()) + assert.Contains(t, err.Error(), "param values are missing on scheduled workflow for the following params") }) t.Run("launchplan spec non empty schedule required param success", func(t *testing.T) { setup() diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index a946601c5c..ece842beb8 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -70,6 +70,28 @@ Specify a Flyte Sandbox image pull policy. Possible pull policy values are Alway :: flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always + +Start sandbox cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. +eg : for passing timeout value in secs for the sandbox container use the following. +:: + + flytectl sandbox start --env FLYTE_TIMEOUT=700 + + +The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: +s - seconds (default) +m - minutes +h - hours +d - days +When no unit is used, it defaults to seconds. If the duration is set to zero, the associated timeout is disabled. + + +eg : for passing multiple environment variables +:: + + flytectl sandbox start --env USER=foo --env PASSWORD=bar + + Usage ` k8sEndpoint = "https://127.0.0.1:30086" @@ -161,7 +183,8 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } volumes := docker.Volumes - if vol, err := mountVolume(sandboxConfig.DefaultConfig.Source, docker.Source); err != nil { + sandboxDefaultConfig := sandboxConfig.DefaultConfig + if vol, err := mountVolume(sandboxDefaultConfig.Source, docker.Source); err != nil { return nil, err } else if vol != nil { volumes = append(volumes, *vol) @@ -182,7 +205,9 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) exposedPorts, portBindings, _ := docker.GetSandboxPorts() - ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, sandboxImage) + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, + sandboxImage, sandboxDefaultConfig.Env) + if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return nil, err diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index ec6fa871cf..941cb57926 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -47,6 +47,28 @@ Specify a Flyte Sandbox image pull policy. Possible pull policy values are Alway :: flytectl sandbox start --image docker.io/my-override:latest --imagePullPolicy Always + +Start sandbox cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. +eg : for passing timeout value in secs for the sandbox container use the following. +:: + + flytectl sandbox start --env FLYTE_TIMEOUT=700 + + +The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: +s - seconds (default) +m - minutes +h - hours +d - days +When no unit is used, it defaults to seconds. If the duration is set to zero, the associated timeout is disabled. + + +eg : for passing multiple environment variables +:: + + flytectl sandbox start --env USER=foo --env PASSWORD=bar + + Usage @@ -59,6 +81,7 @@ Options :: + --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) diff --git a/flytectl/go.mod b/flytectl/go.mod index b34924a30d..096232e2c3 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v0.21.24 - github.com/flyteorg/flytestdlib v0.4.0 + github.com/flyteorg/flytestdlib v0.4.14 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 9787249411..a3a5753e53 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -359,8 +359,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v0.21.24 h1:e2wPBK4aiLE+fw2zmhUDNg39QoJk6Lf5lQRvj8XgtFk= github.com/flyteorg/flyteidl v0.21.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.4.0 h1:cEMkNfjocCuBSLzM9tKjsODhkr5gXTZAGl6k62FrT60= -github.com/flyteorg/flytestdlib v0.4.0/go.mod h1:7cDWkY3v7xsoesFcDdu6DSW5Q2U2W5KlHUbUHSwBG1Q= +github.com/flyteorg/flytestdlib v0.4.14 h1:qpPwvJ+DqM1fI/y5uPKAP8p8VONz8oRp9Fz0jFl/5aI= +github.com/flyteorg/flytestdlib v0.4.14/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index a1d952475f..cf8f96a2c6 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -131,7 +131,10 @@ func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy s } //StartContainer will create and start docker container -func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, name, image string) (string, error) { +func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, exposedPorts map[nat.Port]struct{}, + portBindings map[nat.Port][]nat.PortBinding, name, image string, additionalEnvVars []string) (string, error) { + // Append the additional env variables to the default list of env + Environment = append(Environment, additionalEnvVars...) resp, err := cli.ContainerCreate(ctx, &container.Config{ Env: Environment, Image: image, diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index cc27fd8af4..1915722640 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -166,12 +166,42 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") }) + t.Run("Successfully create a container with Env", func(t *testing.T) { + setupSandbox() + mockDocker := &mocks.Docker{} + context := context.Background() + // Setup additional env + additionalEnv := []string{"a=1", "b=2"} + expectedEnv := append(Environment, "a=1") + expectedEnv = append(expectedEnv, "b=2") + + // Verify the attributes + mockDocker.OnContainerCreate(context, &container.Config{ + Env: expectedEnv, + Image: imageName, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, additionalEnv) + assert.Nil(t, err) + assert.Greater(t, len(id), 0) + assert.Equal(t, id, "Hello") + assert.Equal(t, expectedEnv, Environment) + }) + t.Run("Error in creating container", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} @@ -191,7 +221,7 @@ func TestStartContainer(t *testing.T) { ID: "", }, fmt.Errorf("error")) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") @@ -216,7 +246,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName) + id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") From 39cb8f3e46370b2ade5434ca019921f3578591b6 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Fri, 4 Mar 2022 07:04:30 -0800 Subject: [PATCH 224/356] Update documentation (#286) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_config.rst | 1 + .../docs/source/gen/flytectl_config_docs.rst | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 flytectl/docs/source/gen/flytectl_config_docs.rst diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index c8590d9ac1..56b8782bb7 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -71,6 +71,7 @@ SEE ALSO * :doc:`flytectl` - FlyteCTL CLI tool * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. +* :doc:`flytectl_config_docs` - Generate configuration documetation in rst format * :doc:`flytectl_config_init` - Generates FlyteCTL config file in the user's home directory. * :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst new file mode 100644 index 0000000000..ec4ee408d7 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -0,0 +1,77 @@ +.. _flytectl_config_docs: + +flytectl config docs +-------------------- + +Generate configuration documetation in rst format + +Synopsis +~~~~~~~~ + + +Generate configuration documetation in rst format + +:: + + flytectl config docs [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for docs + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. + From 9aaba3e34cc26545d41b2b08fbea4ecaf515d907 Mon Sep 17 00:00:00 2001 From: Alekhya Sai Date: Mon, 7 Mar 2022 22:16:04 +0530 Subject: [PATCH 225/356] Remove duplicate register files (#288) Signed-off-by: Alekhya Sai Punnamaraju --- flytectl/docs/source/files.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flytectl/docs/source/files.rst b/flytectl/docs/source/files.rst index afdb7e8e66..96f2b861d9 100644 --- a/flytectl/docs/source/files.rst +++ b/flytectl/docs/source/files.rst @@ -7,6 +7,5 @@ It specifies the actions to be performed on the resource 'files'. :caption: Files gen/flytectl_register_files - gen/flytectl_register_files -Note: It allows the user to register local files +Note: It allows the user to register local files. From a94cbdd5743198110cd807d947b5b1186cbab0bf Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Mon, 7 Mar 2022 22:27:03 +0530 Subject: [PATCH 226/356] Added workflow flag for get launchplan (#287) * Added workflow flag for get launchplan Signed-off-by: Prafulla Mahindrakar * Using filter for workflow flag Signed-off-by: Prafulla Mahindrakar --- .../subcommand/launchplan/config_flags.go | 1 + .../launchplan/config_flags_test.go | 14 + .../launchplan/launchplan_config.go | 1 + flytectl/cmd/get/launch_plan.go | 14 + flytectl/cmd/get/launch_plan_test.go | 496 ++---------------- 5 files changed, 83 insertions(+), 443 deletions(-) diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags.go b/flytectl/cmd/config/subcommand/launchplan/config_flags.go index 3348bff7ee..dfac4c53ea 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags.go @@ -58,5 +58,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Int32Var(&DefaultConfig.Filter.Limit, fmt.Sprintf("%v%v", prefix, "filter.limit"), DefaultConfig.Filter.Limit, "Specifies the limit") cmdFlags.BoolVar(&DefaultConfig.Filter.Asc, fmt.Sprintf("%v%v", prefix, "filter.asc"), DefaultConfig.Filter.Asc, "Specifies the sorting order. By default flytectl sort result in descending order") cmdFlags.Int32Var(&DefaultConfig.Filter.Page, fmt.Sprintf("%v%v", prefix, "filter.page"), DefaultConfig.Filter.Page, "Specifies the page number, in case there are multiple pages of results") + cmdFlags.StringVar(&DefaultConfig.Workflow, fmt.Sprintf("%v%v", prefix, "workflow"), DefaultConfig.Workflow, "name of the workflow for which the launchplans need to be fetched.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go index afcd0597dd..b46c8d104f 100755 --- a/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/config_flags_test.go @@ -211,4 +211,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_workflow", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("workflow", testValue) + if vString, err := cmdFlags.GetString("workflow"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Workflow) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go index 7c8245256a..1a10764384 100644 --- a/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go +++ b/flytectl/cmd/config/subcommand/launchplan/launchplan_config.go @@ -17,4 +17,5 @@ type Config struct { Version string `json:"version" pflag:",version of the launchplan to be fetched."` Latest bool `json:"latest" pflag:", flag to indicate to fetch the latest version, version flag will be ignored in this case"` Filter filters.Filters `json:"filter" pflag:","` + Workflow string `json:"workflow" pflag:",name of the workflow for which the launchplans need to be fetched."` } diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 1700f4c04e..047965ebf4 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -2,6 +2,7 @@ package get import ( "context" + "fmt" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" @@ -40,6 +41,12 @@ Retrieve a particular version of the launch plan by name within the project and flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 +Retrieve all launch plans for a given workflow name: + +:: + + flytectl get launchplan -p flytesnacks -d development --workflow core.flyte_basics.lp.go_greet + Retrieve all the launch plans with filters: :: @@ -170,6 +177,13 @@ func getLaunchPlanFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comman return nil } + if len(launchplan.DefaultConfig.Workflow) > 0 { + if len(launchplan.DefaultConfig.Filter.FieldSelector) > 0 { + return fmt.Errorf("fieldSelector cannot be specified with workflow flag") + } + launchplan.DefaultConfig.Filter.FieldSelector = fmt.Sprintf("workflow.name=%s", launchplan.DefaultConfig.Workflow) + } + launchPlans, err := cmdCtx.AdminFetcherExt().FetchAllVerOfLP(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, launchplan.DefaultConfig.Filter) if err != nil { return err diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index e6a7cbec01..a36cd2ec77 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -23,14 +23,15 @@ import ( ) var ( - resourceListRequest *admin.ResourceListRequest - resourceGetRequest *admin.ResourceListRequest - objectGetRequest *admin.ObjectGetRequest - namedIDRequest *admin.NamedEntityIdentifierListRequest - launchPlanListResponse *admin.LaunchPlanList - argsLp []string - namedIdentifierList *admin.NamedEntityIdentifierList - launchPlan2 *admin.LaunchPlan + resourceListRequest *admin.ResourceListRequest + resourceGetRequest *admin.ResourceListRequest + objectGetRequest *admin.ObjectGetRequest + namedIDRequest *admin.NamedEntityIdentifierListRequest + launchPlanListResponse *admin.LaunchPlanList + filteredLaunchPlanListResponse *admin.LaunchPlanList + argsLp []string + namedIdentifierList *admin.NamedEntityIdentifierList + launchPlan2 *admin.LaunchPlan ) func getLaunchPlanSetup() { @@ -96,6 +97,9 @@ func getLaunchPlanSetup() { Version: "v1", }, Spec: &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Name: "workflow1", + }, DefaultInputs: &core.ParameterMap{ Parameters: parameterMap, }, @@ -113,6 +117,9 @@ func getLaunchPlanSetup() { Version: "v2", }, Spec: &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Name: "workflow2", + }, DefaultInputs: &core.ParameterMap{ Parameters: parameterMap, }, @@ -146,6 +153,10 @@ func getLaunchPlanSetup() { LaunchPlans: launchPlans, } + filteredLaunchPlanListResponse = &admin.LaunchPlanList{ + LaunchPlans: []*admin.LaunchPlan{launchPlan2}, + } + objectGetRequest = &admin.ObjectGetRequest{ Id: &core.Identifier{ ResourceType: core.ResourceType_LAUNCH_PLAN, @@ -249,178 +260,7 @@ func TestGetLaunchPlanFunc(t *testing.T) { err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) - tearDownAndVerify(t, `[ - { - "id": { - "name": "launchplan1", - "version": "v2" - }, - "spec": { - "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - } - }, - "closure": { - "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - }, - "createdAt": "1970-01-01T00:00:01Z" - } - }, - { - "id": { - "name": "launchplan1", - "version": "v1" - }, - "spec": { - "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - } - }, - "closure": { - "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - }, - "createdAt": "1970-01-01T00:00:00Z" - } - } -]`) + tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlanFuncLatest(t *testing.T) { @@ -433,91 +273,7 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) - tearDownAndVerify(t, `{ - "id": { - "name": "launchplan1", - "version": "v2" - }, - "spec": { - "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - } - }, - "closure": { - "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - }, - "createdAt": "1970-01-01T00:00:01Z" - } -}`) + tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanWithVersion(t *testing.T) { @@ -530,102 +286,40 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) assert.Nil(t, err) mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) - tearDownAndVerify(t, `{ - "id": { - "name": "launchplan1", - "version": "v2" - }, - "spec": { - "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - } - }, - "closure": { - "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - }, - "createdAt": "1970-01-01T00:00:01Z" - } -}`) + tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlans(t *testing.T) { - setup() - getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - argsLp = []string{} - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) - assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + t.Run("no workflow filter", func(t *testing.T) { + setup() + getLaunchPlanSetup() + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + argsLp = []string{} + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + }) + t.Run("workflow filter", func(t *testing.T) { + setup() + getLaunchPlanSetup() + resourceListRequest.Filters = "eq(workflow.name,workflow2)" + mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(filteredLaunchPlanListResponse, nil) + argsLp = []string{} + launchplan.DefaultConfig.Workflow = "workflow2" + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.Nil(t, err) + tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + }) + t.Run("workflow filter error", func(t *testing.T) { + setup() + getLaunchPlanSetup() + argsLp = []string{} + launchplan.DefaultConfig.Workflow = "workflow2" + launchplan.DefaultConfig.Filter.FieldSelector = "workflow.name" + err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("fieldSelector cannot be specified with workflow flag"), err) + }) } func TestGetLaunchPlansWithExecFile(t *testing.T) { @@ -640,91 +334,7 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { os.Remove(launchplan.DefaultConfig.ExecFile) assert.Nil(t, err) mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) - tearDownAndVerify(t, `{ - "id": { - "name": "launchplan1", - "version": "v2" - }, - "spec": { - "defaultInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - } - }, - "closure": { - "expectedInputs": { - "parameters": { - "numbers": { - "var": { - "type": { - "collectionType": { - "simple": "INTEGER" - } - }, - "description": "short desc" - } - }, - "numbers_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "long description will be truncated in table" - } - }, - "run_local_at_count": { - "var": { - "type": { - "simple": "INTEGER" - }, - "description": "run_local_at_count" - }, - "default": { - "scalar": { - "primitive": { - "integer": "10" - } - } - } - } - } - }, - "createdAt": "1970-01-01T00:00:01Z" - } -}`) + tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanTableFunc(t *testing.T) { From 3421735b73b2a273ac4fda071a098020d9f151a6 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 8 Mar 2022 22:43:01 -0800 Subject: [PATCH 227/356] Update documentation (#289) Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl_get_launchplan.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index cb527a26b0..4a2e13a751 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -34,6 +34,12 @@ Retrieve a particular version of the launch plan by name within the project and flytectl get launchplan -p flytesnacks -d development core.basic.lp.go_greet --version v2 +Retrieve all launch plans for a given workflow name: + +:: + + flytectl get launchplan -p flytesnacks -d development --workflow core.flyte_basics.lp.go_greet + Retrieve all the launch plans with filters: :: @@ -112,6 +118,7 @@ Options -h, --help help for launchplan --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the launchplan to be fetched. + --workflow string name of the workflow for which the launchplans need to be fetched. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 651706b5ad52e8ac6e1a69e841630ca82e21ccd6 Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Wed, 9 Mar 2022 12:44:27 +0530 Subject: [PATCH 228/356] bump containerd (#290) Signed-off-by: Yuvraj --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 096232e2c3..84eef1ec12 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -61,7 +61,7 @@ require ( github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect - github.com/containerd/containerd v1.5.9 // indirect + github.com/containerd/containerd v1.5.10 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/danieljoos/wincred v1.1.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index a3a5753e53..3666fe15ea 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -217,8 +217,8 @@ github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7 github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4= -github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= +github.com/containerd/containerd v1.5.10 h1:3cQ2uRVCkJVcx5VombsE7105Gl9Wrl7ORAO3+4+ogf4= +github.com/containerd/containerd v1.5.10/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= From 63582435e0c51cf1ae45fa526b16b63ac927916e Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 11 Mar 2022 10:00:59 +0530 Subject: [PATCH 229/356] fix create project bug (#291) Signed-off-by: Yuvraj --- flytectl/cmd/config/subcommand/project/project_config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index e4c9bfb649..36e6c41cb9 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -56,10 +56,9 @@ func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { if err != nil { return nil, err } - if projectSpec.Id == id { - return &projectSpec, nil + if len(id) > 0 { + projectSpec.Id = id } - projectSpec.Id = id return &projectSpec, nil } From 7a6ba140ca282d161425ff390bbaccea406812e4 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 15 Mar 2022 10:24:28 +0530 Subject: [PATCH 230/356] Fixed continueonError bug (#292) --- flytectl/cmd/register/files.go | 2 +- flytectl/cmd/register/files_test.go | 29 ++++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 895d2f5aa5..b6ac2c980a 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -136,7 +136,7 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) } var registerResults []Result - fastFail := rconfig.DefaultFilesConfig.ContinueOnError + fastFail := !rconfig.DefaultFilesConfig.ContinueOnError for i := 0; i < len(validProto) && !(fastFail && regErr != nil); i++ { registerResults, regErr = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx, *rconfig.DefaultFilesConfig) } diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index e583e18400..744e9cef2c 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -105,9 +105,32 @@ func TestRegisterFromFiles(t *testing.T) { Client = s assert.Nil(t, err) args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + err = registerFromFilesFunc(ctx, args, cmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("failed"), err) + }) + t.Run("Failure registration of fast serialize continue on error", func(t *testing.T) { + setup() + registerFilesSetup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + rconfig.DefaultFilesConfig.Archive = true + + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + rconfig.DefaultFilesConfig.ContinueOnError = true + s, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + Client = s + assert.Nil(t, err) + args = []string{"testdata/flytesnacks-core.tgz"} + mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(39) + mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(21) + mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(24) err = registerFromFilesFunc(ctx, args, cmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed"), err) From 3e329adea4756d145f0d701ee3cb47bdfbfee5d0 Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:25:26 +0530 Subject: [PATCH 231/356] Fix grammar test (#272) * Fix grammar Signed-off-by: SmritiSatyanV * Updated task.go Signed-off-by: SmritiSatyanV * Updated configuration.go Signed-off-by: SmritiSatyanV * Fixed build errors-1 Signed-off-by: SmritiSatyanV * Fixed build errors-2 Signed-off-by: SmritiSatyanV * Fixed errors-3 Signed-off-by: SmritiSatyanV * Updated sandbox_test.go Signed-off-by: SmritiSatyanV * Fixed errors-4 Signed-off-by: SmritiSatyanV * Minor grammar fix Changed FlyteCTL to Flytectl Grammar fixes Signed-off-by: SmritiSatyanV * Fixed errors Signed-off-by: SmritiSatyanV * Fixed unit test errors Signed-off-by: SmritiSatyanV * Updates based on comments Signed-off-by: SmritiSatyanV * Rephrased sentence Signed-off-by: SmritiSatyanV * Fixed errors Error strings shouldn't begin with upper case or end with punctuation or newline. Signed-off-by: SmritiSatyanV * Updated project.go Signed-off-by: SmritiSatyanV * Updated errors.go Signed-off-by: SmritiSatyanV * Updated project_test.go Signed-off-by: SmritiSatyanV * stylistic changes Signed-off-by: Samhita Alla * revert letter case in errors.go Signed-off-by: Samhita Alla * fix lint errors Signed-off-by: Samhita Alla Co-authored-by: Samhita Alla --- flytectl/README.md | 10 +- flytectl/clierrors/errors.go | 28 ++--- flytectl/cmd/completion.go | 70 +++++++----- flytectl/cmd/completion_test.go | 6 +- .../subcommand/sandbox/sandbox_config.go | 10 +- flytectl/cmd/configuration/configuration.go | 19 ++-- flytectl/cmd/create/create.go | 2 +- flytectl/cmd/create/create_test.go | 4 +- flytectl/cmd/create/execution.go | 105 ++++++++---------- flytectl/cmd/create/execution_test.go | 2 +- flytectl/cmd/create/execution_util.go | 2 +- flytectl/cmd/create/project.go | 20 ++-- flytectl/cmd/create/project_test.go | 4 +- flytectl/cmd/delete/delete.go | 2 +- flytectl/cmd/delete/execution.go | 16 +-- .../matchable_cluster_resource_attribute.go | 21 ++-- .../matchable_execution_cluster_label.go | 22 ++-- .../matchable_execution_queue_attribute.go | 20 ++-- .../cmd/delete/matchable_plugin_override.go | 19 ++-- .../matchable_task_resource_attribute.go | 20 ++-- .../matchable_workflow_execution_config.go | 22 ++-- flytectl/cmd/get/execution.go | 26 +++-- flytectl/cmd/get/get.go | 4 +- flytectl/cmd/get/get_test.go | 2 +- flytectl/cmd/get/launch_plan.go | 12 +- .../matchable_cluster_resource_attribute.go | 18 +-- .../get/matchable_execution_cluster_label.go | 18 +-- .../matchable_execution_queue_attribute.go | 18 +-- flytectl/cmd/get/matchable_plugin_override.go | 21 ++-- .../get/matchable_task_resource_attribute.go | 18 +-- .../matchable_workflow_execution_config.go | 20 ++-- flytectl/cmd/get/project.go | 7 +- flytectl/cmd/get/task.go | 8 +- flytectl/cmd/get/workflow.go | 4 +- flytectl/cmd/register/examples.go | 8 +- flytectl/cmd/register/files.go | 34 +++--- flytectl/cmd/register/register.go | 6 +- flytectl/cmd/register/register_test.go | 6 +- flytectl/cmd/root.go | 4 +- flytectl/cmd/sandbox/exec.go | 6 +- flytectl/cmd/sandbox/sandbox.go | 23 ++-- flytectl/cmd/sandbox/sandbox_test.go | 2 +- flytectl/cmd/sandbox/start.go | 18 +-- flytectl/cmd/sandbox/status.go | 4 +- flytectl/cmd/sandbox/teardown.go | 4 +- flytectl/cmd/update/execution.go | 6 +- flytectl/cmd/update/launch_plan.go | 6 +- flytectl/cmd/update/launch_plan_meta.go | 2 +- .../matchable_cluster_resource_attribute.go | 6 +- ...tchable_cluster_resource_attribute_test.go | 8 +- .../matchable_execution_cluster_label.go | 6 +- .../matchable_execution_queue_attribute.go | 8 +- .../cmd/update/matchable_plugin_override.go | 8 +- .../matchable_task_resource_attribute.go | 8 +- .../matchable_workflow_execution_config.go | 8 +- flytectl/cmd/update/project.go | 2 +- flytectl/cmd/update/project_test.go | 4 +- flytectl/cmd/update/task_meta.go | 2 +- flytectl/cmd/update/update.go | 4 +- flytectl/cmd/update/workflow_meta.go | 2 +- flytectl/cmd/upgrade/upgrade.go | 14 ++- flytectl/cmd/upgrade/upgrade_test.go | 4 +- flytectl/cmd/version/version.go | 12 +- flytectl/cmd/version/version_test.go | 4 +- flytectl/docs/source/conf.py | 1 + flytectl/docs/source/config.rst | 2 - flytectl/docs/source/contribute.rst | 45 ++++---- flytectl/docs/source/examples.rst | 4 +- .../docs/source/execution-cluster-label.rst | 2 +- .../docs/source/execution-queue-attribute.rst | 7 +- flytectl/docs/source/execution.rst | 2 +- flytectl/docs/source/files.rst | 4 +- flytectl/docs/source/gen/flytectl.rst | 20 ++-- .../docs/source/gen/flytectl_completion.rst | 72 +++++++----- flytectl/docs/source/gen/flytectl_config.rst | 4 +- .../docs/source/gen/flytectl_config_init.rst | 19 ++-- flytectl/docs/source/gen/flytectl_create.rst | 8 +- .../source/gen/flytectl_create_execution.rst | 105 ++++++++---------- .../source/gen/flytectl_create_project.rst | 20 ++-- flytectl/docs/source/gen/flytectl_delete.rst | 18 +-- ...ectl_delete_cluster-resource-attribute.rst | 23 ++-- ...lytectl_delete_execution-cluster-label.rst | 18 +-- ...tectl_delete_execution-queue-attribute.rst | 18 +-- .../source/gen/flytectl_delete_execution.rst | 16 +-- .../gen/flytectl_delete_plugin-override.rst | 18 +-- ...lytectl_delete_task-resource-attribute.rst | 16 +-- ...tectl_delete_workflow-execution-config.rst | 14 +-- flytectl/docs/source/gen/flytectl_get.rst | 28 ++--- ...lytectl_get_cluster-resource-attribute.rst | 20 ++-- .../flytectl_get_execution-cluster-label.rst | 20 ++-- ...flytectl_get_execution-queue-attribute.rst | 20 ++-- .../source/gen/flytectl_get_execution.rst | 28 ++--- .../source/gen/flytectl_get_launchplan.rst | 14 ++- .../gen/flytectl_get_plugin-override.rst | 23 ++-- .../docs/source/gen/flytectl_get_project.rst | 9 +- .../flytectl_get_task-resource-attribute.rst | 20 ++-- .../docs/source/gen/flytectl_get_task.rst | 10 +- ...flytectl_get_workflow-execution-config.rst | 22 ++-- .../docs/source/gen/flytectl_get_workflow.rst | 6 +- .../docs/source/gen/flytectl_register.rst | 12 +- .../source/gen/flytectl_register_examples.rst | 10 +- .../source/gen/flytectl_register_files.rst | 14 ++- flytectl/docs/source/gen/flytectl_sandbox.rst | 22 ++-- .../docs/source/gen/flytectl_sandbox_exec.rst | 7 +- .../source/gen/flytectl_sandbox_start.rst | 19 ++-- .../source/gen/flytectl_sandbox_status.rst | 6 +- .../source/gen/flytectl_sandbox_teardown.rst | 6 +- flytectl/docs/source/gen/flytectl_update.rst | 14 +-- ...ectl_update_cluster-resource-attribute.rst | 6 +- ...lytectl_update_execution-cluster-label.rst | 6 +- ...tectl_update_execution-queue-attribute.rst | 8 +- .../source/gen/flytectl_update_execution.rst | 6 +- .../gen/flytectl_update_launchplan-meta.rst | 2 +- .../source/gen/flytectl_update_launchplan.rst | 6 +- .../gen/flytectl_update_plugin-override.rst | 8 +- .../source/gen/flytectl_update_project.rst | 2 +- .../source/gen/flytectl_update_task-meta.rst | 2 +- ...lytectl_update_task-resource-attribute.rst | 8 +- ...tectl_update_workflow-execution-config.rst | 8 +- .../gen/flytectl_update_workflow-meta.rst | 2 +- flytectl/docs/source/gen/flytectl_upgrade.rst | 14 ++- flytectl/docs/source/gen/flytectl_version.rst | 6 +- flytectl/docs/source/index.rst | 25 +++-- flytectl/docs/source/launchplan.rst | 4 +- flytectl/docs/source/nouns.rst | 4 +- flytectl/docs/source/plugin-override.rst | 2 +- flytectl/docs/source/project.rst | 4 +- flytectl/docs/source/sandbox.rst | 2 +- .../docs/source/task-resource-attribute.rst | 2 +- flytectl/docs/source/task.rst | 2 +- flytectl/docs/source/verbs.rst | 2 +- .../docs/source/workflow-execution-config.rst | 5 +- flytectl/docs/source/workflow.rst | 2 +- flytectl/proposal/README.md | 32 +++--- 134 files changed, 932 insertions(+), 853 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index 4c64202e23..938d915550 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -31,7 +31,7 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control ## 🚀 Quick Start -1. Install FlyteCTL with bash or shell script +1. Install Flytectl with bash or shell script. * Bash ```bash @@ -41,14 +41,14 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control ```bash $ curl -sL https://ctl.flyte.org/install | bash ``` -2. (Optional) `flytectl upgrade` provides a general interface to upgrading FlyteCTL; run the command in the output +2. (Optional) `flytectl upgrade` provides a general interface to upgrading Flytectl; run the command in the output. -3. Start sandbox using FlyteCTL +3. Start Sandbox using Flytectl. ```bash $ flytectl sandbox start ``` -4. Register examples +4. Register examples. ```bash # Register core workflows $ flytectl register examples -d development -p flytesnacks @@ -56,7 +56,7 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control

- 📖 How to Contribute to FlyteCTL + 📖 How to Contribute to Flytectl

diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index c3515bf212..a8ff701cb3 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -1,24 +1,24 @@ package clierrors var ( - ErrInvalidStateUpdate = "Invalid state passed. Specify either activate or archive\n" + ErrInvalidStateUpdate = "invalid state passed. Specify either activate or archive\n" - ErrProjectNotPassed = "Project id not passed\n" // #nosec - ErrProjectNameNotPassed = "project name is required flag" - ErrFailedProjectUpdate = "Project %v failed to get updated due to %v\n" + ErrProjectNotPassed = "project id wasn't passed\n" // #nosec + ErrProjectNameNotPassed = "project name is a required flag" + ErrFailedProjectUpdate = "Project %v failed to update due to %v\n" - ErrLPNotPassed = "Launch plan name not passed\n" - ErrLPVersionNotPassed = "Launch plan version not passed\n" //nolint - ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" + ErrLPNotPassed = "launch plan name wasn't passed\n" + ErrLPVersionNotPassed = "launch plan version wasn't passed\n" //nolint + ErrFailedLPUpdate = "launch plan %v failed to update due to %v\n" - ErrExecutionNotPassed = "Execution name not passed\n" - ErrFailedExecutionUpdate = "Execution %v failed to get updated due to %v\n" + ErrExecutionNotPassed = "execution name wasn't passed\n" + ErrFailedExecutionUpdate = "execution %v failed to update due to %v\n" - ErrWorkflowNotPassed = "Workflow name not passed\n" - ErrFailedWorkflowUpdate = "Workflow %v failed to get updated to due to %v\n" + ErrWorkflowNotPassed = "workflow name wasn't passed\n" + ErrFailedWorkflowUpdate = "workflow %v failed to update to due to %v\n" - ErrTaskNotPassed = "Task name not passed\n" // #nosec - ErrFailedTaskUpdate = "Task %v failed to get updated to due to %v\n" + ErrTaskNotPassed = "task name wasn't passed\n" // #nosec + ErrFailedTaskUpdate = "task %v failed to update to due to %v\n" - ErrSandboxExists = "Sandbox Exist\n" + ErrSandboxExists = "sandbox already exists!\n" ) diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go index ceeb07643a..34b3c17104 100644 --- a/flytectl/cmd/completion.go +++ b/flytectl/cmd/completion.go @@ -24,45 +24,65 @@ import ( // completionCmd represents the completion command var completionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", - Short: "Generate completion script", - Long: `To load completions: + Short: "Generates completion script.", + Long: `To load completion, run the following commands in accordance with the shell you are using: -Bash: +- Bash + :: - $ source <(flytectl completion bash) + $ source <(flytectl completion bash) - # To load completions for each session, execute once: - # Linux: - $ flytectl completion bash > /etc/bash_completion.d/flytectl - # macOS: - $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + To load completions for each session: -Zsh: + - Linux + :: - # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + $ flytectl completion bash > /etc/bash_completion.d/flytectl - $ echo "autoload -U compinit; compinit" >> ~/.zshrc + - macOS + :: - # To load completions for each session, execute once: - $ flytectl completion zsh > "${fpath[1]}/_flytectl" + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl - # You will need to start a new shell for this setup to take effect. +- Zsh + If shell completion is not already enabled in your environment, enable it: -fish: + :: - $ flytectl completion fish | source + $ echo "autoload -U compinit; compinit" >> ~/.zshrc - # To load completions for each session, execute once: - $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + Once enabled, execute once: -PowerShell: + :: - PS> flytectl completion powershell | Out-String | Invoke-Expression + $ flytectl completion zsh > "${fpath[1]}/_flytectl" - # To load completions for every new session, run: - PS> flytectl completion powershell > flytectl.ps1 - # and source this file from your PowerShell profile. + .. note:: + Start a new shell for this setup to take effect. + +- fish + :: + + $ flytectl completion fish | source + + To load completions for each session, run: + + :: + + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +- PowerShell + :: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + To load completions for each session, run: + + :: + + PS> flytectl completion powershell > flytectl.ps1 + + and source this file from your PowerShell profile. `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, diff --git a/flytectl/cmd/completion_test.go b/flytectl/cmd/completion_test.go index 71eab97dc9..99aa21a851 100644 --- a/flytectl/cmd/completion_test.go +++ b/flytectl/cmd/completion_test.go @@ -9,9 +9,9 @@ import ( func TestCompletionCmdIntegration(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", - Use: "FlyteCTL", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service", + Short: "Flytectl CLI tool", + Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index be553a4efc..a2fd3d1521 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -34,9 +34,9 @@ var ( type Config struct { Source string `json:"source" pflag:",Path of your source code"` - // Flytectl sandbox only supports flyte version available in Github release https://github.com/flyteorg/flyte/tags - // Flytectl sandbox will only work for v0.10.0+ - // Default value dind represents the latest release + // Flytectl sandbox only supports Flyte version available in Github release https://github.com/flyteorg/flyte/tags. + // Flytectl sandbox will only work for v0.10.0+. + // Default value dind represents the latest release. Version string `json:"version" pflag:",Version of flyte. Only supports flyte releases greater than v0.10.0"` // Optionally it is possible to specify a specific fqn for the docker image with the tag. This should be @@ -44,13 +44,13 @@ type Config struct { // from there. Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."` - // Default value false represents that flytectl will not use latest pre release if exist + // Default value false represents that Flytectl will not use the latest pre-release if it exists. Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."` // Optionally it is possible to pass in environment variables to sandbox container. Env []string `json:"env" pflag:",Optional. Provide Env variable in key=value format which can be passed to sandbox container."` // Optionally it is possible to use local sandbox image - // If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry + // Flytectl will not pull the image from the registry if the local flag passes. It is usually useful while testing your local images without pushing them to a registry. ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index be8421a640..30e506c2f1 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -25,28 +25,33 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - initCmdShort = `Generates FlyteCTL config file in the user's home directory.` - initCmdLong = `Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte + initCmdShort = `Generates a Flytectl config file in the user's home directory.` + initCmdLong = `Creates a Flytectl config file in Flyte directory i.e ~/.flyte. -Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html - +Generate Sandbox config: :: flytectl config init -Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +Read more about the Sandbox deployment :ref:` + "`here `" + `. + +Generate remote cluster config: :: flytectl config init --host=flyte.myexample.com -Generates remote cluster config with insecure connection +By default, the connection is secure. +Read more about remote deployment :ref:` + "`here `" + `. + +Generate remote cluster config with insecure connection: :: flytectl config init --host=flyte.myexample.com --insecure -Generates FlyteCTL config with a storage provider +Generate Flytectl config with a storage provider: :: flytectl config init --host=flyte.myexample.com --storage diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 20cbefb54e..81b029c5bf 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -9,7 +9,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - createCmdShort = `Create various Flyte resources including tasks/workflows/launchplans/executions/project.` + createCmdShort = `Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` createCmdLong = ` Create Flyte resource; if a project: :: diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index a33201cf12..40b8d5d861 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -27,7 +27,7 @@ var tearDownAndVerify = testutils.TearDownAndVerify func TestCreateCommand(t *testing.T) { createCommand := RemoteCreateCommand() assert.Equal(t, createCommand.Use, "create") - assert.Equal(t, createCommand.Short, "Create various Flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, createCommand.Short, "Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects.") assert.Equal(t, len(createCommand.Commands()), 2) cmdNouns := createCommand.Commands() // Sort by Use value. @@ -39,5 +39,5 @@ func TestCreateCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Short, executionShort) assert.Equal(t, cmdNouns[1].Use, "project") assert.Equal(t, cmdNouns[1].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[1].Short, "Create project resources") + assert.Equal(t, cmdNouns[1].Short, "Creates project resources.") } diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 263046389e..3693c97424 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -11,90 +11,83 @@ import ( ) const ( - executionShort = "Create execution resources" + executionShort = "Creates execution resources." executionLong = ` -Creates executions for a given workflow/task in a project and domain. +Create execution resources for a given workflow or task in a project and domain. -There are three steps in generating an execution: - -- Generate the execution spec file using the get command. -- Update the inputs for the execution if needed. -- Run the execution by passing in the generated yaml file. - -The spec file should be generated first and then, the execution should be run using the spec file. -You can reference the FlyteCTL get task for more details. +There are three steps to generate an execution, as outlined below: +1. Generate the execution spec file using the :ref:` + "`get task `" + ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this: +The generated file would look similar to the following: .. code-block:: yaml - iamRoleARN: "" - inputs: - sorted_list1: - - 0 - sorted_list2: - - 0 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - - -The generated file can be modified to change the input values. + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +2. [Optional] Update the inputs for the execution, if needed. +The generated spec file can be modified to change the input values, as shown below: .. code-block:: yaml - iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' - inputs: - sorted_list1: - - 2 - - 4 - - 6 - sorted_list2: - - 1 - - 3 - - 5 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - -It can then be passed through the command line. -Notice that the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to the task/launch plans project/domain. - + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +3. Run the execution by passing the generated YAML file. +The file can then be passed through the command line. +It is worth noting that the source's and target's project and domain can be different. :: - flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -Also, an execution can be relaunched by passing in the current execution id. +To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. -See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. +To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. -The spec file should be generated first and then, the execution should be run using the spec file. +See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. + +Generic data types are supported for execution in a similar manner. +The following is an example of how generic data can be specified while creating the execution. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. - +The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: iamRoleARN: "" @@ -107,7 +100,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add +Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -149,7 +142,7 @@ type ExecutionConfig struct { Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` Version string `json:"version" pflag:",specify version of execution workflow/task."` - // Non plfag section is read from the execution config generated by get task/launchplan + // Non plfag section is read from the execution config generated by get task/launch plan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` Inputs map[string]interface{} `json:"inputs" pflag:"-"` diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 49ff720f6a..d671e0f5b0 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -253,5 +253,5 @@ func TestCreateExecutionFuncInvalid(t *testing.T) { executionConfig.ExecFile = testDataFolder + "invalid_execution_spec.yaml" err = createExecutionCommand(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("either one of task or workflow name should be specified to launch an execution"), err) + assert.Equal(t, fmt.Errorf("either task or workflow name should be specified to launch an execution"), err) } diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index f2f7bdd60f..82adaf6110 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -216,7 +216,7 @@ func readConfigAndValidate(project string, domain string) (ExecutionParams, erro isTask := readExecutionConfig.Task != "" isWorkflow := readExecutionConfig.Workflow != "" if isTask == isWorkflow { - return executionParams, fmt.Errorf("either one of task or workflow name should be specified" + + return executionParams, fmt.Errorf("either task or workflow name should be specified" + " to launch an execution") } name := readExecutionConfig.Task diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 95c4909c59..b0bb4eba73 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -13,18 +13,22 @@ import ( ) const ( - projectShort = "Create project resources" + projectShort = "Creates project resources." projectLong = ` -Create projects.(project/projects can be used interchangeably in these commands) +Create a project given its name and id. :: - flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +.. note:: + The terms project/projects are interchangeable in these commands. + +Create a project by definition file. -Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml @@ -33,8 +37,10 @@ Create a project by definition file. Note: The name shouldn't contain any whites labels: values: app: flyte - description: "Some description for the project" + description: "Some description for the project." +.. note:: + The project name shouldn't contain any whitespace characters. ` ) @@ -65,6 +71,6 @@ func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.Co return err } } - fmt.Println("project Created successfully") + fmt.Println("project created successfully.") return nil } diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 867894c4b7..538fd70f62 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -44,7 +44,7 @@ func createProjectSetup() { func TestCreateProjectFunc(t *testing.T) { setup() createProjectSetup() - defer tearDownAndVerify(t, "project Created successfully") + defer tearDownAndVerify(t, "project created successfully.") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} @@ -75,6 +75,6 @@ func TestEmptyProjectName(t *testing.T) { project.DefaultProjectConfig.Description = "" mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Equal(t, fmt.Errorf("project name is required flag"), err) + assert.Equal(t, fmt.Errorf("project name is a required flag"), err) mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 14969e9aeb..fa51fd2fbb 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -15,7 +15,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - deleteCmdShort = `Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project.` + deleteCmdShort = `Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` deleteCmdLong = ` Delete a resource; if an execution: :: diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index 12a0e268fc..fab4cbe5d0 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -13,19 +13,19 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - execCmdShort = `Terminate/Delete execution resources.` + execCmdShort = `Terminates/deletes execution resources.` execCmdLong = ` -Terminate executions.(execution,executions can be used interchangeably in these commands) - -Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. - +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED, or SUCCEEDED, calling terminate on them has no effect. Terminate a single execution with its name: :: flytectl delete execution c6a51x2l9e -d development -p flytesnacks -Get executions to check its state: +.. note:: + The terms execution/executions are interchangeable in these commands. + +Get an execution to check its state: :: @@ -41,7 +41,7 @@ Terminate multiple executions with their names: flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Get executions to find the state of previously terminated executions: +Get an execution to find the state of previously terminated executions: :: @@ -75,7 +75,7 @@ func terminateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.C }, }) if err != nil { - logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) + logger.Errorf(ctx, "Failed to terminate execution of %v execution due to %v ", name, err) return err } } diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index 8b4b6fb4dc..d94a71741a 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -11,36 +11,35 @@ import ( ) const ( - clusterResourceAttributesShort = "Delete matchable resources of cluster attributes" + clusterResourceAttributesShort = "Deletes matchable resources of cluster attributes." clusterResourceAttributesLong = ` -Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. +Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used to create it. -Here, the config file is written to cra.yaml. -Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of cra.yaml: +To delete cluster resource attribute using the config file that was used to create it, run: :: flytectl delete cluster-resource-attribute --attrFile cra.yaml +For example, here's the config file cra.yaml: .. code-block:: yaml - + domain: development project: flytectldemo attributes: foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index e8ed9c04ae..ff88f7a788 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -11,34 +11,32 @@ import ( ) const ( - executionClusterLabelShort = "Delete matchable resources of execution cluster label" + executionClusterLabelShort = "Deletes matchable resources of execution cluster label." executionClusterLabelLong = ` -Deletes execution cluster label for given project and domain combination or additionally with workflow name. +Delete execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete execution-cluster-label -p flytectldemo -d development + flytectl delete execution-cluster-label -p flytectldemo -d development - -Deletes execution cluster label using config file which was used for creating it. -Here, the config file is written to ecl.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of ecl.yaml: +To delete execution cluster label using the config file that was used to create it, run: :: flytectl delete execution-cluster-label --attrFile ecl.yaml +For example, here's the config file ecl.yaml: .. code-block:: yaml - + domain: development project: flytectldemo value: foo -Deletes execution cluster label for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete the execution cluster label of the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following: :: diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index d3b77a62c5..0c222065ac 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -11,25 +11,22 @@ import ( ) const ( - executionQueueAttributesShort = "Delete matchable resources of execution queue attributes" + executionQueueAttributesShort = "Deletes matchable resources of execution queue attributes." executionQueueAttributesLong = ` -Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. +Delete execution queue attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development + flytectl delete execution-queue-attribute -p flytectldemo -d development - -Deletes execution queue attribute using config file which was used for creating it. -Here, the config file is written to era.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of era.yaml: +Delete execution queue attribute using the config file which was used to create it. :: flytectl delete execution-queue-attribute --attrFile era.yaml +For example, here's the config file era.yaml: .. code-block:: yaml @@ -41,8 +38,9 @@ e.g., content of era.yaml: - buzz - lightyear -Deletes execution queue attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update and delete commands. + +To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index 80b46b35db..c96493cd91 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -11,24 +11,22 @@ import ( ) const ( - pluginOverrideShort = "Delete matchable resources of plugin overrides" + pluginOverrideShort = "Deletes matchable resources of plugin overrides." pluginOverrideLong = ` -Deletes plugin override for the given project and domain combination or additionally with workflow name. +Delete plugin override for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete plugin-override -p flytectldemo -d development + flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used to create it. -Here, the config file is written to po.yaml. -Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of po.yaml: +To delete plugin override using the config file which was used to create it, run: :: flytectl delete plugin-override --attrFile po.yaml +For example, here's the config file po.yaml: .. code-block:: yaml @@ -41,8 +39,9 @@ e.g., content of po.yaml: - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 90cd11e48f..903c1f7dc8 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -11,25 +11,22 @@ import ( ) const ( - taskResourceAttributesShort = "Delete matchable resources of task attributes" + taskResourceAttributesShort = "Deletes matchable resources of task attributes." taskResourceAttributesLong = ` -Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. +Delete task resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete task-resource-attribute -p flytectldemo -d development + flytectl delete task-resource-attribute -p flytectldemo -d development - -Deletes task resource attribute using config file which was used to create it. -Here, the config file is written to tra.yaml. -The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of tra.yaml: +To delete task resource attribute using the config file which was used to create it, run: :: flytectl delete task-resource-attribute --attrFile tra.yaml +For example, here's the config file tra.yaml: .. code-block:: yaml @@ -42,8 +39,9 @@ e.g., content of tra.yaml: cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index ee9b612712..4aa47acc23 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -12,34 +12,32 @@ import ( ) const ( - workflowExecutionConfigShort = "Delete matchable resources of workflow execution config" + workflowExecutionConfigShort = "Deletes matchable resources of workflow execution config." workflowExecutionConfigLong = ` -Deletes workflow execution config for the given project and domain combination or additionally with workflow name. +Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development + flytectl delete workflow-execution-config -p flytectldemo -d development - -Deletes workflow execution config using config file which was used to create it. -Here, the config file is written to wec.yaml. -Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of wec.yaml: +To delete workflow execution config using the config file which was used to create it, run: :: flytectl delete workflow-execution-config --attrFile wec.yaml +For example, here's the config file wec.yaml: .. code-block:: yaml - + domain: development project: flytectldemo max_parallelism: 5 -Deletes workflow execution config for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete workflow execution config for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 3c53b714b2..657d283499 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -15,57 +15,59 @@ import ( ) const ( - executionShort = "Get execution resources" + executionShort = "Gets execution resources." executionLong = ` -Retrieve all executions within the project and domain (execution, executions can be used interchangeably): +Retrieve all executions within the project and domain. :: flytectl get execution -p flytesnacks -d development -Retrieve executions by name within the project and domain: +.. note:: + The terms execution/executions are interchangeable in these commands. +Retrieve executions by name within the project and domain. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieve all the executions with filters: +Retrieve all the executions with filters. :: flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters: +Retrieve executions as per the specified limit and sorting parameters. :: flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions present in other pages by specifying the limit and page number: +Retrieve executions present in other pages by specifying the limit and page number. :: flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 -Retrieve executions within the project and domain in YAML format: +Retrieve executions within the project and domain in YAML format. :: flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format: +Retrieve executions within the project and domain in JSON format. :: flytectl get execution -p flytesnacks -d development -o json -Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. +Get more details of the execution using the --details flag, which shows node and task executions. +The default view is a tree view, and the TABLE view format is not supported on this view. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. - +Fetch execution details in YAML format. In this view, only node details are available. For task, pass the --nodeID flag. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml @@ -76,7 +78,7 @@ Fetch task executions on a specific node using the --nodeID flag. Use the nodeID flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. +Task execution view is available in YAML/JSON format too. The following example showcases YAML, where the output contains input and output data of each node. :: diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 181444afec..2e0792166d 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -19,9 +19,9 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - getCmdShort = `Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.` + getCmdShort = `Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` getCmdLong = ` -For project, it is: +To fetch a project, use the following command: :: flytectl get project diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index bf22c762f1..e92d7c1261 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -40,7 +40,7 @@ const ( func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() assert.Equal(t, getCommand.Use, "get") - assert.Equal(t, getCommand.Short, "Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, getCommand.Short, "Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects.") fmt.Println(getCommand.Commands()) assert.Equal(t, len(getCommand.Commands()), 11) cmdNouns := getCommand.Commands() diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 047965ebf4..65071c2f7c 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -15,13 +15,16 @@ import ( ) const ( - launchPlanShort = "Get launch plan resources" + launchPlanShort = "Gets the launch plan resources." launchPlanLong = ` -Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): +Retrieve all launch plans within the project and domain: :: flytectl get launchplan -p flytesnacks -d development +.. note:: + The terms launchplan/launchplans are interchangeable in these commands. + Retrieve a launch plan by name within the project and domain: :: @@ -80,7 +83,7 @@ Retrieve all launch plans the within the project and domain in JSON format: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: +Retrieve a launch plan within the project and domain as per a version and generates the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: @@ -102,8 +105,7 @@ The generated file would look similar to this: version: v3 workflow: core.advanced.run_merge_sort.merge_sort -Check the create execution section on how to launch one using the generated file. - +Check the :ref:` + "`create execution section`" + ` on how to launch one using the generated file. Usage ` ) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 9682ec271d..89830dfec8 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - clusterResourceAttributesShort = "Get matchable resources of cluster resource attributes." + clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes." clusterResourceAttributesLong = ` -Retrieves cluster resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve cluster resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attributes for the given project, domain, and workflow. +Retrieve cluster resource attributes for the given project, domain, and workflow. For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. -Here, the config file is written to cra.yaml file: -e.g., content of cra.yaml +Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +The config file is written to cra.yaml file. +Example: content of cra.yaml: :: diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index a8ebb50514..c665a48db0 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -11,36 +11,36 @@ import ( ) const ( - executionClusterLabelShort = "Get matchable resources of execution cluster label." + executionClusterLabelShort = "Gets matchable resources of execution cluster label." executionClusterLabelLong = ` -Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieve the execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g., output from the command +The output would look like: .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieve the execution cluster label for the given project, domain and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution cluster label for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. -Here, the config file is written to ecl.yaml, -e.g., content of ecl.yaml: +The config file is written to ecl.yaml file. +Example: content of ecl.yaml: :: diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 34b73c139e..796b405d0d 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - executionQueueAttributesShort = "Get matchable resources of execution queue attributes" + executionQueueAttributesShort = "Gets matchable resources of execution queue attributes." executionQueueAttributesLong = ` -Retrieves the execution queue attribute for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the execution queue attribute for the given project and domain. +For project flytectldemo and development domain: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the config file is written to era.yaml, -e.g., content of era.yaml: +The config file is written to era.yaml file. +Example: content of era.yaml: :: diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index eb8e0fdd0c..eaac3d0dee 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -11,16 +11,16 @@ import ( ) const ( - pluginOverrideShort = "Get matchable resources of plugin override" + pluginOverrideShort = "Gets matchable resources of plugin override." pluginOverrideLong = ` -Retrieves the plugin override for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the plugin override for the given project and domain. +For project flytectldemo and development domain: :: flytectl get plugin-override -p flytectldemo -d development -e.g., output from the command +Example: output from the command .. code-block:: json @@ -34,14 +34,13 @@ e.g., output from the command }] } -Retrieves the plugin override for the given project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: - +Retrieve the plugin override for the given project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -56,9 +55,9 @@ e.g., output from the command: }] } -Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. -Here, the config file is written to po.yaml, -e.g., content of po.yaml: +Write plugin overrides to a file. If there are no plugin overrides, the command throws an error. +The config file is written to po.yaml file. +Example: content of po.yaml: :: diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 6636976350..63ef50da19 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -11,27 +11,27 @@ import ( ) const ( - taskResourceAttributesShort = "Get matchable resources of task attributes" + taskResourceAttributesShort = "Gets matchable resources of task attributes." taskResourceAttributesLong = ` -Retrieves task resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve task resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g., output from the command: +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -39,8 +39,8 @@ e.g., output from the command: Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here, the config file is written to tra.yaml, -e.g., content of tra.yaml: +The config file is written to tra.yaml file. +Example: content of tra.yaml: :: diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index afb1d3b0f8..6adfd5ebca 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -12,17 +12,17 @@ import ( ) const ( - workflowExecutionConfigShort = "Get matchable resources of workflow execution config" + workflowExecutionConfigShort = "Gets matchable resources of workflow execution config." workflowExecutionConfigLong = ` -Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. +Retrieve workflow execution config for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get workflow-execution-config -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -32,14 +32,14 @@ e.g., output from the command "max_parallelism": 5 } -Retrieves workflow execution config for the project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve workflow execution config for the project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -50,9 +50,9 @@ e.g., output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. -Here, the config file is written to wec.yaml, -e.g., content of wec.yaml: +Write the workflow execution config to a file. If there are no workflow execution config, the command throws an error. +The config file is written to wec.yaml file. +Example: content of wec.yaml: :: diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 03f1826059..092935c59c 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -15,13 +15,16 @@ import ( ) const ( - projectShort = "Get project resources" + projectShort = "Gets project resources" projectLong = ` -Retrieve all the projects. (project,projects can be used interchangeably in these commands): +Retrieve all the projects: :: flytectl get project +.. note:: + The terms project/projects are interchangeable in these commands. + Retrieve project by name: :: diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index dfb03c337c..d4226d86dd 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -14,13 +14,17 @@ import ( ) const ( - taskShort = "Get task resources" + taskShort = "Gets task resources" taskLong = ` -Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): + +Retrieve all the tasks within project and domain: :: flytectl get task -p flytesnacks -d development +.. note:: + The terms task/tasks are interchangeable in these commands. + Retrieve task by name within project and domain: :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 1a51974b75..f2b3650250 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -16,9 +16,9 @@ import ( ) const ( - workflowShort = "Get workflow resources" + workflowShort = "Gets workflow resources" workflowLong = ` -Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): +Retrieve all the workflows within project and domain (workflow/workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 845dcc417c..8d1434294e 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -13,9 +13,9 @@ import ( ) const ( - registerExampleShort = "Register Flytesnacks example" + registerExampleShort = "Registers Flytesnacks example." registerExampleLong = ` -Register all latest Flytesnacks examples: +Register all the latest Flytesnacks examples: :: flytectl register examples -d development -p flytesnacks @@ -25,7 +25,9 @@ Register specific release of Flytesnacks examples: flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: The register command automatically override the version with release version +.. note:: + The register command automatically override the version with release version. + Usage ` ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b6ac2c980a..c66ceddf7a 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -14,31 +14,39 @@ import ( ) const ( - registerFilesShort = "Register file resources" + registerFilesShort = "Registers file resources." registerFilesLong = ` -Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +Registers all the serialized protobuf files including tasks, workflows and launch plans with default v1 version. + If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: flytectl register file _pb_output/* -d development -p flytesnacks - -There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. + +As per Flytectl, registration and fast registration mean the same! + +In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. +When the user runs pyflyte with --fast flag, then pyflyte creates serialized proto and the source code archive file in the same directory. +Flytectl finds the input file by searching for an archive file whose name starts with "fast" and has .tar.gz extension. +If Flytectl finds any source code in users' input, it considers the registration as fast registration. + +SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. +If s3, Flytectl will upload the code base to s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 - -In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + +In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. +Instead, it will override the destination path on the registration. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" - -Using archive file. Currently supported extensions are .tgz and .tar. They can be local or remote files served through http/https. -Use --archive flag: + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" + +To register a .tgz or .tar file, use the --archive flag. They can be local or remote files served through http/https. :: - flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive Using local tgz file: diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 469a3811a9..a04c99bd19 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -9,11 +9,11 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - registerCmdShort = "Register tasks/workflows/launchplans from a list of generated serialized files." + registerCmdShort = "Registers tasks, workflows, and launch plans from a list of generated serialized files." registercmdLong = ` -Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Take input files as serialized versions of the tasks/workflows/launchplans and register them with FlyteAdmin. Currently, these input files are protobuf files generated as output from Flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +Project and Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. If the entities are already registered with Flyte for the same version, the registration would fail. ` ) diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index cf3b725fcd..871fc2523b 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -27,7 +27,7 @@ var setup = u.Setup func TestRegisterCommand(t *testing.T) { registerCommand := RemoteRegisterCommand() assert.Equal(t, registerCommand.Use, "register") - assert.Equal(t, registerCommand.Short, "Register tasks/workflows/launchplans from a list of generated serialized files.") + assert.Equal(t, registerCommand.Short, "Registers tasks, workflows, and launch plans from a list of generated serialized files.") fmt.Println(registerCommand.Commands()) assert.Equal(t, len(registerCommand.Commands()), 2) cmdNouns := registerCommand.Commands() @@ -38,9 +38,9 @@ func TestRegisterCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Use, "examples") assert.Equal(t, cmdNouns[0].Aliases, []string{"example", "flytesnack", "flytesnacks"}) - assert.Equal(t, cmdNouns[0].Short, "Register Flytesnacks example") + assert.Equal(t, cmdNouns[0].Short, "Registers Flytesnacks example.") assert.Equal(t, cmdNouns[1].Use, "files") assert.Equal(t, cmdNouns[1].Aliases, []string{"file"}) - assert.Equal(t, cmdNouns[1].Short, "Register file resources") + assert.Equal(t, cmdNouns[1].Short, "Registers file resources.") } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index f9286950b7..dba5b8f85a 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -42,8 +42,8 @@ const ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index 98f584aa64..327d2e4f23 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -9,11 +9,13 @@ import ( ) const ( - execShort = "Execute non-interactive command inside the sandbox container" + execShort = "Executes non-interactive command inside the sandbox container" execLong = ` -Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. +Run non-interactive commands inside the sandbox container and immediately return the output. +By default, "flytectl exec" is present in the /root directory inside the sandbox container. :: + flytectl sandbox exec -- ls -al Usage` diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index ea639fa4a4..26e9453f7e 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -8,28 +8,27 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - sandboxShort = `Used for sandbox interactions like start/teardown/status/exec.` + sandboxShort = `Helps with sandbox interactions like start, teardown, status, and exec.` sandboxLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Create sandbox cluster: +To create a sandbox cluster, run: :: flytectl sandbox start - - -Remove sandbox cluster: + +To remove a sandbox cluster, run: :: - flytectl sandbox teardown - + flytectl sandbox teardown -Check status of sandbox container: +To check the status of the sandbox container, run: :: - flytectl sandbox status - -Execute command inside sandbox container: + flytectl sandbox status + +To execute commands inside the sandbox container, use exec: :: flytectl sandbox exec -- pwd diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go index ee615c08ce..0692a08930 100644 --- a/flytectl/cmd/sandbox/sandbox_test.go +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -11,7 +11,7 @@ import ( func TestCreateSandboxCommand(t *testing.T) { sandboxCommand := CreateSandboxCommand() assert.Equal(t, sandboxCommand.Use, "sandbox") - assert.Equal(t, sandboxCommand.Short, "Used for sandbox interactions like start/teardown/status/exec.") + assert.Equal(t, sandboxCommand.Short, "Helps with sandbox interactions like start, teardown, status, and exec.") fmt.Println(sandboxCommand.Commands()) assert.Equal(t, len(sandboxCommand.Commands()), 4) cmdNouns := sandboxCommand.Commands() diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index ece842beb8..979e666788 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -31,33 +31,35 @@ import ( ) const ( - startShort = "Start the Flyte Sandbox cluster" + startShort = "Starts the Flyte sandbox cluster." startLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Start sandbox cluster without any source code: +Starts the sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox: +Mounts your source code repository inside the sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +.. note:: + Flytectl Sandbox is only supported for Flyte versions > v0.10.0. -Run latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl sandbox start --pre -Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index bff5230c11..49e5fb77b7 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -10,9 +10,9 @@ import ( ) const ( - statusShort = "Get status of the sandbox environment." + statusShort = "Gets the status of the sandbox environment." statusLong = ` -Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. +Retrieves the status of the sandbox environment. Currently, Flyte sandbox runs as a local Docker container. Usage :: diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index bce078b788..bbdfa303c6 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -17,9 +17,9 @@ import ( ) const ( - teardownShort = "Teardown cleans up the sandbox environment" + teardownShort = "Cleans up the sandbox environment" teardownLong = ` -Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: +Removes the Sandbox cluster and all the Flyte config created by 'sandbox start': :: flytectl sandbox teardown diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index cd8a7ad209..a32d4cddc4 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -14,14 +14,14 @@ import ( ) const ( - updateExecutionShort = "Update execution status" + updateExecutionShort = "Updates the execution status" updateExecutionLong = ` -Activating an execution shows it in the cli and UI: +Activate an execution; and it shows up in the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate -Archiving execution hides it from cli and UI: +Archive an execution; and it is hidden from the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 0c2a3267dd..51552fbf8a 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -14,14 +14,14 @@ import ( ) const ( - updateLPShort = "Update launch plan status" + updateLPShort = "Updates launch plan status" updateLPLong = ` -Activating launch plan activates the scheduled job associated with it: +Activates a launch plan which activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launch plan deschedules any scheduled job associated with it: +Archives a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index d2a9678667..c3efa3b254 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -11,7 +11,7 @@ import ( ) const ( - updateLPMetaShort = "Update launch plan metadata" + updateLPMetaShort = "Updates the launch plan metadata" updateLPMetaLong = ` Update the description on the launch plan: :: diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 2e8f2a2077..7da3bc3c1c 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -12,11 +12,11 @@ import ( const ( clusterResourceAttributesShort = "Update matchable resources of cluster attributes" clusterResourceAttributesLong = ` -Updates cluster resource attributes for given project and domain combination or additionally with workflow name. +Update cluster resource attributes for given project and domain combination or additionally with workflow name. Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. It takes input for cluster resource attributes from the config file cra.yaml, -e.g., content of cra.yaml: +Example: content of cra.yaml: .. code-block:: yaml @@ -30,7 +30,7 @@ e.g., content of cra.yaml: flytectl update cluster-resource-attribute --attrFile cra.yaml -Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Update cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 8cb13ee340..e354541d26 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -27,7 +27,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) tearDownAndVerify(t, ``) }) - t.Run("successful update project domain attribute", func(t *testing.T) { + t.Run("successfully updated project domain attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" @@ -38,7 +38,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) tearDownAndVerify(t, ``) }) - t.Run("failed update project domain attribute", func(t *testing.T) { + t.Run("failed to update project domain attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" @@ -50,7 +50,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to update attributes"), err) tearDownAndVerify(t, ``) }) - t.Run("successful update workflow attribute", func(t *testing.T) { + t.Run("successfully updated workflow attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" @@ -61,7 +61,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) tearDownAndVerify(t, ``) }) - t.Run("failed update workflow attribute", func(t *testing.T) { + t.Run("failed to update workflow attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index 2c03815468..223001cdfb 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -12,11 +12,11 @@ import ( const ( executionClusterLabelShort = "Update matchable resources of execution cluster label" executionClusterLabelLong = ` -Updates execution cluster label for the given project and domain combination or additionally with workflow name. +Update execution cluster label for the given project and domain combination or additionally with workflow name. Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. It takes input for execution cluster label from the config file ecl.yaml -e.g., content of ecl.yaml: +Example: content of ecl.yaml: .. code-block:: yaml @@ -28,7 +28,7 @@ e.g., content of ecl.yaml: flytectl update execution-cluster-label --attrFile ecl.yaml -Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other +Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index 4d85146680..e324fee2e0 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -12,14 +12,14 @@ import ( const ( executionQueueAttributesShort = "Update matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Updates execution queue attributes for the given project and domain combination or additionally with workflow name. +Update execution queue attributes for the given project and domain combination or additionally with workflow name. Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file It takes input for execution queue attributes from the config file era.yaml, -e.g., content of era.yaml: +Example: content of era.yaml: .. code-block:: yaml @@ -35,7 +35,7 @@ e.g., content of era.yaml: flytectl update execution-queue-attribute --attrFile era.yaml -Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other +Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 2dfca66113..52a2837ab8 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -12,14 +12,14 @@ import ( const ( pluginOverrideShort = "Update matchable resources of plugin overrides" pluginOverrideLong = ` -Updates plugin overrides for given project and domain combination or additionally with workflow name. +Update plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +This will completely overwrite any existing plugins overrides on custom project, domain, and workflow combination. It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file It takes input for plugin overrides from the config file po.yaml, -e.g., content of po.yaml: +Example: content of po.yaml: .. code-block:: yaml @@ -36,7 +36,7 @@ e.g., content of po.yaml: flytectl update plugin-override --attrFile po.yaml -Updates plugin override for project, domain and workflow combination. This will take precedence over any other +Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index f7bb45ce67..7b3e72cfda 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -12,14 +12,14 @@ import ( const ( taskResourceAttributesShort = "Update matchable resources of task attributes" taskResourceAttributesLong = ` -Updates task resource attributes for the given project and domain combination or additionally with workflow name. +Updates the task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. Refer to get task-resource-attribute section on how to generate this file. It takes input for task resource attributes from the config file tra.yaml, -e.g., content of tra.yaml: +Example: content of tra.yaml: .. code-block:: yaml @@ -36,7 +36,7 @@ e.g., content of tra.yaml: flytectl update task-resource-attribute --attrFile tra.yaml -Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other +Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 740685ef2b..57e20c065d 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -11,16 +11,16 @@ import ( ) const ( - workflowExecutionConfigShort = "Update matchable resources of workflow execution config" + workflowExecutionConfigShort = "Updates matchable resources of workflow execution config" workflowExecutionConfigLong = ` -Updates workflow execution config for given project and domain combination or additionally with workflow name. +Updates the workflow execution config for the given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. This will completely overwrite any existing custom project and domain and workflow combination execution config. It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. Refer to get workflow-execution-config section on how to generate this file. It takes input for workflow execution config from the config file wec.yaml, -e.g., content of wec.yaml: +Example: content of wec.yaml: .. code-block:: yaml @@ -32,7 +32,7 @@ e.g., content of wec.yaml: flytectl update workflow-execution-config --attrFile wec.yaml -Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other +Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index d63bcb80d3..0da542b763 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -15,7 +15,7 @@ import ( const ( projectShort = "Update project resources" projectLong = ` -Updates the project according to the flags passed. Allows you to archive or activate a project. +Update the project according to the flags passed. Allows you to archive or activate a project. Activate project flytesnacks: :: diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index b6b16702b6..db1f52c7cd 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -75,7 +75,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated due to Error Updating Project\n") + tearDownAndVerify(t, "Project dummyProject failed to update due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { @@ -118,7 +118,7 @@ func TestArchiveProjectFuncWithError(t *testing.T) { err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated"+ + tearDownAndVerify(t, "Project dummyProject failed to update"+ " due to Error Updating Project\n") } diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index 8c599710b2..80f2b6c7b0 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -13,7 +13,7 @@ import ( const ( updateTaskShort = "Update task metadata" updateTaskLong = ` -Updates the description on the task: +Update the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index ef1c2b66a8..7f48226b0c 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -21,8 +21,8 @@ const ( updateShort = `Update Flyte resources e.g., project.` updatecmdLong = ` Currently, this command only provides subcommands to update project. -Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -To update a project: +Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +Update Flyte resources; if a project: :: flytectl update project -p flytesnacks --activateProject diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index af4cb3fe7d..f84c1e87e4 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -13,7 +13,7 @@ import ( const ( updateWorkflowShort = "Update workflow metadata" updateWorkflowLong = ` -Updates the description on the workflow: +Update the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 89963b3b71..eb1dde2b3e 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -26,21 +26,23 @@ type Goos string // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - upgradeCmdShort = `Upgrade/rollback to a Flyte version` + upgradeCmdShort = `Upgrades/rollbacks to a Flyte version.` upgradeCmdLong = ` -For FlyteCTL, it is: +For Flytectl, it is: :: flytectl upgrade -Note: Please use upgrade with sudo. Without sudo it will cause permission issue. +.. note:: + Please upgrade with sudo. Failing to do so may result in a permission issues. -Rollback flytectl binary: +Rollback Flytectl binary: :: flytectl upgrade rollback -Note: Upgrade is not available on windows. +.. note:: + Upgrade is not available on Windows. ` rollBackSubCommand = "rollback" ) @@ -115,7 +117,7 @@ func isUpgradeSupported(goos platformutil.Platform) (bool, error) { if isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version); err != nil { return false, err } else if !isGreater { - fmt.Println("You already have the latest version of flytectl") + fmt.Println("You already have the latest version of Flytectl") return false, nil } diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index d89f93aecf..473621bb9e 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -27,8 +27,8 @@ var ( func TestUpgradeCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 2f5d9f3f62..927ca755f5 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -19,9 +19,9 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - versionCmdShort = `Fetch Flyte version` + versionCmdShort = `Fetches Flyte version` versionCmdLong = ` -For FlyteCTL version, it is: +Fetch Flytectl version. :: flytectl version @@ -55,11 +55,11 @@ func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContex goos := platformutil.Platform(runtime.GOOS) version, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() if err != nil { - logger.Error(ctx, "Not able to get latest version because %v", err) + logger.Error(ctx, "Unable to get the latest version because %v", err) } else { message, err := githubutil.GetUpgradeMessage(version, goos) if err != nil { - logger.Error(ctx, "Not able to detect new version because %v", err) + logger.Error(ctx, "Unable to detect a new version because %v", err) } if len(message) > 0 { fmt.Println(message) @@ -97,14 +97,14 @@ func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) logger.Debugf(ctx, "Failed to get version of control plane %v: \n", err) return err } - // Print Flyteadmin + // Print FlyteAdmin if err := printVersion(versionOutput{ Build: v.ControlPlaneVersion.Build, BuildTime: v.ControlPlaneVersion.BuildTime, Version: v.ControlPlaneVersion.Version, App: controlPlanAppName, }); err != nil { - return fmt.Errorf("not able to get control plane version..Please try again: %v", err) + return fmt.Errorf("Unable to get the control plane version. Please try again: %v", err) } return nil } diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 8bc2511a3a..0be22c97c2 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -31,8 +31,8 @@ var ( func TestVersionCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index aeaa2ae410..419e02fd71 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -190,4 +190,5 @@ # intersphinx configuration intersphinx_mapping = { "flyteidl": ("https://docs.flyte.org/projects/flyteidl/en/latest", None), + "flyte": ("https://docs.flyte.org/en/latest", None), } diff --git a/flytectl/docs/source/config.rst b/flytectl/docs/source/config.rst index dd558c988c..1bf12d6016 100644 --- a/flytectl/docs/source/config.rst +++ b/flytectl/docs/source/config.rst @@ -6,8 +6,6 @@ It specifies the actions to be performed on the resource 'config'. :maxdepth: 1 :caption: Config - gen/flytectl_config_validate - gen/flytectl_config_init gen/flytectl_config_validate gen/flytectl_config_init gen/flytectl_config_discover diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst index 864fda4e61..9859618635 100644 --- a/flytectl/docs/source/contribute.rst +++ b/flytectl/docs/source/contribute.rst @@ -3,7 +3,7 @@ Contributing Guide ########################### First off, thank you for thinking about contributing! -Below you’ll find instructions that will hopefully guide you through how to contribute to, fix, and improve FlyteCTL. +Here are the instructions that will guide you through contributing, fixing, and improving Flytectl. 📝 Contribute to Documentation ============================== @@ -12,25 +12,25 @@ Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https:// To update the documentation, follow these steps: -1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder -2. Make modifications in the `cmd `__ folder -3. Run ``make gendocs`` from within the `docs `__ folder -4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder) +1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder. +2. Make modifications in the `cmd `__ folder. +3. Run ``make gendocs`` from within the `docs `__ folder. +4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder). 💻 Contribute Code ================== -1. Run ``make compile`` in the root directory to compile the code -2. Set up a local cluster by running ``./bin/flytectl sandbox start`` in the root directory -3. Run ``flytectl get project`` to see if things are working -4. Run the command you want to test in the terminal +1. Run ``make compile`` in the root directory to compile the code. +2. Set up a local cluster by running ``./bin/flytectl sandbox start`` in the root directory. +3. Run ``flytectl get project`` to see if things are working. +4. Run the command you want to test in the terminal. 5. If you want to update the command (add additional options, change existing options, etc.): * Navigate to `cmd `__ directory - * Each sub-directory points to a command, for example, ``create`` points to ``flytectl create ...`` + * Each sub-directory points to a command, e.g., ``create`` points to ``flytectl create ...`` * Here are the directories you can navigate to: - .. list-table:: FlyteCTL cmd directories + .. list-table:: Flytectl cmd directories :widths: 25 25 50 :header-rows: 1 @@ -42,32 +42,31 @@ To update the documentation, follow these steps: - Common package for all commands; has root flags * - ``configuration`` - ``flytectl configuration ...`` - - Command to validate/generate flytectl config + - Validates/generates Flytectl config * - ``create`` - ``flytectl create ...`` - - Command to create a project/execution + - Creates a project/execution * - ``delete`` - ``flytectl delete ...`` - - Command to abort an execution and delete resource attributes + - Aborts an execution and deletes the resource attributes * - ``get`` - ``flytectl get ...`` - - Command to get a task/workflow/launchplan/execution/project/resource's-attributes + - Gets a task/workflow/launchplan/execution/project/resource attribute * - ``register`` - ``flytectl register ...`` - - Command to register a task/workflow/launchplan + - Registers a task/workflow/launchplan * - ``sandbox`` - ``flytectl sandbox ...`` - - Command to interact with sandbox + - Interacts with sandbox * - ``update`` - ``flytectl update ...`` - - Command to update a project/launchplan/resource's-attributes + - Updates a project/launchplan/resource attribute * - ``upgrade`` - ``flytectl upgrade ...`` - - Command to upgrade/rollback FlyteCTL version + - Upgrades/rollbacks Flytectl version * - ``version`` - ``flytectl version ...`` - - Command to fetch FlyteCTL version + - Fetches Flytectl version + Find all the Flytectl commands :ref:`here `. + * Run appropriate tests to view the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` in the root directory. - Find all FlyteCTL commands on the `Nouns `__ page. - * Run appropriate tests to test the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` - in the root directory \ No newline at end of file diff --git a/flytectl/docs/source/examples.rst b/flytectl/docs/source/examples.rst index b57b7e5965..35993115b4 100644 --- a/flytectl/docs/source/examples.rst +++ b/flytectl/docs/source/examples.rst @@ -1,6 +1,6 @@ Examples ------- -It specifies the actions to be performed on the resource 'examples'. +--------- +It specifies the actions to be performed on the 'examples' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/execution-cluster-label.rst b/flytectl/docs/source/execution-cluster-label.rst index 2a27e87e52..9daa792840 100644 --- a/flytectl/docs/source/execution-cluster-label.rst +++ b/flytectl/docs/source/execution-cluster-label.rst @@ -1,6 +1,6 @@ Execution cluster label ----------------------- -It specifies the actions to be performed on the resource 'execution-cluster-label'. +It specifies the actions to be performed on the 'execution-cluster-label' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/execution-queue-attribute.rst b/flytectl/docs/source/execution-queue-attribute.rst index 207118cdb9..cbffa7537b 100644 --- a/flytectl/docs/source/execution-queue-attribute.rst +++ b/flytectl/docs/source/execution-queue-attribute.rst @@ -1,6 +1,6 @@ Execution queue attribute ------- -It specifies the actions to be performed on the resource 'execution-queue-attribute'. +-------------------------- +It specifies the actions to be performed on the 'execution-queue-attribute' resource. .. toctree:: :maxdepth: 1 @@ -9,6 +9,3 @@ It specifies the actions to be performed on the resource 'execution-queue-attrib gen/flytectl_get_execution-queue-attribute gen/flytectl_delete_execution-queue-attribute gen/flytectl_update_execution-queue-attribute - gen/flytectl_get_execution-queue-attribute - gen/flytectl_delete_execution-queue-attribute - gen/flytectl_update_execution-queue-attribute diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst index 4e3d1cbff3..2669831019 100644 --- a/flytectl/docs/source/execution.rst +++ b/flytectl/docs/source/execution.rst @@ -1,6 +1,6 @@ Execution --------- -It specifies the actions to be performed on the resource 'execution'. +It specifies the actions to be performed on the 'execution' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/files.rst b/flytectl/docs/source/files.rst index 96f2b861d9..f02fb03950 100644 --- a/flytectl/docs/source/files.rst +++ b/flytectl/docs/source/files.rst @@ -1,6 +1,6 @@ Files ------ -It specifies the actions to be performed on the resource 'files'. +It specifies the actions to be performed on the 'file' resource. .. toctree:: :maxdepth: 1 @@ -8,4 +8,4 @@ It specifies the actions to be performed on the resource 'files'. gen/flytectl_register_files -Note: It allows the user to register local files. +Note: It allows the user to register local files. diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index f3cf8c06f6..6d7693e09a 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -3,13 +3,13 @@ flytectl -------- -FlyteCTL CLI tool +Flytectl CLI tool Synopsis ~~~~~~~~ -FlyteCTL is CLI tool written in go to interact with Flyteadmin service +Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service. Options ~~~~~~~ @@ -61,14 +61,14 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`flytectl_completion` - Generate completion script +* :doc:`flytectl_completion` - Generates completion script. * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. * :doc:`flytectl_update` - Update Flyte resources e.g., project. -* :doc:`flytectl_upgrade` - Upgrade/rollback to a Flyte version -* :doc:`flytectl_version` - Fetch Flyte version +* :doc:`flytectl_upgrade` - Upgrades/rollbacks to a Flyte version. +* :doc:`flytectl_version` - Fetches Flyte version diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 33dea6e177..e9a33b0ae6 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -3,50 +3,70 @@ flytectl completion ------------------- -Generate completion script +Generates completion script. Synopsis ~~~~~~~~ -To load completions: +To load completion, run the following commands in accordance with the shell you are using: -Bash: +- Bash + :: - $ source <(flytectl completion bash) + $ source <(flytectl completion bash) - # To load completions for each session, execute once: - # Linux: - $ flytectl completion bash > /etc/bash_completion.d/flytectl - # macOS: - $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + To load completions for each session: -Zsh: + - Linux + :: - # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + $ flytectl completion bash > /etc/bash_completion.d/flytectl - $ echo "autoload -U compinit; compinit" >> ~/.zshrc + - macOS + :: - # To load completions for each session, execute once: - $ flytectl completion zsh > "${fpath[1]}/_flytectl" + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl - # You will need to start a new shell for this setup to take effect. +- Zsh + If shell completion is not already enabled in your environment, enable it: -fish: + :: - $ flytectl completion fish | source + $ echo "autoload -U compinit; compinit" >> ~/.zshrc - # To load completions for each session, execute once: - $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + Once enabled, execute once: -PowerShell: + :: - PS> flytectl completion powershell | Out-String | Invoke-Expression + $ flytectl completion zsh > "${fpath[1]}/_flytectl" - # To load completions for every new session, run: - PS> flytectl completion powershell > flytectl.ps1 - # and source this file from your PowerShell profile. + .. note:: + Start a new shell for this setup to take effect. + +- fish + :: + + $ flytectl completion fish | source + + To load completions for each session, run: + + :: + + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +- PowerShell + :: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + To load completions for each session, run: + + :: + + PS> flytectl completion powershell > flytectl.ps1 + + and source this file from your PowerShell profile. :: @@ -109,5 +129,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 56b8782bb7..86138b2491 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -69,9 +69,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. * :doc:`flytectl_config_docs` - Generate configuration documetation in rst format -* :doc:`flytectl_config_init` - Generates FlyteCTL config file in the user's home directory. +* :doc:`flytectl_config_init` - Generates a Flytectl config file in the user's home directory. * :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index a7274917da..26c1eae2ac 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -3,33 +3,38 @@ flytectl config init -------------------- -Generates FlyteCTL config file in the user's home directory. +Generates a Flytectl config file in the user's home directory. Synopsis ~~~~~~~~ -Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte +Creates a Flytectl config file in Flyte directory i.e ~/.flyte. -Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html - +Generate Sandbox config: :: flytectl config init -Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +Read more about the Sandbox deployment :ref:`here `. + +Generate remote cluster config: :: flytectl config init --host=flyte.myexample.com -Generates remote cluster config with insecure connection +By default, the connection is secure. +Read more about remote deployment :ref:`here `. + +Generate remote cluster config with insecure connection: :: flytectl config init --host=flyte.myexample.com --insecure -Generates FlyteCTL config with a storage provider +Generate Flytectl config with a storage provider: :: flytectl config init --host=flyte.myexample.com --storage diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 1fcc9387db..3839af1a4a 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -3,7 +3,7 @@ flytectl create --------------- -Create various Flyte resources including tasks/workflows/launchplans/executions/project. +Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ @@ -72,7 +72,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_create_execution` - Create execution resources -* :doc:`flytectl_create_project` - Create project resources +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_create_execution` - Creates execution resources. +* :doc:`flytectl_create_project` - Creates project resources. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 9e0d33530e..c7cfc199ba 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -3,95 +3,88 @@ flytectl create execution ------------------------- -Create execution resources +Creates execution resources. Synopsis ~~~~~~~~ -Creates executions for a given workflow/task in a project and domain. +Create execution resources for a given workflow or task in a project and domain. -There are three steps in generating an execution: - -- Generate the execution spec file using the get command. -- Update the inputs for the execution if needed. -- Run the execution by passing in the generated yaml file. - -The spec file should be generated first and then, the execution should be run using the spec file. -You can reference the FlyteCTL get task for more details. +There are three steps to generate an execution, as outlined below: +1. Generate the execution spec file using the :ref:`get task ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this: +The generated file would look similar to the following: .. code-block:: yaml - iamRoleARN: "" - inputs: - sorted_list1: - - 0 - sorted_list2: - - 0 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - - -The generated file can be modified to change the input values. + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +2. [Optional] Update the inputs for the execution, if needed. +The generated spec file can be modified to change the input values, as shown below: .. code-block:: yaml - iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' - inputs: - sorted_list1: - - 2 - - 4 - - 6 - sorted_list2: - - 1 - - 3 - - 5 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - -It can then be passed through the command line. -Notice that the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to the task/launch plans project/domain. - + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +3. Run the execution by passing the generated YAML file. +The file can then be passed through the command line. +It is worth noting that the source's and target's project and domain can be different. :: - flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -Also, an execution can be relaunched by passing in the current execution id. +To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. -See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. +To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. -The spec file should be generated first and then, the execution should be run using the spec file. +See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. + +Generic data types are supported for execution in a similar manner. +The following is an example of how generic data can be specified while creating the execution. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. - +The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: iamRoleARN: "" @@ -104,7 +97,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add +Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -202,5 +195,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index ba6b813e40..6cf6174288 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -3,23 +3,27 @@ flytectl create project ----------------------- -Create project resources +Creates project resources. Synopsis ~~~~~~~~ -Create projects.(project/projects can be used interchangeably in these commands) +Create a project given its name and id. :: - flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +.. note:: + The terms project/projects are interchangeable in these commands. + +Create a project by definition file. -Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml @@ -28,8 +32,10 @@ Create a project by definition file. Note: The name shouldn't contain any whites labels: values: app: flyte - description: "Some description for the project" + description: "Some description for the project." +.. note:: + The project name shouldn't contain any whitespace characters. :: @@ -102,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 4bf0a412a6..c5a5d389fc 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -3,7 +3,7 @@ flytectl delete --------------- -Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ @@ -72,12 +72,12 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_delete_cluster-resource-attribute` - Delete matchable resources of cluster attributes -* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. -* :doc:`flytectl_delete_execution-cluster-label` - Delete matchable resources of execution cluster label -* :doc:`flytectl_delete_execution-queue-attribute` - Delete matchable resources of execution queue attributes -* :doc:`flytectl_delete_plugin-override` - Delete matchable resources of plugin overrides -* :doc:`flytectl_delete_task-resource-attribute` - Delete matchable resources of task attributes -* :doc:`flytectl_delete_workflow-execution-config` - Delete matchable resources of workflow execution config +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes. +* :doc:`flytectl_delete_execution` - Terminates/deletes execution resources. +* :doc:`flytectl_delete_execution-cluster-label` - Deletes matchable resources of execution cluster label. +* :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes. +* :doc:`flytectl_delete_plugin-override` - Deletes matchable resources of plugin overrides. +* :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes. +* :doc:`flytectl_delete_workflow-execution-config` - Deletes matchable resources of workflow execution config. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index e606a9fd2e..0fdfa84c68 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -3,41 +3,40 @@ flytectl delete cluster-resource-attribute ------------------------------------------ -Delete matchable resources of cluster attributes +Deletes matchable resources of cluster attributes. Synopsis ~~~~~~~~ -Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. +Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used to create it. -Here, the config file is written to cra.yaml. -Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of cra.yaml: +To delete cluster resource attribute using the config file that was used to create it, run: :: flytectl delete cluster-resource-attribute --attrFile cra.yaml +For example, here's the config file cra.yaml: .. code-block:: yaml - + domain: development project: flytectldemo attributes: foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: @@ -108,5 +107,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index de963af2ce..889e09a6fa 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -3,25 +3,25 @@ flytectl delete execution-cluster-label --------------------------------------- -Delete matchable resources of execution cluster label +Deletes matchable resources of execution cluster label. Synopsis ~~~~~~~~ -Deletes execution cluster label for given project and domain combination or additionally with workflow name. +Deletes execution cluster label for a given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete execution-cluster-label -p flytectldemo -d development -Deletes execution cluster label using config file which was used for creating it. +Delete execution cluster label using the config file that was used to create it. Here, the config file is written to ecl.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of ecl.yaml: +Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' or 'delete' commands. +Example: content of ecl.yaml: :: @@ -34,8 +34,8 @@ e.g., content of ecl.yaml: project: flytectldemo value: foo -Deletes execution cluster label for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete execution cluster label for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -106,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 30849c67d8..9909792dbe 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -3,25 +3,25 @@ flytectl delete execution-queue-attribute ----------------------------------------- -Delete matchable resources of execution queue attributes +Deletes matchable resources of execution queue attributes. Synopsis ~~~~~~~~ -Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. +Delete execution queue attributes for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete execution-queue-attribute -p flytectldemo -d development -Deletes execution queue attribute using config file which was used for creating it. +Delete execution queue attribute using the config file which was used to create it. Here, the config file is written to era.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of era.yaml: +Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update or delete commands. +Example: content of era.yaml: :: @@ -38,8 +38,8 @@ e.g., content of era.yaml: - buzz - lightyear -Deletes execution queue attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete execution queue attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -110,5 +110,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 9831831e98..711b2a3ffd 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -3,24 +3,24 @@ flytectl delete execution ------------------------- -Terminate/Delete execution resources. +Terminates/deletes execution resources. Synopsis ~~~~~~~~ -Terminate executions.(execution,executions can be used interchangeably in these commands) - -Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. - +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED, or SUCCEEDED, calling terminate on them has no effect. Terminate a single execution with its name: :: flytectl delete execution c6a51x2l9e -d development -p flytesnacks -Get executions to check its state: +.. note:: + The terms execution/executions are interchangeable in these commands. + +Get an execution to check its state: :: @@ -36,7 +36,7 @@ Terminate multiple executions with their names: flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Get executions to find the state of previously terminated executions: +Get an execution to find the state of previously terminated executions: :: @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index e54b428707..9933f2c072 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -3,25 +3,25 @@ flytectl delete plugin-override ------------------------------- -Delete matchable resources of plugin overrides +Deletes matchable resources of plugin overrides. Synopsis ~~~~~~~~ -Deletes plugin override for the given project and domain combination or additionally with workflow name. +Delete plugin override for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used to create it. +Delete plugin override using the config file which was used to create it. Here, the config file is written to po.yaml. -Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of po.yaml: +Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update or delete commands. +Example: content of po.yaml: :: flytectl delete plugin-override --attrFile po.yaml @@ -38,8 +38,8 @@ e.g., content of po.yaml: - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete plugin override for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -110,5 +110,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 96f726900a..8664c34035 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -3,16 +3,16 @@ flytectl delete task-resource-attribute --------------------------------------- -Delete matchable resources of task attributes +Deletes matchable resources of task attributes. Synopsis ~~~~~~~~ -Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. +Deletes task resource attributes for the given project and domain combination, or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete task-resource-attribute -p flytectldemo -d development @@ -20,8 +20,8 @@ For project flytectldemo and development domain, it is: Deletes task resource attribute using config file which was used to create it. Here, the config file is written to tra.yaml. -The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of tra.yaml: +The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' or 'delete' commands. +Example: content of tra.yaml: :: @@ -39,8 +39,8 @@ e.g., content of tra.yaml: cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete task resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -111,5 +111,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index fc586192f5..b584343e6f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -3,16 +3,16 @@ flytectl delete workflow-execution-config ----------------------------------------- -Delete matchable resources of workflow execution config +Deletes matchable resources of workflow execution config. Synopsis ~~~~~~~~ -Deletes workflow execution config for the given project and domain combination or additionally with workflow name. +Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete workflow-execution-config -p flytectldemo -d development @@ -20,8 +20,8 @@ For project flytectldemo and development domain, it is: Deletes workflow execution config using config file which was used to create it. Here, the config file is written to wec.yaml. -Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of wec.yaml: +Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update or delete commands. +Example: content of wec.yaml: :: @@ -35,7 +35,7 @@ e.g., content of wec.yaml: max_parallelism: 5 Deletes workflow execution config for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -106,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index b129cecbb2..a61c75323c 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -3,14 +3,14 @@ flytectl get ------------ -Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ -For project, it is: +Fetch Flyte resource; if a project: :: flytectl get project @@ -72,16 +72,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_get_cluster-resource-attribute` - Get matchable resources of cluster resource attributes. -* :doc:`flytectl_get_execution` - Get execution resources -* :doc:`flytectl_get_execution-cluster-label` - Get matchable resources of execution cluster label. -* :doc:`flytectl_get_execution-queue-attribute` - Get matchable resources of execution queue attributes -* :doc:`flytectl_get_launchplan` - Get launch plan resources -* :doc:`flytectl_get_plugin-override` - Get matchable resources of plugin override -* :doc:`flytectl_get_project` - Get project resources -* :doc:`flytectl_get_task` - Get task resources -* :doc:`flytectl_get_task-resource-attribute` - Get matchable resources of task attributes -* :doc:`flytectl_get_workflow` - Get workflow resources -* :doc:`flytectl_get_workflow-execution-config` - Get matchable resources of workflow execution config +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes. +* :doc:`flytectl_get_execution` - Gets execution resources. +* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label. +* :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes. +* :doc:`flytectl_get_launchplan` - Gets the launch plan resources. +* :doc:`flytectl_get_plugin-override` - Gets matchable resources of plugin override. +* :doc:`flytectl_get_project` - Gets project resources +* :doc:`flytectl_get_task` - Gets task resources +* :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes. +* :doc:`flytectl_get_workflow` - Gets workflow resources +* :doc:`flytectl_get_workflow-execution-config` - Gets matchable resources of workflow execution config. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index de78a8ceac..6ea320d7cf 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -3,40 +3,40 @@ flytectl get cluster-resource-attribute --------------------------------------- -Get matchable resources of cluster resource attributes. +Gets matchable resources of cluster resource attributes. Synopsis ~~~~~~~~ -Retrieves cluster resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve cluster resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attributes for the given project, domain, and workflow. +Retrieve cluster resource attributes for the given project, domain, and workflow. For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. -Here, the config file is written to cra.yaml file: -e.g., content of cra.yaml +Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +The config file is written to cra.yaml file. +Example: content of cra.yaml: :: @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 84109db997..47309bf44f 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -3,41 +3,41 @@ flytectl get execution-cluster-label ------------------------------------ -Get matchable resources of execution cluster label. +Gets matchable resources of execution cluster label. Synopsis ~~~~~~~~ -Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieve the execution cluster label for a given project and domain, combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieve the execution cluster label for the given project, domain and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution cluster label for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. -Here, the config file is written to ecl.yaml, -e.g., content of ecl.yaml: +The config file is written to ecl.yaml file. +Example: content of ecl.yaml: :: @@ -114,5 +114,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index ecb63556bc..719ac51458 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -3,40 +3,40 @@ flytectl get execution-queue-attribute -------------------------------------- -Get matchable resources of execution queue attributes +Gets matchable resources of execution queue attributes. Synopsis ~~~~~~~~ -Retrieves the execution queue attribute for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the execution queue attribute for the given project and domain. +For project flytectldemo and development domain: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the config file is written to era.yaml, -e.g., content of era.yaml: +The config file is written to era.yaml file. +Example: content of era.yaml: :: @@ -117,5 +117,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index e77bcb8dc0..ba5c4a0801 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -3,62 +3,64 @@ flytectl get execution ---------------------- -Get execution resources +Gets execution resources. Synopsis ~~~~~~~~ -Retrieve all executions within the project and domain (execution, executions can be used interchangeably): +Retrieve all executions within the project and domain. :: flytectl get execution -p flytesnacks -d development -Retrieve executions by name within the project and domain: +.. note:: + The terms execution/executions are interchangeable in these commands. +Retrieve executions by name within the project and domain. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieve all the executions with filters: +Retrieve all the executions with filters. :: flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters: +Retrieve executions as per the specified limit and sorting parameters. :: flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions present in other pages by specifying the limit and page number: +Retrieve executions present in other pages by specifying the limit and page number. :: flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 -Retrieve executions within the project and domain in YAML format: +Retrieve executions within the project and domain in YAML format. :: flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format: +Retrieve executions within the project and domain in JSON format. :: flytectl get execution -p flytesnacks -d development -o json -Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. +Get more details of the execution using the --details flag, which shows node and task executions. +The default view is a tree view, and the TABLE view format is not supported on this view. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. - +Fetch execution details in YAML format. In this view, only node details are available. For task, pass the --nodeID flag. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml @@ -69,7 +71,7 @@ Fetch task executions on a specific node using the --nodeID flag. Use the nodeID flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. +Task execution view is available in YAML/JSON format too. The following example showcases YAML, where the output contains input and output data of each node. :: @@ -145,5 +147,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 4a2e13a751..53c95cff78 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -3,18 +3,21 @@ flytectl get launchplan ----------------------- -Get launch plan resources +Gets the launch plan resources. Synopsis ~~~~~~~~ -Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): +Retrieve all launch plans within the project and domain: :: flytectl get launchplan -p flytesnacks -d development +.. note:: + The terms launch plan/launch plans are interchangeable in these commands. + Retrieve a launch plan by name within the project and domain: :: @@ -73,7 +76,7 @@ Retrieve all launch plans the within the project and domain in JSON format: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: +Retrieve a launch plan within the project and domain as per a version and generates the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: @@ -95,8 +98,7 @@ The generated file would look similar to this: version: v3 workflow: core.advanced.run_merge_sort.merge_sort -Check the create execution section on how to launch one using the generated file. - +Check the :ref:`create execution section` on how to launch one using the generated file. Usage @@ -169,5 +171,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index eafa654f20..aa1ed4f7a1 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -3,21 +3,21 @@ flytectl get plugin-override ---------------------------- -Get matchable resources of plugin override +Gets matchable resources of plugin override. Synopsis ~~~~~~~~ -Retrieves the plugin override for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the plugin override for the given project and domain. +For project flytectldemo and development domain: :: flytectl get plugin-override -p flytectldemo -d development -e.g., output from the command +Example: output from the command .. code-block:: json @@ -31,14 +31,13 @@ e.g., output from the command }] } -Retrieves the plugin override for the given project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: - +Retrieve the plugin override for the given project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -53,9 +52,9 @@ e.g., output from the command: }] } -Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. -Here, the config file is written to po.yaml, -e.g., content of po.yaml: +Write plugin overrides to a file. If there are no plugin overrides, the command throws an error. +The config file is written to po.yaml file. +Example: content of po.yaml: :: @@ -137,5 +136,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index c1e67c5ce3..f917911908 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -3,18 +3,21 @@ flytectl get project -------------------- -Get project resources +Gets project resources Synopsis ~~~~~~~~ -Retrieve all the projects. (project,projects can be used interchangeably in these commands): +Retrieve all the projects: :: flytectl get project +.. note:: + The terms project/projects are interchangeable in these commands. + Retrieve project by name: :: @@ -116,5 +119,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 2bc62dd00a..7cdb8bc5ae 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -3,32 +3,32 @@ flytectl get task-resource-attribute ------------------------------------ -Get matchable resources of task attributes +Gets matchable resources of task attributes. Synopsis ~~~~~~~~ -Retrieves task resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve task resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g., output from the command: +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -36,8 +36,8 @@ e.g., output from the command: Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here, the config file is written to tra.yaml, -e.g., content of tra.yaml: +The config file is written to tra.yaml file. +Example: content of tra.yaml: :: @@ -119,5 +119,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 473030b128..0ce16463f4 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -3,18 +3,22 @@ flytectl get task ----------------- -Get task resources +Gets task resources Synopsis ~~~~~~~~ -Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): + +Retrieve all the tasks within project and domain: :: flytectl get task -p flytesnacks -d development +.. note:: + The terms task/tasks are interchangeable in these commands. + Retrieve task by name within project and domain: :: @@ -159,5 +163,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index eaa12eef0d..85ce34f3b9 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -3,22 +3,22 @@ flytectl get workflow-execution-config -------------------------------------- -Get matchable resources of workflow execution config +Gets matchable resources of workflow execution config. Synopsis ~~~~~~~~ -Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. +Retrieve workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get workflow-execution-config -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -28,14 +28,14 @@ e.g., output from the command "max_parallelism": 5 } -Retrieves workflow execution config for the project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve workflow execution config for the project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -46,9 +46,9 @@ e.g., output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. -Here, the config file is written to wec.yaml, -e.g., content of wec.yaml: +Write the workflow execution config to a file. If there are no workflow execution config, the command throws an error. +The config file is written to wec.yaml file. +Example: content of wec.yaml: :: @@ -125,5 +125,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index b3e8fc5738..92960d0ddb 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -3,14 +3,14 @@ flytectl get workflow --------------------- -Get workflow resources +Gets workflow resources Synopsis ~~~~~~~~ -Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): +Retrieve all the workflows within project and domain (workflow/workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development @@ -147,5 +147,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 56c795d3c3..aeea164696 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -3,16 +3,16 @@ flytectl register ----------------- -Register tasks/workflows/launchplans from a list of generated serialized files. +Registers tasks, workflows, and launch plans from a list of generated serialized files. Synopsis ~~~~~~~~ -Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Take input files as serialized versions of the tasks/workflows/launchplans and register them with FlyteAdmin. Currently, these input files are protobuf files generated as output from Flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +Project and Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. If the entities are already registered with Flyte for the same version, the registration would fail. @@ -72,7 +72,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_register_examples` - Register Flytesnacks example -* :doc:`flytectl_register_files` - Register file resources +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_register_examples` - Registers Flytesnacks example. +* :doc:`flytectl_register_files` - Registers file resources. diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index a53c63669f..75d25ea88e 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -3,14 +3,14 @@ flytectl register examples -------------------------- -Register Flytesnacks example +Registers Flytesnacks example. Synopsis ~~~~~~~~ -Register all latest Flytesnacks examples: +Register all the latest Flytesnacks examples: :: flytectl register examples -d development -p flytesnacks @@ -20,7 +20,9 @@ Register specific release of Flytesnacks examples: flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: The register command automatically override the version with release version +.. note:: + The register command automatically override the version with release version. + Usage @@ -95,5 +97,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index cc62e457db..e052e181be 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -3,26 +3,28 @@ flytectl register files ----------------------- -Register file resources +Registers file resources. Synopsis ~~~~~~~~ -Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +Registers all the serialized protobuf files including tasks, workflows and launch plans with default v1 version. If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: flytectl register file _pb_output/* -d development -p flytesnacks -There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +Registration and fast registration mean the same. In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. +If Flytectl finds any source code in users' input, it considers the registration as fast registration. +Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. In case of s3 Flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. +In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. :: flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" @@ -160,5 +162,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index e9ff4c3a02..43e7816f51 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -3,33 +3,33 @@ flytectl sandbox ---------------- -Used for sandbox interactions like start/teardown/status/exec. +Helps with Sandbox interactions like start, teardown, status, and exec. Synopsis ~~~~~~~~ -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. -Create sandbox cluster: +Creates Sandbox cluster: :: flytectl sandbox start -Remove sandbox cluster: +Removes Sandbox cluster: :: flytectl sandbox teardown -Check status of sandbox container: +Checks the status of the Sandbox container: :: flytectl sandbox status -Execute command inside sandbox container: +Executes commands inside the Sandbox container: :: flytectl sandbox exec -- pwd @@ -91,9 +91,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_sandbox_exec` - Execute non-interactive command inside the sandbox container -* :doc:`flytectl_sandbox_start` - Start the Flyte Sandbox cluster -* :doc:`flytectl_sandbox_status` - Get status of the sandbox environment. -* :doc:`flytectl_sandbox_teardown` - Teardown cleans up the sandbox environment +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_sandbox_exec` - Executes non-interactive command inside the Sandbox container +* :doc:`flytectl_sandbox_start` - Starts the Flyte Sandbox cluster. +* :doc:`flytectl_sandbox_status` - Gets the status of the Sandbox environment. +* :doc:`flytectl_sandbox_teardown` - Cleans up the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index d377d26950..e030242b1d 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -3,16 +3,17 @@ flytectl sandbox exec --------------------- -Execute non-interactive command inside the sandbox container +Executes non-interactive command inside the Sandbox container Synopsis ~~~~~~~~ -Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. +Runs non-interactive commands inside the Sandbox container and immediately returns the output. By default, "flytectl exec" is present in the /root directory inside the Sandbox container. :: + flytectl sandbox exec -- ls -al Usage @@ -77,5 +78,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 941cb57926..c7a87d2ed1 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -3,38 +3,39 @@ flytectl sandbox start ---------------------- -Start the Flyte Sandbox cluster +Starts the Flyte Sandbox cluster. Synopsis ~~~~~~~~ -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. -Start sandbox cluster without any source code: +Starts the Sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox: +Mounts your source code repository inside the Sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +Runs a specific version of Flyte. Flytectl Sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +.. note:: + Flytectl Sandbox is only supported for Flyte versions > v0.10.0. -Run latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl sandbox start --pre -Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -138,5 +139,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 6b7637cb3b..a7a8e1e372 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -3,14 +3,14 @@ flytectl sandbox status ----------------------- -Get status of the sandbox environment. +Gets the status of the Sandbox environment. Synopsis ~~~~~~~~ -Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. +Retrieves the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. Usage :: @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 5958285fae..31280b2511 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -3,14 +3,14 @@ flytectl sandbox teardown ------------------------- -Teardown cleans up the sandbox environment +Cleans up the sandbox environment Synopsis ~~~~~~~~ -Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: +Removes the Sandbox cluster and all the Flyte config created by 'sandbox start': :: flytectl sandbox teardown @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index e0ed691ea5..f4c8ae3e06 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -11,8 +11,8 @@ Synopsis Currently, this command only provides subcommands to update project. -Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -To update a project: +Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +Update Flyte resources; if a project: :: flytectl update project -p flytesnacks --activateProject @@ -74,17 +74,17 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_update_cluster-resource-attribute` - Update matchable resources of cluster attributes -* :doc:`flytectl_update_execution` - Update execution status +* :doc:`flytectl_update_execution` - Updates the execution status * :doc:`flytectl_update_execution-cluster-label` - Update matchable resources of execution cluster label * :doc:`flytectl_update_execution-queue-attribute` - Update matchable resources of execution queue attributes -* :doc:`flytectl_update_launchplan` - Update launch plan status -* :doc:`flytectl_update_launchplan-meta` - Update launch plan metadata +* :doc:`flytectl_update_launchplan` - Updates launch plan status +* :doc:`flytectl_update_launchplan-meta` - Updates the launch plan metadata * :doc:`flytectl_update_plugin-override` - Update matchable resources of plugin overrides * :doc:`flytectl_update_project` - Update project resources * :doc:`flytectl_update_task-meta` - Update task metadata * :doc:`flytectl_update_task-resource-attribute` - Update matchable resources of task attributes -* :doc:`flytectl_update_workflow-execution-config` - Update matchable resources of workflow execution config +* :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config * :doc:`flytectl_update_workflow-meta` - Update workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index b976c3486a..43f4f034bc 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -10,11 +10,11 @@ Synopsis -Updates cluster resource attributes for given project and domain combination or additionally with workflow name. +Update cluster resource attributes for given project and domain combination or additionally with workflow name. Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. It takes input for cluster resource attributes from the config file cra.yaml, -e.g., content of cra.yaml: +Example: content of cra.yaml: .. code-block:: yaml @@ -28,7 +28,7 @@ e.g., content of cra.yaml: flytectl update cluster-resource-attribute --attrFile cra.yaml -Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Update cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 265a274589..e809f7c70a 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -10,11 +10,11 @@ Synopsis -Updates execution cluster label for the given project and domain combination or additionally with workflow name. +Update execution cluster label for the given project and domain combination or additionally with workflow name. Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. It takes input for execution cluster label from the config file ecl.yaml -e.g., content of ecl.yaml: +Example: content of ecl.yaml: .. code-block:: yaml @@ -26,7 +26,7 @@ e.g., content of ecl.yaml: flytectl update execution-cluster-label --attrFile ecl.yaml -Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other +Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index e12e6ff614..53122c5a8f 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -10,14 +10,14 @@ Synopsis -Updates execution queue attributes for the given project and domain combination or additionally with workflow name. +Update execution queue attributes for the given project and domain combination or additionally with workflow name. Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file It takes input for execution queue attributes from the config file era.yaml, -e.g., content of era.yaml: +Example: content of era.yaml: .. code-block:: yaml @@ -33,7 +33,7 @@ e.g., content of era.yaml: flytectl update execution-queue-attribute --attrFile era.yaml -Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other +Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 7bb7ebee56..4ad95da247 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -3,19 +3,19 @@ flytectl update execution ------------------------- -Update execution status +Updates the execution status Synopsis ~~~~~~~~ -Activating an execution shows it in the cli and UI: +Activate an execution; and it shows up in the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate -Archiving execution hides it from cli and UI: +Archive an execution; and it is hidden from the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 2ac0f7c1ff..b08cd29e4b 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -3,7 +3,7 @@ flytectl update launchplan-meta ------------------------------- -Update launch plan metadata +Updates the launch plan metadata Synopsis ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index fd64182bd3..ca27b38679 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -3,19 +3,19 @@ flytectl update launchplan -------------------------- -Update launch plan status +Updates launch plan status Synopsis ~~~~~~~~ -Activating launch plan activates the scheduled job associated with it: +Activates a launch plan which activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launch plan deschedules any scheduled job associated with it: +Archives a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 41c04f73ce..3460f9498b 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -10,14 +10,14 @@ Synopsis -Updates plugin overrides for given project and domain combination or additionally with workflow name. +Update plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +This will completely overwrite any existing plugins overrides on custom project, domain, and workflow combination. It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file It takes input for plugin overrides from the config file po.yaml, -e.g., content of po.yaml: +Example: content of po.yaml: .. code-block:: yaml @@ -34,7 +34,7 @@ e.g., content of po.yaml: flytectl update plugin-override --attrFile po.yaml -Updates plugin override for project, domain and workflow combination. This will take precedence over any other +Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 1c05bdbbc9..9277927bae 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -10,7 +10,7 @@ Synopsis -Updates the project according to the flags passed. Allows you to archive or activate a project. +Update the project according to the flags passed. Allows you to archive or activate a project. Activate project flytesnacks: :: diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 06ad150dc1..b6fec0258c 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -10,7 +10,7 @@ Synopsis -Updates the description on the task: +Update the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index c788249f3b..0c9f31dc50 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -10,14 +10,14 @@ Synopsis -Updates task resource attributes for the given project and domain combination or additionally with workflow name. +Updates the task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. Refer to get task-resource-attribute section on how to generate this file. It takes input for task resource attributes from the config file tra.yaml, -e.g., content of tra.yaml: +Example: content of tra.yaml: .. code-block:: yaml @@ -34,7 +34,7 @@ e.g., content of tra.yaml: flytectl update task-resource-attribute --attrFile tra.yaml -Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other +Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 90f3815857..ae43ff1982 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -3,21 +3,21 @@ flytectl update workflow-execution-config ----------------------------------------- -Update matchable resources of workflow execution config +Updates matchable resources of workflow execution config Synopsis ~~~~~~~~ -Updates workflow execution config for given project and domain combination or additionally with workflow name. +Updates the workflow execution config for the given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. This will completely overwrite any existing custom project and domain and workflow combination execution config. It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. Refer to get workflow-execution-config section on how to generate this file. It takes input for workflow execution config from the config file wec.yaml, -e.g., content of wec.yaml: +Example: content of wec.yaml: .. code-block:: yaml @@ -29,7 +29,7 @@ e.g., content of wec.yaml: flytectl update workflow-execution-config --attrFile wec.yaml -Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other +Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 07a7340fbd..6e220472c6 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -10,7 +10,7 @@ Synopsis -Updates the description on the workflow: +Update the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index bea19096ad..d1a1e34ee3 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -3,26 +3,28 @@ flytectl upgrade ---------------- -Upgrade/rollback to a Flyte version +Upgrades/rollbacks to a Flyte version. Synopsis ~~~~~~~~ -For FlyteCTL, it is: +For Flytectl, it is: :: flytectl upgrade -Note: Please use upgrade with sudo. Without sudo it will cause permission issue. +.. note:: + Please upgrade with sudo. Failing to do so may result in a permission issues. -Rollback flytectl binary: +Rollback Flytectl binary: :: flytectl upgrade rollback -Note: Upgrade is not available on windows. +.. note:: + Upgrade is not available on Windows. :: @@ -85,5 +87,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index de9d2d6d6c..41ad6f8030 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -3,14 +3,14 @@ flytectl version ---------------- -Fetch Flyte version +Fetches Flyte version Synopsis ~~~~~~~~ -For FlyteCTL version, it is: +Fetch Flytectl version. :: flytectl version @@ -76,5 +76,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 3f73b6b834..7288d80a7e 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -11,10 +11,10 @@ This video will take you on a tour of Flytectl - how to install and configure it .. youtube:: cV8ezYnBANE -Install -======= -Flytectl is a Golang binary and can be installed on any platform supported by -golang +Installation +============ + +Flytectl is a Golang binary that can be installed on any platform supported by Golang. .. tabbed:: OSX @@ -40,19 +40,20 @@ golang flytectl version -Configure -========= -Flytectl allows configuring using a YAML file or pass every configuration value -on command-line. The following configuration is useful to setup. +Configuration +============= + +Flytectl allows you to communicate with FlyteAdmin using a YAML file or by passing every configuration value +on the command-line. The following configuration can be used for the setup: Basic Configuration -------------------- -The full list of available configurable options can be found by running ``flytectl --help``, or alternately `here `__ +The full list of available configurable options can be found by running ``flytectl --help``, or `here `__. .. NOTE:: - Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in config file + Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in the config file. .. tabbed:: Local Flyte Sandbox @@ -63,7 +64,7 @@ The full list of available configurable options can be found by running ``flytec admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 - insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment) + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). authType: Pkce # authType: Pkce # if using authentication or just drop this. storage: connection: @@ -124,7 +125,7 @@ The full list of available configurable options can be found by running ``flytec * currDir from where you run flytectl * ``/etc/flyte/config`` - You can pass the file name in the commandline using ``--config `` as well! + You can also pass the file name in the command line using ``--config ``. .. toctree:: diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst index 7755b8eaba..ad29e5229a 100644 --- a/flytectl/docs/source/launchplan.rst +++ b/flytectl/docs/source/launchplan.rst @@ -1,6 +1,6 @@ Launchplan ----------- -It specifies the actions to be performed on the resource 'launchplan'. +----------- +It specifies the actions to be performed on the 'launchplan' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index c61cfbf640..197ce67a02 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -1,6 +1,8 @@ +.. _nouns: + Nouns ------ -FlyteCTL nouns specify the resource on which the action needs to be performed. Example of resources include project, workflow, task, execution. +Flytectl nouns specify the resource on which the action needs to be performed. Examples of resources include project, workflow, task, and execution. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/plugin-override.rst b/flytectl/docs/source/plugin-override.rst index ed016543c5..7b1010ff1a 100644 --- a/flytectl/docs/source/plugin-override.rst +++ b/flytectl/docs/source/plugin-override.rst @@ -1,6 +1,6 @@ Plugin override --------------- -It specifies the actions to be performed on the resource 'plugin-override'. +It specifies the actions to be performed on the 'plugin-override' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/project.rst b/flytectl/docs/source/project.rst index b98d7909c2..05e1cc1113 100644 --- a/flytectl/docs/source/project.rst +++ b/flytectl/docs/source/project.rst @@ -1,6 +1,6 @@ Project ------- -It specifies the actions to be performed on the resource 'project'. +-------- +It specifies the actions to be performed on the 'project' resource. .. toctree:: diff --git a/flytectl/docs/source/sandbox.rst b/flytectl/docs/source/sandbox.rst index e6de8cafa5..f7d7bbc4bd 100644 --- a/flytectl/docs/source/sandbox.rst +++ b/flytectl/docs/source/sandbox.rst @@ -1,6 +1,6 @@ Sandbox ------- -It specifies the actions to be performed on the resource 'sandbox'. +It specifies the actions to be performed on the 'sandbox' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/task-resource-attribute.rst b/flytectl/docs/source/task-resource-attribute.rst index 3a4c0d5e8d..edc168355a 100644 --- a/flytectl/docs/source/task-resource-attribute.rst +++ b/flytectl/docs/source/task-resource-attribute.rst @@ -1,6 +1,6 @@ Task resource attribute ----------------------- -It specifies the actions to be performed on the resource 'task-resource-attribute'. +It specifies the actions to be performed on the 'task-resource-attribute' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/task.rst b/flytectl/docs/source/task.rst index 14f1c58f41..8792ea31d4 100644 --- a/flytectl/docs/source/task.rst +++ b/flytectl/docs/source/task.rst @@ -1,6 +1,6 @@ Task ------ -It specifies the actions to be performed on the resource 'task'. +It specifies the actions to be performed on the 'task' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index a286d313e6..a1763a35b2 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -1,6 +1,6 @@ Verbs ------ -FlyteCTL verbs specify the actions to be performed on the resources. Ex: create, get, update, and delete. +Flytectl verbs specify the actions to be performed on the resources. Example: create, get, update, and delete. .. toctree:: diff --git a/flytectl/docs/source/workflow-execution-config.rst b/flytectl/docs/source/workflow-execution-config.rst index 0ae96cbb87..d4f94e76a9 100644 --- a/flytectl/docs/source/workflow-execution-config.rst +++ b/flytectl/docs/source/workflow-execution-config.rst @@ -1,6 +1,7 @@ Workflow execution config ------- -It specifies the actions to be performed on the resource 'workflow-execution-config'. +------------------------- + +It specifies the actions to be performed on the 'workflow-execution-config' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst index 91332dc281..32c08574a3 100644 --- a/flytectl/docs/source/workflow.rst +++ b/flytectl/docs/source/workflow.rst @@ -1,6 +1,6 @@ Workflow -------- -It specifies the actions to be performed on the resource 'workflow'. +It specifies the actions to be performed on the 'workflow' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index f561707b4d..362e60a9ba 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -1,30 +1,30 @@ # Introduction -This document proposes, **flytectl** as one singular CLI that interacts with flyteadmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of -FlyteAdmin. We will start with gRPC endpoint as the client is easily generated and in future we should investigate generation of a Swagger based REST client from the gRPC specification. As we build -more SDK's in different languages we should support a common way of interacting with the API. This does no mean that some SDK's may provide native ways of interacting with the Admin API (for e.g. -flytekit), but the intention is that we will eventually replace **flytekit/flyte-cli** with flytectl exclusively. +This document proposes, **Flytectl** as a single CLI that interacts with FlyteAdmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of +FlyteAdmin. We will start with gRPC endpoint since the client can be easily generated. In the future, we will work on generating a Swagger-based REST client from the gRPC specification. As we build +more SDKs in different languages we will support a common way of interacting with the API. This doesn't mean that some SDKs may provide native ways of interacting with the Admin API (for e.g. +Flytekit), but the intention is to eventually replace **Flytekit/Flytecli** with Flytectl exclusively. -We also recommend that the design of FlyteCTL is careful and it could helps us with delivering user features faster without having to rely on the UI. FlyteCTL with follow standard oauth2 for -authentication already supported by flyteAdmin. Moreover, FlyteCTL should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. +Flytectl has been designed to deliver user features without having to rely on the UI. Flytectl will follow the standard oauth2 for +authentication, supported by FlyteAdmin. Moreover, Flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. # Why One CLI? -As we build multiple SDK's they need a native way of interacting with the API. Having multiple CLI's makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. +As we build multiple SDKs, we need a native way of interacting with the API. Having multiple CLIs makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. *Diagram here* # Why Golang? -- Most of Flytebackend is written in golang -- Golang offers great CLI tooling support with viper and cobra -- Golang toolchain to create cross-compiled small, light weight binary is really efficient and easy to use -- We already generate golang proto and clients for all our IDL -- we have multiple common libraries available to ease the development of this tool -- kubectl is a stellar example of a cli done well +- Most of Flyte backend is written in Golang. +- Golang offers great CLI tooling support with viper and cobra. +- Golang toolchain helps create cross-compiled small, light weight binary, which is efficient and easy to use. +- We already generate Golang proto and clients for all our IDL. +- We have multiple common libraries available to ease the development of this tool. +- Kubectl is a stellar example of a CLI done well. ## Generating Swagger code -We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. We also got approached by the swagger code gen maintainer to see if they can help. +We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. The Swagger code-gen maintainer also approached us to see if they could help. # API @@ -51,7 +51,7 @@ $ flytectl [options] returns the version of the CLI, version of Admin service and version of the Platform that is deployed ### configure -Allows configuring FlyteCTL for your own usage (low pri). Needed for especially storing Auth tokens. +Allows configuring Flytectl for your own usage (low pri). Needed for especially storing Auth tokens. ### get/delete Get retrieves a list of resources that is qualified by a further sub-command. for example @@ -72,7 +72,7 @@ Create may need more information than can be easily passed in command line and w Eventually we may want to simplify the json and yaml representations but that is not required in first pass. We may also want to create just a separate option for that. The create for Task and Workflow is essential what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that pyflyte, jflyte (other native cli's or -code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **flytectl**. Thus flytectl is essential in every flow for the user. +code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **Flytectl**. Thus Flytectl is essential in every flow for the user. #### Create Templatization From 1f29a6732e6ece005a32e2490ddd911fc909a634 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 15 Mar 2022 08:34:37 -0700 Subject: [PATCH 232/356] Update documentation (#293) Signed-off-by: Flyte-Bot Co-authored-by: samhita-alla --- flytectl/docs/source/gen/flytectl.rst | 2 +- ...lytectl_delete_execution-cluster-label.rst | 20 ++++++------ ...tectl_delete_execution-queue-attribute.rst | 16 ++++------ .../gen/flytectl_delete_plugin-override.rst | 17 +++++----- ...lytectl_delete_task-resource-attribute.rst | 18 +++++------ ...tectl_delete_workflow-execution-config.rst | 18 +++++------ flytectl/docs/source/gen/flytectl_get.rst | 2 +- .../flytectl_get_execution-cluster-label.rst | 6 ++-- .../source/gen/flytectl_get_launchplan.rst | 2 +- ...flytectl_get_workflow-execution-config.rst | 2 +- .../source/gen/flytectl_register_files.rst | 32 +++++++++++-------- flytectl/docs/source/gen/flytectl_sandbox.rst | 29 ++++++++--------- .../docs/source/gen/flytectl_sandbox_exec.rst | 7 ++-- .../source/gen/flytectl_sandbox_start.rst | 13 ++++---- .../source/gen/flytectl_sandbox_status.rst | 6 ++-- .../source/gen/flytectl_sandbox_teardown.rst | 2 +- 16 files changed, 95 insertions(+), 97 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 6d7693e09a..03357644e9 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -67,7 +67,7 @@ SEE ALSO * :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. * :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. * :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. -* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. +* :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. * :doc:`flytectl_update` - Update Flyte resources e.g., project. * :doc:`flytectl_upgrade` - Upgrades/rollbacks to a Flyte version. * :doc:`flytectl_version` - Fetches Flyte version diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 889e09a6fa..e83edad12e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -10,32 +10,30 @@ Synopsis -Deletes execution cluster label for a given project and domain combination or additionally the workflow name. +Delete execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: - flytectl delete execution-cluster-label -p flytectldemo -d development + flytectl delete execution-cluster-label -p flytectldemo -d development - -Delete execution cluster label using the config file that was used to create it. -Here, the config file is written to ecl.yaml. -Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' or 'delete' commands. -Example: content of ecl.yaml: +To delete execution cluster label using the config file that was used to create it, run: :: flytectl delete execution-cluster-label --attrFile ecl.yaml +For example, here's the config file ecl.yaml: .. code-block:: yaml - + domain: development project: flytectldemo value: foo -Delete execution cluster label for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort': +Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete the execution cluster label of the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following: :: diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 9909792dbe..710e8e7f10 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -10,23 +10,20 @@ Synopsis -Delete execution queue attributes for the given project and domain combination or additionally the workflow name. +Delete execution queue attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development - + flytectl delete execution-queue-attribute -p flytectldemo -d development Delete execution queue attribute using the config file which was used to create it. -Here, the config file is written to era.yaml. -Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update or delete commands. -Example: content of era.yaml: :: flytectl delete execution-queue-attribute --attrFile era.yaml +For example, here's the config file era.yaml: .. code-block:: yaml @@ -38,8 +35,9 @@ Example: content of era.yaml: - buzz - lightyear -Delete execution queue attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort': +Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update and delete commands. + +To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 9933f2c072..f3b01a02c9 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -10,22 +10,20 @@ Synopsis -Delete plugin override for the given project and domain combination or additionally the workflow name. +Delete plugin override for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: - flytectl delete plugin-override -p flytectldemo -d development + flytectl delete plugin-override -p flytectldemo -d development -Delete plugin override using the config file which was used to create it. -Here, the config file is written to po.yaml. -Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update or delete commands. -Example: content of po.yaml: +To delete plugin override using the config file which was used to create it, run: :: flytectl delete plugin-override --attrFile po.yaml +For example, here's the config file po.yaml: .. code-block:: yaml @@ -38,8 +36,9 @@ Example: content of po.yaml: - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Delete plugin override for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort': +Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 8664c34035..ac26e320de 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -10,23 +10,20 @@ Synopsis -Deletes task resource attributes for the given project and domain combination, or additionally the workflow name. +Delete task resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: - flytectl delete task-resource-attribute -p flytectldemo -d development + flytectl delete task-resource-attribute -p flytectldemo -d development - -Deletes task resource attribute using config file which was used to create it. -Here, the config file is written to tra.yaml. -The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' or 'delete' commands. -Example: content of tra.yaml: +To delete task resource attribute using the config file which was used to create it, run: :: flytectl delete task-resource-attribute --attrFile tra.yaml +For example, here's the config file tra.yaml: .. code-block:: yaml @@ -39,8 +36,9 @@ Example: content of tra.yaml: cpu: "2" memory: "450Mi" -Delete task resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort': +The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index b584343e6f..0f36d5dd7a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -12,30 +12,28 @@ Synopsis Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development + flytectl delete workflow-execution-config -p flytectldemo -d development - -Deletes workflow execution config using config file which was used to create it. -Here, the config file is written to wec.yaml. -Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update or delete commands. -Example: content of wec.yaml: +To delete workflow execution config using the config file which was used to create it, run: :: flytectl delete workflow-execution-config --attrFile wec.yaml +For example, here's the config file wec.yaml: .. code-block:: yaml - + domain: development project: flytectldemo max_parallelism: 5 -Deletes workflow execution config for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort': +Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete workflow execution config for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index a61c75323c..0be6546db4 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -10,7 +10,7 @@ Synopsis -Fetch Flyte resource; if a project: +To fetch a project, use the following command: :: flytectl get project diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 47309bf44f..c8eed6cbb6 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -10,14 +10,14 @@ Synopsis -Retrieve the execution cluster label for a given project and domain, combination or additionally the workflow name. +Retrieve the execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytectldemo and development domain, run: :: flytectl get execution-cluster-label -p flytectldemo -d development -Example: output from the command: +The output would look like: .. code-block:: json diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 53c95cff78..2d47156ba8 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -16,7 +16,7 @@ Retrieve all launch plans within the project and domain: flytectl get launchplan -p flytesnacks -d development .. note:: - The terms launch plan/launch plans are interchangeable in these commands. + The terms launchplan/launchplans are interchangeable in these commands. Retrieve a launch plan by name within the project and domain: diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 85ce34f3b9..ce38e4be29 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -10,7 +10,7 @@ Synopsis -Retrieve workflow execution config for the given project and domain combination or additionally the workflow name. +Retrieve workflow execution config for the given project and domain, in combination with the workflow name. For project flytectldemo and development domain: diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index e052e181be..7c20d694bb 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -11,30 +11,36 @@ Synopsis Registers all the serialized protobuf files including tasks, workflows and launch plans with default v1 version. + If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: flytectl register file _pb_output/* -d development -p flytesnacks - -Registration and fast registration mean the same. In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. -If Flytectl finds any source code in users' input, it considers the registration as fast registration. -Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. In case of s3 Flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. + +As per Flytectl, registration and fast registration mean the same! + +In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. +When the user runs pyflyte with --fast flag, then pyflyte creates serialized proto and the source code archive file in the same directory. +Flytectl finds the input file by searching for an archive file whose name starts with "fast" and has .tar.gz extension. +If Flytectl finds any source code in users' input, it considers the registration as fast registration. + +SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. +If s3, Flytectl will upload the code base to s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 - -In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + +In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. +Instead, it will override the destination path on the registration. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" - -Using archive file. Currently supported extensions are .tgz and .tar. They can be local or remote files served through http/https. -Use --archive flag: + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" + +To register a .tgz or .tar file, use the --archive flag. They can be local or remote files served through http/https. :: - flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive Using local tgz file: diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 43e7816f51..dcc3f886cd 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -3,33 +3,32 @@ flytectl sandbox ---------------- -Helps with Sandbox interactions like start, teardown, status, and exec. +Helps with sandbox interactions like start, teardown, status, and exec. Synopsis ~~~~~~~~ -Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Creates Sandbox cluster: +To create a sandbox cluster, run: :: flytectl sandbox start - - -Removes Sandbox cluster: + +To remove a sandbox cluster, run: :: - flytectl sandbox teardown - + flytectl sandbox teardown -Checks the status of the Sandbox container: +To check the status of the sandbox container, run: :: - flytectl sandbox status - -Executes commands inside the Sandbox container: + flytectl sandbox status + +To execute commands inside the sandbox container, use exec: :: flytectl sandbox exec -- pwd @@ -92,8 +91,8 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl` - Flytectl CLI tool -* :doc:`flytectl_sandbox_exec` - Executes non-interactive command inside the Sandbox container -* :doc:`flytectl_sandbox_start` - Starts the Flyte Sandbox cluster. -* :doc:`flytectl_sandbox_status` - Gets the status of the Sandbox environment. +* :doc:`flytectl_sandbox_exec` - Executes non-interactive command inside the sandbox container +* :doc:`flytectl_sandbox_start` - Starts the Flyte sandbox cluster. +* :doc:`flytectl_sandbox_status` - Gets the status of the sandbox environment. * :doc:`flytectl_sandbox_teardown` - Cleans up the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index e030242b1d..ebe3141dda 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -3,14 +3,15 @@ flytectl sandbox exec --------------------- -Executes non-interactive command inside the Sandbox container +Executes non-interactive command inside the sandbox container Synopsis ~~~~~~~~ -Runs non-interactive commands inside the Sandbox container and immediately returns the output. By default, "flytectl exec" is present in the /root directory inside the Sandbox container. +Run non-interactive commands inside the sandbox container and immediately return the output. +By default, "flytectl exec" is present in the /root directory inside the sandbox container. :: @@ -78,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. +* :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index c7a87d2ed1..75169d7cec 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -3,26 +3,27 @@ flytectl sandbox start ---------------------- -Starts the Flyte Sandbox cluster. +Starts the Flyte sandbox cluster. Synopsis ~~~~~~~~ -Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. +Flyte sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Starts the Sandbox cluster without any source code: +Starts the sandbox cluster without any source code: :: flytectl sandbox start -Mounts your source code repository inside the Sandbox: +Mounts your source code repository inside the sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Runs a specific version of Flyte. Flytectl Sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 @@ -139,5 +140,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. +* :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index a7a8e1e372..41b13a1307 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -3,14 +3,14 @@ flytectl sandbox status ----------------------- -Gets the status of the Sandbox environment. +Gets the status of the sandbox environment. Synopsis ~~~~~~~~ -Retrieves the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. +Retrieves the status of the sandbox environment. Currently, Flyte sandbox runs as a local Docker container. Usage :: @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. +* :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 31280b2511..18a97a7fb8 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. +* :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. From e8bffb618ceb3e0ebc61dbfdf33bdb0d056fb0bb Mon Sep 17 00:00:00 2001 From: Alekhya Sai Date: Thu, 17 Mar 2022 19:56:41 +0530 Subject: [PATCH 233/356] Image migration to static resources (#294) * Updates to grammar and image link. Signed-off-by: Alekhya Sai Punnamaraju * Updated image link in readme. Signed-off-by: Alekhya Sai Punnamaraju * Updates from review suggestions. Signed-off-by: Alekhya Sai Punnamaraju --- flytectl/README.md | 2 +- flytectl/proposal/README.md | 77 +++++++++++++++++++++---------------- 2 files changed, 45 insertions(+), 34 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index 938d915550..d7c8081889 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -1,6 +1,6 @@

- Flyte Logo + Flyte Logo

FlyteCTL diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index 362e60a9ba..833f01d0bb 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -1,21 +1,18 @@ # Introduction -This document proposes, **Flytectl** as a single CLI that interacts with FlyteAdmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of -FlyteAdmin. We will start with gRPC endpoint since the client can be easily generated. In the future, we will work on generating a Swagger-based REST client from the gRPC specification. As we build -more SDKs in different languages we will support a common way of interacting with the API. This doesn't mean that some SDKs may provide native ways of interacting with the Admin API (for e.g. -Flytekit), but the intention is to eventually replace **Flytekit/Flytecli** with Flytectl exclusively. +This document proposes, **Flytectl** as a single CLI that interacts with the FlyteAdmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of the FlyteAdmin. We will start with gRPC endpoint since the client can be easily generated. In the future, we will work on generating a Swagger-based REST client from the gRPC specification. As we buildmore SDKs in different languages we will support a common way of interacting with the API. This doesn't mean that some SDKs may provide native ways of interacting with the Admin API (e.g. Flytekit), but the intention is to eventually replace **Flytekit/Flytecli** with Flytectl exclusively. -Flytectl has been designed to deliver user features without having to rely on the UI. Flytectl will follow the standard oauth2 for -authentication, supported by FlyteAdmin. Moreover, Flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. +Flytectl has been designed to deliver user features without having to rely on the UI. Flytectl will follow the standard oauth2 for authentication, supported by FlyteAdmin. Moreover, Flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. # Why One CLI? As we build multiple SDKs, we need a native way of interacting with the API. Having multiple CLIs makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. -*Diagram here* + # Why Golang? + - Most of Flyte backend is written in Golang. - Golang offers great CLI tooling support with viper and cobra. - Golang toolchain helps create cross-compiled small, light weight binary, which is efficient and easy to use. @@ -24,6 +21,7 @@ As we build multiple SDKs, we need a native way of interacting with the API. Hav - Kubectl is a stellar example of a CLI done well. ## Generating Swagger code + We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. The Swagger code-gen maintainer also approached us to see if they could help. # API @@ -41,6 +39,7 @@ $ flytectl [options] ``` ### base options + - *endpoint* endpoint where Flyteadmin is available - *insecure* use if Oauth is not available - optional *project* project for which we need to retrieve details @@ -48,12 +47,15 @@ $ flytectl [options] - TBD ### version -returns the version of the CLI, version of Admin service and version of the Platform that is deployed + +returns the version of the CLI, version of Admin service, and version of the Platform that is deployed. ### configure + Allows configuring Flytectl for your own usage (low pri). Needed for especially storing Auth tokens. ### get/delete + Get retrieves a list of resources that is qualified by a further sub-command. for example ```bash $ flytectl --endpoint "example.flyte.net" get projects @@ -68,15 +70,15 @@ $ flytectl --endpoint "example.flyte.net" --project "p" --domain "d" delete work ``` ### Create is special -Create may need more information than can be easily passed in command line and we recommend using files to create an entity. The file could be in protobuf, jsonpb (json) or jsonpb (yaml) form. -Eventually we may want to simplify the json and yaml representations but that is not required in first pass. We may also want to create just a separate option for that. - -The create for Task and Workflow is essential what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that pyflyte, jflyte (other native cli's or -code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **Flytectl**. Thus Flytectl is essential in every flow for the user. +Create may need more information that can be easily passed in the command line. We recommend using files to create an entity. The file could be in protobuf, jsonpb (json) or jsonpb (yaml) form. + Eventually, we may want to simplify the json and yaml representations, but that is not required in the first pass. We may also want to create just a separate option for that. +The create for Task and Workflow is essential to what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that the pyflyte, jflyte (other native cli's or +code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **flytectl**. Thus flytectl is essential in every flow for the user. #### Create Templatization -User-facing SDKs can serialize workflow code to protobuf representations but these will be incomplete. Specifically, the _project_, _domain_, and _version_ parameters must be supplied at create time since these are attributes of the registerable, rather than serialized object. Placeholder template variables including: + +User-facing SDKs can serialize workflow code to protobuf representations, but these will be incomplete. Specifically, the _project_, _domain_, and _version_ parameters must be supplied at create time since these are attributes of the registerable rather than serialized object. Placeholder template variables include: * `{{ .project }}` * `{{ .domain }}` @@ -84,9 +86,9 @@ User-facing SDKs can serialize workflow code to protobuf representations but the * [auth](https://github.com/flyteorg/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L241): including the assumable_iam_role and/or kubernetes_service_account * the [output_location_prefix](https://github.com/flyteorg/flyteidl/blob/c3baba8983019680ef57b6244cea36ba951233ed/protos/flyteidl/admin/common.proto#L250) -will be included in the serialized protobuf that must be substituted at **create** time. Eventually the hope is that substitution will be done server-side. +will be included in the serialized protobuf that must be substituted at **create** time. Eventually, the hope is that substitution will be done server-side. -Furthermore, to reproduce the equivalent **fast-register** code path for the flyte-cli defined in flytekit an equivalent _fast-create_ command must fill in additional template variables in the [task container args](https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/core/tasks.proto#L142). These serialized, templatized args will appear like so: +Furthermore, to reproduce the equivalent **fast-register** code path for the flyte-cli defined in flytekit, an equivalent _fast-create_ command must fill in additional template variables in the [task container args](https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/core/tasks.proto#L142). These serialized, templatized args will appear like so: ``` "pyflyte-fast-execute", @@ -99,21 +101,22 @@ Furthermore, to reproduce the equivalent **fast-register** code path for the fly ... ``` -The `remote package path` is determined by uploading the compressed user code (produced in the serialize step) to a user-specified remote directory (called `additional-distribution-dir` in flytekit). In the case of fast-create the code _version_ arg can be deterministcally assigned when serializing the code. Compressed code archives uploaded as individual files to the remote directory can assume the version name to guarantee uniqueness. +The `remote package path` is determined by uploading the compressed user code (produced in the serialize step) to a user-specified remote directory (called `additional-distribution-dir` in flytekit). In the case of fast-create the code _version_ arg can be deterministically assigned when serializing the code. Compressed code archives uploaded as individual files to the remote directory can assume the version name to guarantee uniqueness. The `dest dir` is an optional argument specified by the user to designate where code is downloaded at execution time. -![Registration process](flytectl_interaction.png) +![Registration process](https://raw.githubusercontent.com/flyteorg/static-resources/main/flytectl/readme/flytectl_interaction.png) ### update -This is a lower priority option as most entities in flyte are immutable and do not support updates. For the ones where update is supported, we should look into retrieving the existing and allow editing in an editor, like kubectl edit does. -**To be specified** +This is a lower priority option as most entities in flyte are immutable and do not support updates. For the ones where updates are supported, we should look into retrieving the existing and allowing editing in an editor, as kubectl edit does. + -# Details of each resource +# Details of each resource ## Projects + Projects are top level entity in Flyte. You can fetch multiple projects or one project using the CLI. Think about projects like namespaces. - create @@ -144,16 +147,17 @@ $ flytectl update projects --id project-x ... ``` ## Tasks - - get + +- get ```bash $ flytectl get tasks [task-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] ``` - - get specific version and get a template to launch - Create an execution is complicated as the user needs to know all the input types and way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc) + - get a specific version and get a template to launch + Create an execution is complicated as the user needs to know all the input types, and a way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc.) ```bash $ flytectl get task task-name --execution-template -o YAML yaml.template (TBD) -This is a special version of get launch-plan which can be executed by passing it to create execution. +This is a special version of the get launch-plan which can be executed by passing it to create execution. ``` - create @@ -161,6 +165,7 @@ This is a special version of get launch-plan which can be executed by passing it - update ## Workflows + Support - get ```bash @@ -170,30 +175,32 @@ $ flytectl get workflows [workflow-name] [-o yaml | -o json | default -o table] - update ## Launch Plans + Support - get ```bash $ flytectl get launch-plans [launchplan-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] ``` - - get specific version and get a template to launch - Create an execution is complicated as the user needs to know all the input types and way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc) + - get a specific version and get a template to launch + Create an execution is complicated as the user needs to know all the input types, and a way to simplify this could be to create a YAML template locally from the launchplan (the interface, etc.) ```bash $ flytectl get launch-plans launch-plan-name --execution-template -o YAML yaml.template (TBD) -This is a special version of get launch-plan which can be executed by passing it to create execution. +This is a special version of the get launch-plan which can be executed by passing it to create execution. ``` - create - update ## Execution + Create or retrieve an execution. - get Get all executions or get a single execution. ```bash $ flytectl get execution [exec-name] [-o yaml | -o json | default -o table] [--filters...] [--sort-by...] [--selectors...] ``` -An interesting feature in get-execution might be to filter within the execution only the execution of a node, or quickly find the ones that have failed. +An interesting feature in get-execution might be to filter the execution of a node within the execution only or quickly find the ones that have failed. Visualizing the execution is also challenging. We may want to visualize We could use https://graphviz.org/ to visualize the DAG. Within the DAG, NodeExecutions and corresponding task executions need to be fetched. @@ -207,12 +214,14 @@ $ flytectl create execution --launch-plan "name" --inputs "key=value" - delete - here refers to terminate ## MatchableEntity -Ability to retrieve matchable entity and edit its details + +Ability to retrieve the matchable entity and edit its details - get - create - update ## Outputs + Support - get - create @@ -221,14 +230,16 @@ Support # No resource interactions ## Install all examples -Today Flytesnacks houses a few examples for Flyte usage in python. When a user wants to get started with Flyte quickly it would be preferable that all Flytesnacks examples are serialized and stored as artifacts in flytesnacks for every checkin. This can be done for python flytekit using `pyflyte serialize` command. Once they are posted as serialized blobs, flytectl could easily retrieve them and register them in a specific project as desired by the user. + +Today Flytesnacks houses a few examples for Flyte usage in python. When a user wants to get started with Flyte quickly, it would be preferable that all Flytesnacks examples are serialized and stored as artifacts in flytesnacks for every checkin. This can be done for python flytekit using `pyflyte serialize` command. Once they are posted as serialized blobs, flytectl could easily retrieve them and register them in a specific project as desired by the user. ```bash $ flytectl examples register-all [cookbook|plugins|--custom-path=remote-path] [--semver semantic-version-of-flytesnacks-examples] --target-project --target-domain ``` -The remote has to follow a protocol. It should be an archive - `tar.gz` with two folders `example-set/ -tasks/*.pb -workflows/*.pb` All the workflows in this path will be installed to the target project / domain +The remote has to follow a protocol. It should be an archive - `tar.gz` with two folders `example-set/ -tasks/*.pb -workflows/*.pb` All the workflows in this path will be installed to the target project/domain. ## Setup a repository with dockerfile for writing code for Flyte + Maybe we should look at `boilr` or some other existing framework to do this ```bash $ flytectl init project --archetype tensorflow-2.0 @@ -236,4 +247,4 @@ $ flytectl init project --archetype spark-3.0 $ flytectl init project --archetype xgboost ... ``` -For this to work, all these archetypes should be available in a separate repository. An archetype is essentially a template with dockerfile and folder setup with flytekit.config +All these archetypes should be available in a separate repository for this to work. An archetype is a template with dockerfile and folder setup with flytekit.config. From 308ddc86aba93f8d4df100a2aa397753fbc29e5e Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 22 Mar 2022 12:23:55 +0530 Subject: [PATCH 234/356] [Doc] Updated flytectl uprade command (#297) --- flytectl/docs/source/index.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 7288d80a7e..e78875f917 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -26,7 +26,7 @@ Flytectl is a Golang binary that can be installed on any platform supported by G .. prompt:: bash $ - brew update && brew upgrade flytectl + flytectl upgrade .. tabbed:: Other Operating systems @@ -34,6 +34,12 @@ Flytectl is a Golang binary that can be installed on any platform supported by G curl -sL https://ctl.flyte.org/install | bash + *Upgrade* existing installation using the following command: + + .. prompt:: bash $ + + flytectl upgrade + **Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: .. prompt:: bash $ From 204d3eafb6a8dc45f818b024e61c42aab313d67c Mon Sep 17 00:00:00 2001 From: Alekhya Sai Date: Thu, 24 Mar 2022 18:40:46 +0530 Subject: [PATCH 235/356] Include workflow execution creation as part of flytectl create workflow (#295) * Stub for workflow Signed-off-by: Alekhya Sai Punnamaraju * Edit. Signed-off-by: Alekhya Sai Punnamaraju * Add WF execution steps Signed-off-by: Alekhya Sai Punnamaraju * Modified workflow steps. Signed-off-by: Alekhya Sai Punnamaraju * Fixing the rendering issue. Signed-off-by: Alekhya Sai Punnamaraju * Modified workflow as discussed. Signed-off-by: Alekhya Sai Punnamaraju * Removed relaunch steps for workflow. Signed-off-by: Alekhya Sai Punnamaraju --- .../source/gen/flytectl_create_execution.rst | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index c7cfc199ba..55ab913ddb 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -10,10 +10,15 @@ Synopsis -Create execution resources for a given workflow or task in a project and domain. +Create execution resources for a given workflow or task in a project and domain. + There are three steps to generate an execution, as outlined below: + +Create execution for a task +=========================== + 1. Generate the execution spec file using the :ref:`get task ` command. :: @@ -63,6 +68,53 @@ It is worth noting that the source's and target's project and domain can be diff flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks +Create execution for a workflow +=============================== + +1. Generate an execution spec file. +:: + + flytectl get launchplan --project flytesnacks --domain development flyte.workflows.example.my_wf --latest --execFile exec_spec.yaml + +The generated file would look similar to the following: + +.. code-block:: yaml + + iamRoleARN: "" + inputs: {} + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + version: v1 + workflow: flyte.workflows.example.my_wf + +2. [Optional] Update the inputs for the execution, if needed. The generated spec file can be modified to change the input values, as shown below: + +.. code-block:: yaml + + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + version: "v1" + workflow: flyte.workflows.example.my_wf + +3. Run the execution using the exec spec file. The file can then be passed through the command line. It is worth noting that the source’s and target’s project and domain can be different. +:: + + flytectl create execution --project flytesnacks --domain development --execFile exec_spec.yaml + +The following commands are common to both task and worflow: + To relaunch an execution, pass the current execution ID as follows: :: @@ -123,7 +175,6 @@ Modified file with struct data populated for 'x' and 'y' parameters for the task Usage - :: flytectl create execution [flags] From 4065cf7112af13694836bf9fbf966fc4a610fef4 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 25 Mar 2022 22:59:00 +0530 Subject: [PATCH 236/356] Project domain attribute for workflow Execution config (#298) --- .../golang_test_targets/download_tooling.sh | 2 +- .../matchable_attr_file_config_utils.go | 2 +- .../attrfetchconfig_flags.go | 1 + .../attrfetchconfig_flags_test.go | 14 +++++++ .../workflowexecutionconfig/fetch_config.go | 1 + .../cmd/delete/matchable_attribute_util.go | 10 ++--- .../matchable_workflow_execution_config.go | 41 +++++++++++++++++-- .../cmd/update/matchable_attribute_util.go | 10 ++--- ...tchable_cluster_resource_attribute_test.go | 4 +- .../matchable_execution_cluster_label_test.go | 4 +- ...atchable_execution_queue_attribute_test.go | 4 +- .../update/matchable_plugin_override_test.go | 4 +- .../matchable_task_resource_attribute_test.go | 4 +- ...atchable_workflow_execution_config_test.go | 4 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- 16 files changed, 81 insertions(+), 30 deletions(-) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index 02fb004881..f205cb9cd0 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -17,7 +17,7 @@ set -e # In the format of ":" or ":" if no cli tools=( "github.com/vektra/mockery/cmd/mockery" - "github.com/flyteorg/flytestdlib/cli/pflags@latest" + "github.com/flyteorg/flytestdlib/cli/pflags" "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" diff --git a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go index b21e7832a9..d7fa956373 100644 --- a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go +++ b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go @@ -57,4 +57,4 @@ func DumpTaskResourceAttr(matchableAttrConfig interface{}, fileName string) erro fmt.Printf("%v", String(matchableAttrConfig)) } return nil -} +} \ No newline at end of file diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go index 6196b75ed7..7ea760f420 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags.go @@ -51,5 +51,6 @@ func (AttrFetchConfig) mustMarshalJSON(v json.Marshaler) string { func (cfg AttrFetchConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrFetchConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultFetchConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultFetchConfig.AttrFile, "attribute file name to be used for generating attribute for the resource type.") + cmdFlags.BoolVar(&DefaultFetchConfig.Gen, fmt.Sprintf("%v%v", prefix, "gen"), DefaultFetchConfig.Gen, "generates an empty workflow execution config file with conformance to the api format.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go index 7f85109efe..6d090a0fe4 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrfetchconfig_flags_test.go @@ -113,4 +113,18 @@ func TestAttrFetchConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_gen", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("gen", testValue) + if vBool, err := cmdFlags.GetBool("gen"); err == nil { + testDecodeJson_AttrFetchConfig(t, fmt.Sprintf("%v", vBool), &actual.Gen) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go index 8c2b918cb4..6a1c3e6988 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/fetch_config.go @@ -4,6 +4,7 @@ package workflowexecutionconfig type AttrFetchConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` + Gen bool `json:"gen" pflag:",generates an empty workflow execution config file with conformance to the api format."` } var DefaultFetchConfig = &AttrFetchConfig{} diff --git a/flytectl/cmd/delete/matchable_attribute_util.go b/flytectl/cmd/delete/matchable_attribute_util.go index cfdd90f250..b2482270e8 100644 --- a/flytectl/cmd/delete/matchable_attribute_util.go +++ b/flytectl/cmd/delete/matchable_attribute_util.go @@ -2,10 +2,10 @@ package delete import ( "context" + "fmt" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" ) func deleteMatchableAttr(ctx context.Context, project, domain, workflowName string, @@ -13,25 +13,25 @@ func deleteMatchableAttr(ctx context.Context, project, domain, workflowName stri if len(workflowName) > 0 { // Delete the workflow attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here if dryRun { - logger.Infof(ctx, "skipping DeleteWorkflowAttributes request (dryRun)") + fmt.Print("skipping DeleteWorkflowAttributes request (dryRun)\n") } else { err := deleter.DeleteWorkflowAttributes(ctx, project, domain, workflowName, rsType) if err != nil { return err } } - logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v and workflow %v", project, domain, workflowName) + fmt.Printf("Deleted matchable resources from %v project and domain %v and workflow %v\n", project, domain, workflowName) } else { // Delete the project domain attribute from the admin. If the attribute doesn't exist , admin deesn't return an error and same behavior is followed here if dryRun { - logger.Infof(ctx, "skipping DeleteProjectDomainAttributes request (dryRun)") + fmt.Print("skipping DeleteProjectDomainAttributes request (dryRun)\n") } else { err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) if err != nil { return err } } - logger.Debugf(ctx, "Deleted matchable resources from %v project and domain %v", project, domain) + fmt.Printf("Deleted matchable resources from %v project and domain %v\n", project, domain) } return nil } diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 6adfd5ebca..7e75c2a93b 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -2,13 +2,17 @@ package get import ( "context" - - "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "fmt" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const ( @@ -88,7 +92,12 @@ func getWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCtx c // Updates the workflowExecutionConfigFileConfig with the fetched matchable attribute if err := FetchAndUnDecorateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminFetcherExt(), &workflowExecutionConfigFileConfig, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG); err != nil { - return err + if grpcError := status.Code(err); grpcError == codes.NotFound && workflowexecutionconfig.DefaultFetchConfig.Gen { + fmt.Println("Generating a sample workflow execution config file") + workflowExecutionConfigFileConfig = getSampleWorkflowExecutionFileConfig(project, domain, workflowName) + } else { + return err + } } // Write the config to the file which can be used for update @@ -97,3 +106,29 @@ func getWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCtx c } return nil } + +func getSampleWorkflowExecutionFileConfig(project, domain, workflow string) workflowexecutionconfig.FileConfig { + return workflowexecutionconfig.FileConfig{ + Project: project, + Domain: domain, + Workflow: workflow, + WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ + MaxParallelism: 10, + SecurityContext: &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: "default", + IamRole: "", + }, + }, + Labels: &admin.Labels{ + Values: map[string]string{"cliLabelKey": "cliLabelValue"}, + }, + Annotations: &admin.Annotations{ + Values: map[string]string{"cliAnnotationKey": "cliAnnotationValue"}, + }, + RawOutputDataConfig: &admin.RawOutputDataConfig{ + OutputLocationPrefix: "cliOutputLocationPrefix", + }, + }, + } +} diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go index 41ff4fa388..e3f4a2d296 100644 --- a/flytectl/cmd/update/matchable_attribute_util.go +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -2,10 +2,10 @@ package update import ( "context" + "fmt" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flytestdlib/logger" ) func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workflowName string, @@ -14,25 +14,25 @@ func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workfl if len(workflowName) > 0 { // Update the workflow attribute using the admin. if dryRun { - logger.Infof(ctx, "skipping UpdateWorkflowAttributes request (dryRun)") + fmt.Printf("skipping UpdateWorkflowAttributes request (dryRun)\n") } else { err := updater.UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) if err != nil { return err } } - logger.Debugf(ctx, "Updated attributes from %v project and domain %v and workflow %v", project, domain, workflowName) + fmt.Printf("Updated attributes from %v project and domain %v and workflow %v\n", project, domain, workflowName) } else { // Update the project domain attribute using the admin. if dryRun { - logger.Infof(ctx, "skipping UpdateProjectDomainAttributes request (dryRun)") + fmt.Printf("skipping UpdateProjectDomainAttributes request (dryRun)\n") } else { err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) if err != nil { return err } } - logger.Debugf(ctx, "Updated attributes from %v project and domain %v", project, domain) + fmt.Printf("Updated attributes from %v project and domain %v\n", project, domain) } return nil } diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index e354541d26..d091125cdc 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -36,7 +36,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed to update project domain attribute", func(t *testing.T) { setup() @@ -59,7 +59,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed to update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index b22b444b7a..0a84237cc0 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -36,7 +36,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything).Return(nil) err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { setup() @@ -59,7 +59,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index 5659a35696..f0751b32da 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -36,7 +36,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything).Return(nil) err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { setup() @@ -59,7 +59,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index 8ca9cff072..8f59d1e1e4 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -36,7 +36,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything).Return(nil) err = updatePluginOverridesFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { setup() @@ -59,7 +59,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updatePluginOverridesFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index a5dd5f7a02..e91f6476d9 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -36,7 +36,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { setup() @@ -59,7 +59,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index f4a2934c7f..8afcfda1bf 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -37,7 +37,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything).Return(nil) err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { setup() @@ -60,7 +60,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { setup() diff --git a/flytectl/go.mod b/flytectl/go.mod index 84eef1ec12..695533b176 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.21.24 + github.com/flyteorg/flyteidl v0.24.6 github.com/flyteorg/flytestdlib v0.4.14 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 3666fe15ea..5402048521 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -356,8 +356,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.21.24 h1:e2wPBK4aiLE+fw2zmhUDNg39QoJk6Lf5lQRvj8XgtFk= -github.com/flyteorg/flyteidl v0.21.24/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.24.6 h1:n2796X9Sw7mNDtXWwsJr84DLQpz8Cptvb7LptfJLxag= +github.com/flyteorg/flyteidl v0.24.6/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.14 h1:qpPwvJ+DqM1fI/y5uPKAP8p8VONz8oRp9Fz0jFl/5aI= github.com/flyteorg/flytestdlib v0.4.14/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= From 49a11220fb8d5991b467de52dfbc01050a36e7ab Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Fri, 1 Apr 2022 00:30:43 -0700 Subject: [PATCH 237/356] Implement Fast Register through PreSigned URL (#296) * Signed URL Signed-off-by: Haytham Abuelfutuh * Updates Signed-off-by: Haytham Abuelfutuh * go mod tidy Signed-off-by: Haytham Abuelfutuh * update to latest Signed-off-by: Haytham Abuelfutuh * update stdlib version Signed-off-by: Haytham Abuelfutuh * Cleanup golang support Signed-off-by: Haytham Abuelfutuh * Update go version Signed-off-by: Haytham Abuelfutuh * Use latest flytestdlib Signed-off-by: Haytham Abuelfutuh * Fix unit tests Signed-off-by: Haytham Abuelfutuh * Overhaul tests to get rid of global variables Signed-off-by: Haytham Abuelfutuh * cleanup Signed-off-by: Haytham Abuelfutuh * more cleanup Signed-off-by: Haytham Abuelfutuh * Lint Signed-off-by: Haytham Abuelfutuh * go fmt Signed-off-by: Haytham Abuelfutuh * generate Signed-off-by: Haytham Abuelfutuh * Go imports Signed-off-by: Haytham Abuelfutuh * Lint Signed-off-by: Haytham Abuelfutuh * Fix unit test Signed-off-by: Haytham Abuelfutuh * lint Signed-off-by: Haytham Abuelfutuh * lint Signed-off-by: Haytham Abuelfutuh * Fix unit tests Signed-off-by: Haytham Abuelfutuh * go fmt Signed-off-by: Haytham Abuelfutuh * More lint Signed-off-by: Haytham Abuelfutuh * some progress Signed-off-by: Haytham Abuelfutuh * Go generate Signed-off-by: Haytham Abuelfutuh * Attempting to serialize tests Signed-off-by: Haytham Abuelfutuh * Reset file Signed-off-by: Haytham Abuelfutuh * go improts Signed-off-by: Haytham Abuelfutuh * Revert to go 1.17 Signed-off-by: Haytham Abuelfutuh * Use Go 1.17 for tests Signed-off-by: Haytham Abuelfutuh * Unit tests Signed-off-by: Haytham Abuelfutuh * Fix unit test Signed-off-by: Haytham Abuelfutuh * Rename DataProxy per IDL changes Signed-off-by: Haytham Abuelfutuh * Missed Signed-off-by: Haytham Abuelfutuh --- flytectl/.github/workflows/checks.yml | 10 + .../flyte/golang_support_tools/go.mod | 23 +- .../flyte/golang_support_tools/go.sum | 62 ++++-- .../matchable_attr_file_config_utils.go | 2 +- .../subcommand/register/files_config.go | 30 ++- .../subcommand/register/filesconfig_flags.go | 22 +- .../register/filesconfig_flags_test.go | 2 +- .../config/subcommand/sandbox/config_flags.go | 2 + .../subcommand/sandbox/config_flags_test.go | 28 +++ .../subcommand/sandbox/sandbox_config.go | 7 + .../cmd/configuration/configuration_test.go | 5 +- flytectl/cmd/core/cmd.go | 4 +- flytectl/cmd/core/cmd_ctx.go | 32 ++- flytectl/cmd/create/create_test.go | 11 - flytectl/cmd/create/execution_test.go | 118 +++++----- flytectl/cmd/create/execution_util_test.go | 28 ++- flytectl/cmd/create/project_test.go | 34 ++- flytectl/cmd/delete/delete_test.go | 11 - flytectl/cmd/delete/execution_test.go | 46 ++-- ...tchable_cluster_resource_attribute_test.go | 82 ++++--- .../matchable_execution_cluster_label_test.go | 82 ++++--- ...atchable_execution_queue_attribute_test.go | 82 ++++--- .../delete/matchable_plugin_override_test.go | 82 ++++--- .../matchable_task_resource_attribute_test.go | 82 ++++--- ...atchable_workflow_execution_config_test.go | 82 ++++--- flytectl/cmd/get/execution_test.go | 109 ++++------ flytectl/cmd/get/get_test.go | 10 - flytectl/cmd/get/launch_plan_test.go | 133 ++++++------ ...tchable_cluster_resource_attribute_test.go | 88 ++++---- .../matchable_execution_cluster_label_test.go | 88 ++++---- ...atchable_execution_queue_attribute_test.go | 88 ++++---- .../cmd/get/matchable_plugin_override_test.go | 88 ++++---- .../matchable_task_resource_attribute_test.go | 88 ++++---- ...atchable_workflow_execution_config_test.go | 88 ++++---- flytectl/cmd/get/node_execution_test.go | 29 +-- flytectl/cmd/get/project_test.go | 43 ++-- flytectl/cmd/get/task_test.go | 139 ++++++------ flytectl/cmd/get/workflow_test.go | 40 ++-- flytectl/cmd/register/examples.go | 6 +- flytectl/cmd/register/examples_test.go | 13 +- flytectl/cmd/register/files.go | 27 ++- flytectl/cmd/register/files_test.go | 144 +++++++------ flytectl/cmd/register/register_test.go | 10 +- flytectl/cmd/register/register_util.go | 188 ++++++++++++---- flytectl/cmd/register/register_util_test.go | 203 ++++++++++-------- flytectl/cmd/root.go | 7 +- flytectl/cmd/sandbox/exec_test.go | 14 +- flytectl/cmd/sandbox/start.go | 2 +- flytectl/cmd/sandbox/start_test.go | 6 +- flytectl/cmd/sandbox/status_test.go | 20 +- flytectl/cmd/sandbox/teardown_test.go | 12 +- flytectl/cmd/testutils/test_utils.go | 114 ++++++---- flytectl/cmd/update/execution_test.go | 44 ++-- flytectl/cmd/update/launch_plan_meta.go | 28 +-- flytectl/cmd/update/launch_plan_meta_test.go | 37 ++-- flytectl/cmd/update/launch_plan_test.go | 31 +-- ...tchable_cluster_resource_attribute_test.go | 55 +++-- .../matchable_execution_cluster_label_test.go | 55 +++-- ...atchable_execution_queue_attribute_test.go | 55 +++-- .../update/matchable_plugin_override_test.go | 55 +++-- .../matchable_task_resource_attribute_test.go | 55 +++-- ...atchable_workflow_execution_config_test.go | 55 +++-- flytectl/cmd/update/named_entity.go | 10 +- flytectl/cmd/update/named_entity_test.go | 39 ++-- flytectl/cmd/update/project_test.go | 54 +++-- flytectl/cmd/update/task_meta.go | 30 +-- flytectl/cmd/update/task_meta_test.go | 33 +-- flytectl/cmd/update/update.go | 6 +- flytectl/cmd/update/update_test.go | 11 - flytectl/cmd/update/workflow_meta.go | 28 +-- flytectl/cmd/update/workflow_meta_test.go | 33 +-- flytectl/cmd/upgrade/upgrade_test.go | 50 ++--- flytectl/cmd/version/version_test.go | 47 ++-- flytectl/go.mod | 28 +-- flytectl/go.sum | 57 +++-- flytectl/pkg/configutil/version.yaml | 8 + flytectl/pkg/docker/docker_util.go | 10 +- flytectl/pkg/docker/docker_util_test.go | 14 +- flytectl/pkg/githubutil/githubutil.go | 5 +- flytectl/pkg/githubutil/githubutil_test.go | 5 +- flytectl/pkg/util/version.yaml | 0 81 files changed, 1888 insertions(+), 1816 deletions(-) create mode 100644 flytectl/pkg/configutil/version.yaml create mode 100755 flytectl/pkg/util/version.yaml diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index b7f29f1dc5..d31399b768 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -19,16 +19,22 @@ jobs: lint: name: Lint uses: flyteorg/flytetools/.github/workflows/lint.yml@master + with: + go-version: 1.17 tests: name: Unit Tests uses: flyteorg/flytetools/.github/workflows/tests.yml@master secrets: FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + with: + go-version: 1.17 generate: name: Check Go Gennerate uses: flyteorg/flytetools/.github/workflows/go_generate.yml@master + with: + go-version: 1.17 dry_run_goreleaser: name: Dry Run Goreleaser @@ -65,6 +71,10 @@ jobs: ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 - name: Build Flytectl binary run: make compile - name: Create a sandbox cluster diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 307398c89e..441224926c 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/alvaroloes/enumer v1.1.2 - github.com/flyteorg/flytestdlib v0.4.7 + github.com/flyteorg/flytestdlib v0.4.16 github.com/golangci/golangci-lint v1.38.0 github.com/pseudomuto/protoc-gen-doc v1.4.1 github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 @@ -14,7 +14,10 @@ require ( 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect cloud.google.com/go v0.75.0 // indirect cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.17 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect @@ -46,6 +49,7 @@ require ( github.com/esimonov/ifshort v1.0.1 // indirect github.com/fatih/color v1.10.0 // indirect github.com/fatih/structtag v1.2.0 // indirect + github.com/flyteorg/stow v0.3.1 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/fzipp/gocyclo v0.3.1 // indirect @@ -62,6 +66,7 @@ require ( github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/flock v0.8.0 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/golang/protobuf v1.4.3 // indirect @@ -82,7 +87,6 @@ require ( github.com/gostaticanalysis/comment v1.4.1 // indirect github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect - github.com/graymeta/stow v0.2.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huandu/xstrings v1.0.0 // indirect github.com/imdario/mergo v0.3.5 // indirect @@ -135,7 +139,6 @@ require ( github.com/ryancurrah/gomodguard v1.2.0 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/sanposhiho/wastedassign v0.1.3 // indirect - github.com/satori/go.uuid v1.2.0 // indirect github.com/securego/gosec/v2 v2.6.1 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.8.0 // indirect @@ -160,15 +163,15 @@ require ( github.com/ultraware/whitespace v0.0.4 // indirect github.com/uudashr/gocognit v1.0.1 // indirect go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.4.1 // indirect - golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect - golang.org/x/text v0.3.5 // indirect + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect + golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - golang.org/x/tools v0.1.0 // indirect + golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.38.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index a62010d29f..755f8cf6ef 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -41,9 +41,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -177,8 +182,9 @@ github.com/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7q github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +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/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -210,10 +216,12 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flytestdlib v0.4.7 h1:SMPPXI3j/MjP7D2fqaR+lPQkTrqYS7xZbwsgJI2F8SU= -github.com/flyteorg/flytestdlib v0.4.7/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= +github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= +github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= github.com/flyteorg/protoc-gen-doc v1.4.2/go.mod h1:exDTOVwqpp30eV/EDPFLZy3Pwr2sn6hBC1WIYH/UbIg= +github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= +github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -276,6 +284,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -397,8 +407,6 @@ github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= -github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -484,6 +492,8 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -577,7 +587,6 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88/go.mod h1:KSVJ github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= @@ -698,8 +707,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= github.com/securego/gosec/v2 v2.6.1/go.mod h1:I76p3NTHBXsGhybUW+cEQ692q2Vp+A0Z6ZLzDIZy+Ao= @@ -799,6 +806,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -832,8 +840,9 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U 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.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= @@ -867,8 +876,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -907,14 +917,18 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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= @@ -936,6 +950,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -993,8 +1008,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1003,8 +1020,9 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1106,8 +1124,9 @@ golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= @@ -1225,8 +1244,9 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= diff --git a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go index d7fa956373..b21e7832a9 100644 --- a/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go +++ b/flytectl/cmd/config/subcommand/matchable_attr_file_config_utils.go @@ -57,4 +57,4 @@ func DumpTaskResourceAttr(matchableAttrConfig interface{}, fileName string) erro fmt.Printf("%v", String(matchableAttrConfig)) } return nil -} \ No newline at end of file +} diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index ae618d3380..ea2333583a 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -1,5 +1,7 @@ package register +import "github.com/flyteorg/flytestdlib/config" + //go:generate pflags FilesConfig --default-var DefaultFilesConfig --bind-default-var var ( @@ -7,19 +9,25 @@ var ( Version: "", ContinueOnError: false, } + + cfg = config.MustRegisterSection("files", DefaultFilesConfig) ) // FilesConfig containing flags used for registration type FilesConfig struct { - Version string `json:"version" pflag:",version of the entity to be registered with flyte which are un-versioned after serialization."` - Force bool `json:"force" pflag:",force use of version number on entities registered with flyte."` - ContinueOnError bool `json:"continueOnError" pflag:",continue on error when registering files."` - Archive bool `json:"archive" pflag:",pass in archive file either an http link or local path."` - AssumableIamRole string `json:"assumableIamRole" pflag:", custom assumable iam auth role to register launch plans with."` - K8sServiceAccount string `json:"k8sServiceAccount" pflag:", custom kubernetes service account auth role to register launch plans with."` - K8ServiceAccount string `json:"k8ServiceAccount" pflag:", deprecated. Please use --K8sServiceAccount"` - OutputLocationPrefix string `json:"outputLocationPrefix" pflag:", custom output location prefix for offloaded types (files/schemas)."` - SourceUploadPath string `json:"sourceUploadPath" pflag:", Location for source code in storage."` - DestinationDirectory string `json:"destinationDirectory" pflag:", Location of source code in container."` - DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Version string `json:"version" pflag:",Version of the entity to be registered with flyte which are un-versioned after serialization."` + Force bool `json:"force" pflag:",Force use of version number on entities registered with flyte."` + ContinueOnError bool `json:"continueOnError" pflag:",Continue on error when registering files."` + Archive bool `json:"archive" pflag:",Pass in archive file either an http link or local path."` + AssumableIamRole string `json:"assumableIamRole" pflag:",Custom assumable iam auth role to register launch plans with."` + K8sServiceAccount string `json:"k8sServiceAccount" pflag:",Custom kubernetes service account auth role to register launch plans with."` + K8ServiceAccount string `json:"k8ServiceAccount" pflag:",Deprecated. Please use --K8sServiceAccount"` + OutputLocationPrefix string `json:"outputLocationPrefix" pflag:",Custom output location prefix for offloaded types (files/schemas)."` + DeprecatedSourceUploadPath string `json:"sourceUploadPath" pflag:",Deprecated: Update flyte admin to avoid having to configure storage access from flytectl."` + DestinationDirectory string `json:"destinationDirectory" pflag:",Location of source code in container."` + DryRun bool `json:"dryRun" pflag:",Execute command without making any modifications."` +} + +func GetConfig() *FilesConfig { + return cfg.GetConfig().(*FilesConfig) } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index 910245ee9f..9ca76123d8 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -50,16 +50,16 @@ func (FilesConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("FilesConfig", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultFilesConfig.Version, "version of the entity to be registered with flyte which are un-versioned after serialization.") - cmdFlags.BoolVar(&DefaultFilesConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultFilesConfig.Force, "force use of version number on entities registered with flyte.") - cmdFlags.BoolVar(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), DefaultFilesConfig.ContinueOnError, "continue on error when registering files.") - cmdFlags.BoolVar(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultFilesConfig.Archive, "pass in archive file either an http link or local path.") - cmdFlags.StringVar(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), DefaultFilesConfig.AssumableIamRole, " custom assumable iam auth role to register launch plans with.") - cmdFlags.StringVar(&DefaultFilesConfig.K8sServiceAccount, fmt.Sprintf("%v%v", prefix, "k8sServiceAccount"), DefaultFilesConfig.K8sServiceAccount, " custom kubernetes service account auth role to register launch plans with.") - cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, " deprecated. Please use --K8sServiceAccount") - cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, " custom output location prefix for offloaded types (files/schemas).") - cmdFlags.StringVar(&DefaultFilesConfig.SourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.SourceUploadPath, " Location for source code in storage.") - cmdFlags.StringVar(&DefaultFilesConfig.DestinationDirectory, fmt.Sprintf("%v%v", prefix, "destinationDirectory"), DefaultFilesConfig.DestinationDirectory, " Location of source code in container.") - cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "execute command without making any modifications.") + cmdFlags.StringVar(&DefaultFilesConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultFilesConfig.Version, "Version of the entity to be registered with flyte which are un-versioned after serialization.") + cmdFlags.BoolVar(&DefaultFilesConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultFilesConfig.Force, "Force use of version number on entities registered with flyte.") + cmdFlags.BoolVar(&DefaultFilesConfig.ContinueOnError, fmt.Sprintf("%v%v", prefix, "continueOnError"), DefaultFilesConfig.ContinueOnError, "Continue on error when registering files.") + cmdFlags.BoolVar(&DefaultFilesConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultFilesConfig.Archive, "Pass in archive file either an http link or local path.") + cmdFlags.StringVar(&DefaultFilesConfig.AssumableIamRole, fmt.Sprintf("%v%v", prefix, "assumableIamRole"), DefaultFilesConfig.AssumableIamRole, "Custom assumable iam auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.K8sServiceAccount, fmt.Sprintf("%v%v", prefix, "k8sServiceAccount"), DefaultFilesConfig.K8sServiceAccount, "Custom kubernetes service account auth role to register launch plans with.") + cmdFlags.StringVar(&DefaultFilesConfig.K8ServiceAccount, fmt.Sprintf("%v%v", prefix, "k8ServiceAccount"), DefaultFilesConfig.K8ServiceAccount, "Deprecated. Please use --K8sServiceAccount") + cmdFlags.StringVar(&DefaultFilesConfig.OutputLocationPrefix, fmt.Sprintf("%v%v", prefix, "outputLocationPrefix"), DefaultFilesConfig.OutputLocationPrefix, "Custom output location prefix for offloaded types (files/schemas).") + cmdFlags.StringVar(&DefaultFilesConfig.DeprecatedSourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.DeprecatedSourceUploadPath, "Deprecated: Update flyte admin to avoid having to configure storage access from flytectl.") + cmdFlags.StringVar(&DefaultFilesConfig.DestinationDirectory, fmt.Sprintf("%v%v", prefix, "destinationDirectory"), DefaultFilesConfig.DestinationDirectory, "Location of source code in container.") + cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "Execute command without making any modifications.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 29c5494a67..911df3dc31 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -218,7 +218,7 @@ func TestFilesConfig_SetFlags(t *testing.T) { cmdFlags.Set("sourceUploadPath", testValue) if vString, err := cmdFlags.GetString("sourceUploadPath"); err == nil { - testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.SourceUploadPath) + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vString), &actual.DeprecatedSourceUploadPath) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 0355ee08f5..426e24204b 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -56,5 +56,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&DefaultConfig.Prerelease, fmt.Sprintf("%v%v", prefix, "pre"), DefaultConfig.Prerelease, "Optional. Pre release Version of flyte will be used for sandbox.") cmdFlags.StringSliceVar(&DefaultConfig.Env, fmt.Sprintf("%v%v", prefix, "env"), DefaultConfig.Env, "Optional. Provide Env variable in key=value format which can be passed to sandbox container.") cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") + cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.RegistryAuth, fmt.Sprintf("%v%v", prefix, "imagePullOptions.registryAuth"), DefaultConfig.ImagePullOptions.RegistryAuth, "The base64 encoded credentials for the registry.") + cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.Platform, fmt.Sprintf("%v%v", prefix, "imagePullOptions.platform"), DefaultConfig.ImagePullOptions.Platform, "Forces a specific platform's image to be pulled.'") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 6433a3e647..3fdc64ba40 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -181,4 +181,32 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_imagePullOptions.registryAuth", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("imagePullOptions.registryAuth", testValue) + if vString, err := cmdFlags.GetString("imagePullOptions.registryAuth"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ImagePullOptions.RegistryAuth) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_imagePullOptions.platform", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("imagePullOptions.platform", testValue) + if vString, err := cmdFlags.GetString("imagePullOptions.platform"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.ImagePullOptions.Platform) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index a2fd3d1521..7381a398b7 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -53,4 +53,11 @@ type Config struct { // Optionally it is possible to use local sandbox image // Flytectl will not pull the image from the registry if the local flag passes. It is usually useful while testing your local images without pushing them to a registry. ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` + + ImagePullOptions ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"` +} + +type ImagePullOptions struct { + RegistryAuth string `json:"registryAuth" pflag:",The base64 encoded credentials for the registry."` + Platform string `json:"platform" pflag:",Forces a specific platform's image to be pulled.'"` } diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index bb2d256229..da5b0a6f97 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -9,6 +9,8 @@ import ( "strings" "testing" + admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flytectl/pkg/configutil" initConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/config" @@ -51,7 +53,8 @@ func TestSetupConfigFunc(t *testing.T) { _ = util.SetupFlyteDir() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockClient := admin2.InitializeMockClientset() + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) err := configInitFunc(ctx, []string{}, cmdCtx) initConfig.DefaultConfig.Host = "" assert.Nil(t, err) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index c1121355fb..20188130a6 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -35,9 +35,11 @@ func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { RunE: generateCommandFunc(cmdEntry), SilenceUsage: true, } + if cmdEntry.PFlagProvider != nil { cmd.Flags().AddFlagSet(cmdEntry.PFlagProvider.GetPFlagSet("")) } + rootCmd.AddCommand(cmd) } } @@ -67,6 +69,6 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] if err != nil { return err } - return cmdEntry.CmdFunc(ctx, args, NewCommandContext(clientSet.AdminClient(), cmd.OutOrStdout())) + return cmdEntry.CmdFunc(ctx, args, NewCommandContext(clientSet, cmd.OutOrStdout())) } } diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index ab1c6c6afd..7d02474490 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,12 +3,14 @@ package cmdcore import ( "io" + "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" ) type CommandContext struct { - adminClient service.AdminServiceClient + clientSet *admin.Clientset adminClientFetcherExt ext.AdminFetcherExtInterface adminClientUpdateExt ext.AdminUpdaterExtInterface adminClientDeleteExt ext.AdminDeleterExtInterface @@ -16,28 +18,38 @@ type CommandContext struct { out io.Writer } -func NewCommandContext(adminClient service.AdminServiceClient, out io.Writer) CommandContext { - return CommandContext{adminClient: adminClient, out: out, - adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: adminClient}, - adminClientUpdateExt: &ext.AdminUpdaterExtClient{AdminClient: adminClient}, - adminClientDeleteExt: &ext.AdminDeleterExtClient{AdminClient: adminClient}} +func NewCommandContext(clientSet *admin.Clientset, out io.Writer) CommandContext { + return CommandContext{ + clientSet: clientSet, + out: out, + adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: clientSet.AdminClient()}, + adminClientUpdateExt: &ext.AdminUpdaterExtClient{AdminClient: clientSet.AdminClient()}, + adminClientDeleteExt: &ext.AdminDeleterExtClient{AdminClient: clientSet.AdminClient()}, + } } // NewCommandContextWithExt construct command context with injected extensions. Helps in injecting mocked ones for testing. func NewCommandContextWithExt( - adminClient service.AdminServiceClient, + clientSet *admin.Clientset, fetcher ext.AdminFetcherExtInterface, updater ext.AdminUpdaterExtInterface, deleter ext.AdminDeleterExtInterface, out io.Writer) CommandContext { - return CommandContext{adminClient: adminClient, out: out, + return CommandContext{ + clientSet: clientSet, + out: out, adminClientFetcherExt: fetcher, adminClientUpdateExt: updater, - adminClientDeleteExt: deleter} + adminClientDeleteExt: deleter, + } } func (c CommandContext) AdminClient() service.AdminServiceClient { - return c.adminClient + return c.clientSet.AdminClient() +} + +func (c CommandContext) ClientSet() *admin.Clientset { + return c.clientSet } func (c CommandContext) OutputPipe() io.Writer { diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index 40b8d5d861..dafd803a03 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -1,26 +1,15 @@ package create import ( - "context" "sort" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) const testDataFolder = "../testdata/" -var ( - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - args []string - cmdCtx cmdCore.CommandContext -) var setup = testutils.Setup var tearDownAndVerify = testutils.TearDownAndVerify diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index d671e0f5b0..1a3a7217e5 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -15,13 +15,17 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) +type TestStruct struct { + executionConfig *ExecutionConfig + args []string +} + // This function needs to be called after testutils.Steup() -func createExecutionSetup() { - ctx = testutils.Ctx - mockClient = testutils.MockClient - executionConfig = &ExecutionConfig{} +func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { + ctx := s.Ctx + t.executionConfig = &ExecutionConfig{} // TODO: migrate to new command context from testutils - cmdCtx = cmdCore.NewCommandContext(mockClient, testutils.MockOutStream) + s.CmdCtx = cmdCore.NewCommandContext(s.MockClient, s.MockOutStream) sortedListLiteralType := core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ @@ -56,7 +60,7 @@ func createExecutionSetup() { }, }, } - mockClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) + s.MockAdminClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) parameterMap := map[string]*core.Parameter{ "numbers": { Var: &core.Variable{ @@ -128,15 +132,20 @@ func createExecutionSetup() { Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: "core.advanced.run_merge_sort.merge_sort", - Version: "v3", + Version: "v2", }, } - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan1, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan1, nil) + + return TestStruct{ + executionConfig: executionConfig, + args: []string{}, + } } func TestCreateTaskExecutionFunc(t *testing.T) { - setup() - createExecutionSetup() + s := setup() + ts := createExecutionSetup(&s) executionCreateResponseTask := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -144,28 +153,31 @@ func TestCreateTaskExecutionFunc(t *testing.T) { Name: "ff513c0e44b5b4a35aa5", }, } - mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) - executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" - err = createExecutionCommand(ctx, args, cmdCtx) + + ctx := s.Ctx + s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) + ts.executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" + err := createExecutionCommand(ctx, ts.args, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) + s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) } func TestCreateTaskExecutionFuncError(t *testing.T) { - setup() - createExecutionSetup() - mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(nil, fmt.Errorf("error launching task")) - executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" - err = createExecutionCommand(ctx, args, cmdCtx) + s := setup() + ts := createExecutionSetup(&s) + ctx := s.Ctx + s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(nil, fmt.Errorf("error launching task")) + ts.executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + err := createExecutionCommand(ctx, ts.args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error launching task"), err) - mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) } func TestCreateLaunchPlanExecutionFunc(t *testing.T) { - setup() - createExecutionSetup() + s := setup() + ts := createExecutionSetup(&s) executionCreateResponseLP := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -173,18 +185,20 @@ func TestCreateLaunchPlanExecutionFunc(t *testing.T) { Name: "f652ea3596e7f4d80a0e", }, } - mockClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseLP, nil) - executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" - err = createExecutionCommand(ctx, args, cmdCtx) + + ctx := s.Ctx + s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseLP, nil) + ts.executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" + err := createExecutionCommand(ctx, ts.args, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) + s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) + tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) } func TestCreateRelaunchExecutionFunc(t *testing.T) { - setup() - createExecutionSetup() - defer func() { executionConfig.Relaunch = "" }() + s := setup() + ts := createExecutionSetup(&s) + defer func() { ts.executionConfig.Relaunch = "" }() relaunchExecResponse := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -193,7 +207,7 @@ func TestCreateRelaunchExecutionFunc(t *testing.T) { }, } - executionConfig.Relaunch = relaunchExecResponse.Id.Name + ts.executionConfig.Relaunch = relaunchExecResponse.Id.Name relaunchRequest := &admin.ExecutionRelaunchRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: executionConfig.Relaunch, @@ -201,17 +215,18 @@ func TestCreateRelaunchExecutionFunc(t *testing.T) { Domain: config.GetConfig().Domain, }, } - mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) - err = createExecutionCommand(ctx, args, cmdCtx) + ctx := s.Ctx + s.MockAdminClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) + err := createExecutionCommand(ctx, ts.args, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "RelaunchExecution", ctx, relaunchRequest) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + s.MockAdminClient.AssertCalled(t, "RelaunchExecution", ctx, relaunchRequest) + tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) } func TestCreateRecoverExecutionFunc(t *testing.T) { - setup() - createExecutionSetup() - defer func() { executionConfig.Recover = "" }() + s := setup() + ts := createExecutionSetup(&s) + defer func() { ts.executionConfig.Recover = "" }() originalExecutionName := "abc123" recoverExecResponse := &admin.ExecutionCreateResponse{ @@ -222,7 +237,7 @@ func TestCreateRecoverExecutionFunc(t *testing.T) { }, } - executionConfig.Recover = originalExecutionName + ts.executionConfig.Recover = originalExecutionName recoverRequest := &admin.ExecutionRecoverRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: originalExecutionName, @@ -230,28 +245,31 @@ func TestCreateRecoverExecutionFunc(t *testing.T) { Domain: config.GetConfig().Domain, }, } - mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(recoverExecResponse, nil) - err = createExecutionCommand(ctx, args, cmdCtx) + + ctx := s.Ctx + s.MockAdminClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(recoverExecResponse, nil) + err := createExecutionCommand(ctx, ts.args, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "RecoverExecution", ctx, recoverRequest) - tearDownAndVerify(t, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) - executionConfig.Relaunch = "" + s.MockAdminClient.AssertCalled(t, "RecoverExecution", ctx, recoverRequest) + tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + ts.executionConfig.Relaunch = "" } func TestCreateExecutionFuncInvalid(t *testing.T) { - setup() - createExecutionSetup() + s := setup() + ts := createExecutionSetup(&s) + executionConfig := ts.executionConfig executionConfig.Relaunch = "" executionConfig.ExecFile = "" - err = createExecutionCommand(ctx, args, cmdCtx) + err := createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("executionConfig, relaunch and recover can't be empty. Run the flytectl get task/launchplan to generate the config"), err) executionConfig.ExecFile = "Invalid-file" - err = createExecutionCommand(ctx, args, cmdCtx) + err = createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from %v yaml file", executionConfig.ExecFile), err) executionConfig.ExecFile = testDataFolder + "invalid_execution_spec.yaml" - err = createExecutionCommand(ctx, args, cmdCtx) + err = createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("either task or workflow name should be specified to launch an execution"), err) } diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index 9d6bf63d41..643248daaa 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -20,9 +19,6 @@ var ( // This function needs to be called after testutils.Steup() func createExecutionUtilSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient executionCreateResponse = &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -47,35 +43,35 @@ func createExecutionUtilSetup() { } func TestCreateExecutionForRelaunch(t *testing.T) { - setup() + s := setup() createExecutionUtilSetup() - mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(executionCreateResponse, nil) - err = relaunchExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(executionCreateResponse, nil) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) assert.Nil(t, err) } func TestCreateExecutionForRelaunchNotFound(t *testing.T) { - setup() + s := setup() createExecutionUtilSetup() - mockClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(nil, errors.New("unknown execution")) - err = relaunchExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(nil, errors.New("unknown execution")) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } func TestCreateExecutionForRecovery(t *testing.T) { - setup() + s := setup() createExecutionUtilSetup() - mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(executionCreateResponse, nil) - err = recoverExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(executionCreateResponse, nil) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) assert.Nil(t, err) } func TestCreateExecutionForRecoveryNotFound(t *testing.T) { - setup() + s := setup() createExecutionUtilSetup() - mockClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(nil, errors.New("unknown execution")) - err = recoverExecution(ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, cmdCtx) + s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(nil, errors.New("unknown execution")) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 538fd70f62..2de7ee24e1 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -23,9 +22,6 @@ var ( ) func createProjectSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient projectRegisterRequest = &admin.ProjectRegisterRequest{ Project: &admin.Project{ Id: projectValue, @@ -42,39 +38,39 @@ func createProjectSetup() { project.DefaultProjectConfig.Description = "" } func TestCreateProjectFunc(t *testing.T) { - setup() + s := setup() createProjectSetup() - defer tearDownAndVerify(t, "project created successfully.") + defer tearDownAndVerify(t, s.Writer, "project created successfully.") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} project.DefaultProjectConfig.Description = "" - mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) - err := createProjectsCommand(ctx, args, cmdCtx) + s.MockAdminClient.OnRegisterProjectMatch(s.Ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "RegisterProject", ctx, projectRegisterRequest) + s.MockAdminClient.AssertCalled(t, "RegisterProject", s.Ctx, projectRegisterRequest) } func TestEmptyProjectID(t *testing.T) { - setup() + s := setup() createProjectSetup() - defer tearDownAndVerify(t, "") + defer tearDownAndVerify(t, s.Writer, "") project.DefaultProjectConfig = &project.ConfigProject{} - mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) - err := createProjectsCommand(ctx, args, cmdCtx) + s.MockAdminClient.OnRegisterProjectMatch(s.Ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(s.Ctx, []string{}, s.CmdCtx) assert.Equal(t, errors.New(clierrors.ErrProjectNotPassed), err) - mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) + s.MockAdminClient.AssertNotCalled(t, "RegisterProject", s.Ctx, mock.Anything) } func TestEmptyProjectName(t *testing.T) { - setup() + s := setup() createProjectSetup() - defer tearDownAndVerify(t, "") + defer tearDownAndVerify(t, s.Writer, "") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Labels = map[string]string{} project.DefaultProjectConfig.Description = "" - mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) - err := createProjectsCommand(ctx, args, cmdCtx) + s.MockAdminClient.OnRegisterProjectMatch(s.Ctx, projectRegisterRequest).Return(nil, nil) + err := createProjectsCommand(s.Ctx, []string{}, s.CmdCtx) assert.Equal(t, fmt.Errorf("project name is a required flag"), err) - mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) + s.MockAdminClient.AssertNotCalled(t, "RegisterProject", s.Ctx, mock.Anything) } diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 70af741071..88119c37cd 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -1,24 +1,13 @@ package delete import ( - "context" "sort" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) -var ( - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - cmdCtx cmdCore.CommandContext -) - const ( testDataNonExistentFile = "testdata/non-existent-file" testDataInvalidAttrFile = "testdata/invalid_attribute.yaml" diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index c9a5b11c62..1d74a9d524 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -18,9 +17,6 @@ var ( ) func terminateExecutionSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient args = append(args, "exec1", "exec2") terminateExecRequests = []*admin.ExecutionTerminateRequest{ {Id: &core.WorkflowExecutionIdentifier{ @@ -37,40 +33,40 @@ func terminateExecutionSetup() { } func TestTerminateExecutionFunc(t *testing.T) { - setup() + s := setup() terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) - err = terminateExecutionFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) - mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) - tearDownAndVerify(t, "") + s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) + s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) + tearDownAndVerify(t, s.Writer, "") } func TestTerminateExecutionFuncWithError(t *testing.T) { - setup() + s := setup() terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(nil, errors.New("failed to terminate")) - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) - err = terminateExecutionFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[0]).Return(nil, errors.New("failed to terminate")) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(s.Ctx, args, s.CmdCtx) assert.Equal(t, errors.New("failed to terminate"), err) - mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) - mockClient.AssertNotCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) - tearDownAndVerify(t, "") + s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) + s.MockAdminClient.AssertNotCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) + tearDownAndVerify(t, s.Writer, "") } func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { - setup() + s := setup() terminateExecutionSetup() terminateExecResponse := &admin.ExecutionTerminateResponse{} - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) - mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(nil, errors.New("failed to terminate")) - err = terminateExecutionFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + s.MockAdminClient.OnTerminateExecutionMatch(s.Ctx, terminateExecRequests[1]).Return(nil, errors.New("failed to terminate")) + err := terminateExecutionFunc(s.Ctx, args, s.CmdCtx) assert.Equal(t, errors.New("failed to terminate"), err) - mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) - mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) - tearDownAndVerify(t, "") + s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) + s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) + tearDownAndVerify(t, s.Writer, "") } diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index f9290ad6b7..d4556224ff 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -14,121 +13,118 @@ import ( ) func deleteClusterResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient clusterresourceattribute.DefaultDelConfig = &clusterresourceattribute.AttrDeleteConfig{} args = []string{} } func TestDeleteClusterResourceAttributes(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deleteClusterResourceAttributeSetup() // Empty attribute file clusterresourceattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deleteClusterResourceAttributes(ctx, args, cmdCtx) + err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) }) } diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index 834e5afb66..c36248c267 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -14,121 +13,118 @@ import ( ) func deleteExecutionClusterLabelSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionclusterlabel.DefaultDelConfig = &executionclusterlabel.AttrDeleteConfig{} args = []string{} } func TestDeleteExecutionClusterLabels(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete project domain attributes")) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deleteExecutionClusterLabelSetup() // Empty attribute file executionclusterlabel.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deleteExecutionClusterLabel(ctx, args, cmdCtx) + err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) } diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go index ef5b2975c0..5c4843ede3 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -14,121 +13,118 @@ import ( ) func deleteExecutionQueueAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionqueueattribute.DefaultDelConfig = &executionqueueattribute.AttrDeleteConfig{} args = []string{} } func TestDeleteExecutionQueueAttributes(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deleteExecutionQueueAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file executionqueueattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deleteExecutionQueueAttributes(ctx, args, cmdCtx) + err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) }) } diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go index d8ed34818f..af64254d3c 100644 --- a/flytectl/cmd/delete/matchable_plugin_override_test.go +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -14,121 +13,118 @@ import ( ) func deletePluginOverrideSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient pluginoverride.DefaultDelConfig = &pluginoverride.AttrDeleteConfig{} args = []string{} } func TestPluginOverride(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deletePluginOverrideSetup() // Empty attribute file pluginoverride.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deletePluginOverride(ctx, args, cmdCtx) + err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) }) } diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 204d46f8c7..62dd7930ce 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -6,7 +6,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -14,121 +13,118 @@ import ( ) func deleteTaskResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient taskresourceattribute.DefaultDelConfig = &taskresourceattribute.AttrDeleteConfig{} args = []string{} } func TestDeleteTaskResourceAttributes(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delte project domain attributes")) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delte project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_TASK_RESOURCE) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_TASK_RESOURCE) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_TASK_RESOURCE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_TASK_RESOURCE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deleteTaskResourceAttributeSetup() // Empty attribute file taskresourceattribute.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deleteTaskResourceAttributes(ctx, args, cmdCtx) + err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) }) } diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index acebc7d06b..592a53edba 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -7,7 +7,6 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flytectl/cmd/config" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,121 +14,118 @@ import ( ) func deleteWorkflowExecutionConfigSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient workflowexecutionconfig.DefaultDelConfig = &workflowexecutionconfig.AttrDeleteConfig{} args = []string{} } func TestDeleteWorkflowExecutionConfig(t *testing.T) { t.Run("successful project domain attribute deletion commandline", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = "" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("failed project domain attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete project domain attributes")) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete project domain attributes"), err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("successful project domain attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("failed workflow attribute deletion", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = "" args := []string{"workflow1"} - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to delete workflow attribute")) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to delete workflow attribute"), err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow1", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("successful workflow attribute deletion file", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = testDataNonExistentFile // No args implying project domain attribute deletion - u.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.DeleterExt.OnDeleteWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - u.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", + s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("attribute deletion invalid file", func(t *testing.T) { - setup() + s := setup() deleteWorkflowExecutionConfigSetup() // Empty attribute file workflowexecutionconfig.DefaultDelConfig.AttrFile = testDataInvalidAttrFile // No args implying project domain attribute deletion - err = deleteWorkflowExecutionConfig(ctx, args, cmdCtx) + err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - u.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", + s.Ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) } diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index bcedf1f6d3..ff11d03db0 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -4,14 +4,12 @@ import ( "context" "errors" "fmt" - "io" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -32,12 +30,9 @@ func getExecutionSetup() { } func TestListExecutionFunc(t *testing.T) { - ctx := context.Background() getExecutionSetup() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := setup() + ctx := s.Ctx execListRequest := &admin.ResourceListRequest{ Limit: 100, SortBy: &admin.Sort{ @@ -77,21 +72,15 @@ func TestListExecutionFunc(t *testing.T) { executionList := &admin.ExecutionList{ Executions: executions, } - mockClient.OnListExecutionsMatch(mock.Anything, mock.MatchedBy(func(o *admin.ResourceListRequest) bool { - return execListRequest.SortBy.Key == o.SortBy.Key && execListRequest.SortBy.Direction == o.SortBy.Direction && execListRequest.Filters == o.Filters && execListRequest.Limit == o.Limit - })).Return(executionList, nil) - err := getExecutionFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnListExecutionsMatch(mock.Anything, execListRequest).Return(executionList, nil) + err := getExecutionFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) + s.MockAdminClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) } func TestListExecutionFuncWithError(t *testing.T) { ctx := context.Background() getExecutionSetup() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) execListRequest := &admin.ResourceListRequest{ Limit: 100, SortBy: &admin.Sort{ @@ -102,6 +91,7 @@ func TestListExecutionFuncWithError(t *testing.T) { Domain: domainValue, }, } + _ = &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -126,21 +116,18 @@ func TestListExecutionFuncWithError(t *testing.T) { Phase: core.WorkflowExecution_SUCCEEDED, }, } - mockClient.OnListExecutionsMatch(mock.Anything, mock.MatchedBy(func(o *admin.ResourceListRequest) bool { - return execListRequest.SortBy.Key == o.SortBy.Key && execListRequest.SortBy.Direction == o.SortBy.Direction && execListRequest.Filters == o.Filters && execListRequest.Limit == o.Limit - })).Return(nil, errors.New("executions NotFound")) - err := getExecutionFunc(ctx, args, cmdCtx) + s := setup() + s.FetcherExt.OnListExecutionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("executions NotFound")) + s.MockAdminClient.OnListExecutionsMatch(mock.Anything, execListRequest).Return(nil, errors.New("executions NotFound")) + err := getExecutionFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("executions NotFound")) - mockClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) + s.MockAdminClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) } func TestGetExecutionFunc(t *testing.T) { ctx := context.Background() getExecutionSetup() - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) execGetRequest := &admin.WorkflowExecutionGetRequest{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -173,37 +160,39 @@ func TestGetExecutionFunc(t *testing.T) { }, } args := []string{executionNameValue} - mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(executionResponse, nil) - err := getExecutionFunc(ctx, args, cmdCtx) - assert.Nil(t, err) - mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) + s := setup() + //executionList := &admin.ExecutionList{ + // Executions: []*admin.Execution{executionResponse}, + //} + s.MockAdminClient.OnGetExecutionMatch(ctx, execGetRequest).Return(executionResponse, nil) + err := getExecutionFunc(s.Ctx, args, s.CmdCtx) + assert.Nil(t, err) + s.MockAdminClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) } func TestGetExecutionFuncForDetails(t *testing.T) { - setup() + s := testutils.SetupWithExt() getExecutionSetup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockClient = u.MockClient - mockFetcherExt := u.FetcherExt + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt execution.DefaultConfig.Details = true args := []string{dummyExec} mockFetcherExt.OnFetchExecutionMatch(ctx, dummyExec, dummyProject, dummyDomain).Return(&admin.Execution{}, nil) mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nil, fmt.Errorf("unable to fetch details")) - err = getExecutionFunc(ctx, args, mockCmdCtx) + err := getExecutionFunc(ctx, args, mockCmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to fetch details"), err) } func TestGetExecutionFuncWithIOData(t *testing.T) { t.Run("successful inputs outputs", func(t *testing.T) { - setup() + s := testutils.SetupWithExt() getExecutionSetup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockClient = u.MockClient - mockFetcherExt := u.FetcherExt + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt execution.DefaultConfig.NodeID = nodeID args := []string{dummyExec} @@ -259,16 +248,15 @@ func TestGetExecutionFuncWithIOData(t *testing.T) { }, nil) mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(dataResp, nil) - err = getExecutionFunc(ctx, args, mockCmdCtx) + err := getExecutionFunc(ctx, args, mockCmdCtx) assert.Nil(t, err) }) t.Run("fetch data error from admin", func(t *testing.T) { - setup() + s := testutils.SetupWithExt() getExecutionSetup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockClient = u.MockClient - mockFetcherExt := u.FetcherExt + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt execution.DefaultConfig.NodeID = nodeID args := []string{dummyExec} @@ -285,7 +273,7 @@ func TestGetExecutionFuncWithIOData(t *testing.T) { }, nil) mockFetcherExt.OnFetchNodeExecutionDataMatch(ctx, mock.Anything, dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("error in fetching data")) - err = getExecutionFunc(ctx, args, mockCmdCtx) + err := getExecutionFunc(ctx, args, mockCmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error in fetching data"), err) }) @@ -304,13 +292,13 @@ func TestGetExecutionFuncWithIOData(t *testing.T) { args := []string{dummyExec} for _, tt := range tests { - setup() + s := testutils.SetupWithExt() config.GetConfig().Output = tt.outputFormat execution.DefaultConfig.NodeID = tt.nodeID - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} nodeExec1 := createDummyNodeWithID("n0", false) @@ -377,16 +365,6 @@ func TestGetExecutionFuncWithIOData(t *testing.T) { func TestGetExecutionFuncWithError(t *testing.T) { ctx := context.Background() getExecutionSetup() - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - execGetRequest := &admin.WorkflowExecutionGetRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: projectValue, - Domain: domainValue, - Name: executionNameValue, - }, - } _ = &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -413,9 +391,10 @@ func TestGetExecutionFuncWithError(t *testing.T) { } args := []string{executionNameValue} - mockClient.OnGetExecutionMatch(ctx, execGetRequest).Return(nil, errors.New("execution NotFound")) - err := getExecutionFunc(ctx, args, cmdCtx) + s := testutils.SetupWithExt() + s.FetcherExt.OnFetchExecutionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("execution NotFound")) + err := getExecutionFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("execution NotFound")) - mockClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) + s.FetcherExt.AssertCalled(t, "FetchExecution", ctx, "e124", "dummyProject", "dummyDomain") } diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index e92d7c1261..e4a1aec40d 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -1,15 +1,11 @@ package get import ( - "context" "fmt" "sort" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) @@ -23,12 +19,6 @@ const workflowNameValue = "wf_name" const workflowVersionValue = "wf_version" const testDataFolder = "../testdata/" -var ( - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - cmdCtx cmdCore.CommandContext -) var setup = testutils.Setup var tearDownAndVerify = testutils.TearDownAndVerify diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index a36cd2ec77..3831631f87 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,14 +5,14 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/printer" "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -35,10 +35,7 @@ var ( ) func getLaunchPlanSetup() { - ctx = u.Ctx - mockClient = u.MockClient // TODO: migrate to new command context from testutils - cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsLp = []string{"launchplan1"} parameterMap := map[string]*core.Parameter{ "numbers": { @@ -196,158 +193,168 @@ func getLaunchPlanSetup() { func TestGetLaunchPlanFuncWithError(t *testing.T) { t.Run("failure fetch latest", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) launchplan.DefaultConfig.Latest = true launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchLPLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) - _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchLPForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching version ", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) launchplan.DefaultConfig.Version = "v1" launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchLPVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) - _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchLPForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching all version ", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() launchplan.DefaultConfig.Filter = filters.Filters{} launchplan.DefaultConfig.Filter = filters.Filters{} mockFetcher := new(mocks.AdminFetcherExtInterface) mockFetcher.OnFetchAllVerOfLPMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) - _, err = FetchLPForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchLPForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching ", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(nil, fmt.Errorf("error fetching all version")) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(nil, fmt.Errorf("error fetching lanuch plan")) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(nil, fmt.Errorf("error listing lanuch plan ids")) - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}).Return(nil, fmt.Errorf("error fetching all version")) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(nil, fmt.Errorf("error fetching all version")) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(nil, fmt.Errorf("error fetching lanuch plan")) + s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(nil, fmt.Errorf("error listing lanuch plan ids")) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.NotNil(t, err) }) t.Run("failure fetching list", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() argsLp = []string{} - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(nil, fmt.Errorf("error fetching all version")) - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "", "dummyProject", "dummyDomain", filters.Filters{}).Return(nil, fmt.Errorf("error fetching all version")) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(nil, fmt.Errorf("error fetching all version")) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.NotNil(t, err) }) } func TestGetLaunchPlanFunc(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) - tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.MockAdminClient.AssertCalled(t, "ListLaunchPlans", s.Ctx, resourceGetRequest) + tearDownAndVerify(t, s.Writer, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlanFuncLatest(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() launchplan.DefaultConfig.Latest = true launchplan.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) - tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.MockAdminClient.AssertCalled(t, "ListLaunchPlans", s.Ctx, resourceGetRequest) + tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanWithVersion(t *testing.T) { - setup() + s := testutils.SetupWithExt() getLaunchPlanSetup() launchplan.DefaultConfig.Version = "v2" - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.FetcherExt.OnFetchLPVersion(s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain").Return(launchPlan2, nil) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) - tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") + tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlans(t *testing.T) { t.Run("no workflow filter", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(launchPlanListResponse, nil) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "", "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) argsLp = []string{} - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, s.Writer, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) }) t.Run("workflow filter", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() resourceListRequest.Filters = "eq(workflow.name,workflow2)" - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(filteredLaunchPlanListResponse, nil) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(filteredLaunchPlanListResponse, nil) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "", "dummyProject", "dummyDomain", filters.Filters{ + FieldSelector: "workflow.name=workflow2", + }).Return(launchPlanListResponse.LaunchPlans, nil) argsLp = []string{} launchplan.DefaultConfig.Workflow = "workflow2" - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) }) t.Run("workflow filter error", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() argsLp = []string{} launchplan.DefaultConfig.Workflow = "workflow2" launchplan.DefaultConfig.Filter.FieldSelector = "workflow.name" - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("fieldSelector cannot be specified with workflow flag"), err) }) } func TestGetLaunchPlansWithExecFile(t *testing.T) { - setup() + s := testutils.SetupWithExt() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceListRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.FetcherExt.OnFetchLPVersion(s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain").Return(launchPlan2, nil) launchplan.DefaultConfig.Version = "v2" launchplan.DefaultConfig.ExecFile = testDataFolder + "exec_file" - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) os.Remove(launchplan.DefaultConfig.ExecFile) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetLaunchPlan", ctx, objectGetRequest) - tearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") + tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanTableFunc(t *testing.T) { - setup() + s := testutils.SetupWithExt() getLaunchPlanSetup() - mockClient.OnListLaunchPlansMatch(ctx, resourceGetRequest).Return(launchPlanListResponse, nil) - mockClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan2, nil) - mockClient.OnListLaunchPlanIdsMatch(ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(launchPlanListResponse, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) + s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) config.GetConfig().Output = printer.OutputFormatTABLE.String() - err = getLaunchPlanFunc(ctx, argsLp, cmdCtx) + err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListLaunchPlans", ctx, resourceGetRequest) - tearDownAndVerify(t, ` + s.FetcherExt.AssertCalled(t, "FetchAllVerOfLP", s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}) + tearDownAndVerify(t, s.Writer, ` --------- ------------- ------ ------- ---------- --------------------------- --------- | VERSION | NAME | TYPE | STATE | SCHEDULE | INPUTS | OUTPUTS | --------- ------------- ------ ------- ---------- --------------------------- --------- diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index 9991e3688d..82fba0a6c8 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getClusterResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient clusterresourceattribute.DefaultFetchConfig = &clusterresourceattribute.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -51,88 +49,82 @@ func TestGetClusterResourceAttributes(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","attributes":{"foo":"bar"}}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","attributes":{"foo":"bar"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() clusterresourceattribute.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() clusterresourceattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","attributes":{"foo":"bar"}}`) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","attributes":{"foo":"bar"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getClusterResourceAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getClusterResourceAttributes(ctx, args, cmdCtx) + err := getClusterResourceAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index b49aab9d8b..d3aff8d6a5 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getExecutionClusterLabelSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionclusterlabel.DefaultFetchConfig = &executionclusterlabel.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -51,88 +49,82 @@ func TestGetExecutionClusterLabel(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","value":"foo"}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","value":"foo"}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() executionclusterlabel.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() executionclusterlabel.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed to get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) }) t.Run("failed to get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionClusterLabelSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getExecutionClusterLabel(ctx, args, cmdCtx) + err := getExecutionClusterLabel(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go index 92bf156d95..521ee8e522 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getExecutionQueueAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionqueueattribute.DefaultFetchConfig = &executionqueueattribute.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -51,88 +49,82 @@ func TestGetExecutionQueueAttributes(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","tags":["foo","bar"]}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","tags":["foo","bar"]}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() executionqueueattribute.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() executionqueueattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","tags":["foo","bar"]}`) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","tags":["foo","bar"]}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getExecutionQueueAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getExecutionQueueAttributes(ctx, args, cmdCtx) + err := getExecutionQueueAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go index b72ab6524e..16ec913754 100644 --- a/flytectl/cmd/get/matchable_plugin_override_test.go +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getPluginOverrideSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient pluginoverride.DefaultFetchConfig = &pluginoverride.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -63,86 +61,80 @@ func TestGetPluginOverride(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() pluginoverride.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() pluginoverride.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getPluginOverrideSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getPluginOverridesFunc(ctx, args, cmdCtx) + err := getPluginOverridesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index 6df5479859..021f02ea7f 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getTaskResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient taskresourceattribute.DefaultFetchConfig = &taskresourceattribute.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -58,88 +56,82 @@ func TestGetTaskResourceAttributes(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() taskresourceattribute.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() taskresourceattribute.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getTaskResourceAttributeSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getTaskResourceAttributes(ctx, args, cmdCtx) + err := getTaskResourceAttributes(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go index c3c97829a6..e477bb3158 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -15,9 +16,6 @@ import ( ) func getWorkflowExecutionConfigSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient workflowexecutionconfig.DefaultFetchConfig = &workflowexecutionconfig.AttrFetchConfig{} // Clean up the temp directory. _ = os.Remove(testDataTempFile) @@ -51,88 +49,82 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { }, } t.Run("successful get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","max_parallelism":5}`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","max_parallelism":5}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultFetchConfig.AttrFile = testDataTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, `wrote the config to file temp-output-file`) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultFetchConfig.AttrFile = testDataNotExistentTempFile // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(projectDomainResp, nil) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() // No args implying project domain attribute deletion - u.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, ``) + s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(workflowResp, nil) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","max_parallelism":5}`) + tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","max_parallelism":5}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { - var args []string - setup() + s := testutils.SetupWithExt() getWorkflowExecutionConfigSetup() - args = []string{"workflow"} - u.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + args := []string{"workflow"} + s.FetcherExt.OnFetchWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to fetch response")) - err = getWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := getWorkflowExecutionConfigFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to fetch response"), err) - u.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", - ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", + s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", + s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index 05d5c2372f..1958f6a5c6 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -5,7 +5,8 @@ import ( "testing" "time" - u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/event" @@ -159,10 +160,10 @@ func createDummyTaskExecutionForNode(nodeID string, taskID string) *admin.TaskEx func TestGetExecutionDetails(t *testing.T) { t.Run("successful get details default view", func(t *testing.T) { - setup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt + s := testutils.SetupWithExt() + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt nodeExecStart := createDummyNodeWithID("start-node", false) nodeExecN2 := createDummyNodeWithID("n2", true) @@ -225,10 +226,10 @@ func TestGetExecutionDetails(t *testing.T) { }) t.Run("successful get details default view for node-id", func(t *testing.T) { - setup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt + s := testutils.SetupWithExt() + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt nodeExec1 := createDummyNodeWithID("n0", false) taskExec1 := createDummyTaskExecutionForNode("n0", "task21") @@ -288,10 +289,10 @@ func TestGetExecutionDetails(t *testing.T) { }) t.Run("failure task exec fetch", func(t *testing.T) { - setup() - ctx := u.Ctx - mockCmdCtx := u.CmdCtx - mockFetcherExt := u.FetcherExt + s := testutils.SetupWithExt() + ctx := s.Ctx + mockCmdCtx := s.CmdCtx + mockFetcherExt := s.FetcherExt nodeExecToTaskExec := map[string]*admin.TaskExecutionList{} nodeExec1 := createDummyNodeWithID("n0", false) @@ -307,7 +308,7 @@ func TestGetExecutionDetails(t *testing.T) { mockFetcherExt.OnFetchNodeExecutionDetailsMatch(ctx, dummyExec, dummyProject, dummyDomain, "").Return(nodeExecList, nil) mockFetcherExt.OnFetchTaskExecutionsOnNodeMatch(ctx, "n0", dummyExec, dummyProject, dummyDomain).Return(nil, fmt.Errorf("unable to fetch task exec details")) - _, err = getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, "", mockCmdCtx) + _, err := getExecutionDetails(ctx, dummyProject, dummyDomain, dummyExec, "", mockCmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to fetch task exec details"), err) }) diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go index 264aa35c1c..d2a3a1abe7 100644 --- a/flytectl/cmd/get/project_test.go +++ b/flytectl/cmd/get/project_test.go @@ -2,15 +2,13 @@ package get import ( "fmt" - "io" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) @@ -18,16 +16,11 @@ import ( var ( resourceListRequestProject *admin.ProjectListRequest projectListResponse *admin.Projects - argsProject []string + argsProject = []string{"flyteexample"} project1 *admin.Project ) func getProjectSetup() { - - mockOutStream := new(io.Writer) - cmdCtx = cmdCore.NewCommandContext(mockClient, *mockOutStream) - - argsProject = []string{"flyteexample"} resourceListRequestProject = &admin.ProjectListRequest{} project1 = &admin.Project{ @@ -60,40 +53,40 @@ func getProjectSetup() { } func TestListProjectFunc(t *testing.T) { - setup() + s := testutils.SetupWithExt() getProjectSetup() - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - project.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) - err = getProjectsFunc(ctx, argsProject, cmdCtx) + s.MockAdminClient.OnListProjectsMatch(s.Ctx, resourceListRequestProject).Return(projectListResponse, nil) + s.FetcherExt.OnListProjects(s.Ctx, filters.Filters{}).Return(projectListResponse, nil) + err := getProjectsFunc(s.Ctx, argsProject, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListProjects", ctx, resourceListRequestProject) + s.FetcherExt.AssertCalled(t, "ListProjects", s.Ctx, filters.Filters{}) } func TestGetProjectFunc(t *testing.T) { - setup() + s := testutils.SetupWithExt() getProjectSetup() - argsProject = []string{} project.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(projectListResponse, nil) - err = getProjectsFunc(ctx, argsProject, cmdCtx) + s.MockAdminClient.OnListProjectsMatch(s.Ctx, resourceListRequestProject).Return(projectListResponse, nil) + s.FetcherExt.OnListProjects(s.Ctx, filters.Filters{}).Return(projectListResponse, nil) + err := getProjectsFunc(s.Ctx, argsProject, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListProjects", ctx, resourceListRequestProject) + s.FetcherExt.AssertCalled(t, "ListProjects", s.Ctx, filters.Filters{}) } func TestGetProjectFuncError(t *testing.T) { - setup() + s := testutils.SetupWithExt() getProjectSetup() project.DefaultConfig.Filter = filters.Filters{ FieldSelector: "hello=", } - mockClient.OnListProjectsMatch(ctx, resourceListRequestProject).Return(nil, fmt.Errorf("Please add a valid field selector")) - err = getProjectsFunc(ctx, argsProject, cmdCtx) + s.MockAdminClient.OnListProjectsMatch(s.Ctx, resourceListRequestProject).Return(nil, fmt.Errorf("Please add a valid field selector")) + s.FetcherExt.OnListProjects(s.Ctx, filters.Filters{ + FieldSelector: "hello=", + }).Return(nil, fmt.Errorf("Please add a valid field selector")) + err := getProjectsFunc(s.Ctx, argsProject, s.CmdCtx) assert.NotNil(t, err) } diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 0133c20f46..28816e8a1c 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -5,14 +5,14 @@ import ( "os" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" "github.com/flyteorg/flytectl/pkg/filters" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" @@ -37,10 +37,6 @@ var ( ) func getTaskSetup() { - ctx = u.Ctx - mockClient = u.MockClient - // TODO: migrate to new command context from testutils - cmdCtx = cmdCore.NewCommandContext(mockClient, u.MockOutStream) argsTask = []string{"task1"} sortedListLiteralType := core.Variable{ Type: &core.LiteralType{ @@ -179,73 +175,79 @@ func getTaskSetup() { func TestGetTaskFuncWithError(t *testing.T) { t.Run("failure fetch latest", func(t *testing.T) { - setup() + s := setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) taskConfig.DefaultConfig.Latest = true taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchTaskLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) - _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchTaskForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching version ", func(t *testing.T) { - setup() + s := setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) taskConfig.DefaultConfig.Version = "v1" taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchTaskVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) - _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchTaskForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching all version ", func(t *testing.T) { - setup() + s := setup() getTaskSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) taskConfig.DefaultConfig.Filter = filters.Filters{} mockFetcher.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) - _, err = FetchTaskForName(ctx, mockFetcher, "lpName", projectValue, domainValue) + _, err := FetchTaskForName(s.Ctx, mockFetcher, "lpName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching ", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(nil, fmt.Errorf("error fetching all version")) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) - err = getTaskFunc(ctx, argsTask, cmdCtx) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(nil, fmt.Errorf("error fetching all version")) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) + s.MockAdminClient.OnListTaskIdsMatch(s.Ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) + s.FetcherExt.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.NotNil(t, err) }) t.Run("failure fetching list task", func(t *testing.T) { - setup() + s := setup() getLaunchPlanSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} argsTask = []string{} - mockClient.OnListTasksMatch(ctx, resourceListTaskRequest).Return(nil, fmt.Errorf("error fetching all version")) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) - err = getTaskFunc(ctx, argsTask, cmdCtx) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListTaskRequest).Return(nil, fmt.Errorf("error fetching all version")) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(nil, fmt.Errorf("error fetching task")) + s.MockAdminClient.OnListTaskIdsMatch(s.Ctx, namedIDRequestTask).Return(nil, fmt.Errorf("error listing task ids")) + s.FetcherExt.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.NotNil(t, err) }) } func TestGetTaskFunc(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - err = getTaskFunc(ctx, argsTask, cmdCtx) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.FetcherExt.OnFetchAllVerOfTaskMatch(mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(taskListResponse.Tasks, nil) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) - tearDownAndVerify(t, `[ + s.FetcherExt.AssertCalled(t, "FetchAllVerOfTask", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) + tearDownAndVerify(t, s.Writer, `[ { "id": { "name": "task1", @@ -320,16 +322,17 @@ func TestGetTaskFunc(t *testing.T) { } func TestGetTaskFuncWithTable(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.FetcherExt.OnFetchAllVerOfTask(s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}).Return(taskListResponse.Tasks, nil) config.GetConfig().Output = "table" - err = getTaskFunc(ctx, argsTask, cmdCtx) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) - tearDownAndVerify(t, ` + s.FetcherExt.AssertCalled(t, "FetchAllVerOfTask", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) + tearDownAndVerify(t, s.Writer, ` --------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- | VERSION | NAME | TYPE | INPUTS | OUTPUTS | DISCOVERABLE | DISCOVERY VERSION | CREATED AT | --------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- @@ -343,17 +346,18 @@ func TestGetTaskFuncWithTable(t *testing.T) { } func TestGetTaskFuncLatest(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.MockAdminClient.OnListTaskIdsMatch(s.Ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.FetcherExt.OnFetchTaskLatestVersion(s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}).Return(task2, nil) taskConfig.DefaultConfig.Latest = true - err = getTaskFunc(ctx, argsTask, cmdCtx) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "ListTasks", ctx, resourceListRequestTask) - tearDownAndVerify(t, `{ + s.FetcherExt.AssertCalled(t, "FetchTaskLatestVersion", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) + tearDownAndVerify(t, s.Writer, `{ "id": { "name": "task1", "version": "v2" @@ -391,18 +395,19 @@ func TestGetTaskFuncLatest(t *testing.T) { } func TestGetTaskWithVersion(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.MockAdminClient.OnListTaskIdsMatch(s.Ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.FetcherExt.OnFetchTaskVersion(s.Ctx, "task1", "v2", "dummyProject", "dummyDomain").Return(task2, nil) taskConfig.DefaultConfig.Version = "v2" objectGetRequestTask.Id.ResourceType = core.ResourceType_TASK - err = getTaskFunc(ctx, argsTask, cmdCtx) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetTask", ctx, objectGetRequestTask) - tearDownAndVerify(t, `{ + s.FetcherExt.AssertCalled(t, "FetchTaskVersion", s.Ctx, "task1", "v2", "dummyProject", "dummyDomain") + tearDownAndVerify(t, s.Writer, `{ "id": { "name": "task1", "version": "v2" @@ -440,41 +445,47 @@ func TestGetTaskWithVersion(t *testing.T) { } func TestGetTasks(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{} - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - err = getTaskFunc(ctx, argsTask, cmdCtx) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.FetcherExt.OnFetchAllVerOfTask(s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}).Return(taskListResponse.Tasks, nil) + + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + tearDownAndVerify(t, s.Writer, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetTasksFilters(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() taskConfig.DefaultConfig.Filter = filters.Filters{ FieldSelector: "task.name=task1,task.version=v1", } - mockClient.OnListTasksMatch(ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) - err = getTaskFunc(ctx, argsTask, cmdCtx) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) + s.FetcherExt.OnFetchAllVerOfTask(s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{ + FieldSelector: "task.name=task1,task.version=v1", + }).Return(taskListResponse.Tasks, nil) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) + tearDownAndVerify(t, s.Writer, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) } func TestGetTaskWithExecFile(t *testing.T) { - setup() + s := testutils.SetupWithExt() getTaskSetup() - mockClient.OnListTasksMatch(ctx, resourceListRequestTask).Return(taskListResponse, nil) - mockClient.OnGetTaskMatch(ctx, objectGetRequestTask).Return(task2, nil) - mockClient.OnListTaskIdsMatch(ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListRequestTask).Return(taskListResponse, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, objectGetRequestTask).Return(task2, nil) + s.MockAdminClient.OnListTaskIdsMatch(s.Ctx, namedIDRequestTask).Return(namedIdentifierListTask, nil) + s.FetcherExt.OnFetchTaskVersion(s.Ctx, "task1", "v2", "dummyProject", "dummyDomain").Return(task2, nil) taskConfig.DefaultConfig.Version = "v2" taskConfig.DefaultConfig.ExecFile = testDataFolder + "task_exec_file" - err = getTaskFunc(ctx, argsTask, cmdCtx) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) os.Remove(taskConfig.DefaultConfig.ExecFile) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetTask", ctx, objectGetRequestTask) - tearDownAndVerify(t, `{ + s.FetcherExt.AssertCalled(t, "FetchTaskVersion", s.Ctx, "task1", "v2", "dummyProject", "dummyDomain") + tearDownAndVerify(t, s.Writer, `{ "id": { "name": "task1", "version": "v2" diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index 46ad846cdd..d0b50007ca 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/pkg/printer" @@ -17,7 +19,6 @@ import ( "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" - u "github.com/flyteorg/flytectl/cmd/testutils" ) var ( @@ -29,9 +30,6 @@ var ( ) func getWorkflowSetup() { - ctx = u.Ctx - mockClient = u.MockClient - cmdCtx = u.CmdCtx resourceListRequestWorkflow = &admin.ResourceListRequest{ Id: &admin.NamedEntityIdentifier{ Project: projectValue, @@ -110,59 +108,59 @@ func getWorkflowSetup() { func TestGetWorkflowFuncWithError(t *testing.T) { t.Run("failure fetch latest", func(t *testing.T) { - setup() + s := setup() getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) workflow.DefaultConfig.Latest = true mockFetcher.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) - _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err := FetchWorkflowForName(s.Ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching version ", func(t *testing.T) { - setup() + s := setup() getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) workflow.DefaultConfig.Version = "v1" mockFetcher.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching version")) - _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err := FetchWorkflowForName(s.Ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching all version ", func(t *testing.T) { - setup() + s := setup() getWorkflowSetup() mockFetcher := new(mocks.AdminFetcherExtInterface) mockFetcher.OnFetchAllVerOfWorkflowMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all version")) - _, _, err = FetchWorkflowForName(ctx, mockFetcher, "workflowName", projectValue, domainValue) + _, _, err := FetchWorkflowForName(s.Ctx, mockFetcher, "workflowName", projectValue, domainValue) assert.NotNil(t, err) }) t.Run("failure fetching ", func(t *testing.T) { - setup() + s := testutils.SetupWithExt() getWorkflowSetup() workflow.DefaultConfig.Latest = true args := []string{"workflowName"} - u.FetcherExt.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, + s.FetcherExt.OnFetchWorkflowLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching latest version")) - err = getWorkflowFunc(ctx, args, cmdCtx) + err := getWorkflowFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) }) } func TestGetWorkflowFuncLatestWithTable(t *testing.T) { - setup() + s := testutils.SetupWithExt() getWorkflowSetup() workflow.DefaultConfig.Latest = true workflow.DefaultConfig.Filter = filters.Filters{} config.GetConfig().Output = printer.OutputFormatTABLE.String() - u.FetcherExt.OnFetchWorkflowLatestVersionMatch(ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflow1, nil) - err = getWorkflowFunc(ctx, argsWf, cmdCtx) + s.FetcherExt.OnFetchWorkflowLatestVersionMatch(s.Ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflow1, nil) + err := getWorkflowFunc(s.Ctx, argsWf, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ` + tearDownAndVerify(t, s.Writer, ` --------- ----------- --------------------------- --------- ---------------------- | VERSION | NAME | INPUTS | OUTPUTS | CREATED AT | --------- ----------- --------------------------- --------- ---------------------- @@ -173,14 +171,14 @@ func TestGetWorkflowFuncLatestWithTable(t *testing.T) { } func TestListWorkflowFuncWithTable(t *testing.T) { - setup() + s := testutils.SetupWithExt() getWorkflowSetup() workflow.DefaultConfig.Filter = filters.Filters{} config.GetConfig().Output = printer.OutputFormatTABLE.String() - u.FetcherExt.OnFetchAllVerOfWorkflowMatch(ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflows, nil) - err = getWorkflowFunc(ctx, argsWf, cmdCtx) + s.FetcherExt.OnFetchAllVerOfWorkflowMatch(s.Ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflows, nil) + err := getWorkflowFunc(s.Ctx, argsWf, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, ` + tearDownAndVerify(t, s.Writer, ` --------- ----------- ---------------------- | VERSION | NAME | CREATED AT | --------- ----------- ---------------------- diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 8d1434294e..eb3feff8ec 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/flyteorg/flytestdlib/logger" "github.com/google/go-github/v42/github" @@ -54,8 +56,8 @@ func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Com args := []string{ *v.BrowserDownloadURL, } - if err := Register(ctx, args, cmdCtx); err != nil { - return fmt.Errorf("Example %v failed to register %v", v.Name, err) + if err := Register(ctx, args, config.GetConfig(), cmdCtx); err != nil { + return fmt.Errorf("example %v failed to register %v", v.Name, err) } } return nil diff --git a/flytectl/cmd/register/examples_test.go b/flytectl/cmd/register/examples_test.go index f405d44284..fc3996f185 100644 --- a/flytectl/cmd/register/examples_test.go +++ b/flytectl/cmd/register/examples_test.go @@ -7,19 +7,18 @@ import ( ) func TestRegisterExamplesFunc(t *testing.T) { - setup() + s := setup() registerFilesSetup() - args = []string{""} - err := registerExamplesFunc(ctx, args, cmdCtx) + args := []string{""} + err := registerExamplesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) } func TestRegisterExamplesFuncErr(t *testing.T) { - setup() + s := setup() registerFilesSetup() flytesnacks = "testingsnacks" - args = []string{""} - - err := registerExamplesFunc(ctx, args, cmdCtx) + args := []string{""} + err := registerExamplesFunc(s.Ctx, args, s.CmdCtx) // TODO (Yuvraj) make test to success after fixing flytesnacks bug assert.NotNil(t, err) flytesnacks = "flytesnacks" diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index c66ceddf7a..18f43c40c0 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -5,7 +5,10 @@ import ( "encoding/json" "fmt" "os" - "path/filepath" + + "github.com/flyteorg/flytectl/cmd/config" + + "github.com/flyteorg/flytestdlib/storage" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -106,10 +109,10 @@ Usage ) func registerFromFilesFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - return Register(ctx, args, cmdCtx) + return Register(ctx, args, config.GetConfig(), cmdCtx) } -func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { +func Register(ctx context.Context, args []string, cfg *config.Config, cmdCtx cmdCore.CommandContext) error { var regErr error var dataRefs []string @@ -125,7 +128,7 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) logger.Infof(ctx, "Parsing file... Total(%v)", len(dataRefs)) // It will segregate serialize output files in valid proto,Invalid files if have any and source code(In case of fast serialize input files) - sourceCode, validProto, InvalidFiles := segregateSourceAndProtos(dataRefs) + sourceCodePath, validProto, InvalidFiles := segregateSourceAndProtos(dataRefs) // If any invalid files provide in input then through an error if len(InvalidFiles) > 0 { @@ -133,20 +136,22 @@ func Register(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) } // In case of fast serialize input upload source code to destination bucket - var sourceCodeName string - if len(sourceCode) > 0 { + var uploadLocation storage.DataReference + if len(sourceCodePath) > 0 { logger.Infof(ctx, "Fast Registration detected") - _, sourceCodeName = filepath.Split(sourceCode) - if err = uploadFastRegisterArtifact(ctx, sourceCode, sourceCodeName, rconfig.DefaultFilesConfig.Version, &rconfig.DefaultFilesConfig.SourceUploadPath); err != nil { - return fmt.Errorf("please check your Storage Config. It failed while uploading the source code. %v", err) + uploadLocation, err = uploadFastRegisterArtifact(ctx, cfg.Project, cfg.Domain, sourceCodePath, rconfig.DefaultFilesConfig.Version, + cmdCtx.ClientSet().DataProxyClient(), rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) + if err != nil { + return fmt.Errorf("failed to upload source code from [%v]. Error: %w", sourceCodePath, err) } - logger.Infof(ctx, "Source code successfully uploaded %v/%v ", rconfig.DefaultFilesConfig.SourceUploadPath, sourceCodeName) + + logger.Infof(ctx, "Source code successfully uploaded to [%v]", uploadLocation) } var registerResults []Result fastFail := !rconfig.DefaultFilesConfig.ContinueOnError for i := 0; i < len(validProto) && !(fastFail && regErr != nil); i++ { - registerResults, regErr = registerFile(ctx, validProto[i], sourceCodeName, registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + registerResults, regErr = registerFile(ctx, validProto[i], registerResults, cmdCtx, uploadLocation, *rconfig.DefaultFilesConfig) } payload, _ := json.Marshal(registerResults) diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index 744e9cef2c..ea167f2971 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -4,6 +4,10 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils/labeled" "github.com/flyteorg/flytestdlib/storage" @@ -20,161 +24,169 @@ const ( func TestRegisterFromFiles(t *testing.T) { t.Run("Valid registration", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/valid-parent-folder-register.tar"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - err := registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/valid-parent-folder-register.tar"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) t.Run("Valid fast registration", func(t *testing.T) { - setup() + s := setup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = s3Output mockStorage, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) Client = mockStorage - args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + args := []string{"testdata/flytesnacks-core.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + + mockDataProxy := s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient) + mockDataProxy.OnCreateUploadLocationMatch(s.Ctx, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) - err = registerFromFilesFunc(ctx, args, cmdCtx) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) t.Run("Failed fast registration while uploading the codebase", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = true rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - s, err := storage.NewDataStore(&storage.Config{ + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) - Client = s - args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - err = Register(ctx, args, cmdCtx) + Client = store + args := []string{"testdata/flytesnacks-core.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + err = Register(s.Ctx, args, config.GetConfig(), s.CmdCtx) assert.Nil(t, err) }) t.Run("Failed registration because of invalid files", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = true - rconfig.DefaultFilesConfig.SourceUploadPath = "" - s, err := storage.NewDataStore(&storage.Config{ + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = "" + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) - Client = s + Client = store assert.Nil(t, err) - args = []string{"testdata/invalid-fast.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - err = registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/invalid-fast.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) }) t.Run("Failure registration of fast serialize", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = true rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - rconfig.DefaultFilesConfig.SourceUploadPath = s3Output - s, err := storage.NewDataStore(&storage.Config{ + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = s3Output + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) - Client = s + Client = store assert.Nil(t, err) - args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) - err = registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/flytesnacks-core.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(1) + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed"), err) }) t.Run("Failure registration of fast serialize continue on error", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = true rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - rconfig.DefaultFilesConfig.SourceUploadPath = s3Output + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = s3Output rconfig.DefaultFilesConfig.ContinueOnError = true - s, err := storage.NewDataStore(&storage.Config{ + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) - Client = s + Client = store assert.Nil(t, err) - args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(39) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(21) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(24) - err = registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/flytesnacks-core.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(39) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(21) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")).Call.Times(24) + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed"), err) }) t.Run("Valid registration of fast serialize", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = true rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - rconfig.DefaultFilesConfig.SourceUploadPath = s3Output - s, err := storage.NewDataStore(&storage.Config{ + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = s3Output + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) - Client = s + Client = store assert.Nil(t, err) - args = []string{"testdata/flytesnacks-core.tgz"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - err = registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/flytesnacks-core.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) t.Run("Registration with proto files ", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) rconfig.DefaultFilesConfig.Archive = false rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output - rconfig.DefaultFilesConfig.SourceUploadPath = "" - s, err := storage.NewDataStore(&storage.Config{ + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = "" + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) - Client = s + Client = store assert.Nil(t, err) - args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - err = registerFromFilesFunc(ctx, args, cmdCtx) + args := []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) } diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index 871fc2523b..26a3186344 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -1,25 +1,17 @@ package register import ( - "context" "fmt" "net/http" "sort" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) var ( - ctx context.Context - mockAdminClient *mocks.AdminServiceClient - cmdCtx cmdCore.CommandContext - args []string - GetDoFunc func(req *http.Request) (*http.Response, error) + GetDoFunc func(req *http.Request) (*http.Response, error) ) var setup = u.Setup diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index f81c438fec..1982417f16 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -4,7 +4,6 @@ import ( "archive/tar" "compress/gzip" "context" - "encoding/json" "errors" "fmt" "io" @@ -12,9 +11,15 @@ import ( "net/http" "os" "path/filepath" + "regexp" "sort" + "strconv" "strings" + errors2 "github.com/flyteorg/flytestdlib/errors" + + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytestdlib/contextutils" @@ -54,6 +59,12 @@ var supportedExtensions = []string{".tar", ".tgz", ".tar.gz"} // All supported extensions for gzip compress var validGzipExtensions = []string{".tgz", ".tar.gz"} +type SignedURLPatternMatcher = *regexp.Regexp + +var ( + SignedURLPattern SignedURLPatternMatcher = regexp.MustCompile(`https://((storage\.googleapis\.com/(?P[^/]+))|((?P[^\.]+)\.s3\.amazonaws\.com)|(.*\.blob\.core\.windows\.net/(?P[^/]+)))/(?P[^?]*)`) +) + type Result struct { Name string Status string @@ -81,21 +92,34 @@ var projectColumns = []printer.Column{ func unMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { workflowSpec := &admin.WorkflowSpec{} - if err := proto.Unmarshal(fileContents, workflowSpec); err == nil { + errCollection := errors2.ErrorCollection{} + err := proto.Unmarshal(fileContents, workflowSpec) + if err == nil { return workflowSpec, nil } + + errCollection.Append(fmt.Errorf("as a Workflow: %w", err)) + logger.Debugf(ctx, "Failed to unmarshal file %v for workflow type", fname) taskSpec := &admin.TaskSpec{} - if err := proto.Unmarshal(fileContents, taskSpec); err == nil { + err = proto.Unmarshal(fileContents, taskSpec) + if err == nil { return taskSpec, nil } - logger.Debugf(ctx, "Failed to unmarshal file %v for task type", fname) + + errCollection.Append(fmt.Errorf("as a Task: %w", err)) + + logger.Debugf(ctx, "Failed to unmarshal file %v for task type", fname) launchPlan := &admin.LaunchPlan{} - if err := proto.Unmarshal(fileContents, launchPlan); err == nil { + err = proto.Unmarshal(fileContents, launchPlan) + if err == nil { return launchPlan, nil } + + errCollection.Append(fmt.Errorf("as a Launchplan: %w", err)) + logger.Debugf(ctx, "Failed to unmarshal file %v for launch plan type", fname) - return nil, fmt.Errorf("failed unmarshalling file %v", fname) + return nil, fmt.Errorf("failed unmarshalling file %v. Errors: %w", fname, errCollection.ErrorOrDefault()) } @@ -221,15 +245,11 @@ func hydrateIdentifier(identifier *core.Identifier, version string, force bool) } } -func hydrateTaskSpec(task *admin.TaskSpec, sourceCode, sourceUploadPath, version, destinationDir string) error { +func hydrateTaskSpec(task *admin.TaskSpec, sourceUploadedLocation storage.DataReference, destinationDir string) error { if task.Template.GetContainer() != nil { for k := range task.Template.GetContainer().Args { if task.Template.GetContainer().Args[k] == registrationRemotePackagePattern { - remotePath, err := getRemoteStoragePath(context.Background(), Client, sourceUploadPath, sourceCode, version) - if err != nil { - return err - } - task.Template.GetContainer().Args[k] = string(remotePath) + task.Template.GetContainer().Args[k] = sourceUploadedLocation.String() } if task.Template.GetContainer().Args[k] == registrationDestDirPattern { task.Template.GetContainer().Args[k] = "." @@ -247,11 +267,7 @@ func hydrateTaskSpec(task *admin.TaskSpec, sourceCode, sourceUploadPath, version for containerIdx, container := range podSpec.Containers { for argIdx, arg := range container.Args { if arg == registrationRemotePackagePattern { - remotePath, err := getRemoteStoragePath(context.Background(), Client, sourceUploadPath, sourceCode, version) - if err != nil { - return err - } - podSpec.Containers[containerIdx].Args[argIdx] = string(remotePath) + podSpec.Containers[containerIdx].Args[argIdx] = sourceUploadedLocation.String() } if arg == registrationDestDirPattern { podSpec.Containers[containerIdx].Args[argIdx] = "." @@ -392,7 +408,7 @@ func validateSpec(ctx context.Context, message proto.Message, cmdCtx cmdCore.Com return nil } -func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesConfig) error { +func hydrateSpec(message proto.Message, uploadLocation storage.DataReference, config rconfig.FilesConfig) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) @@ -421,7 +437,7 @@ func hydrateSpec(message proto.Message, sourceCode string, config rconfig.FilesC taskSpec := message.(*admin.TaskSpec) hydrateIdentifier(taskSpec.Template.Id, config.Version, config.Force) // In case of fast serialize input proto also have on additional variable to substitute i.e destination bucket for source code - if err := hydrateTaskSpec(taskSpec, sourceCode, config.SourceUploadPath, config.Version, config.DestinationDirectory); err != nil { + if err := hydrateTaskSpec(taskSpec, uploadLocation, config.DestinationDirectory); err != nil { return err } @@ -456,8 +472,18 @@ func getSerializeOutputFiles(ctx context.Context, args []string, archive bool) ( * generated otherwise the registration can fail if the dependent files are not registered earlier. */ - sort.Strings(args) - return args, "", nil + finalList := make([]string, 0, len(args)) + for _, arg := range args { + matches, err := filepath.Glob(arg) + if err != nil { + return nil, "", fmt.Errorf("failed to glob [%v]. Error: %w", arg, err) + } + + finalList = append(finalList, matches...) + } + + sort.Strings(finalList) + return finalList, "", nil } tempDir, err := ioutil.TempDir("/tmp", "register") @@ -523,7 +549,9 @@ func readAndCopyArchive(src io.Reader, tempDir string, unarchivedFiles []string) } } -func registerFile(ctx context.Context, fileName, sourceCode string, registerResults []Result, cmdCtx cmdCore.CommandContext, config rconfig.FilesConfig) ([]Result, error) { +func registerFile(ctx context.Context, fileName string, registerResults []Result, + cmdCtx cmdCore.CommandContext, uploadLocation storage.DataReference, config rconfig.FilesConfig) ([]Result, error) { + var registerResult Result var fileContents []byte var err error @@ -539,7 +567,7 @@ func registerFile(ctx context.Context, fileName, sourceCode string, registerResu return registerResults, err } - if err := hydrateSpec(spec, sourceCode, config); err != nil { + if err := hydrateSpec(spec, uploadLocation, config); err != nil { registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error hydrating spec due to %v", err)} registerResults = append(registerResults, registerResult) return registerResults, err @@ -642,44 +670,124 @@ func getAllExample(repository, version string) ([]*github.ReleaseAsset, *github. func getRemoteStoragePath(ctx context.Context, s *storage.DataStore, remoteLocation, file, identifier string) (storage.DataReference, error) { remotePath, err := s.ConstructReference(ctx, storage.DataReference(remoteLocation), fmt.Sprintf("%v-%v", identifier, file)) if err != nil { - return storage.DataReference(""), err + return "", err } + return remotePath, nil } -func uploadFastRegisterArtifact(ctx context.Context, file, sourceCodeName, version string, sourceUploadPath *string) error { +func getTotalSize(reader io.Reader) (size int64, err error) { + page := make([]byte, 512) + size = 0 + + n := 0 + for n, err = reader.Read(page); n > 0 && err == nil; n, err = reader.Read(page) { + size += int64(n) + } + + if err == io.EOF { + return size + int64(n), nil + } + + return size, err +} + +func uploadFastRegisterArtifact(ctx context.Context, project, domain, sourceCodeFilePath, version string, + dataProxyClient service.DataProxyServiceClient, deprecatedSourceUploadPath string) (uploadLocation storage.DataReference, err error) { + + fileHandle, err := os.Open(sourceCodeFilePath) + if err != nil { + return "", err + } + + dataRefReaderCloser, err := gzip.NewReader(fileHandle) + if err != nil { + return "", err + } + + size, err := getTotalSize(dataRefReaderCloser) + if err != nil { + return "", err + } + + _, err = fileHandle.Seek(0, 0) + if err != nil { + return "", err + } + + err = dataRefReaderCloser.Reset(fileHandle) + if err != nil { + return "", err + } + + remotePath := storage.DataReference(deprecatedSourceUploadPath) + _, fileName := filepath.Split(sourceCodeFilePath) + resp, err := dataProxyClient.CreateUploadLocation(ctx, &service.CreateUploadLocationRequest{ + Project: project, + Domain: domain, + Suffix: strings.Join([]string{version, fileName}, "/"), + }) + + if err != nil { + if status.Code(err) == codes.Unimplemented { + logger.Infof(ctx, "Using an older version of FlyteAdmin. Falling back to the configured storage client.") + } else { + return "", fmt.Errorf("failed to create an upload location. Error: %w", err) + } + } + + if resp != nil && len(resp.SignedUrl) > 0 { + return storage.DataReference(resp.NativeUrl), DirectUpload(resp.SignedUrl, size, dataRefReaderCloser) + } + dataStore, err := getStorageClient(ctx) if err != nil { - return err + return "", err } - var dataRefReaderCloser io.ReadCloser - remotePath := storage.DataReference(*sourceUploadPath) - if len(*sourceUploadPath) == 0 { + + if len(deprecatedSourceUploadPath) == 0 { remotePath, err = dataStore.ConstructReference(ctx, dataStore.GetBaseContainerFQN(ctx), "fast") if err != nil { - return err + return "", err } } - *sourceUploadPath = string(remotePath) - fullRemotePath, err := getRemoteStoragePath(ctx, dataStore, *sourceUploadPath, sourceCodeName, version) + + remotePath, err = getRemoteStoragePath(ctx, dataStore, remotePath.String(), fileName, version) if err != nil { - return err + return "", err } - raw, err := json.Marshal(file) - if err != nil { - return err + + if err := dataStore.ComposedProtobufStore.WriteRaw(ctx, remotePath, size, storage.Options{}, dataRefReaderCloser); err != nil { + return "", err } - dataRefReaderCloser, err = os.Open(file) + + return remotePath, nil +} + +func DirectUpload(url string, size int64, data io.Reader) error { + req, err := http.NewRequest(http.MethodPut, url, data) if err != nil { return err } - dataRefReaderCloser, err = gzip.NewReader(dataRefReaderCloser) + + req.ContentLength = size + req.Header.Set("Content-Length", strconv.FormatInt(size, 10)) + + client := &http.Client{} + res, err := client.Do(req) if err != nil { return err } - if err := dataStore.ComposedProtobufStore.WriteRaw(ctx, fullRemotePath, int64(len(raw)), storage.Options{}, dataRefReaderCloser); err != nil { - return err + + if res.StatusCode != http.StatusOK { + raw, err := ioutil.ReadAll(res.Body) + if err != nil { + return fmt.Errorf("received response code [%v]. Failed to read response body. Error: %w", res.StatusCode, err) + } + + return fmt.Errorf("bad status: %s : %s", res.Status, string(raw)) } + return nil } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 491c0c1f98..e9b4caae05 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -1,6 +1,7 @@ package register import ( + "bytes" "context" "errors" "fmt" @@ -11,6 +12,9 @@ import ( "strings" "testing" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flytestdlib/utils" v1 "k8s.io/api/core/v1" @@ -23,8 +27,6 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -54,9 +56,6 @@ func registerFilesSetup() { GetDoFunc = func(*http.Request) (*http.Response, error) { return response, nil } - ctx = u.Ctx - mockAdminClient = u.MockClient - cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) rconfig.DefaultFilesConfig.AssumableIamRole = "" rconfig.DefaultFilesConfig.K8sServiceAccount = "" @@ -64,11 +63,11 @@ func registerFilesSetup() { } func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/valid-parent-folder-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/valid-parent-folder-register.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -81,11 +80,11 @@ func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { } func TestGetSortedArchivedFileList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/valid-register.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -98,11 +97,11 @@ func TestGetSortedArchivedFileList(t *testing.T) { } func TestGetSortedArchivedFileUnorderedList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/valid-unordered-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/valid-unordered-register.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -115,11 +114,11 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { } func TestGetSortedArchivedCorruptedFileList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/invalid.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/invalid.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -128,11 +127,11 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { } func TestGetSortedArchivedTgzList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/valid-register.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/valid-register.tgz"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -145,10 +144,10 @@ func TestGetSortedArchivedTgzList(t *testing.T) { } func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { - setup() + s := setup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/invalid.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/invalid.tgz"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -157,11 +156,11 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { } func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"testdata/invalid-extension-register.zip"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"testdata/invalid-extension-register.zip"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -171,10 +170,10 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { } func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { - setup() + s := setup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -183,11 +182,11 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { } func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { - setup() + s := setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"http://dummyhost:80/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + args := []string{"http://dummyhost:80/testdata/valid-register.tar"} + fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -203,10 +202,10 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) setup() registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true - args = []string{"http://dummyhost:80/testdata/valid-register.tar"} - ctx = nil + args := []string{"http://dummyhost:80/testdata/valid-register.tar"} + var ctx context.Context = nil fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) - assert.Equal(t, len(fileList), 0) + assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) assert.Equal(t, errors.New("net/http: nil Context"), err) @@ -214,21 +213,28 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) assert.Nil(t, os.RemoveAll(tmpDir), "unable to delete temp dir %v", tmpDir) } +func Test_getTotalSize(t *testing.T) { + b := bytes.NewBufferString("hello world") + size, err := getTotalSize(b) + assert.NoError(t, err) + assert.Equal(t, int64(11), size) +} + func TestRegisterFile(t *testing.T) { t.Run("Successful run", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) - args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + args := []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Nil(t, err) }) t.Run("Failed Scheduled launch plan registration", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) variableMap := map[string]*core.Variable{ "var1": { Type: &core.LiteralType{ @@ -270,58 +276,60 @@ func TestRegisterFile(t *testing.T) { }, }, } - mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) - args = []string{"testdata/152_my_cron_scheduled_lp_3.pb"} + s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + s.FetcherExt.OnFetchWorkflowVersion(s.Ctx, "core.scheduled_workflows.lp_schedules.date_formatter_wf", "v0.3.59", "dummyProject", "dummyDomain").Return(wf, nil) + s.FetcherExt.OnFetchWorkflowVersion(s.Ctx, "core.scheduled_workflows.lp_schedules.date_formatter_wf", "", "dummyProject", "dummyDomain").Return(wf, nil) + args := []string{"testdata/152_my_cron_scheduled_lp_3.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Contains(t, results[0].Info, "param values are missing on scheduled workflow for the following params") assert.NotNil(t, err) }) t.Run("Non existent file", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - args = []string{"testdata/non-existent.pb"} + args := []string{"testdata/non-existent.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error reading file due to open testdata/non-existent.pb: no such file or directory", results[0].Info) assert.NotNil(t, err) }) t.Run("unmarhal failure", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - args = []string{"testdata/valid-register.tar"} + args := []string{"testdata/valid-register.tar"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) - assert.Equal(t, "Error unmarshalling file due to failed unmarshalling file testdata/valid-register.tar", results[0].Info) + assert.True(t, strings.HasPrefix(results[0].Info, "Error unmarshalling file due to failed unmarshalling file testdata/valid-register.tar")) assert.NotNil(t, err) }) t.Run("AlreadyExists", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, status.Error(codes.AlreadyExists, "AlreadyExists")) - args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + args := []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Success", results[0].Status) assert.Equal(t, "AlreadyExists", results[0].Info) assert.Nil(t, err) }) t.Run("Registration Error", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, status.Error(codes.InvalidArgument, "Invalid")) - args = []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} + args := []string{"testdata/69_core.flyte_basics.lp.greet_1.pb"} var registerResults []Result - results, err := registerFile(ctx, args[0], "", registerResults, cmdCtx, *rconfig.DefaultFilesConfig) + results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) assert.Equal(t, 1, len(results)) assert.Equal(t, "Failed", results[0].Status) assert.Equal(t, "Error registering file due to rpc error: code = InvalidArgument desc = Invalid", results[0].Info) @@ -340,7 +348,6 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) }) t.Run("k8sService account override", func(t *testing.T) { - setup() registerFilesSetup() rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" lpSpec := &admin.LaunchPlanSpec{} @@ -349,7 +356,6 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) t.Run("Both k8sService and IamRole", func(t *testing.T) { - setup() registerFilesSetup() rconfig.DefaultFilesConfig.AssumableIamRole = "iamRole" rconfig.DefaultFilesConfig.K8sServiceAccount = "k8Account" @@ -360,7 +366,6 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) }) t.Run("Output prefix", func(t *testing.T) { - setup() registerFilesSetup() rconfig.DefaultFilesConfig.OutputLocationPrefix = "prefix" lpSpec := &admin.LaunchPlanSpec{} @@ -372,25 +377,37 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { func TestUploadFastRegisterArtifact(t *testing.T) { t.Run("Successful upload", func(t *testing.T) { + s := setup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) - s, err := storage.NewDataStore(&storage.Config{ + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) - Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "flytesnacks-core.tgz", "", &rconfig.DefaultFilesConfig.SourceUploadPath) + Client = store + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(s.Ctx, &service.CreateUploadLocationRequest{ + Project: "flytesnacks", + Domain: "development", + Suffix: "/flytesnacks-core.tgz", + }).Return(&service.CreateUploadLocationResponse{}, nil) + _, err = uploadFastRegisterArtifact(s.Ctx, "flytesnacks", "development", "testdata/flytesnacks-core.tgz", "", s.MockClient.DataProxyClient(), rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) assert.Nil(t, err) }) t.Run("Failed upload", func(t *testing.T) { + s := setup() testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) - s, err := storage.NewDataStore(&storage.Config{ + store, err := storage.NewDataStore(&storage.Config{ Type: storage.TypeMemory, }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) - Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacks-core.tgz", "", "", &rconfig.DefaultFilesConfig.SourceUploadPath) + Client = store + s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(s.Ctx, &service.CreateUploadLocationRequest{ + Project: "flytesnacks", + Domain: "development", + Suffix: "/flytesnacks-core.tgz", + }).Return(&service.CreateUploadLocationResponse{}, nil) + _, err = uploadFastRegisterArtifact(context.Background(), "flytesnacks", "development", "testdata/flytesnacks-core.tgz", "", s.MockClient.DataProxyClient(), rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) assert.Nil(t, err) }) t.Run("Failed upload", func(t *testing.T) { @@ -401,7 +418,7 @@ func TestUploadFastRegisterArtifact(t *testing.T) { }, testScope.NewSubScope("flytectl")) assert.Nil(t, err) Client = s - err = uploadFastRegisterArtifact(ctx, "testdata/flytesnacksre.tgz", "", "", &rconfig.DefaultFilesConfig.SourceUploadPath) + _, err = uploadFastRegisterArtifact(context.Background(), "flytesnacks", "development", "testdata/flytesnacksre.tgz", "", nil, rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) assert.NotNil(t, err) }) } @@ -409,7 +426,7 @@ func TestUploadFastRegisterArtifact(t *testing.T) { func TestGetStorageClient(t *testing.T) { t.Run("Failed to create storage client", func(t *testing.T) { Client = nil - s, err := getStorageClient(ctx) + s, err := getStorageClient(context.Background()) assert.NotNil(t, err) assert.Nil(t, s) }) @@ -434,17 +451,16 @@ func TestGetAllFlytesnacksExample(t *testing.T) { func TestRegister(t *testing.T) { t.Run("Failed to register", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() node := &admin.NodeExecution{} - err := register(ctx, node, cmdCtx, rconfig.DefaultFilesConfig.DryRun) + err := register(s.Ctx, node, s.CmdCtx, rconfig.DefaultFilesConfig.DryRun) assert.NotNil(t, err) }) } func TestHydrateNode(t *testing.T) { t.Run("Failed hydrate node", func(t *testing.T) { - setup() registerFilesSetup() node := &core.Node{} err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) @@ -452,7 +468,6 @@ func TestHydrateNode(t *testing.T) { }) t.Run("hydrateSpec with wrong type", func(t *testing.T) { - setup() registerFilesSetup() task := &admin.Task{} err := hydrateSpec(task, "", *rconfig.DefaultFilesConfig) @@ -503,13 +518,13 @@ func TestHydrateTaskSpec(t *testing.T) { }, }, } - err = hydrateTaskSpec(task, "sourcey", rconfig.DefaultFilesConfig.SourceUploadPath, rconfig.DefaultFilesConfig.Version, "") + err = hydrateTaskSpec(task, storage.DataReference("file://somewhere"), "sourcey") assert.NoError(t, err) var hydratedPodSpec = v1.PodSpec{} err = utils.UnmarshalStructToObj(task.Template.GetK8SPod().PodSpec, &hydratedPodSpec) assert.NoError(t, err) assert.Len(t, hydratedPodSpec.Containers[1].Args, 2) - assert.True(t, strings.HasSuffix(hydratedPodSpec.Containers[1].Args[1], "sourcey")) + assert.Contains(t, hydratedPodSpec.Containers[1].Args[1], "somewhere") } func TestLeftDiff(t *testing.T) { @@ -564,17 +579,20 @@ func TestLeftDiff(t *testing.T) { func TestValidateLaunchSpec(t *testing.T) { ctx := context.Background() t.Run("nil launchplan spec", func(t *testing.T) { + s := setup() registerFilesSetup() - err := validateLaunchSpec(ctx, nil, cmdCtx) + err := validateLaunchSpec(ctx, nil, s.CmdCtx) assert.Nil(t, err) }) t.Run("launchplan spec with nil workflow id", func(t *testing.T) { + s := setup() registerFilesSetup() lpSpec := &admin.LaunchPlanSpec{} - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.Nil(t, err) }) t.Run("launchplan spec with empty metadata", func(t *testing.T) { + s := setup() registerFilesSetup() lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ @@ -584,10 +602,11 @@ func TestValidateLaunchSpec(t *testing.T) { Version: "workflowVersionValue", }, } - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.Nil(t, err) }) t.Run("launchplan spec with metadata and empty schedule", func(t *testing.T) { + s := setup() registerFilesSetup() lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ @@ -598,14 +617,14 @@ func TestValidateLaunchSpec(t *testing.T) { }, EntityMetadata: &admin.LaunchPlanMetadata{}, } - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.Nil(t, err) }) t.Run("validate spec failed to fetch workflow", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -622,15 +641,15 @@ func TestValidateLaunchSpec(t *testing.T) { lp := &admin.LaunchPlan{ Spec: lpSpec, } - err := validateSpec(ctx, lp, cmdCtx) + err := validateSpec(ctx, lp, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, "failed", err.Error()) }) t.Run("failed to fetch workflow", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() - mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -644,12 +663,12 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, "failed", err.Error()) }) t.Run("launchplan spec missing required param schedule", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() variableMap := map[string]*core.Variable{ "var1": { @@ -692,7 +711,7 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -706,12 +725,12 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.NotNil(t, err) assert.Contains(t, err.Error(), "param values are missing on scheduled workflow for the following params") }) t.Run("launchplan spec non empty schedule required param success", func(t *testing.T) { - setup() + s := setup() registerFilesSetup() variableMap := map[string]*core.Variable{ "var1": { @@ -754,7 +773,7 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - mockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -796,7 +815,7 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - err := validateLaunchSpec(ctx, lpSpec, cmdCtx) + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.Nil(t, err) }) } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index dba5b8f85a..ca08c94966 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -3,13 +3,8 @@ package cmd import ( "context" "fmt" - "os" - "github.com/flyteorg/flytectl/cmd/sandbox" - - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - "github.com/flyteorg/flytectl/cmd/config" configuration "github.com/flyteorg/flytectl/cmd/configuration" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -17,9 +12,11 @@ import ( "github.com/flyteorg/flytectl/cmd/delete" "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flytectl/cmd/register" + "github.com/flyteorg/flytectl/cmd/sandbox" "github.com/flyteorg/flytectl/cmd/update" "github.com/flyteorg/flytectl/cmd/upgrade" "github.com/flyteorg/flytectl/cmd/version" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/printer" stdConfig "github.com/flyteorg/flytestdlib/config" "github.com/flyteorg/flytestdlib/config/viper" diff --git a/flytectl/cmd/sandbox/exec_test.go b/flytectl/cmd/sandbox/exec_test.go index 4aa0e2148a..8cd7059c19 100644 --- a/flytectl/cmd/sandbox/exec_test.go +++ b/flytectl/cmd/sandbox/exec_test.go @@ -8,6 +8,10 @@ import ( "strings" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + + admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/stretchr/testify/assert" @@ -21,7 +25,8 @@ func TestSandboxClusterExec(t *testing.T) { mockDocker := &mocks.Docker{} mockOutStream := new(io.Writer) ctx := context.Background() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + mockClient := admin2.InitializeMockClientset() + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) reader := bufio.NewReader(strings.NewReader("test")) mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ @@ -46,10 +51,9 @@ func TestSandboxClusterExec(t *testing.T) { func TestSandboxClusterExecWithoutCmd(t *testing.T) { mockDocker := &mocks.Docker{} - mockOutStream := new(io.Writer) - ctx := context.Background() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) reader := bufio.NewReader(strings.NewReader("test")) + s := testutils.Setup() + ctx := s.Ctx mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { @@ -66,7 +70,7 @@ func TestSandboxClusterExecWithoutCmd(t *testing.T) { Reader: reader, }, fmt.Errorf("Test")) docker.Client = mockDocker - err := sandboxClusterExec(ctx, []string{}, cmdCtx) + err := sandboxClusterExec(ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 979e666788..7c373bb2ed 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -201,7 +201,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) } fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, sandboxImage) - if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.DefaultConfig.ImagePullPolicy); err != nil { + if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.DefaultConfig.ImagePullPolicy, sandboxConfig.DefaultConfig.ImagePullOptions); err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index a70e136334..ae938ab1e2 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -10,6 +10,8 @@ import ( "strings" "testing" + "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytectl/pkg/k8s" @@ -511,7 +513,7 @@ func TestStartSandboxFunc(t *testing.T) { t.Run("Successfully run sandbox cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) ctx := context.Background() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) mockDocker := &mocks.Docker{} errCh := make(chan error) client := testclient.NewSimpleClientset() @@ -561,7 +563,7 @@ func TestStartSandboxFunc(t *testing.T) { t.Run("Error in running sandbox cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) ctx := context.Background() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) mockDocker := &mocks.Docker{} errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) diff --git a/flytectl/cmd/sandbox/status_test.go b/flytectl/cmd/sandbox/status_test.go index fa5fbf424a..e38cfb0271 100644 --- a/flytectl/cmd/sandbox/status_test.go +++ b/flytectl/cmd/sandbox/status_test.go @@ -1,12 +1,11 @@ package sandbox import ( - "context" - "io" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/docker/docker/api/types" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/assert" @@ -14,19 +13,16 @@ import ( func TestSandboxStatus(t *testing.T) { t.Run("Sandbox status with zero result", func(t *testing.T) { - ctx := context.Background() - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) mockDocker := &mocks.Docker{} - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + s := testutils.Setup() + mockDocker.OnContainerList(s.Ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) docker.Client = mockDocker - err := sandboxClusterStatus(ctx, []string{}, cmdCtx) + err := sandboxClusterStatus(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) }) t.Run("Sandbox status with running sandbox", func(t *testing.T) { - ctx := context.Background() - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + s := testutils.Setup() + ctx := s.Ctx mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { @@ -37,7 +33,7 @@ func TestSandboxStatus(t *testing.T) { }, }, nil) docker.Client = mockDocker - err := sandboxClusterStatus(ctx, []string{}, cmdCtx) + err := sandboxClusterStatus(ctx, []string{}, s.CmdCtx) assert.Nil(t, err) }) } diff --git a/flytectl/cmd/sandbox/teardown_test.go b/flytectl/cmd/sandbox/teardown_test.go index 224c905ae1..d95b12221d 100644 --- a/flytectl/cmd/sandbox/teardown_test.go +++ b/flytectl/cmd/sandbox/teardown_test.go @@ -3,14 +3,13 @@ package sandbox import ( "context" "fmt" - "io" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/util" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/docker/docker/api/types" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" @@ -52,13 +51,12 @@ func TestTearDownFunc(t *testing.T) { func TestTearDownClusterFunc(t *testing.T) { _ = util.SetupFlyteDir() _ = util.WriteIntoFile([]byte("data"), configutil.FlytectlConfig) - mockOutStream := new(io.Writer) - ctx := context.Background() - cmdCtx := cmdCore.NewCommandContext(nil, *mockOutStream) + s := testutils.Setup() + ctx := s.Ctx mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) docker.Client = mockDocker - err := teardownSandboxCluster(ctx, []string{}, cmdCtx) + err := teardownSandboxCluster(ctx, []string{}, s.CmdCtx) assert.Nil(t, err) } diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index c04be45a52..86577b1323 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -10,11 +10,15 @@ import ( "strings" "testing" + "github.com/flyteorg/flytectl/pkg/ext" + + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + + "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" extMocks "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) @@ -22,51 +26,83 @@ const projectValue = "dummyProject" const domainValue = "dummyDomain" const output = "json" -var ( - reader *os.File - writer *os.File - Err error - Ctx context.Context - MockClient *mocks.AdminServiceClient - FetcherExt *extMocks.AdminFetcherExtInterface - UpdaterExt *extMocks.AdminUpdaterExtInterface - DeleterExt *extMocks.AdminDeleterExtInterface - MockOutStream io.Writer - CmdCtx cmdCore.CommandContext - stdOut *os.File - stderr *os.File -) +type TestStruct struct { + Reader *os.File + Writer *os.File + Err error + Ctx context.Context + MockClient *admin.Clientset + MockAdminClient *mocks.AdminServiceClient + FetcherExt *extMocks.AdminFetcherExtInterface + UpdaterExt *extMocks.AdminUpdaterExtInterface + DeleterExt *extMocks.AdminDeleterExtInterface + MockOutStream io.Writer + CmdCtx cmdCore.CommandContext + StdOut *os.File + Stderr *os.File +} -func Setup() { - Ctx = context.Background() - reader, writer, Err = os.Pipe() - if Err != nil { - panic(Err) +func Setup() (s TestStruct) { + s.Ctx = context.Background() + s.Reader, s.Writer, s.Err = os.Pipe() + if s.Err != nil { + panic(s.Err) + } + s.StdOut = os.Stdout + s.Stderr = os.Stderr + os.Stdout = s.Writer + os.Stderr = s.Writer + log.SetOutput(s.Writer) + s.MockClient = admin.InitializeMockClientset() + s.FetcherExt = new(extMocks.AdminFetcherExtInterface) + s.UpdaterExt = new(extMocks.AdminUpdaterExtInterface) + s.DeleterExt = new(extMocks.AdminDeleterExtInterface) + s.FetcherExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.UpdaterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.DeleterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.MockAdminClient = s.MockClient.AdminClient().(*mocks.AdminServiceClient) + fetcher := &ext.AdminFetcherExtClient{ + AdminClient: s.MockAdminClient, } - stdOut = os.Stdout - stderr = os.Stderr - os.Stdout = writer - os.Stderr = writer - log.SetOutput(writer) - MockClient = new(mocks.AdminServiceClient) - FetcherExt = new(extMocks.AdminFetcherExtInterface) - UpdaterExt = new(extMocks.AdminUpdaterExtInterface) - DeleterExt = new(extMocks.AdminDeleterExtInterface) - FetcherExt.OnAdminServiceClient().Return(MockClient) - UpdaterExt.OnAdminServiceClient().Return(MockClient) - DeleterExt.OnAdminServiceClient().Return(MockClient) - MockOutStream = writer - CmdCtx = cmdCore.NewCommandContextWithExt(MockClient, FetcherExt, UpdaterExt, DeleterExt, MockOutStream) + s.MockOutStream = s.Writer + s.CmdCtx = cmdCore.NewCommandContextWithExt(s.MockClient, fetcher, s.UpdaterExt, s.DeleterExt, s.MockOutStream) config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue config.GetConfig().Output = output + + return s +} + +func SetupWithExt() (s TestStruct) { + s.Ctx = context.Background() + s.Reader, s.Writer, s.Err = os.Pipe() + if s.Err != nil { + panic(s.Err) + } + s.StdOut = os.Stdout + s.Stderr = os.Stderr + os.Stdout = s.Writer + os.Stderr = s.Writer + log.SetOutput(s.Writer) + s.MockClient = admin.InitializeMockClientset() + s.FetcherExt = new(extMocks.AdminFetcherExtInterface) + s.UpdaterExt = new(extMocks.AdminUpdaterExtInterface) + s.DeleterExt = new(extMocks.AdminDeleterExtInterface) + s.FetcherExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.UpdaterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.DeleterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) + s.MockAdminClient = s.MockClient.AdminClient().(*mocks.AdminServiceClient) + s.MockOutStream = s.Writer + s.CmdCtx = cmdCore.NewCommandContextWithExt(s.MockClient, s.FetcherExt, s.UpdaterExt, s.DeleterExt, s.MockOutStream) + config.GetConfig().Project = projectValue + config.GetConfig().Domain = domainValue + config.GetConfig().Output = output + + return s } // TearDownAndVerify TODO: Change this to verify log lines from context -func TearDownAndVerify(t *testing.T, expectedLog string) { - writer.Close() - os.Stdout = stdOut - os.Stderr = stderr +func TearDownAndVerify(t *testing.T, reader io.Reader, expectedLog string) { var buf bytes.Buffer if _, err := io.Copy(&buf, reader); err == nil { assert.Equal(t, sanitizeString(expectedLog), sanitizeString(buf.String())) diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go index 2f7e5423ba..35ab591212 100644 --- a/flytectl/cmd/update/execution_test.go +++ b/flytectl/cmd/update/execution_test.go @@ -12,60 +12,50 @@ import ( "github.com/stretchr/testify/mock" ) -func UpdateExecutionSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestExecutionUpdate(t *testing.T) { - testutils.Setup() - UpdateExecutionSetup() - args = []string{"execution1"} + s := testutils.Setup() + args := []string{"execution1"} // Activate execution.UConfig.Activate = true - mockClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(&admin.ExecutionUpdateResponse{}, nil) - assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) + s.MockAdminClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(&admin.ExecutionUpdateResponse{}, nil) + assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) // Archive execution.UConfig.Activate = false execution.UConfig.Archive = true - assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) + assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) // Reset execution.UConfig.Activate = false execution.UConfig.Archive = false // Dry run execution.UConfig.DryRun = true - assert.Nil(t, updateExecutionFunc(ctx, args, cmdCtx)) - mockClient.AssertNotCalled(t, "UpdateExecution", mock.Anything) + assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything) // Reset execution.UConfig.DryRun = false } func TestExecutionUpdateValidationFailure(t *testing.T) { - testutils.Setup() - UpdateExecutionSetup() - args = []string{"execution1"} + s := testutils.Setup() + args := []string{"execution1"} execution.UConfig.Activate = true execution.UConfig.Archive = true - assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) + assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) // Reset execution.UConfig.Activate = false execution.UConfig.Archive = false } func TestExecutionUpdateFail(t *testing.T) { - testutils.Setup() - UpdateExecutionSetup() - args = []string{"execution1"} - mockClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{"execution1"} + s.MockAdminClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) } func TestExecutionUpdateInvalidArgs(t *testing.T) { - testutils.Setup() - UpdateExecutionSetup() - args = []string{} - assert.NotNil(t, updateExecutionFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{} + assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) } diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index c3efa3b254..9efa37533e 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -32,18 +32,20 @@ Usage ` ) -func updateLPMetaFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - project := config.GetConfig().Project - domain := config.GetConfig().Domain - if len(args) != 1 { - return fmt.Errorf(clierrors.ErrLPNotPassed) +func getUpdateLPMetaFunc(namedEntityConfig *NamedEntityConfig) func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + return func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrLPNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil } - name := args[0] - err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) - if err != nil { - fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) - return err - } - fmt.Printf("updated metadata successfully on %v", name) - return nil } diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go index 0427964fc6..f0119b9eb1 100644 --- a/flytectl/cmd/update/launch_plan_meta_test.go +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -11,34 +11,25 @@ import ( "github.com/stretchr/testify/mock" ) -func UpdateLPMetaSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestLPMetaUpdate(t *testing.T) { - testutils.Setup() - UpdateLPMetaSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"task1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, updateLPMetaFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + namedEntityConfig := &NamedEntityConfig{} + args := []string{"task1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, getUpdateLPMetaFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) } func TestLPMetaUpdateFail(t *testing.T) { - testutils.Setup() - UpdateLPMetaSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"task1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + namedEntityConfig := &NamedEntityConfig{} + args := []string{"task1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, getUpdateTaskFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) } func TestLPMetaUpdateInvalidArgs(t *testing.T) { - testutils.Setup() - UpdateLPMetaSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{} - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + namedEntityConfig := &NamedEntityConfig{} + args := []string{} + assert.NotNil(t, getUpdateTaskFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) } diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index 3ef074277b..0e5010c5cf 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -12,34 +12,25 @@ import ( "github.com/stretchr/testify/mock" ) -func UpdateLPSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestLPUpdate(t *testing.T) { - testutils.Setup() - UpdateLPSetup() + s := testutils.Setup() launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} - args = []string{"lp1"} - mockClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(&admin.LaunchPlanUpdateResponse{}, nil) - assert.Nil(t, updateLPFunc(ctx, args, cmdCtx)) + args := []string{"lp1"} + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(&admin.LaunchPlanUpdateResponse{}, nil) + assert.Nil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) } func TestLPUpdateFail(t *testing.T) { - testutils.Setup() - UpdateLPSetup() + s := testutils.Setup() launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} - args = []string{"task1"} - mockClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateLPFunc(ctx, args, cmdCtx)) + args := []string{"task1"} + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) } func TestLPUpdateInvalidArgs(t *testing.T) { - testutils.Setup() - UpdateLPSetup() + s := testutils.Setup() launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true, Activate: true} - args = []string{} - assert.NotNil(t, updateLPFunc(ctx, args, cmdCtx)) + args := []string{} + assert.NotNil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) } diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index d091125cdc..19c9257d69 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -5,90 +5,85 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updateClusterResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} } func TestUpdateClusterResourceAttributes(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() - err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successfully updated project domain attribute", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed to update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateClusterResourceAttributesFunc(ctx, args, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successfully updated workflow attribute", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed to update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updateClusterResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index 0a84237cc0..500c082673 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -5,90 +5,85 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updateExecutionClusterLabelSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} } func TestExecutionClusterLabel(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() - err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution cluster label"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateExecutionClusterLabelFunc(ctx, args, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updateExecutionClusterLabelSetup() executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updateExecutionClusterLabelFunc(ctx, nil, cmdCtx) + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index f0751b32da..4ba42eadc2 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -5,90 +5,85 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updateExecutionQueueAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} } func TestExecutionQueueAttributes(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() - err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution queue attribute"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateExecutionQueueAttributesFunc(ctx, args, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updateExecutionQueueAttributeSetup() executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updateExecutionQueueAttributesFunc(ctx, nil, cmdCtx) + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index 8f59d1e1e4..644144a29c 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -5,90 +5,85 @@ import ( "testing" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updatePluginOverrideSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} } func TestPluginOverride(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() - err = updatePluginOverridesFunc(ctx, args, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for plugin override"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updatePluginOverridesFunc(ctx, args, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updatePluginOverridesFunc(ctx, args, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updatePluginOverrideSetup() pluginoverride.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updatePluginOverridesFunc(ctx, nil, cmdCtx) + err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index e91f6476d9..39f1cffc9b 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -5,90 +5,85 @@ import ( "testing" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updateTaskResourceAttributeSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} } func TestUpdateTaskResourceAttributes(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() - err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for task resource attribute"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateTaskResourceAttributesFunc(ctx, args, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updateTaskResourceAttributeSetup() taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updateTaskResourceAttributesFunc(ctx, nil, cmdCtx) + err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index 8afcfda1bf..9b9ba63001 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -6,90 +6,85 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) func updateWorkflowExecutionConfigSetup() { - ctx = u.Ctx - cmdCtx = u.CmdCtx - mockClient = u.MockClient workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} } func TestWorkflowExecutionConfigs(t *testing.T) { t.Run("no input file for update", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() - err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for workflow execution config"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateWorkflowExecutionConfigFunc(ctx, args, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" // No args implying project domain attribute deletion - u.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, + s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("non existent file", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) t.Run("invalid update file", func(t *testing.T) { - setup() + s := setup() updateWorkflowExecutionConfigSetup() workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err = updateWorkflowExecutionConfigFunc(ctx, nil, cmdCtx) + err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, ``) + tearDownAndVerify(t, s.Writer, ``) }) } diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go index 25d537f380..c7644f4907 100644 --- a/flytectl/cmd/update/named_entity.go +++ b/flytectl/cmd/update/named_entity.go @@ -24,9 +24,9 @@ type NamedEntityConfig struct { DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` } -func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error { - archiveProject := n.Archive - activateProject := n.Activate +func (cfg NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error { + archiveProject := cfg.Archive + activateProject := cfg.Activate if activateProject == archiveProject && activateProject { return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } @@ -36,7 +36,7 @@ func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, p } else if archiveProject { nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED } - if namedEntityConfig.DryRun { + if cfg.DryRun { logger.Infof(ctx, "skipping UpdateNamedEntity request (dryRun)") } else { _, err := cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ @@ -47,7 +47,7 @@ func (n NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, p Name: name, }, Metadata: &admin.NamedEntityMetadata{ - Description: n.Description, + Description: cfg.Description, State: nameEntityState, }, }) diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go index 9c322f1840..4e0086d7c6 100644 --- a/flytectl/cmd/update/named_entity_test.go +++ b/flytectl/cmd/update/named_entity_test.go @@ -12,37 +12,28 @@ import ( "github.com/stretchr/testify/assert" ) -func NamedEntitySetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestNamedEntity(t *testing.T) { - testutils.Setup() - NamedEntitySetup() - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + s := testutils.Setup() + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) namedEntityConfig = &NamedEntityConfig{Archive: false, Activate: true, Description: "named entity description"} - assert.Nil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, cmdCtx)) + assert.Nil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, s.CmdCtx)) namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: false, Description: "named entity description"} - assert.Nil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, cmdCtx)) + assert.Nil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, s.CmdCtx)) } func TestNamedEntityValidationFailure(t *testing.T) { - testutils.Setup() - NamedEntitySetup() - namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} - assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, cmdCtx)) + s := testutils.Setup() + namedEntityConfig := &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} + assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, s.CmdCtx)) } func TestNamedEntityFailure(t *testing.T) { - testutils.Setup() - NamedEntitySetup() - namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, cmdCtx)) + s := testutils.Setup() + namedEntityConfig := &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", + core.ResourceType_WORKFLOW, s.CmdCtx)) } diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index db1f52c7cd..d33ce6e374 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -9,7 +9,6 @@ import ( "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" - u "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" @@ -18,13 +17,10 @@ import ( const projectValue = "dummyProject" var ( - args []string projectUpdateRequest *admin.Project ) func updateProjectSetup() { - mockClient = u.MockClient - cmdCtx = u.CmdCtx projectUpdateRequest = &admin.Project{ Id: projectValue, State: admin.Project_ACTIVE, @@ -37,7 +33,7 @@ func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProjec } func TestActivateProjectFunc(t *testing.T) { - setup() + s := setup() updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue @@ -50,15 +46,15 @@ func TestActivateProjectFunc(t *testing.T) { }, State: admin.Project_ACTIVE, } - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err = updateProjectsFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, nil) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject updated\n") + s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) + tearDownAndVerify(t, s.Writer, "Project dummyProject updated\n") } func TestActivateProjectFuncWithError(t *testing.T) { - setup() + s := setup() updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue @@ -71,15 +67,15 @@ func TestActivateProjectFuncWithError(t *testing.T) { }, State: admin.Project_ACTIVE, } - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err = updateProjectsFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to update due to Error Updating Project\n") + s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) + tearDownAndVerify(t, s.Writer, "Project dummyProject failed to update due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { - setup() + s := setup() updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig = &project.ConfigProject{} @@ -93,15 +89,15 @@ func TestArchiveProjectFunc(t *testing.T) { }, State: admin.Project_ARCHIVED, } - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, nil) - err = updateProjectsFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, nil) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject updated\n") + s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) + tearDownAndVerify(t, s.Writer, "Project dummyProject updated\n") } func TestArchiveProjectFuncWithError(t *testing.T) { - setup() + s := setup() updateProjectSetup() project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} @@ -114,32 +110,32 @@ func TestArchiveProjectFuncWithError(t *testing.T) { }, State: admin.Project_ARCHIVED, } - mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err = updateProjectsFunc(ctx, args, cmdCtx) + s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) - mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to update"+ + s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) + tearDownAndVerify(t, s.Writer, "Project dummyProject failed to update"+ " due to Error Updating Project\n") } func TestEmptyProjectInput(t *testing.T) { - setup() + s := setup() updateProjectSetup() config.GetConfig().Project = "" modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) - err = updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrProjectNotPassed), err) } func TestInvalidInput(t *testing.T) { - setup() + s := setup() updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), true) - err = updateProjectsFunc(ctx, args, cmdCtx) + err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) - tearDownAndVerify(t, "") + tearDownAndVerify(t, s.Writer, "") } diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index 80f2b6c7b0..40d4ee4410 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -32,18 +32,22 @@ Usage ` ) -func updateTaskFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - project := config.GetConfig().Project - domain := config.GetConfig().Domain - if len(args) != 1 { - return fmt.Errorf(clierrors.ErrTaskNotPassed) +func getUpdateTaskFunc(namedEntityConfig *NamedEntityConfig) func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + return func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrTaskNotPassed) + } + + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_TASK, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedTaskUpdate, name, err) + return err + } + + fmt.Printf("updated metadata successfully on %v", name) + return nil } - name := args[0] - err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_TASK, cmdCtx) - if err != nil { - fmt.Printf(clierrors.ErrFailedTaskUpdate, name, err) - return err - } - fmt.Printf("updated metadata successfully on %v", name) - return nil } diff --git a/flytectl/cmd/update/task_meta_test.go b/flytectl/cmd/update/task_meta_test.go index 250f7f9fde..e121cbe8bd 100644 --- a/flytectl/cmd/update/task_meta_test.go +++ b/flytectl/cmd/update/task_meta_test.go @@ -11,34 +11,21 @@ import ( "github.com/stretchr/testify/mock" ) -func UpdateTaskSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestTaskUpdate(t *testing.T) { - testutils.Setup() - UpdateTaskSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"task1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, updateTaskFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{"task1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) } func TestTaskUpdateFail(t *testing.T) { - testutils.Setup() - UpdateWorkflowSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"workflow1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{"workflow1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) } func TestTaskUpdateInvalidArgs(t *testing.T) { - testutils.Setup() - UpdateWorkflowSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{} - assert.NotNil(t, updateTaskFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + assert.NotNil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, []string{}, s.CmdCtx)) } diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 7f48226b0c..23c69ac608 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -39,15 +39,15 @@ func CreateUpdateCommand() *cobra.Command { updateResourcesFuncs := map[string]cmdCore.CommandEntry{ "launchplan": {CmdFunc: updateLPFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: launchplan.UConfig, Short: updateLPShort, Long: updateLPLong}, - "launchplan-meta": {CmdFunc: updateLPMetaFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "launchplan-meta": {CmdFunc: getUpdateLPMetaFunc(namedEntityConfig), Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateLPMetaShort, Long: updateLPMetaLong}, "project": {CmdFunc: updateProjectsFunc, Aliases: []string{}, ProjectDomainNotRequired: true, PFlagProvider: project.DefaultProjectConfig, Short: projectShort, Long: projectLong}, "execution": {CmdFunc: updateExecutionFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: execution.UConfig, Short: updateExecutionShort, Long: updateExecutionLong}, - "task-meta": {CmdFunc: updateTaskFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "task-meta": {CmdFunc: getUpdateTaskFunc(namedEntityConfig), Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateTaskShort, Long: updateTaskLong}, - "workflow-meta": {CmdFunc: updateWorkflowFunc, Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, + "workflow-meta": {CmdFunc: getUpdateWorkflowFunc(namedEntityConfig), Aliases: []string{}, ProjectDomainNotRequired: false, PFlagProvider: namedEntityConfig, Short: updateWorkflowShort, Long: updateWorkflowLong}, "task-resource-attribute": {CmdFunc: updateTaskResourceAttributesFunc, Aliases: []string{}, PFlagProvider: taskresourceattribute.DefaultUpdateConfig, Short: taskResourceAttributesShort, Long: taskResourceAttributesLong, ProjectDomainNotRequired: true}, diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index b289b0a4cd..b17bae11e8 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -1,24 +1,13 @@ package update import ( - "context" "sort" "testing" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/stretchr/testify/assert" ) -var ( - err error - ctx context.Context - mockClient *mocks.AdminServiceClient - cmdCtx cmdCore.CommandContext -) - const ( testDataNonExistentFile = "testdata/non-existent-file" testDataInvalidAttrFile = "testdata/invalid_attribute.yaml" diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index f84c1e87e4..5db98b44de 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -32,18 +32,20 @@ Usage ` ) -func updateWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - project := config.GetConfig().Project - domain := config.GetConfig().Domain - if len(args) != 1 { - return fmt.Errorf(clierrors.ErrWorkflowNotPassed) +func getUpdateWorkflowFunc(namedEntityConfig *NamedEntityConfig) func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + return func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + project := config.GetConfig().Project + domain := config.GetConfig().Domain + if len(args) != 1 { + return fmt.Errorf(clierrors.ErrWorkflowNotPassed) + } + name := args[0] + err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_WORKFLOW, cmdCtx) + if err != nil { + fmt.Printf(clierrors.ErrFailedWorkflowUpdate, name, err) + return err + } + fmt.Printf("updated metadata successfully on %v", name) + return nil } - name := args[0] - err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_WORKFLOW, cmdCtx) - if err != nil { - fmt.Printf(clierrors.ErrFailedWorkflowUpdate, name, err) - return err - } - fmt.Printf("updated metadata successfully on %v", name) - return nil } diff --git a/flytectl/cmd/update/workflow_meta_test.go b/flytectl/cmd/update/workflow_meta_test.go index d6b5ba06ad..7c7a1fc78e 100644 --- a/flytectl/cmd/update/workflow_meta_test.go +++ b/flytectl/cmd/update/workflow_meta_test.go @@ -11,34 +11,21 @@ import ( "github.com/stretchr/testify/mock" ) -func UpdateWorkflowSetup() { - ctx = testutils.Ctx - cmdCtx = testutils.CmdCtx - mockClient = testutils.MockClient -} - func TestWorkflowUpdate(t *testing.T) { - testutils.Setup() - UpdateWorkflowSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"workflow1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, updateWorkflowFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{"workflow1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) + assert.Nil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) } func TestWorkflowUpdateFail(t *testing.T) { - testutils.Setup() - UpdateWorkflowSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{"workflow1"} - mockClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateWorkflowFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + args := []string{"workflow1"} + s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) + assert.NotNil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) } func TestWorkflowUpdateInvalidArgs(t *testing.T) { - testutils.Setup() - UpdateWorkflowSetup() - namedEntityConfig = &NamedEntityConfig{} - args = []string{} - assert.NotNil(t, updateWorkflowFunc(ctx, args, cmdCtx)) + s := testutils.Setup() + assert.NotNil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, []string{}, s.CmdCtx)) } diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 473621bb9e..5d4ac283ef 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -1,20 +1,18 @@ package upgrade import ( - "io" "sort" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/githubutil" "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytectl/pkg/platformutil" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" stdlibversion "github.com/flyteorg/flytestdlib/version" - "context" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" @@ -111,16 +109,12 @@ func TestSelfUpgrade(t *testing.T) { githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful upgrade", func(t *testing.T) { - ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := testutils.Setup() stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = version - assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.Nil(t, selfUpgrade(s.Ctx, []string{}, s.CmdCtx)) }) } @@ -129,16 +123,12 @@ func TestSelfUpgradeError(t *testing.T) { githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful upgrade", func(t *testing.T) { - ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := testutils.Setup() stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = "v" - assert.NotNil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.NotNil(t, selfUpgrade(s.Ctx, []string{}, s.CmdCtx)) }) } @@ -148,53 +138,41 @@ func TestSelfUpgradeRollback(t *testing.T) { githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful rollback", func(t *testing.T) { - ctx := context.Background() + s := testutils.Setup() var args = []string{rollBackSubCommand} - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = version - assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.Nil(t, selfUpgrade(s.Ctx, args, s.CmdCtx)) }) t.Run("Successful rollback failed", func(t *testing.T) { - ctx := context.Background() + s := testutils.Setup() var args = []string{rollBackSubCommand} - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = "v100.0.0" - assert.NotNil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.NotNil(t, selfUpgrade(s.Ctx, args, s.CmdCtx)) }) t.Run("Successful rollback for windows", func(t *testing.T) { - ctx := context.Background() + s := testutils.Setup() var args = []string{rollBackSubCommand} - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = version goos = platformutil.Windows - assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.Nil(t, selfUpgrade(s.Ctx, args, s.CmdCtx)) }) t.Run("Successful rollback for windows", func(t *testing.T) { - ctx := context.Background() + s := testutils.Setup() var args = []string{rollBackSubCommand} - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = version githubutil.FlytectlReleaseConfig.OverrideExecutable = "/" - assert.Nil(t, selfUpgrade(ctx, args, cmdCtx)) + assert.Nil(t, selfUpgrade(s.Ctx, args, s.CmdCtx)) }) } diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 0be22c97c2..991d50765e 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -8,6 +8,10 @@ import ( "sort" "testing" + "github.com/flyteorg/flytectl/cmd/testutils" + + admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/spf13/cobra" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -53,47 +57,38 @@ func TestVersionCommand(t *testing.T) { func TestVersionCommandFunc(t *testing.T) { ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := testutils.Setup() stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = testVersion - mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) - err := getVersion(ctx, args, cmdCtx) + s.MockClient.AdminClient().(*mocks.AdminServiceClient).OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) + err := getVersion(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) + s.MockClient.AdminClient().(*mocks.AdminServiceClient).AssertCalled(t, "GetVersion", ctx, versionRequest) } func TestVersionCommandFuncError(t *testing.T) { ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := testutils.Setup() stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = "v" - mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) - err := getVersion(ctx, args, cmdCtx) + s.MockClient.AdminClient().(*mocks.AdminServiceClient).OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, nil) + err := getVersion(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) + s.MockClient.AdminClient().(*mocks.AdminServiceClient).AssertCalled(t, "GetVersion", ctx, versionRequest) } func TestVersionCommandFuncErr(t *testing.T) { ctx := context.Background() - var args []string - mockClient := new(mocks.AdminServiceClient) - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + s := testutils.Setup() stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = testVersion - mockClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, errors.New("error")) - err := getVersion(ctx, args, cmdCtx) + s.MockAdminClient.OnGetVersionMatch(ctx, versionRequest).Return(versionResponse, errors.New("error")) + err := getVersion(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - mockClient.AssertCalled(t, "GetVersion", ctx, versionRequest) + s.MockAdminClient.AssertCalled(t, "GetVersion", ctx, versionRequest) } func TestVersionUtilFunc(t *testing.T) { @@ -102,19 +97,21 @@ func TestVersionUtilFunc(t *testing.T) { stdlibversion.Version = testVersion t.Run("Error in getting control plan version", func(t *testing.T) { ctx := context.Background() - mockClient := new(mocks.AdminServiceClient) + mockClient := admin2.InitializeMockClientset() + adminClient := mockClient.AdminClient().(*mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - mockClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) + adminClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) err := getControlPlaneVersion(ctx, cmdCtx) assert.NotNil(t, err) }) t.Run("Failed in getting version", func(t *testing.T) { ctx := context.Background() - mockClient := new(mocks.AdminServiceClient) + mockClient := admin2.InitializeMockClientset() + adminClient := mockClient.AdminClient().(*mocks.AdminServiceClient) mockOutStream := new(io.Writer) cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) - mockClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) + adminClient.OnGetVersionMatch(ctx, &admin.GetVersionRequest{}).Return(nil, fmt.Errorf("error")) err := getVersion(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) diff --git a/flytectl/go.mod b/flytectl/go.mod index 695533b176..dcadd78d31 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,12 +9,13 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.24.6 - github.com/flyteorg/flytestdlib v0.4.14 + github.com/flyteorg/flyteidl v0.24.10 + github.com/flyteorg/flytestdlib v0.4.16 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.0 github.com/google/go-github/v42 v42.0.0 + github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 @@ -44,10 +45,15 @@ require ( sigs.k8s.io/yaml v1.2.0 ) +require golang.org/x/text v0.3.7 + require ( cloud.google.com/go v0.75.0 // indirect cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v51.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.17 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect @@ -71,19 +77,19 @@ require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/evanphx/json-patch v4.9.0+incompatible // indirect github.com/fatih/color v1.10.0 // indirect + github.com/flyteorg/stow v0.3.1 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-logr/logr v0.4.0 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/google/go-cmp v0.5.6 // indirect - github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect github.com/googleapis/gnostic v0.4.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/graymeta/stow v0.2.7 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect @@ -116,7 +122,6 @@ require ( github.com/prometheus/procfs v0.6.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect - github.com/satori/go.uuid v1.2.0 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect @@ -125,15 +130,14 @@ require ( github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.4.1 // indirect - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.5 // indirect golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - golang.org/x/tools v0.1.0 // indirect + golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/api v0.38.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 5402048521..357cec6285 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -42,8 +42,15 @@ cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7ni dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible h1:p7blnyJSjJqf5jflHbSGhIhEpXIgIFmYZNg5uwqweso= github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= +github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -310,8 +317,9 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/disiqueira/gotree v1.0.0 h1:en5wk87n7/Jyk6gVME3cx3xN9KmUCstJ1IjHr4Se4To= github.com/disiqueira/gotree v1.0.0/go.mod h1:7CwL+VWsWAU95DovkdRZAtA7YbtHwGk+tLV/kNi8niU= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +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/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -356,11 +364,13 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.24.6 h1:n2796X9Sw7mNDtXWwsJr84DLQpz8Cptvb7LptfJLxag= -github.com/flyteorg/flyteidl v0.24.6/go.mod h1:576W2ViEyjTpT+kEVHAGbrTP3HARNUZ/eCwrNPmdx9U= +github.com/flyteorg/flyteidl v0.24.10 h1:fCYpfp5fxKbhRMSkP0Hdw5lOPBTItLU1A3WA1Lc7sEU= +github.com/flyteorg/flyteidl v0.24.10/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.4.14 h1:qpPwvJ+DqM1fI/y5uPKAP8p8VONz8oRp9Fz0jFl/5aI= -github.com/flyteorg/flytestdlib v0.4.14/go.mod h1:fv1ar34LJLMTaf0tbfetisLykUlARi7rP+NQTUn6QQs= +github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= +github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= +github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= +github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -408,6 +418,8 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -514,7 +526,6 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graymeta/stow v0.2.7 h1:b31cB1Ylw/388sYSZxnmpjT2QxC21AaQ8fRnUtE13b4= github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -611,6 +622,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -700,7 +712,6 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -840,7 +851,6 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= @@ -940,6 +950,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= @@ -986,8 +997,9 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= @@ -1021,8 +1033,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB 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 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1064,6 +1077,7 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1071,8 +1085,11 @@ 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-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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= @@ -1093,6 +1110,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -1170,10 +1188,11 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/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-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1185,8 +1204,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1256,8 +1277,9 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 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 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= @@ -1389,8 +1411,9 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= diff --git a/flytectl/pkg/configutil/version.yaml b/flytectl/pkg/configutil/version.yaml new file mode 100644 index 0000000000..2f492d603a --- /dev/null +++ b/flytectl/pkg/configutil/version.yaml @@ -0,0 +1,8 @@ +admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + authType: Pkce + insecure: true +logger: + show-source: true + level: 0 \ No newline at end of file diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index cf8f96a2c6..3b6be1c91c 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -104,7 +104,9 @@ func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, e } // PullDockerImage will Pull docker image -func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy sandboxConfig.ImagePullPolicy) error { +func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy sandboxConfig.ImagePullPolicy, + imagePullOptions sandboxConfig.ImagePullOptions) error { + if pullPolicy == sandboxConfig.ImagePullPolicyAlways || pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { if pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) @@ -119,7 +121,11 @@ func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy s } } } - r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{}) + + r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{ + RegistryAuth: imagePullOptions.RegistryAuth, + Platform: imagePullOptions.Platform, + }) if err != nil { return err } diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 1915722640..a5124fb2bf 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -17,21 +17,15 @@ import ( "github.com/stretchr/testify/mock" "github.com/docker/docker/api/types" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - u "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/stretchr/testify/assert" ) var ( - cmdCtx cmdCore.CommandContext containers []types.Container imageName = "cr.flyte.org/flyteorg/flyte-sandbox" ) func setupSandbox() { - mockAdminClient := u.MockClient - cmdCtx = cmdCore.NewCommandContext(mockAdminClient, u.MockOutStream) err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), os.ModePerm) if err != nil { fmt.Println(err) @@ -110,7 +104,7 @@ func TestPullDockerImage(t *testing.T) { context := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways) + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) @@ -120,7 +114,7 @@ func TestPullDockerImage(t *testing.T) { context := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways) + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) assert.NotNil(t, err) }) @@ -131,7 +125,7 @@ func TestPullDockerImage(t *testing.T) { // Verify the attributes mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnImageListMatch(context, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent) + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) @@ -139,7 +133,7 @@ func TestPullDockerImage(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} context := context.Background() - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever) + err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) } diff --git a/flytectl/pkg/githubutil/githubutil.go b/flytectl/pkg/githubutil/githubutil.go index b948fe880d..d36fe78800 100644 --- a/flytectl/pkg/githubutil/githubutil.go +++ b/flytectl/pkg/githubutil/githubutil.go @@ -8,6 +8,9 @@ import ( "runtime" "strings" + "golang.org/x/text/cases" + "golang.org/x/text/language" + "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytestdlib/logger" @@ -131,7 +134,7 @@ func getFlytectlAssetName() string { } else if arch == platformutil.ArchX86 { arch = platformutil.Archi386 } - return fmt.Sprintf("flytectl_%s_%s.tar.gz", strings.Title(runtime.GOOS), arch.String()) + return fmt.Sprintf("flytectl_%s_%s.tar.gz", cases.Title(language.English).String(runtime.GOOS), arch.String()) } // CheckVersionExist returns the provided version release if version exist in repository diff --git a/flytectl/pkg/githubutil/githubutil_test.go b/flytectl/pkg/githubutil/githubutil_test.go index 70f383034d..5de7709940 100644 --- a/flytectl/pkg/githubutil/githubutil_test.go +++ b/flytectl/pkg/githubutil/githubutil_test.go @@ -6,6 +6,9 @@ import ( "strings" "testing" + "golang.org/x/text/cases" + "golang.org/x/text/language" + stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/flyteorg/flytectl/pkg/platformutil" @@ -99,7 +102,7 @@ func TestGetAssetsFromRelease(t *testing.T) { func TestGetAssetsName(t *testing.T) { t.Run("Get Assets name", func(t *testing.T) { - expected := fmt.Sprintf("flytectl_%s_386.tar.gz", strings.Title(runtime.GOOS)) + expected := fmt.Sprintf("flytectl_%s_386.tar.gz", cases.Title(language.English).String(runtime.GOOS)) arch = platformutil.Arch386 assert.Equal(t, expected, getFlytectlAssetName()) }) diff --git a/flytectl/pkg/util/version.yaml b/flytectl/pkg/util/version.yaml new file mode 100755 index 0000000000..e69de29bb2 From 59340aee1ba04ad549f2b4a0e124a5cf5ee75569 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 5 Apr 2022 16:26:07 +0530 Subject: [PATCH 238/356] Passing security context only if its non empty (#300) * Rebase and fixes tests Signed-off-by: Prafulla Mahindrakar * updating to setup-go@v3 Signed-off-by: Prafulla Mahindrakar * Fixing the tests for go 1.18 by adding mocking for k8s copy context Signed-off-by: Prafulla Mahindrakar * fixes Signed-off-by: Prafulla Mahindrakar * test fixes Signed-off-by: Prafulla Mahindrakar * Fixes Signed-off-by: Prafulla Mahindrakar * Fixes Signed-off-by: Prafulla Mahindrakar --- flytectl/.github/workflows/checks.yml | 2 +- flytectl/cmd/create/execution.go | 8 +- flytectl/cmd/create/execution_util.go | 56 +++++---- flytectl/cmd/create/execution_util_test.go | 125 +++++++++++++++++++- flytectl/cmd/get/execution_test.go | 46 +------ flytectl/cmd/get/launch_plan_test.go | 16 +-- flytectl/cmd/register/register_util_test.go | 12 +- flytectl/cmd/sandbox/start.go | 8 +- flytectl/cmd/sandbox/start_test.go | 4 + flytectl/cmd/sandbox/teardown.go | 5 +- flytectl/cmd/sandbox/teardown_test.go | 12 +- flytectl/cmd/testutils/test_utils.go | 7 +- flytectl/pkg/k8s/k8s.go | 79 ++++++++----- flytectl/pkg/k8s/mocks/context_ops.go | 78 ++++++++++++ 14 files changed, 317 insertions(+), 141 deletions(-) create mode 100644 flytectl/pkg/k8s/mocks/context_ops.go diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index d31399b768..eee6209b0c 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -50,7 +50,7 @@ jobs: ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: '1.17' - name: Run GoReleaser dry run diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 3693c97424..3ca734d3ed 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -177,15 +177,15 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C var executionRequest *admin.ExecutionCreateRequest switch execParams.execType { case Relaunch: - return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx) + return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig) case Recover: - return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx) + return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig) case Task: - if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { + if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig); err != nil { return err } case Workflow: - if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx); err != nil { + if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig); err != nil { return err } default: diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 82adaf6110..ed862783d0 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -16,7 +16,7 @@ import ( ) func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, - cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) (*admin.ExecutionCreateRequest, error) { // Fetch the launch plan lp, err := cmdCtx.AdminFetcherExt().FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain) if err != nil { @@ -35,23 +35,27 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName, projec } // Set both deprecated field and new field for security identity passing - authRole := &admin.AuthRole{ - KubernetesServiceAccount: executionConfig.KubeServiceAcct, - AssumableIamRole: executionConfig.IamRoleARN, - } - - securityContext := &core.SecurityContext{ - RunAs: &core.Identity{ - K8SServiceAccount: executionConfig.KubeServiceAcct, - IamRole: executionConfig.IamRoleARN, - }, + var securityContext *core.SecurityContext + var authRole *admin.AuthRole + + if len(executionConfig.KubeServiceAcct) > 0 || len(executionConfig.IamRoleARN) > 0 { + authRole = &admin.AuthRole{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + AssumableIamRole: executionConfig.IamRoleARN, + } + securityContext = &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: executionConfig.KubeServiceAcct, + IamRole: executionConfig.IamRoleARN, + }, + } } return createExecutionRequest(lp.Id, inputs, securityContext, authRole), nil } func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, - cmdCtx cmdCore.CommandContext) (*admin.ExecutionCreateRequest, error) { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) (*admin.ExecutionCreateRequest, error) { // Fetch the task task, err := cmdCtx.AdminFetcherExt().FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain) if err != nil { @@ -69,16 +73,20 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project } // Set both deprecated field and new field for security identity passing - authRole := &admin.AuthRole{ - KubernetesServiceAccount: executionConfig.KubeServiceAcct, - AssumableIamRole: executionConfig.IamRoleARN, - } - - securityContext := &core.SecurityContext{ - RunAs: &core.Identity{ - K8SServiceAccount: executionConfig.KubeServiceAcct, - IamRole: executionConfig.IamRoleARN, - }, + var securityContext *core.SecurityContext + var authRole *admin.AuthRole + + if len(executionConfig.KubeServiceAcct) > 0 || len(executionConfig.IamRoleARN) > 0 { + authRole = &admin.AuthRole{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + AssumableIamRole: executionConfig.IamRoleARN, + } + securityContext = &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: executionConfig.KubeServiceAcct, + IamRole: executionConfig.IamRoleARN, + }, + } } id := &core.Identifier{ @@ -93,7 +101,7 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project } func relaunchExecution(ctx context.Context, executionName string, project string, domain string, - cmdCtx cmdCore.CommandContext) error { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) error { if executionConfig.DryRun { logger.Debugf(ctx, "skipping RelaunchExecution request (DryRun)") return nil @@ -113,7 +121,7 @@ func relaunchExecution(ctx context.Context, executionName string, project string } func recoverExecution(ctx context.Context, executionName string, project string, domain string, - cmdCtx cmdCore.CommandContext) error { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) error { if executionConfig.DryRun { logger.Debugf(ctx, "skipping RecoverExecution request (DryRun)") return nil diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index 643248daaa..0342d4b5c7 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -2,6 +2,7 @@ package create import ( "errors" + "fmt" "testing" "github.com/flyteorg/flytectl/cmd/config" @@ -9,6 +10,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) var ( @@ -40,13 +42,14 @@ func createExecutionUtilSetup() { Domain: config.GetConfig().Domain, }, } + executionConfig = &ExecutionConfig{} } func TestCreateExecutionForRelaunch(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(executionCreateResponse, nil) - err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) assert.Nil(t, err) } @@ -54,7 +57,8 @@ func TestCreateExecutionForRelaunchNotFound(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(nil, errors.New("unknown execution")) - err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } @@ -63,7 +67,7 @@ func TestCreateExecutionForRecovery(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(executionCreateResponse, nil) - err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) assert.Nil(t, err) } @@ -71,7 +75,120 @@ func TestCreateExecutionForRecoveryNotFound(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(nil, errors.New("unknown execution")) - err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } + +func TestCreateExecutionRequestForWorkflow(t *testing.T) { + t.Run("successful", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + launchPlan := &admin.LaunchPlan{} + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) + t.Run("failed literal conversion", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + launchPlan := &admin.LaunchPlan{ + Spec: &admin.LaunchPlanSpec{ + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{"nilparam": nil}, + }, + }, + } + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.NotNil(t, err) + assert.Nil(t, execCreateRequest) + assert.Equal(t, fmt.Errorf("parameter [nilparam] has nil Variable"), err) + }) + t.Run("failed fetch", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.NotNil(t, err) + assert.Nil(t, execCreateRequest) + assert.Equal(t, err, errors.New("failed")) + }) + t.Run("with security context", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + executionConfig.KubeServiceAcct = "default" + launchPlan := &admin.LaunchPlan{} + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, mock.Anything).Return(launchPlan, nil) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + executionConfig.KubeServiceAcct = "" + }) +} + +func TestCreateExecutionRequestForTask(t *testing.T) { + t.Run("successful", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + task := &admin.Task{ + Id: &core.Identifier{ + Name: "taskName", + }, + } + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) + t.Run("failed literal conversion", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + task := &admin.Task{ + Closure: &admin.TaskClosure{ + CompiledTask: &core.CompiledTask{ + Template: &core.TaskTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: map[string]*core.Variable{ + "nilvar": nil, + }, + }, + }, + }, + }, + }, + } + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.NotNil(t, err) + assert.Nil(t, execCreateRequest) + assert.Equal(t, fmt.Errorf("variable [nilvar] has nil type"), err) + }) + t.Run("failed fetch", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.NotNil(t, err) + assert.Nil(t, execCreateRequest) + assert.Equal(t, err, errors.New("failed")) + }) + t.Run("with security context", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + executionConfig.KubeServiceAcct = "default" + task := &admin.Task{ + Id: &core.Identifier{ + Name: "taskName", + }, + } + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + executionConfig.KubeServiceAcct = "" + }) +} diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index ff11d03db0..64476ad82f 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -32,18 +32,6 @@ func getExecutionSetup() { func TestListExecutionFunc(t *testing.T) { getExecutionSetup() s := setup() - ctx := s.Ctx - execListRequest := &admin.ResourceListRequest{ - Limit: 100, - SortBy: &admin.Sort{ - Key: "created_at", - Direction: admin.Sort_DESCENDING, - }, - Id: &admin.NamedEntityIdentifier{ - Project: projectValue, - Domain: domainValue, - }, - } executionResponse := &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -72,26 +60,14 @@ func TestListExecutionFunc(t *testing.T) { executionList := &admin.ExecutionList{ Executions: executions, } - s.MockAdminClient.OnListExecutionsMatch(mock.Anything, execListRequest).Return(executionList, nil) + s.FetcherExt.OnListExecutionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(executionList, nil) err := getExecutionFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) + s.FetcherExt.AssertCalled(t, "ListExecution", s.Ctx, projectValue, domainValue, execution.DefaultConfig.Filter) } func TestListExecutionFuncWithError(t *testing.T) { - ctx := context.Background() getExecutionSetup() - execListRequest := &admin.ResourceListRequest{ - Limit: 100, - SortBy: &admin.Sort{ - Key: "created_at", - }, - Id: &admin.NamedEntityIdentifier{ - Project: projectValue, - Domain: domainValue, - }, - } - _ = &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -118,23 +94,14 @@ func TestListExecutionFuncWithError(t *testing.T) { } s := setup() s.FetcherExt.OnListExecutionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("executions NotFound")) - s.MockAdminClient.OnListExecutionsMatch(mock.Anything, execListRequest).Return(nil, errors.New("executions NotFound")) err := getExecutionFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, err, errors.New("executions NotFound")) - s.MockAdminClient.AssertCalled(t, "ListExecutions", ctx, execListRequest) + s.FetcherExt.AssertCalled(t, "ListExecution", s.Ctx, projectValue, domainValue, execution.DefaultConfig.Filter) } func TestGetExecutionFunc(t *testing.T) { - ctx := context.Background() getExecutionSetup() - execGetRequest := &admin.WorkflowExecutionGetRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: projectValue, - Domain: domainValue, - Name: executionNameValue, - }, - } executionResponse := &admin.Execution{ Id: &core.WorkflowExecutionIdentifier{ Project: projectValue, @@ -161,14 +128,11 @@ func TestGetExecutionFunc(t *testing.T) { } args := []string{executionNameValue} s := setup() - //executionList := &admin.ExecutionList{ - // Executions: []*admin.Execution{executionResponse}, - //} - s.MockAdminClient.OnGetExecutionMatch(ctx, execGetRequest).Return(executionResponse, nil) + s.FetcherExt.OnFetchExecutionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything).Return(executionResponse, nil) err := getExecutionFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "GetExecution", ctx, execGetRequest) + s.FetcherExt.AssertCalled(t, "FetchExecution", s.Ctx, executionNameValue, projectValue, domainValue) } func TestGetExecutionFuncForDetails(t *testing.T) { diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 3831631f87..d04698d8b0 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -253,13 +253,10 @@ func TestGetLaunchPlanFuncWithError(t *testing.T) { func TestGetLaunchPlanFunc(t *testing.T) { s := setup() getLaunchPlanSetup() - s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(launchPlanListResponse, nil) - s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) - s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) - s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) + s.FetcherExt.OnFetchAllVerOfLPMatch(mock.Anything, mock.Anything, "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "ListLaunchPlans", s.Ctx, resourceGetRequest) + s.FetcherExt.AssertCalled(t, "FetchAllVerOfLP", s.Ctx, "launchplan1", "dummyProject", "dummyDomain", launchplan.DefaultConfig.Filter) tearDownAndVerify(t, s.Writer, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } @@ -268,11 +265,10 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { getLaunchPlanSetup() launchplan.DefaultConfig.Latest = true launchplan.DefaultConfig.Filter = filters.Filters{} - s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceGetRequest).Return(launchPlanListResponse, nil) - s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) + s.FetcherExt.OnFetchLPLatestVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan2, nil) err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "ListLaunchPlans", s.Ctx, resourceGetRequest) + s.FetcherExt.AssertCalled(t, "FetchLPLatestVersion", s.Ctx, "launchplan1", projectValue, domainValue, launchplan.DefaultConfig.Filter) tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } @@ -280,9 +276,6 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { s := testutils.SetupWithExt() getLaunchPlanSetup() launchplan.DefaultConfig.Version = "v2" - s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(launchPlanListResponse, nil) - s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan2, nil) - s.MockAdminClient.OnListLaunchPlanIdsMatch(s.Ctx, namedIDRequest).Return(namedIdentifierList, nil) s.FetcherExt.OnFetchLPVersion(s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain").Return(launchPlan2, nil) err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) @@ -294,7 +287,6 @@ func TestGetLaunchPlans(t *testing.T) { t.Run("no workflow filter", func(t *testing.T) { s := setup() getLaunchPlanSetup() - s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(launchPlanListResponse, nil) s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "", "dummyProject", "dummyDomain", filters.Filters{}).Return(launchPlanListResponse.LaunchPlans, nil) argsLp = []string{} err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index e9b4caae05..ca55bb348c 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -276,9 +276,7 @@ func TestRegisterFile(t *testing.T) { }, }, } - s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) - s.FetcherExt.OnFetchWorkflowVersion(s.Ctx, "core.scheduled_workflows.lp_schedules.date_formatter_wf", "v0.3.59", "dummyProject", "dummyDomain").Return(wf, nil) - s.FetcherExt.OnFetchWorkflowVersion(s.Ctx, "core.scheduled_workflows.lp_schedules.date_formatter_wf", "", "dummyProject", "dummyDomain").Return(wf, nil) + s.FetcherExt.OnFetchWorkflowVersionMatch(s.Ctx, "core.scheduled_workflows.lp_schedules.date_formatter_wf", mock.Anything, "dummyProject", "dummyDomain").Return(wf, nil) args := []string{"testdata/152_my_cron_scheduled_lp_3.pb"} var registerResults []Result results, err := registerFile(s.Ctx, args[0], registerResults, s.CmdCtx, "", *rconfig.DefaultFilesConfig) @@ -624,7 +622,7 @@ func TestValidateLaunchSpec(t *testing.T) { s := setup() registerFilesSetup() - s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + s.FetcherExt.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -649,7 +647,7 @@ func TestValidateLaunchSpec(t *testing.T) { s := setup() registerFilesSetup() - s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + s.FetcherExt.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -711,7 +709,7 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + s.FetcherExt.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(wf, nil) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", @@ -773,7 +771,7 @@ func TestValidateLaunchSpec(t *testing.T) { }, }, } - s.MockAdminClient.OnGetWorkflowMatch(mock.Anything, mock.Anything).Return(wf, nil) + s.FetcherExt.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(wf, nil) lpSpec := &admin.LaunchPlanSpec{ WorkflowId: &core.Identifier{ Project: "projectValue", diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 7c373bb2ed..f45c791f08 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -150,14 +150,12 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm } func updateLocalKubeContext() error { - localConfigAccess := clientcmd.NewDefaultPathOptions() - - dockerConfigAccess := &clientcmd.PathOptions{ + srcConfigAccess := &clientcmd.PathOptions{ GlobalFile: docker.Kubeconfig, LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), } - - return k8s.CopyKubeContext(dockerConfigAccess, localConfigAccess, sandboxDockerContext, sandboxContextName) + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.CopyContext(srcConfigAccess, sandboxDockerContext, sandboxContextName) } func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index ae938ab1e2..d6c789fd7b 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -24,6 +24,7 @@ import ( "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -554,9 +555,12 @@ func TestStartSandboxFunc(t *testing.T) { Follow: true, }).Return(reader, nil) mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + mockK8sContextMgr := &k8sMocks.ContextOps{} docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" + k8s.ContextMgr = mockK8sContextMgr + mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) err = startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index bbdfa303c6..16ca11bf20 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -13,7 +13,6 @@ import ( cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/k8s" - "k8s.io/client-go/tools/clientcmd" ) const ( @@ -58,6 +57,6 @@ func tearDownSandbox(ctx context.Context, cli docker.Docker) error { } func removeSandboxKubeContext() error { - localConfigAccess := clientcmd.NewDefaultPathOptions() - return k8s.RemoveKubeContext(localConfigAccess, sandboxContextName) + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.RemoveContext(sandboxContextName) } diff --git a/flytectl/cmd/sandbox/teardown_test.go b/flytectl/cmd/sandbox/teardown_test.go index d95b12221d..0664342979 100644 --- a/flytectl/cmd/sandbox/teardown_test.go +++ b/flytectl/cmd/sandbox/teardown_test.go @@ -5,14 +5,14 @@ import ( "fmt" "testing" + "github.com/docker/docker/api/types" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flytectl/pkg/configutil" - "github.com/flyteorg/flytectl/pkg/util" - - "github.com/docker/docker/api/types" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -33,7 +33,9 @@ func TestTearDownFunc(t *testing.T) { mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) - + mockK8sContextMgr := &k8sMocks.ContextOps{} + k8s.ContextMgr = mockK8sContextMgr + mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) err := tearDownSandbox(ctx, mockDocker) assert.Nil(t, err) }) diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 86577b1323..b94b7d3671 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -10,8 +10,6 @@ import ( "strings" "testing" - "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/clients/go/admin" @@ -61,11 +59,8 @@ func Setup() (s TestStruct) { s.UpdaterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) s.DeleterExt.OnAdminServiceClient().Return(s.MockClient.AdminClient()) s.MockAdminClient = s.MockClient.AdminClient().(*mocks.AdminServiceClient) - fetcher := &ext.AdminFetcherExtClient{ - AdminClient: s.MockAdminClient, - } s.MockOutStream = s.Writer - s.CmdCtx = cmdCore.NewCommandContextWithExt(s.MockClient, fetcher, s.UpdaterExt, s.DeleterExt, s.MockOutStream) + s.CmdCtx = cmdCore.NewCommandContextWithExt(s.MockClient, s.FetcherExt, s.UpdaterExt, s.DeleterExt, s.MockOutStream) config.GetConfig().Project = projectValue config.GetConfig().Domain = domainValue config.GetConfig().Output = output diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index 74086d76a2..6f9ca3e07d 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -15,7 +15,29 @@ type K8s interface { CoreV1() corev1.CoreV1Interface } +//go:generate mockery -name=ContextOps -case=underscore +type ContextOps interface { + CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error + RemoveContext(ctxName string) error +} + +// ContextManager context manager implementing ContextOps +type ContextManager struct { + configAccess clientcmd.ConfigAccess +} + +func NewK8sContextManager() ContextOps { + if ContextMgr != nil { + return ContextMgr + } + ContextMgr = &ContextManager{ + configAccess: clientcmd.NewDefaultPathOptions(), + } + return ContextMgr +} + var Client K8s +var ContextMgr ContextOps // GetK8sClient return the k8s client from sandbox kubeconfig func GetK8sClient(cfg, master string) (K8s, error) { @@ -34,70 +56,69 @@ func GetK8sClient(cfg, master string) (K8s, error) { return Client, nil } -// CopyKubeContext copies context fromContext part of fromConfigAccess to toContext part of toConfigAccess. -func CopyKubeContext(fromConfigAccess, toConfigAccess clientcmd.ConfigAccess, fromContext, toContext string) error { - _, err := toConfigAccess.GetStartingConfig() +// CopyKubeContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess. +func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error { + _, err := k.configAccess.GetStartingConfig() if err != nil { return err } - fromStartingConfig, err := fromConfigAccess.GetStartingConfig() + fromStartingConfig, err := srcConfigAccess.GetStartingConfig() if err != nil { return err } - _, exists := fromStartingConfig.Contexts[fromContext] + _, exists := fromStartingConfig.Contexts[srcCtxName] if !exists { - return fmt.Errorf("context %v doesn't exist", fromContext) + return fmt.Errorf("context %v doesn't exist", srcCtxName) } - toStartingConfig, err := toConfigAccess.GetStartingConfig() + toStartingConfig, err := k.configAccess.GetStartingConfig() if err != nil { return err } - _, exists = toStartingConfig.Contexts[toContext] + _, exists = toStartingConfig.Contexts[targetCtxName] if exists { - fmt.Printf("context %v already exist. Overwriting it\n", toContext) + fmt.Printf("context %v already exist. Overwriting it\n", targetCtxName) } else { - toStartingConfig.Contexts[toContext] = clientcmdapi.NewContext() + toStartingConfig.Contexts[targetCtxName] = clientcmdapi.NewContext() } - toStartingConfig.Clusters[toContext] = fromStartingConfig.Clusters[fromContext] - toStartingConfig.Clusters[toContext].LocationOfOrigin = toConfigAccess.GetDefaultFilename() - toStartingConfig.AuthInfos[toContext] = fromStartingConfig.AuthInfos[fromContext] - toStartingConfig.AuthInfos[toContext].LocationOfOrigin = toConfigAccess.GetDefaultFilename() - toStartingConfig.Contexts[toContext].Cluster = toContext - toStartingConfig.Contexts[toContext].AuthInfo = toContext - toStartingConfig.CurrentContext = toContext - - if err := clientcmd.ModifyConfig(toConfigAccess, *toStartingConfig, true); err != nil { + toStartingConfig.Clusters[targetCtxName] = fromStartingConfig.Clusters[srcCtxName] + toStartingConfig.Clusters[targetCtxName].LocationOfOrigin = k.configAccess.GetDefaultFilename() + toStartingConfig.AuthInfos[targetCtxName] = fromStartingConfig.AuthInfos[srcCtxName] + toStartingConfig.AuthInfos[targetCtxName].LocationOfOrigin = k.configAccess.GetDefaultFilename() + toStartingConfig.Contexts[targetCtxName].Cluster = targetCtxName + toStartingConfig.Contexts[targetCtxName].AuthInfo = targetCtxName + toStartingConfig.CurrentContext = targetCtxName + if err := clientcmd.ModifyConfig(k.configAccess, *toStartingConfig, true); err != nil { return err } - fmt.Printf("context modified for %q and switched over to it.\n", toContext) + fmt.Printf("context modified for %q and switched over to it.\n", targetCtxName) return nil } // RemoveKubeContext removes the contextToRemove from the kubeContext pointed to be fromConfigAccess -func RemoveKubeContext(fromConfigAccess clientcmd.ConfigAccess, contextToRemove string) error { - fromStartingConfig, err := fromConfigAccess.GetStartingConfig() +func (k *ContextManager) RemoveContext(ctxName string) error { + fromStartingConfig, err := k.configAccess.GetStartingConfig() if err != nil { return err } - _, exists := fromStartingConfig.Contexts[contextToRemove] + _, exists := fromStartingConfig.Contexts[ctxName] if !exists { - return fmt.Errorf("context %v doesn't exist", contextToRemove) + return fmt.Errorf("context %v doesn't exist", ctxName) } - delete(fromStartingConfig.Clusters, contextToRemove) - delete(fromStartingConfig.AuthInfos, contextToRemove) - delete(fromStartingConfig.Contexts, contextToRemove) + delete(fromStartingConfig.Clusters, ctxName) + delete(fromStartingConfig.AuthInfos, ctxName) + delete(fromStartingConfig.Contexts, ctxName) fromStartingConfig.CurrentContext = "" - if err := clientcmd.ModifyConfig(fromConfigAccess, *fromStartingConfig, true); err != nil { + if err := clientcmd.ModifyConfig(k.configAccess, *fromStartingConfig, true); err != nil { return err } - fmt.Printf("context removed for %q.\n", contextToRemove) + fmt.Printf("context removed for %q.\n", ctxName) return nil } diff --git a/flytectl/pkg/k8s/mocks/context_ops.go b/flytectl/pkg/k8s/mocks/context_ops.go new file mode 100644 index 0000000000..11b7003d0f --- /dev/null +++ b/flytectl/pkg/k8s/mocks/context_ops.go @@ -0,0 +1,78 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + clientcmd "k8s.io/client-go/tools/clientcmd" + + mock "github.com/stretchr/testify/mock" +) + +// ContextOps is an autogenerated mock type for the ContextOps type +type ContextOps struct { + mock.Mock +} + +type ContextOps_CopyContext struct { + *mock.Call +} + +func (_m ContextOps_CopyContext) Return(_a0 error) *ContextOps_CopyContext { + return &ContextOps_CopyContext{Call: _m.Call.Return(_a0)} +} + +func (_m *ContextOps) OnCopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) *ContextOps_CopyContext { + c := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) + return &ContextOps_CopyContext{Call: c} +} + +func (_m *ContextOps) OnCopyContextMatch(matchers ...interface{}) *ContextOps_CopyContext { + c := _m.On("CopyContext", matchers...) + return &ContextOps_CopyContext{Call: c} +} + +// CopyContext provides a mock function with given fields: srcConfigAccess, srcCtxName, targetCtxName +func (_m *ContextOps) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) error { + ret := _m.Called(srcConfigAccess, srcCtxName, targetCtxName) + + var r0 error + if rf, ok := ret.Get(0).(func(clientcmd.ConfigAccess, string, string) error); ok { + r0 = rf(srcConfigAccess, srcCtxName, targetCtxName) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type ContextOps_RemoveContext struct { + *mock.Call +} + +func (_m ContextOps_RemoveContext) Return(_a0 error) *ContextOps_RemoveContext { + return &ContextOps_RemoveContext{Call: _m.Call.Return(_a0)} +} + +func (_m *ContextOps) OnRemoveContext(ctxName string) *ContextOps_RemoveContext { + c := _m.On("RemoveContext", ctxName) + return &ContextOps_RemoveContext{Call: c} +} + +func (_m *ContextOps) OnRemoveContextMatch(matchers ...interface{}) *ContextOps_RemoveContext { + c := _m.On("RemoveContext", matchers...) + return &ContextOps_RemoveContext{Call: c} +} + +// RemoveContext provides a mock function with given fields: ctxName +func (_m *ContextOps) RemoveContext(ctxName string) error { + ret := _m.Called(ctxName) + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(ctxName) + } else { + r0 = ret.Error(0) + } + + return r0 +} From 58f2ab7ef98cf79c5bad7f9c83334eabbe9c8628 Mon Sep 17 00:00:00 2001 From: Alekhya Sai Date: Thu, 7 Apr 2022 16:02:10 +0530 Subject: [PATCH 239/356] Minor updates to Readme (#304) Signed-off-by: Alekhya Sai Punnamaraju --- flytectl/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index d7c8081889..b7676ec842 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -26,8 +26,7 @@ ![Commit since last release](https://img.shields.io/github/commits-since/lyft/flytectl/latest.svg?style=plastic) [![Slack](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.flyte.org) -FlyteCTL was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang -and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. +Flytectl was designed as a portable and lightweight command-line interface to work with Flyte. It is written in Golang and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control plane for Flyte. ## 🚀 Quick Start @@ -68,5 +67,5 @@ You can find the detailed contribution guide [here](docs/source/contribute.rst).

-Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#issues) section in the contribution +Refer to the [issues](https://docs.flyte.org/en/latest/community/contribute.html#file-an-issue) section in the contribution guide if you'd like to file an issue. From a4702fbcd9058b498b7b88c5cf3a4c12d533858d Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 8 Apr 2022 23:05:57 +0530 Subject: [PATCH 240/356] Filtering on activation state of workflows (#305) * Added named entity fetch on workflow which also support state filter Signed-off-by: Prafulla Mahindrakar * Fixed docs Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/get/workflow.go | 27 ++++++++---- flytectl/cmd/get/workflow_test.go | 37 +++++++++------- flytectl/pkg/ext/fetcher.go | 3 ++ .../ext/mocks/admin_fetcher_ext_interface.go | 41 ++++++++++++++++++ flytectl/pkg/ext/workflow_fetcher.go | 16 +++++++ flytectl/pkg/ext/workflow_fetcher_test.go | 42 +++++++++++++++++-- flytectl/pkg/filters/util.go | 20 +++++++++ 7 files changed, 162 insertions(+), 24 deletions(-) diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index f2b3650250..c428c2d6a7 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -23,7 +23,7 @@ Retrieve all the workflows within project and domain (workflow/workflows can be flytectl get workflow -p flytesnacks -d development -Retrieve workflow by name within project and domain: +Retrieve all versions of a workflow by name within project and domain: :: @@ -103,6 +103,14 @@ var listWorkflowColumns = []printer.Column{ {Header: "Created At", JSONPath: "$.closure.createdAt"}, } +var namedEntityColumns = []printer.Column{ + {Header: "Project", JSONPath: "$.id.project"}, + {Header: "Domain", JSONPath: "$.id.domain"}, + {Header: "Name", JSONPath: "$.id.name"}, + {Header: "Description", JSONPath: "$.metadata.description"}, + {Header: "State", JSONPath: "$.metadata.state"}, +} + func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { @@ -111,6 +119,14 @@ func WorkflowToProtoMessages(l []*admin.Workflow) []proto.Message { return messages } +func NamedEntityToProtoMessages(l []*admin.NamedEntity) []proto.Message { + messages := make([]proto.Message, 0, len(l)) + for _, m := range l { + messages = append(messages, m) + } + return messages +} + func WorkflowToTableProtoMessages(l []*admin.Workflow) []proto.Message { messages := make([]proto.Message, 0, len(l)) for _, m := range l { @@ -155,16 +171,13 @@ func getWorkflowFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandC return adminPrinter.Print(config.GetConfig().MustOutputFormat(), columns, WorkflowToProtoMessages(workflows)...) } - workflows, err = cmdCtx.AdminFetcherExt().FetchAllVerOfWorkflow(ctx, "", config.GetConfig().Project, config.GetConfig().Domain, workflowconfig.DefaultConfig.Filter) + nameEntities, err := cmdCtx.AdminFetcherExt().FetchAllWorkflows(ctx, config.GetConfig().Project, config.GetConfig().Domain, workflowconfig.DefaultConfig.Filter) if err != nil { return err } - logger.Debugf(ctx, "Retrieved %v workflows", len(workflows)) - if config.GetConfig().MustOutputFormat() == printer.OutputFormatTABLE { - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), listWorkflowColumns, WorkflowToTableProtoMessages(workflows)...) - } - return adminPrinter.Print(config.GetConfig().MustOutputFormat(), listWorkflowColumns, WorkflowToProtoMessages(workflows)...) + logger.Debugf(ctx, "Retrieved %v workflows", len(nameEntities)) + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), namedEntityColumns, NamedEntityToProtoMessages(nameEntities)...) } // FetchWorkflowForName fetches the workflow give it name. diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index d0b50007ca..c622d8e3fc 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -22,20 +22,12 @@ import ( ) var ( - resourceListRequestWorkflow *admin.ResourceListRequest - workflowListResponse *admin.WorkflowList - argsWf []string - workflow1 *admin.Workflow - workflows []*admin.Workflow + argsWf []string + workflow1 *admin.Workflow + workflows []*admin.Workflow ) func getWorkflowSetup() { - resourceListRequestWorkflow = &admin.ResourceListRequest{ - Id: &admin.NamedEntityIdentifier{ - Project: projectValue, - Domain: domainValue, - }, - } variableMap := map[string]*core.Variable{ "var1": { @@ -97,9 +89,6 @@ func getWorkflowSetup() { }, } workflows = []*admin.Workflow{workflow1, workflow2} - workflowListResponse = &admin.WorkflowList{ - Workflows: workflows, - } argsWf = []string{"workflow1"} workflow.DefaultConfig.Latest = false workflow.DefaultConfig.Version = "" @@ -149,6 +138,26 @@ func TestGetWorkflowFuncWithError(t *testing.T) { assert.NotNil(t, err) }) + t.Run("fetching all workflow success", func(t *testing.T) { + s := setup() + getWorkflowSetup() + var args []string + s.FetcherExt.OnFetchAllWorkflowsMatch(mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return([]*admin.NamedEntity{}, nil) + err := getWorkflowFunc(s.Ctx, args, s.CmdCtx) + assert.Nil(t, err) + }) + + t.Run("fetching all workflow error", func(t *testing.T) { + s := setup() + getWorkflowSetup() + var args []string + s.FetcherExt.OnFetchAllWorkflowsMatch(mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil, fmt.Errorf("error fetching all workflows")) + err := getWorkflowFunc(s.Ctx, args, s.CmdCtx) + assert.NotNil(t, err) + }) + } func TestGetWorkflowFuncLatestWithTable(t *testing.T) { diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 2b8b96f793..2c40e388f6 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -49,6 +49,9 @@ type AdminFetcherExtInterface interface { // FetchTaskVersion fetches particular version of task in a project, domain FetchTaskVersion(ctx context.Context, name, version, project, domain string) (*admin.Task, error) + // FetchAllWorkflows fetches all workflows in project domain + FetchAllWorkflows(ctx context.Context, project, domain string, filter filters.Filters) ([]*admin.NamedEntity, error) + // FetchAllVerOfWorkflow fetches all versions of task in a project, domain FetchAllVerOfWorkflow(ctx context.Context, name, project, domain string, filter filters.Filters) ([]*admin.Workflow, error) diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 623199b9f9..18906ce863 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -176,6 +176,47 @@ func (_m *AdminFetcherExtInterface) FetchAllVerOfWorkflow(ctx context.Context, n return r0, r1 } +type AdminFetcherExtInterface_FetchAllWorkflows struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchAllWorkflows) Return(_a0 []*admin.NamedEntity, _a1 error) *AdminFetcherExtInterface_FetchAllWorkflows { + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllWorkflows(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllWorkflows { + c := _m.On("FetchAllWorkflows", ctx, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} +} + +func (_m *AdminFetcherExtInterface) OnFetchAllWorkflowsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllWorkflows { + c := _m.On("FetchAllWorkflows", matchers...) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} +} + +// FetchAllWorkflows provides a mock function with given fields: ctx, project, domain, filter +func (_m *AdminFetcherExtInterface) FetchAllWorkflows(ctx context.Context, project string, domain string, filter filters.Filters) ([]*admin.NamedEntity, error) { + ret := _m.Called(ctx, project, domain, filter) + + var r0 []*admin.NamedEntity + if rf, ok := ret.Get(0).(func(context.Context, string, string, filters.Filters) []*admin.NamedEntity); ok { + r0 = rf(ctx, project, domain, filter) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*admin.NamedEntity) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string, filters.Filters) error); ok { + r1 = rf(ctx, project, domain, filter) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchExecution struct { *mock.Call } diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 734298a5d4..98438e06f8 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -26,6 +26,22 @@ func (a *AdminFetcherExtClient) FetchAllVerOfWorkflow(ctx context.Context, workf return wList.Workflows, nil } +// FetchAllWorkflows fetches all workflows in project domain +func (a *AdminFetcherExtClient) FetchAllWorkflows(ctx context.Context, project, domain string, filter filters.Filters) ([]*admin.NamedEntity, error) { + tranformFilters, err := filters.BuildNamedEntityListRequest(filter, project, domain, core.ResourceType_WORKFLOW) + if err != nil { + return nil, err + } + wList, err := a.AdminServiceClient().ListNamedEntities(ctx, tranformFilters) + if err != nil { + return nil, err + } + if len(wList.Entities) == 0 { + return nil, fmt.Errorf("no workflow retrieved for %v project %v domain", project, domain) + } + return wList.Entities, nil +} + // FetchWorkflowLatestVersion fetches latest version for given workflow name func (a *AdminFetcherExtClient) FetchWorkflowLatestVersion(ctx context.Context, name, project, domain string, filter filters.Filters) (*admin.Workflow, error) { // Fetch the latest version of the workflow. diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index 9ae96612a6..da027566e2 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -17,9 +17,10 @@ import ( ) var ( - workflowListResponse *admin.WorkflowList - workflowFilter = filters.Filters{} - workflowResponse *admin.Workflow + workflowListResponse *admin.WorkflowList + namedEntityListResponse *admin.NamedEntityList + workflowFilter = filters.Filters{} + workflowResponse *admin.Workflow ) func getWorkflowFetcherSetup() { @@ -79,14 +80,49 @@ func getWorkflowFetcherSetup() { }, } + namedEntity := &admin.NamedEntity{ + Id: &admin.NamedEntityIdentifier{ + Project: "project", + Domain: "domain", + Name: "workflow", + }, + ResourceType: core.ResourceType_WORKFLOW, + } + workflows := []*admin.Workflow{workflow2, workflow1} + namedEntityListResponse = &admin.NamedEntityList{ + Entities: []*admin.NamedEntity{namedEntity}, + } workflowListResponse = &admin.WorkflowList{ Workflows: workflows, } workflowResponse = workflows[0] } +func TestFetchAllWorkflows(t *testing.T) { + t.Run("non empty response", func(t *testing.T) { + getWorkflowFetcherSetup() + adminClient.OnListNamedEntitiesMatch(mock.Anything, mock.Anything).Return(namedEntityListResponse, nil) + _, err := adminFetcherExt.FetchAllWorkflows(ctx, "project", "domain", workflowFilter) + assert.Nil(t, err) + }) + t.Run("empty response", func(t *testing.T) { + getWorkflowFetcherSetup() + namedEntityListResponse := &admin.NamedEntityList{} + adminClient.OnListNamedEntitiesMatch(mock.Anything, mock.Anything).Return(namedEntityListResponse, nil) + _, err := adminFetcherExt.FetchAllWorkflows(ctx, "project", "domain", workflowFilter) + assert.Equal(t, fmt.Errorf("no workflow retrieved for project project domain domain"), err) + }) +} + +func TestFetchAllWorkflowsError(t *testing.T) { + getWorkflowFetcherSetup() + adminClient.OnListNamedEntitiesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchAllWorkflows(ctx, "project", "domain", workflowFilter) + assert.Equal(t, fmt.Errorf("failed"), err) +} + func TestFetchAllVerOfWorkflow(t *testing.T) { getWorkflowFetcherSetup() adminClient.OnListWorkflowsMatch(mock.Anything, mock.Anything).Return(workflowListResponse, nil) diff --git a/flytectl/pkg/filters/util.go b/flytectl/pkg/filters/util.go index 6d2501e4d5..b8584a7a57 100644 --- a/flytectl/pkg/filters/util.go +++ b/flytectl/pkg/filters/util.go @@ -4,6 +4,7 @@ import ( "strconv" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) func BuildResourceListRequestWithName(c Filters, project, domain, name string) (*admin.ResourceListRequest, error) { @@ -29,6 +30,25 @@ func BuildResourceListRequestWithName(c Filters, project, domain, name string) ( return request, nil } +func BuildNamedEntityListRequest(c Filters, project, domain string, resourceType core.ResourceType) (*admin.NamedEntityListRequest, error) { + fieldSelector, err := Transform(SplitTerms(c.FieldSelector)) + if err != nil { + return nil, err + } + request := &admin.NamedEntityListRequest{ + Limit: uint32(c.Limit), + Token: getToken(c), + Filters: fieldSelector, + Project: project, + Domain: domain, + ResourceType: resourceType, + } + if sort := buildSortingRequest(c); sort != nil { + request.SortBy = sort + } + return request, nil +} + func BuildProjectListRequest(c Filters) (*admin.ProjectListRequest, error) { fieldSelector, err := Transform(SplitTerms(c.FieldSelector)) if err != nil { From dd4655d7abbf729772ff1d5f2d7190f3c945b9c9 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Fri, 8 Apr 2022 17:16:19 -0700 Subject: [PATCH 241/356] Add ContentMD5 to fast register upload request (#303) * Pass file hash Signed-off-by: Haytham Abuelfutuh * Send MD5 as []byte Signed-off-by: Haytham Abuelfutuh * Update deps Signed-off-by: Haytham Abuelfutuh * Fix compile error and unit tests Signed-off-by: Haytham Abuelfutuh --- flytectl/cmd/register/register_util.go | 22 ++++++++++++++------- flytectl/cmd/register/register_util_test.go | 14 +++++++------ flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 1982417f16..3d68cca648 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -4,6 +4,8 @@ import ( "archive/tar" "compress/gzip" "context" + "crypto/md5" //#nosec + "encoding/base64" "errors" "fmt" "io" @@ -705,7 +707,10 @@ func uploadFastRegisterArtifact(ctx context.Context, project, domain, sourceCode return "", err } - size, err := getTotalSize(dataRefReaderCloser) + /* #nosec */ + hash := md5.New() + /* #nosec */ + size, err := io.Copy(hash, dataRefReaderCloser) if err != nil { return "", err } @@ -720,12 +725,14 @@ func uploadFastRegisterArtifact(ctx context.Context, project, domain, sourceCode return "", err } + h := hash.Sum(nil) remotePath := storage.DataReference(deprecatedSourceUploadPath) _, fileName := filepath.Split(sourceCodeFilePath) resp, err := dataProxyClient.CreateUploadLocation(ctx, &service.CreateUploadLocationRequest{ - Project: project, - Domain: domain, - Suffix: strings.Join([]string{version, fileName}, "/"), + Project: project, + Domain: domain, + Filename: fileName, + ContentMd5: h, }) if err != nil { @@ -737,7 +744,7 @@ func uploadFastRegisterArtifact(ctx context.Context, project, domain, sourceCode } if resp != nil && len(resp.SignedUrl) > 0 { - return storage.DataReference(resp.NativeUrl), DirectUpload(resp.SignedUrl, size, dataRefReaderCloser) + return storage.DataReference(resp.NativeUrl), DirectUpload(resp.SignedUrl, h, size, dataRefReaderCloser) } dataStore, err := getStorageClient(ctx) @@ -764,7 +771,7 @@ func uploadFastRegisterArtifact(ctx context.Context, project, domain, sourceCode return remotePath, nil } -func DirectUpload(url string, size int64, data io.Reader) error { +func DirectUpload(url string, contentMD5 []byte, size int64, data io.Reader) error { req, err := http.NewRequest(http.MethodPut, url, data) if err != nil { return err @@ -772,6 +779,7 @@ func DirectUpload(url string, size int64, data io.Reader) error { req.ContentLength = size req.Header.Set("Content-Length", strconv.FormatInt(size, 10)) + req.Header.Set("Content-MD5", base64.StdEncoding.EncodeToString(contentMD5)) client := &http.Client{} res, err := client.Do(req) @@ -785,7 +793,7 @@ func DirectUpload(url string, size int64, data io.Reader) error { return fmt.Errorf("received response code [%v]. Failed to read response body. Error: %w", res.StatusCode, err) } - return fmt.Errorf("bad status: %s : %s", res.Status, string(raw)) + return fmt.Errorf("failed uploading to [%v]. bad status: %s: %s", url, res.Status, string(raw)) } return nil diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index ca55bb348c..8b614ed0f6 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -384,9 +384,10 @@ func TestUploadFastRegisterArtifact(t *testing.T) { assert.Nil(t, err) Client = store s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(s.Ctx, &service.CreateUploadLocationRequest{ - Project: "flytesnacks", - Domain: "development", - Suffix: "/flytesnacks-core.tgz", + Project: "flytesnacks", + Domain: "development", + Filename: "flytesnacks-core.tgz", + ContentMd5: []uint8{0x19, 0x72, 0x39, 0xcd, 0x85, 0x2d, 0xf1, 0x79, 0x8f, 0x6b, 0x3, 0xb3, 0xa9, 0x6c, 0xec, 0xa0}, }).Return(&service.CreateUploadLocationResponse{}, nil) _, err = uploadFastRegisterArtifact(s.Ctx, "flytesnacks", "development", "testdata/flytesnacks-core.tgz", "", s.MockClient.DataProxyClient(), rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) assert.Nil(t, err) @@ -401,9 +402,10 @@ func TestUploadFastRegisterArtifact(t *testing.T) { assert.Nil(t, err) Client = store s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(s.Ctx, &service.CreateUploadLocationRequest{ - Project: "flytesnacks", - Domain: "development", - Suffix: "/flytesnacks-core.tgz", + Project: "flytesnacks", + Domain: "development", + Filename: "flytesnacks-core.tgz", + ContentMd5: []uint8{0x19, 0x72, 0x39, 0xcd, 0x85, 0x2d, 0xf1, 0x79, 0x8f, 0x6b, 0x3, 0xb3, 0xa9, 0x6c, 0xec, 0xa0}, }).Return(&service.CreateUploadLocationResponse{}, nil) _, err = uploadFastRegisterArtifact(context.Background(), "flytesnacks", "development", "testdata/flytesnacks-core.tgz", "", s.MockClient.DataProxyClient(), rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath) assert.Nil(t, err) diff --git a/flytectl/go.mod b/flytectl/go.mod index dcadd78d31..2d68091af6 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.24.10 + github.com/flyteorg/flyteidl v0.24.15 github.com/flyteorg/flytestdlib v0.4.16 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 357cec6285..23095dc02a 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -364,8 +364,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.24.10 h1:fCYpfp5fxKbhRMSkP0Hdw5lOPBTItLU1A3WA1Lc7sEU= -github.com/flyteorg/flyteidl v0.24.10/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= +github.com/flyteorg/flyteidl v0.24.15 h1:Iqbwx3w1a4Dh6byRZrZMlHsKPKoOZbBiS9vR0iXzacY= +github.com/flyteorg/flyteidl v0.24.15/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= From e22bce68fadbbfc9c415c33e2543b724c3555efb Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Mon, 11 Apr 2022 14:15:17 -0700 Subject: [PATCH 242/356] Update documentation (#301) Signed-off-by: Flyte-Bot Co-authored-by: EngHabu --- flytectl/docs/source/gen/flytectl.rst | 13 ++++ .../docs/source/gen/flytectl_completion.rst | 13 ++++ flytectl/docs/source/gen/flytectl_config.rst | 13 ++++ .../source/gen/flytectl_config_discover.rst | 13 ++++ .../docs/source/gen/flytectl_config_docs.rst | 13 ++++ .../docs/source/gen/flytectl_config_init.rst | 13 ++++ .../source/gen/flytectl_config_validate.rst | 13 ++++ flytectl/docs/source/gen/flytectl_create.rst | 13 ++++ .../source/gen/flytectl_create_execution.rst | 68 ++++--------------- .../source/gen/flytectl_create_project.rst | 13 ++++ flytectl/docs/source/gen/flytectl_delete.rst | 13 ++++ ...ectl_delete_cluster-resource-attribute.rst | 13 ++++ ...lytectl_delete_execution-cluster-label.rst | 13 ++++ ...tectl_delete_execution-queue-attribute.rst | 13 ++++ .../source/gen/flytectl_delete_execution.rst | 13 ++++ .../gen/flytectl_delete_plugin-override.rst | 13 ++++ ...lytectl_delete_task-resource-attribute.rst | 13 ++++ ...tectl_delete_workflow-execution-config.rst | 13 ++++ flytectl/docs/source/gen/flytectl_get.rst | 13 ++++ ...lytectl_get_cluster-resource-attribute.rst | 13 ++++ .../flytectl_get_execution-cluster-label.rst | 13 ++++ ...flytectl_get_execution-queue-attribute.rst | 13 ++++ .../source/gen/flytectl_get_execution.rst | 13 ++++ .../source/gen/flytectl_get_launchplan.rst | 13 ++++ .../gen/flytectl_get_plugin-override.rst | 13 ++++ .../docs/source/gen/flytectl_get_project.rst | 13 ++++ .../flytectl_get_task-resource-attribute.rst | 13 ++++ .../docs/source/gen/flytectl_get_task.rst | 13 ++++ ...flytectl_get_workflow-execution-config.rst | 14 ++++ .../docs/source/gen/flytectl_get_workflow.rst | 15 +++- .../docs/source/gen/flytectl_register.rst | 13 ++++ .../source/gen/flytectl_register_examples.rst | 35 +++++++--- .../source/gen/flytectl_register_files.rst | 35 +++++++--- flytectl/docs/source/gen/flytectl_sandbox.rst | 13 ++++ .../docs/source/gen/flytectl_sandbox_exec.rst | 13 ++++ .../source/gen/flytectl_sandbox_start.rst | 29 ++++++-- .../source/gen/flytectl_sandbox_status.rst | 13 ++++ .../source/gen/flytectl_sandbox_teardown.rst | 13 ++++ flytectl/docs/source/gen/flytectl_update.rst | 13 ++++ ...ectl_update_cluster-resource-attribute.rst | 13 ++++ ...lytectl_update_execution-cluster-label.rst | 13 ++++ ...tectl_update_execution-queue-attribute.rst | 13 ++++ .../source/gen/flytectl_update_execution.rst | 13 ++++ .../gen/flytectl_update_launchplan-meta.rst | 13 ++++ .../source/gen/flytectl_update_launchplan.rst | 13 ++++ .../gen/flytectl_update_plugin-override.rst | 13 ++++ .../source/gen/flytectl_update_project.rst | 13 ++++ .../source/gen/flytectl_update_task-meta.rst | 13 ++++ ...lytectl_update_task-resource-attribute.rst | 13 ++++ ...tectl_update_workflow-execution-config.rst | 13 ++++ .../gen/flytectl_update_workflow-meta.rst | 13 ++++ flytectl/docs/source/gen/flytectl_upgrade.rst | 13 ++++ flytectl/docs/source/gen/flytectl_version.rst | 13 ++++ 53 files changed, 724 insertions(+), 83 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 03357644e9..fd883f5a55 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -16,6 +16,7 @@ Options :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -31,10 +32,22 @@ Options --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index e9a33b0ae6..cec584ee98 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -85,6 +85,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -100,10 +101,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 86138b2491..43e3c3f1e7 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -25,6 +25,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -40,10 +41,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index a2c248fdac..63144832b5 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -27,6 +27,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -42,12 +43,24 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index ec4ee408d7..79a9313af6 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -27,6 +27,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -42,12 +43,24 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 26c1eae2ac..d26dd15c91 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -59,6 +59,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -74,12 +75,24 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index bcb53f6e61..28c7fe2002 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -29,6 +29,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -44,12 +45,24 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 3839af1a4a..3caac8361c 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -28,6 +28,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -43,10 +44,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 55ab913ddb..a46f88cc0e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -10,15 +10,10 @@ Synopsis -Create execution resources for a given workflow or task in a project and domain. - +Create execution resources for a given workflow or task in a project and domain. There are three steps to generate an execution, as outlined below: - -Create execution for a task -=========================== - 1. Generate the execution spec file using the :ref:`get task ` command. :: @@ -68,53 +63,6 @@ It is worth noting that the source's and target's project and domain can be diff flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -Create execution for a workflow -=============================== - -1. Generate an execution spec file. -:: - - flytectl get launchplan --project flytesnacks --domain development flyte.workflows.example.my_wf --latest --execFile exec_spec.yaml - -The generated file would look similar to the following: - -.. code-block:: yaml - - iamRoleARN: "" - inputs: {} - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - version: v1 - workflow: flyte.workflows.example.my_wf - -2. [Optional] Update the inputs for the execution, if needed. The generated spec file can be modified to change the input values, as shown below: - -.. code-block:: yaml - - iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' - inputs: - sorted_list1: - - 2 - - 4 - - 6 - sorted_list2: - - 1 - - 3 - - 5 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - version: "v1" - workflow: flyte.workflows.example.my_wf - -3. Run the execution using the exec spec file. The file can then be passed through the command line. It is worth noting that the source’s and target’s project and domain can be different. -:: - - flytectl create execution --project flytesnacks --domain development --execFile exec_spec.yaml - -The following commands are common to both task and worflow: - To relaunch an execution, pass the current execution ID as follows: :: @@ -175,6 +123,7 @@ Modified file with struct data populated for 'x' and 'y' parameters for the task Usage + :: flytectl create execution [flags] @@ -202,6 +151,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -217,10 +167,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 6cf6174288..0164bdb98c 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -64,6 +64,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -79,10 +80,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index c5a5d389fc..e4541836e6 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -28,6 +28,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -43,10 +44,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 0fdfa84c68..ffe631f9fa 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -63,6 +63,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -78,10 +79,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index e83edad12e..2ada648bd1 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -60,6 +60,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -75,10 +76,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 710e8e7f10..890563a367 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -64,6 +64,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -79,10 +80,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 711b2a3ffd..0275e5661a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -71,6 +71,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -86,10 +87,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index f3b01a02c9..a581ac9339 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -65,6 +65,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -80,10 +81,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index ac26e320de..25e05a9ee1 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -65,6 +65,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -80,10 +81,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 0f36d5dd7a..8094452bd6 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -60,6 +60,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -75,10 +76,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 0be6546db4..59ca8cb792 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -28,6 +28,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -43,10 +44,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 6ea320d7cf..9b390ba8a5 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -71,6 +71,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -86,10 +87,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index c8eed6cbb6..aaedb7f86d 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -70,6 +70,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -85,10 +86,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 719ac51458..ab34f09fd6 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -73,6 +73,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -88,10 +89,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index ba5c4a0801..cf7579c496 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -103,6 +103,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -118,10 +119,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 2d47156ba8..c1de87a09f 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -127,6 +127,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -142,10 +143,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index aa1ed4f7a1..d4708a6f27 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -92,6 +92,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -107,10 +108,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index f917911908..98b6d84989 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -75,6 +75,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -90,10 +91,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 7cdb8bc5ae..a2bf5a7f87 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -75,6 +75,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -90,10 +91,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 0ce16463f4..3fad267133 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -119,6 +119,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -134,10 +135,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index ce38e4be29..0faeb3c3a7 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -74,6 +74,7 @@ Options :: --attrFile string attribute file name to be used for generating attribute for the resource type. + --gen generates an empty workflow execution config file with conformance to the api format. -h, --help help for workflow-execution-config Options inherited from parent commands @@ -81,6 +82,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -96,10 +98,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 92960d0ddb..e3ddfded83 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -15,7 +15,7 @@ Retrieve all the workflows within project and domain (workflow/workflows can be flytectl get workflow -p flytesnacks -d development -Retrieve workflow by name within project and domain: +Retrieve all versions of a workflow by name within project and domain: :: @@ -103,6 +103,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -118,10 +119,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index aeea164696..556ba2a7c2 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -28,6 +28,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -43,10 +44,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 75d25ea88e..4fa44a4876 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -35,24 +35,25 @@ Options :: - --archive pass in archive file either an http link or local path. - --assumableIamRole string custom assumable iam auth role to register launch plans with. - --continueOnError continue on error when registering files. - --destinationDirectory string Location of source code in container. - --dryRun execute command without making any modifications. - --force force use of version number on entities registered with flyte. + --archive Pass in archive file either an http link or local path. + --assumableIamRole string Custom assumable iam auth role to register launch plans with. + --continueOnError Continue on error when registering files. + --destinationDirectory string Location of source code in container. + --dryRun Execute command without making any modifications. + --force Force use of version number on entities registered with flyte. -h, --help help for examples - --k8ServiceAccount string deprecated. Please use --K8sServiceAccount - --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. - --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). - --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte which are un-versioned after serialization. + --k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --version string Version of the entity to be registered with flyte which are un-versioned after serialization. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -68,10 +69,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 7c20d694bb..acf414b3e7 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -106,24 +106,25 @@ Options :: - --archive pass in archive file either an http link or local path. - --assumableIamRole string custom assumable iam auth role to register launch plans with. - --continueOnError continue on error when registering files. - --destinationDirectory string Location of source code in container. - --dryRun execute command without making any modifications. - --force force use of version number on entities registered with flyte. + --archive Pass in archive file either an http link or local path. + --assumableIamRole string Custom assumable iam auth role to register launch plans with. + --continueOnError Continue on error when registering files. + --destinationDirectory string Location of source code in container. + --dryRun Execute command without making any modifications. + --force Force use of version number on entities registered with flyte. -h, --help help for files - --k8ServiceAccount string deprecated. Please use --K8sServiceAccount - --k8sServiceAccount string custom kubernetes service account auth role to register launch plans with. - --outputLocationPrefix string custom output location prefix for offloaded types (files/schemas). - --sourceUploadPath string Location for source code in storage. - --version string version of the entity to be registered with flyte which are un-versioned after serialization. + --k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --version string Version of the entity to be registered with flyte which are un-versioned after serialization. Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -139,10 +140,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index dcc3f886cd..97a8478b8e 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -46,6 +46,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -61,10 +62,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index ebe3141dda..0cf40d8033 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -35,6 +35,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -50,10 +51,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 75169d7cec..a638e5cfd0 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -83,19 +83,22 @@ Options :: - --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. - -h, --help help for start - --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. - --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) - --pre Optional. Pre release Version of flyte will be used for sandbox. - --source string Path of your source code - --version string Version of flyte. Only supports flyte releases greater than v0.10.0 + --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + -h, --help help for start + --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. + --imagePullOptions.platform string Forces a specific platform's image to be pulled.' + --imagePullOptions.registryAuth string The base64 encoded credentials for the registry. + --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) + --pre Optional. Pre release Version of flyte will be used for sandbox. + --source string Path of your source code + --version string Version of flyte. Only supports flyte releases greater than v0.10.0 Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -111,10 +114,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 41b13a1307..b887fe1fcb 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -35,6 +35,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -50,10 +51,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 18a97a7fb8..2f0a8963da 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -35,6 +35,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -50,10 +51,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index f4c8ae3e06..e65d21155c 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -30,6 +30,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -45,10 +46,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 43f4f034bc..c18ed0d263 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -70,6 +70,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -85,10 +86,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index e809f7c70a..978a731b9e 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -63,6 +63,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -78,10 +79,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 53122c5a8f..593716c991 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -74,6 +74,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -89,10 +90,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 4ad95da247..6f6096fbd5 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -43,6 +43,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -58,10 +59,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index b08cd29e4b..a80d575972 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -48,6 +48,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -63,10 +64,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index ca27b38679..d5140d52fb 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -44,6 +44,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -59,10 +60,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 3460f9498b..047c6a41db 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -76,6 +76,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -91,10 +92,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 9277927bae..97e00e97ef 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -103,6 +103,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -118,10 +119,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index b6fec0258c..da3faef868 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -48,6 +48,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -63,10 +64,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 0c9f31dc50..ba6124eca8 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -76,6 +76,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -91,10 +92,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index ae43ff1982..783ef3795c 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -66,6 +66,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -81,10 +82,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 6e220472c6..5a09fd32aa 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -48,6 +48,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -63,10 +64,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index d1a1e34ee3..802356b635 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -43,6 +43,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -58,10 +59,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 41ad6f8030..1ce459bfec 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -32,6 +32,7 @@ Options inherited from parent commands :: + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") --admin.authorizationHeader string Custom metadata header to pass JWT --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. @@ -47,10 +48,22 @@ Options inherited from parent commands --admin.pkceConfig.refreshTime string (default "5m0s") --admin.pkceConfig.timeout string (default "15s") --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. -c, --config string config file (default is $HOME/.flyte/config.yaml) -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") --logger.level int Sets the minimum logging level. (default 4) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. From f103848633087540cf0876052d45115870ca50c9 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 12 Apr 2022 06:06:58 +0000 Subject: [PATCH 243/356] Launch Flyte cluster in the single binary mode (#306) * Using sandbox-lite Signed-off-by: Kevin Su * Add demo command Signed-off-by: Kevin Su * wip Signed-off-by: Kevin Su * wip Signed-off-by: Kevin Su --- flytectl/cmd/demo/demo.go | 64 +++ flytectl/cmd/demo/demo_test.go | 39 ++ flytectl/cmd/demo/exec.go | 47 ++ flytectl/cmd/demo/exec_test.go | 76 +++ flytectl/cmd/demo/start.go | 306 ++++++++++++ flytectl/cmd/demo/start_test.go | 731 +++++++++++++++++++++++++++++ flytectl/cmd/demo/status.go | 42 ++ flytectl/cmd/demo/status_test.go | 39 ++ flytectl/cmd/demo/teardown.go | 62 +++ flytectl/cmd/demo/teardown_test.go | 64 +++ flytectl/cmd/root.go | 2 + flytectl/cmd/sandbox/start.go | 4 +- flytectl/pkg/docker/docker_util.go | 8 +- flytectl/pkg/util/util.go | 10 +- flytectl/pkg/util/util_test.go | 2 +- 15 files changed, 1485 insertions(+), 11 deletions(-) create mode 100644 flytectl/cmd/demo/demo.go create mode 100644 flytectl/cmd/demo/demo_test.go create mode 100644 flytectl/cmd/demo/exec.go create mode 100644 flytectl/cmd/demo/exec_test.go create mode 100644 flytectl/cmd/demo/start.go create mode 100644 flytectl/cmd/demo/start_test.go create mode 100644 flytectl/cmd/demo/status.go create mode 100644 flytectl/cmd/demo/status_test.go create mode 100644 flytectl/cmd/demo/teardown.go create mode 100644 flytectl/cmd/demo/teardown_test.go diff --git a/flytectl/cmd/demo/demo.go b/flytectl/cmd/demo/demo.go new file mode 100644 index 0000000000..83cb8afe11 --- /dev/null +++ b/flytectl/cmd/demo/demo.go @@ -0,0 +1,64 @@ +package demo + +import ( + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + cmdcore "github.com/flyteorg/flytectl/cmd/core" + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + demoShort = `Helps with demo interactions like start, teardown, status, and exec.` + demoLong = ` +Flyte Demo is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte demo as a single Docker container locally. + +To create a demo cluster, run: +:: + + flytectl demo start + +To remove a demo cluster, run: +:: + + flytectl demo teardown + +To check the status of the demo container, run: +:: + + flytectl demo status + +To execute commands inside the demo container, use exec: +:: + + flytectl demo exec -- pwd +` +) + +// CreateDemoCommand will return demo command +func CreateDemoCommand() *cobra.Command { + demo := &cobra.Command{ + Use: "demo", + Short: demoShort, + Long: demoLong, + } + + demoResourcesFuncs := map[string]cmdcore.CommandEntry{ + "start": {CmdFunc: startDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: startShort, + Long: startLong, PFlagProvider: sandboxConfig.DefaultConfig}, + "teardown": {CmdFunc: teardownDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: teardownShort, + Long: teardownLong}, + "status": {CmdFunc: demoClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: statusShort, + Long: statusLong}, + "exec": {CmdFunc: demoClusterExec, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: execShort, + Long: execLong}, + } + + cmdcore.AddCommands(demo, demoResourcesFuncs) + + return demo +} diff --git a/flytectl/cmd/demo/demo_test.go b/flytectl/cmd/demo/demo_test.go new file mode 100644 index 0000000000..0ce332867a --- /dev/null +++ b/flytectl/cmd/demo/demo_test.go @@ -0,0 +1,39 @@ +package demo + +import ( + "fmt" + "sort" + "testing" + + "gotest.tools/assert" +) + +func TestCreateDemoCommand(t *testing.T) { + demoCommand := CreateDemoCommand() + assert.Equal(t, demoCommand.Use, "demo") + assert.Equal(t, demoCommand.Short, "Helps with demo interactions like start, teardown, status, and exec.") + fmt.Println(demoCommand.Commands()) + assert.Equal(t, len(demoCommand.Commands()), 4) + cmdNouns := demoCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + + assert.Equal(t, cmdNouns[0].Use, "exec") + assert.Equal(t, cmdNouns[0].Short, execShort) + assert.Equal(t, cmdNouns[0].Long, execLong) + + assert.Equal(t, cmdNouns[1].Use, "start") + assert.Equal(t, cmdNouns[1].Short, startShort) + assert.Equal(t, cmdNouns[1].Long, startLong) + + assert.Equal(t, cmdNouns[2].Use, "status") + assert.Equal(t, cmdNouns[2].Short, statusShort) + assert.Equal(t, cmdNouns[2].Long, statusLong) + + assert.Equal(t, cmdNouns[3].Use, "teardown") + assert.Equal(t, cmdNouns[3].Short, teardownShort) + assert.Equal(t, cmdNouns[3].Long, teardownLong) + +} diff --git a/flytectl/cmd/demo/exec.go b/flytectl/cmd/demo/exec.go new file mode 100644 index 0000000000..b0d9510c72 --- /dev/null +++ b/flytectl/cmd/demo/exec.go @@ -0,0 +1,47 @@ +package demo + +import ( + "context" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" +) + +const ( + execShort = "Executes non-interactive command inside the demo container" + execLong = ` +Run non-interactive commands inside the demo container and immediately return the output. +By default, "flytectl exec" is present in the /root directory inside the demo container. + +:: + + flytectl demo exec -- ls -al + +Usage` +) + +func demoClusterExec(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + if len(args) > 0 { + return execute(ctx, cli, args) + } + return fmt.Errorf("missing argument. Please check usage examples by running flytectl demo exec --help") +} + +func execute(ctx context.Context, cli docker.Docker, args []string) error { + c := docker.GetSandbox(ctx, cli) + if c != nil { + exec, err := docker.ExecCommend(ctx, cli, c.ID, args) + if err != nil { + return err + } + if err := docker.InspectExecResp(ctx, cli, exec.ID); err != nil { + return err + } + } + return nil +} diff --git a/flytectl/cmd/demo/exec_test.go b/flytectl/cmd/demo/exec_test.go new file mode 100644 index 0000000000..0375be916c --- /dev/null +++ b/flytectl/cmd/demo/exec_test.go @@ -0,0 +1,76 @@ +package demo + +import ( + "bufio" + "context" + "fmt" + "io" + "strings" + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + + admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/stretchr/testify/assert" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/mock" +) + +func TestDemoClusterExec(t *testing.T) { + mockDocker := &mocks.Docker{} + mockOutStream := new(io.Writer) + ctx := context.Background() + mockClient := admin2.InitializeMockClientset() + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + reader := bufio.NewReader(strings.NewReader("test")) + + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.ExecConfig.Cmd = []string{"ls -al"} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, docker.ExecConfig).Return(types.IDResponse{}, nil) + mockDocker.OnContainerExecInspectMatch(ctx, mock.Anything).Return(types.ContainerExecInspect{}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, fmt.Errorf("Test")) + docker.Client = mockDocker + err := demoClusterExec(ctx, []string{"ls -al"}, cmdCtx) + + assert.NotNil(t, err) +} + +func TestSandboxClusterExecWithoutCmd(t *testing.T) { + mockDocker := &mocks.Docker{} + reader := bufio.NewReader(strings.NewReader("test")) + s := testutils.Setup() + ctx := s.Ctx + + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.ExecConfig.Cmd = []string{} + mockDocker.OnContainerExecCreateMatch(ctx, mock.Anything, docker.ExecConfig).Return(types.IDResponse{}, nil) + mockDocker.OnContainerExecInspectMatch(ctx, mock.Anything).Return(types.ContainerExecInspect{}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, mock.Anything, types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: reader, + }, fmt.Errorf("Test")) + docker.Client = mockDocker + err := demoClusterExec(ctx, []string{}, s.CmdCtx) + + assert.NotNil(t, err) +} diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go new file mode 100644 index 0000000000..459b5568f4 --- /dev/null +++ b/flytectl/cmd/demo/start.go @@ -0,0 +1,306 @@ +package demo + +import ( + "bufio" + "context" + "fmt" + "io" + "os" + "path/filepath" + "time" + + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/pkg/githubutil" + + "github.com/avast/retry-go" + "github.com/olekukonko/tablewriter" + corev1api "k8s.io/api/core/v1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + + "github.com/docker/docker/api/types/mount" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/k8s" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/enescakir/emoji" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/util" + "k8s.io/client-go/tools/clientcmd" +) + +const ( + startShort = "Starts the Flyte demo cluster." + startLong = ` +Flyte demo is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte demo as a single Docker container locally. + +Starts the demo cluster without any source code: +:: + + flytectl demo start + +Mounts your source code repository inside the demo cluster: +:: + + flytectl demo start --source=$HOME/flyteorg/flytesnacks + +Specify a Flyte demo compliant image with the registry. This is useful in case you want to use an image from your registry. +:: + + flytectl demo start --image docker.io/my-override:latest + +Note: If image flag is passed then Flytectl will ignore version and pre flags. + +Specify a Flyte demo image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: +:: + + flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + +Start demo cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. +eg : for passing timeout value in secs for the demo container use the following. +:: + + flytectl demo start --env FLYTE_TIMEOUT=700 + + +The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: +s - seconds (default) +m - minutes +h - hours +d - days +When no unit is used, it defaults to seconds. If the duration is set to zero, the associated timeout is disabled. + + +eg : for passing multiple environment variables +:: + + flytectl demo start --env USER=foo --env PASSWORD=bar + + +Usage +` + k8sEndpoint = "https://127.0.0.1:30086" + flyteNamespace = "flyte" + diskPressureTaint = "node.kubernetes.io/disk-pressure" + taintEffect = "NoSchedule" + demoContextName = "flyte-sandbox" + demoDockerContext = "default" + demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-lite" +) + +type ExecResult struct { + StdOut string + StdErr string + ExitCode int +} + +func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + reader, err := startDemo(ctx, cli, os.Stdin) + if err != nil { + return err + } + if reader != nil { + docker.WaitForSandbox(reader, docker.SuccessMessage) + } + + if reader != nil { + var k8sClient k8s.K8s + err = retry.Do( + func() error { + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + return err + }, + retry.Attempts(10), + ) + if err != nil { + return err + } + if err = updateLocalKubeContext(); err != nil { + return err + } + + if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { + return err + } + util.PrintSandboxMessage(util.DemoConsolePort) + } + return nil +} + +func updateLocalKubeContext() error { + srcConfigAccess := &clientcmd.PathOptions{ + GlobalFile: docker.Kubeconfig, + LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), + } + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.CopyContext(srcConfigAccess, demoDockerContext, demoContextName) +} + +func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { + fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + if err.Error() != clierrors.ErrSandboxExists { + return nil, err + } + fmt.Printf("Existing details of your demo cluster") + util.PrintSandboxMessage(util.DemoConsolePort) + return nil, nil + } + + if err := util.SetupFlyteDir(); err != nil { + return nil, err + } + + templateValues := configutil.ConfigTemplateSpec{ + Host: "localhost:30081", + Insecure: true, + } + if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetSandboxTemplate(), templateValues); err != nil { + return nil, err + } + + volumes := docker.Volumes + sandboxDefaultConfig := sandboxConfig.DefaultConfig + if vol, err := mountVolume(sandboxDefaultConfig.Source, docker.Source); err != nil { + return nil, err + } else if vol != nil { + volumes = append(volumes, *vol) + } + demoImage := sandboxConfig.DefaultConfig.Image + if len(demoImage) == 0 { + image, version, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease) + if err != nil { + return nil, err + } + demoImage = image + fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) + } + fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, demoImage) + if err := docker.PullDockerImage(ctx, cli, demoImage, sandboxConfig.DefaultConfig.ImagePullPolicy, sandboxConfig.DefaultConfig.ImagePullOptions); err != nil { + return nil, err + } + + fmt.Printf("%v booting flyte-demo container\n", emoji.FactoryWorker) + exposedPorts, portBindings, _ := docker.GetSandboxPorts() + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, + demoImage, sandboxDefaultConfig.Env) + + if err != nil { + fmt.Printf("%v Something went wrong: Failed to start demo container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) + return nil, err + } + + logReader, err := docker.ReadLogs(ctx, cli, ID) + if err != nil { + return nil, err + } + + return logReader, nil +} + +func mountVolume(file, destination string) (*mount.Mount, error) { + if len(file) > 0 { + source, err := filepath.Abs(file) + if err != nil { + return nil, err + } + return &mount.Mount{ + Type: mount.TypeBind, + Source: source, + Target: destination, + }, nil + } + return nil, nil +} + +func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { + var data = os.Stdout + table := tablewriter.NewWriter(data) + table.SetHeader([]string{"Service", "Status", "Namespace"}) + table.SetRowLine(true) + + for { + isTaint, err := isNodeTainted(ctx, appsClient) + if err != nil { + return err + } + if isTaint { + return fmt.Errorf("docker sandbox doesn't have sufficient memory available. Please run docker system prune -a --volumes") + } + + pods, err := getFlyteDeployment(ctx, appsClient) + if err != nil { + return err + } + table.ClearRows() + table.SetAutoWrapText(false) + table.SetAutoFormatHeaders(true) + + // Clear os.Stdout + _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") + + var total, ready int + total = len(pods.Items) + ready = 0 + if total != 0 { + for _, v := range pods.Items { + if isPodReady(v) { + ready++ + } + if len(v.Status.Conditions) > 0 { + table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) + } + } + table.Render() + if total == ready { + break + } + } + + time.Sleep(40 * time.Second) + } + + return nil +} + +func isPodReady(v corev1api.Pod) bool { + if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { + return true + } + return false +} + +func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { + pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) + if err != nil { + return nil, err + } + return pods, nil +} + +func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { + nodes, err := client.Nodes().List(ctx, v1.ListOptions{}) + if err != nil { + return false, err + } + match := 0 + for _, node := range nodes.Items { + for _, c := range node.Spec.Taints { + if c.Key == diskPressureTaint && c.Effect == taintEffect { + match++ + } + } + } + if match > 0 { + return true, nil + } + return false, nil +} diff --git a/flytectl/cmd/demo/start_test.go b/flytectl/cmd/demo/start_test.go new file mode 100644 index 0000000000..50fe22d78d --- /dev/null +++ b/flytectl/cmd/demo/start_test.go @@ -0,0 +1,731 @@ +package demo + +import ( + "context" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/flyteorg/flyteidl/clients/go/admin" + + "github.com/flyteorg/flytectl/pkg/githubutil" + + "github.com/flyteorg/flytectl/pkg/k8s" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/flyteorg/flytectl/pkg/util" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + testclient "k8s.io/client-go/kubernetes/fake" +) + +var content = ` +apiVersion: v1 +clusters: +- cluster: + server: https://localhost:8080 + extensions: + - name: client.authentication.k8s.io/exec + extension: + audience: foo + other: bar + name: default +contexts: +- context: + cluster: default + user: default + namespace: bar + name: default +current-context: default +kind: Config +users: +- name: default + user: + exec: + apiVersion: client.authentication.k8s.io/v1alpha1 + args: + - arg-1 + - arg-2 + command: foo-command + provideClusterInfo: true +` + +var fakeNode = &corev1.Node{ + Spec: corev1.NodeSpec{ + Taints: []corev1.Taint{}, + }, +} + +var fakePod = corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + Conditions: []corev1.PodCondition{}, + }, +} + +func TestStartDemoFunc(t *testing.T) { + p1, p2, _ := docker.GetSandboxPorts() + assert.Nil(t, util.SetupFlyteDir()) + assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) + assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) + + fakePod.SetName("flyte") + + t.Run("Successfully run demo cluster", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + errCh := make(chan error) + sandboxConfig.DefaultConfig.Version = "v0.19.1" + bodyStatus := make(chan container.ContainerWaitOKBody) + image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + errCh := make(chan error) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + reader, err := startDemo(ctx, mockDocker, strings.NewReader("n")) + assert.Nil(t, err) + assert.Nil(t, reader) + }) + t.Run("Successfully run demo cluster with source code", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxConfig.DefaultConfig.Version = "" + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.Source, + Target: docker.Source, + }) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = "../" + sandboxConfig.DefaultConfig.Version = "" + absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) + assert.Nil(t, err) + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: absPath, + Target: docker.Source, + }) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Version = "v0.18.0" + sandboxConfig.DefaultConfig.Source = "" + + image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, false) + assert.Nil(t, err) + volumes := docker.Volumes + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Version = "v0.1444.0" + sandboxConfig.DefaultConfig.Source = "" + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + volumes := docker.Volumes + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in pulling image", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.Source, + Target: docker.Source, + }) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in removing existing cluster", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.Source, + Target: docker.Source, + }) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("error")) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, strings.NewReader("y")) + assert.NotNil(t, err) + }) + t.Run("Error in start container", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = "" + sandboxConfig.DefaultConfig.Version = "" + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, fmt.Errorf("error")) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in reading logs", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.Source, + Target: docker.Source, + }) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, fmt.Errorf("error")) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.NotNil(t, err) + }) + t.Run("Error in list container", func(t *testing.T) { + ctx := context.Background() + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker := &mocks.Docker{} + sandboxConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxConfig.DefaultConfig.Version = "" + volumes := docker.Volumes + volumes = append(volumes, mount.Mount{ + Type: mount.TypeBind, + Source: sandboxConfig.DefaultConfig.Source, + Target: docker.Source, + }) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + _, err = startDemo(ctx, mockDocker, os.Stdin) + assert.Nil(t, err) + }) + t.Run("Successfully run demo cluster command", func(t *testing.T) { + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + mockDocker := &mocks.Docker{} + errCh := make(chan error) + client := testclient.NewSimpleClientset() + k8s.Client = client + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + bodyStatus := make(chan container.ContainerWaitOKBody) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + stringReader := strings.NewReader(docker.SuccessMessage) + reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(reader, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + mockK8sContextMgr := &k8sMocks.ContextOps{} + docker.Client = mockDocker + sandboxConfig.DefaultConfig.Source = "" + sandboxConfig.DefaultConfig.Version = "" + k8s.ContextMgr = mockK8sContextMgr + mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) + err = startDemoCluster(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) + t.Run("Error in running demo cluster command", func(t *testing.T) { + mockOutStream := new(io.Writer) + ctx := context.Background() + cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + mockDocker := &mocks.Docker{} + errCh := make(chan error) + bodyStatus := make(chan container.ContainerWaitOKBody) + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + mockDocker.OnContainerCreate(ctx, &container.Config{ + Env: docker.Environment, + Image: image, + Tty: false, + ExposedPorts: p1, + }, &container.HostConfig{ + Mounts: docker.Volumes, + PortBindings: p2, + Privileged: true, + }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + stringReader := strings.NewReader(docker.SuccessMessage) + reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(reader, nil) + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) + docker.Client = mockDocker + sandboxConfig.DefaultConfig.Source = "" + err = startDemoCluster(ctx, []string{}, cmdCtx) + assert.NotNil(t, err) + }) +} + +func TestMonitorFlyteDeployment(t *testing.T) { + t.Run("Monitor k8s deployment fail because of storage", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = append(fakeNode.Spec.Taints, corev1.Taint{ + Effect: "NoSchedule", + Key: "node.kubernetes.io/disk-pressure", + }) + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = watchFlyteDeployment(ctx, client.CoreV1()) + assert.NotNil(t, err) + + }) + + t.Run("Monitor k8s deployment success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = []corev1.Taint{} + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = watchFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + + }) + +} + +func TestGetFlyteDeploymentCount(t *testing.T) { + + ctx := context.Background() + client := testclient.NewSimpleClientset() + c, err := getFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, 0, len(c.Items)) +} + +func TestGetNodeTaintStatus(t *testing.T) { + t.Run("Check node taint with success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, false, c) + }) + t.Run("Check node taint with fail", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + node, err := client.CoreV1().Nodes().Get(ctx, "master", v1.GetOptions{}) + if err != nil { + t.Error(err) + } + node.Spec.Taints = append(node.Spec.Taints, corev1.Taint{ + Effect: taintEffect, + Key: diskPressureTaint, + }) + _, err = client.CoreV1().Nodes().Update(ctx, node, v1.UpdateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, true, c) + }) +} + +func TestGetDemoImage(t *testing.T) { + t.Run("Get Latest demo cluster", func(t *testing.T) { + image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox-lite:dind-")) + }) + + t.Run("Get demo image with version ", func(t *testing.T) { + image, _, err := githubutil.GetFullyQualifiedImageName("v0.14.0", demoImageName, false) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(image, demoImageName)) + }) + t.Run("Get demo image with wrong version ", func(t *testing.T) { + _, _, err := githubutil.GetFullyQualifiedImageName("v100.1.0", demoImageName, false) + assert.NotNil(t, err) + }) + t.Run("Get demo image with wrong version ", func(t *testing.T) { + _, _, err := githubutil.GetFullyQualifiedImageName("aaaaaa", demoImageName, false) + assert.NotNil(t, err) + }) + t.Run("Get demo image with version that is not supported", func(t *testing.T) { + _, _, err := githubutil.GetFullyQualifiedImageName("v0.10.0", demoImageName, false) + assert.NotNil(t, err) + }) + +} diff --git a/flytectl/cmd/demo/status.go b/flytectl/cmd/demo/status.go new file mode 100644 index 0000000000..67a7767afb --- /dev/null +++ b/flytectl/cmd/demo/status.go @@ -0,0 +1,42 @@ +package demo + +import ( + "context" + "fmt" + + "github.com/enescakir/emoji" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" +) + +const ( + statusShort = "Gets the status of the demo environment." + statusLong = ` +Retrieves the status of the demo environment. Currently, Flyte demo runs as a local Docker container. + +Usage +:: + + flytectl demo status + +` +) + +func demoClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + return printStatus(ctx, cli) +} + +func printStatus(ctx context.Context, cli docker.Docker) error { + c := docker.GetSandbox(ctx, cli) + if c == nil { + fmt.Printf("%v no demo cluster found \n", emoji.StopSign) + return nil + } + fmt.Printf("Flyte demo cluster container image [%s] with status [%s] is in state [%s]", c.Image, c.Status, c.State) + return nil +} diff --git a/flytectl/cmd/demo/status_test.go b/flytectl/cmd/demo/status_test.go new file mode 100644 index 0000000000..7fae8bc43a --- /dev/null +++ b/flytectl/cmd/demo/status_test.go @@ -0,0 +1,39 @@ +package demo + +import ( + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/assert" +) + +func TestDemoStatus(t *testing.T) { + t.Run("Demo status with zero result", func(t *testing.T) { + mockDocker := &mocks.Docker{} + s := testutils.Setup() + mockDocker.OnContainerList(s.Ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + docker.Client = mockDocker + err := demoClusterStatus(s.Ctx, []string{}, s.CmdCtx) + assert.Nil(t, err) + }) + t.Run("Demo status with running", func(t *testing.T) { + s := testutils.Setup() + ctx := s.Ctx + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + docker.Client = mockDocker + err := demoClusterStatus(ctx, []string{}, s.CmdCtx) + assert.Nil(t, err) + }) +} diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go new file mode 100644 index 0000000000..1308b10b14 --- /dev/null +++ b/flytectl/cmd/demo/teardown.go @@ -0,0 +1,62 @@ +package demo + +import ( + "context" + "fmt" + + "github.com/flyteorg/flytectl/pkg/configutil" + + "github.com/flyteorg/flytectl/pkg/docker" + + "github.com/docker/docker/api/types" + "github.com/enescakir/emoji" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/k8s" +) + +const ( + teardownShort = "Cleans up the demo environment" + teardownLong = ` +Removes the demo cluster and all the Flyte config created by 'demo start': +:: + + flytectl demo teardown + + +Usage +` +) + +func teardownDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + return tearDownDemo(ctx, cli) +} + +func tearDownDemo(ctx context.Context, cli docker.Docker) error { + c := docker.GetSandbox(ctx, cli) + if c != nil { + if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ + Force: true, + }); err != nil { + return err + } + } + if err := configutil.ConfigCleanup(); err != nil { + fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) + } + if err := removeDemoKubeContext(); err != nil { + fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) + } + fmt.Printf("%v %v Demo cluster is removed successfully. \n", emoji.Broom, emoji.Broom) + return nil +} + +func removeDemoKubeContext() error { + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.RemoveContext(demoContextName) +} diff --git a/flytectl/cmd/demo/teardown_test.go b/flytectl/cmd/demo/teardown_test.go new file mode 100644 index 0000000000..7741272a2b --- /dev/null +++ b/flytectl/cmd/demo/teardown_test.go @@ -0,0 +1,64 @@ +package demo + +import ( + "context" + "fmt" + "testing" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/flyteorg/flytectl/pkg/util" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +var containers []types.Container + +func TestTearDownFunc(t *testing.T) { + container1 := types.Container{ + ID: "FlyteSandboxClusterName", + Names: []string{ + docker.FlyteSandboxClusterName, + }, + } + containers = append(containers, container1) + + t.Run("Success", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + mockK8sContextMgr := &k8sMocks.ContextOps{} + k8s.ContextMgr = mockK8sContextMgr + mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) + err := tearDownDemo(ctx, mockDocker) + assert.Nil(t, err) + }) + t.Run("Error", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) + err := tearDownDemo(ctx, mockDocker) + assert.NotNil(t, err) + }) + +} + +func TestTearDownClusterFunc(t *testing.T) { + _ = util.SetupFlyteDir() + _ = util.WriteIntoFile([]byte("data"), configutil.FlytectlConfig) + s := testutils.Setup() + ctx := s.Ctx + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + docker.Client = mockDocker + err := teardownDemoCluster(ctx, []string{}, s.CmdCtx) + assert.Nil(t, err) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index ca08c94966..7ebdd46ab2 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -10,6 +10,7 @@ import ( cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/create" "github.com/flyteorg/flytectl/cmd/delete" + "github.com/flyteorg/flytectl/cmd/demo" "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flytectl/cmd/register" "github.com/flyteorg/flytectl/cmd/sandbox" @@ -61,6 +62,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(register.RemoteRegisterCommand()) rootCmd.AddCommand(delete.RemoteDeleteCommand()) rootCmd.AddCommand(sandbox.CreateSandboxCommand()) + rootCmd.AddCommand(demo.CreateDemoCommand()) rootCmd.AddCommand(configuration.CreateConfigCommand()) rootCmd.AddCommand(completionCmd) // Added version command diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index f45c791f08..ceda4c04cd 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -144,7 +144,7 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } - util.PrintSandboxMessage() + util.PrintSandboxMessage(util.SandBoxConsolePort) } return nil } @@ -166,7 +166,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu return nil, err } fmt.Printf("Existing details of your sandbox") - util.PrintSandboxMessage() + util.PrintSandboxMessage(util.SandBoxConsolePort) return nil, nil } diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 3b6be1c91c..a3825841fc 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -94,11 +94,11 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { // GetSandboxPorts will return sandbox ports func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ - "0.0.0.0:30081:30081", // Flyteconsole Port - "0.0.0.0:30082:30082", // Flyteadmin Port + "0.0.0.0:30080:30080", // Flyteconsole Port + "0.0.0.0:30081:30081", // Flyteadmin Port + "0.0.0.0:30082:30082", // K8s Dashboard Port "0.0.0.0:30084:30084", // Minio API Port - "0.0.0.0:30086:30086", // K8s Dashboard Port - "0.0.0.0:30087:30087", // Old Minio Console Port, keeping around for old images + "0.0.0.0:30086:30086", // K8s cluster "0.0.0.0:30088:30088", // Minio Console Port }) } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index c5f5470dc0..a34aeba5c4 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -18,7 +18,9 @@ import ( ) const ( - progressSuccessMessage = "Flyte is ready! Flyte UI is available at http://localhost:30081/console" + ProgressSuccessMessage = "Flyte is ready! Flyte UI is available at" + SandBoxConsolePort = 30081 + DemoConsolePort = 30080 ) var Ext string @@ -51,14 +53,14 @@ func SetupFlyteDir() error { } // PrintSandboxMessage will print sandbox success message -func PrintSandboxMessage() { +func PrintSandboxMessage(flyteConsolePort int) { kubeconfig := strings.Join([]string{ "$KUBECONFIG", f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), docker.Kubeconfig, }, ":") - - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, progressSuccessMessage, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + successMsg := fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 185b20db82..718a244d9c 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -25,7 +25,7 @@ func TestSetupFlyteDir(t *testing.T) { func TestPrintSandboxMessage(t *testing.T) { t.Run("Print Sandbox Message", func(t *testing.T) { - PrintSandboxMessage() + PrintSandboxMessage(SandBoxConsolePort) }) } From d5c31339b42bd22cb353e5e036a7bbcffd52e33a Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Tue, 12 Apr 2022 22:07:59 +0530 Subject: [PATCH 244/356] Added port for postgres in sandbox lite (#308) Signed-off-by: Yuvraj Co-authored-by: Yuvraj --- flytectl/pkg/docker/docker_util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index a3825841fc..84374481ea 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -100,6 +100,7 @@ func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, e "0.0.0.0:30084:30084", // Minio API Port "0.0.0.0:30086:30086", // K8s cluster "0.0.0.0:30088:30088", // Minio Console Port + "0.0.0.0:30089:30089", // Postgres Port }) } From 0a1850dd7f6e7d0af6f3f6c3383454c388e5b3a4 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 12 Apr 2022 09:39:20 -0700 Subject: [PATCH 245/356] Update documentation (#307) Signed-off-by: Flyte-Bot Co-authored-by: EngHabu --- flytectl/docs/source/gen/flytectl.rst | 1 + flytectl/docs/source/gen/flytectl_demo.rst | 111 ++++++++++++++ .../docs/source/gen/flytectl_demo_exec.rst | 96 ++++++++++++ .../docs/source/gen/flytectl_demo_start.rst | 144 ++++++++++++++++++ .../docs/source/gen/flytectl_demo_status.rst | 96 ++++++++++++ .../source/gen/flytectl_demo_teardown.rst | 96 ++++++++++++ 6 files changed, 544 insertions(+) create mode 100644 flytectl/docs/source/gen/flytectl_demo.rst create mode 100644 flytectl/docs/source/gen/flytectl_demo_exec.rst create mode 100644 flytectl/docs/source/gen/flytectl_demo_start.rst create mode 100644 flytectl/docs/source/gen/flytectl_demo_status.rst create mode 100644 flytectl/docs/source/gen/flytectl_demo_teardown.rst diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index fd883f5a55..08ff0e3b50 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -78,6 +78,7 @@ SEE ALSO * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. * :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. * :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. * :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. * :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. * :doc:`flytectl_sandbox` - Helps with sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst new file mode 100644 index 0000000000..47949f304f --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -0,0 +1,111 @@ +.. _flytectl_demo: + +flytectl demo +------------- + +Helps with demo interactions like start, teardown, status, and exec. + +Synopsis +~~~~~~~~ + + + +Flyte Demo is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte demo as a single Docker container locally. + +To create a demo cluster, run: +:: + + flytectl demo start + +To remove a demo cluster, run: +:: + + flytectl demo teardown + +To check the status of the demo container, run: +:: + + flytectl demo status + +To execute commands inside the demo container, use exec: +:: + + flytectl demo exec -- pwd + + +Options +~~~~~~~ + +:: + + -h, --help help for demo + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_demo_exec` - Executes non-interactive command inside the demo container +* :doc:`flytectl_demo_start` - Starts the Flyte demo cluster. +* :doc:`flytectl_demo_status` - Gets the status of the demo environment. +* :doc:`flytectl_demo_teardown` - Cleans up the demo environment + diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst new file mode 100644 index 0000000000..9d71ade418 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -0,0 +1,96 @@ +.. _flytectl_demo_exec: + +flytectl demo exec +------------------ + +Executes non-interactive command inside the demo container + +Synopsis +~~~~~~~~ + + + +Run non-interactive commands inside the demo container and immediately return the output. +By default, "flytectl exec" is present in the /root directory inside the demo container. + +:: + + flytectl demo exec -- ls -al + +Usage + +:: + + flytectl demo exec [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for exec + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. + diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst new file mode 100644 index 0000000000..694f0e1390 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -0,0 +1,144 @@ +.. _flytectl_demo_start: + +flytectl demo start +------------------- + +Starts the Flyte demo cluster. + +Synopsis +~~~~~~~~ + + + +Flyte demo is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte demo as a single Docker container locally. + +Starts the demo cluster without any source code: +:: + + flytectl demo start + +Mounts your source code repository inside the demo cluster: +:: + + flytectl demo start --source=$HOME/flyteorg/flytesnacks + +Specify a Flyte demo compliant image with the registry. This is useful in case you want to use an image from your registry. +:: + + flytectl demo start --image docker.io/my-override:latest + +Note: If image flag is passed then Flytectl will ignore version and pre flags. + +Specify a Flyte demo image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: +:: + + flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + +Start demo cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. +eg : for passing timeout value in secs for the demo container use the following. +:: + + flytectl demo start --env FLYTE_TIMEOUT=700 + + +The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: +s - seconds (default) +m - minutes +h - hours +d - days +When no unit is used, it defaults to seconds. If the duration is set to zero, the associated timeout is disabled. + + +eg : for passing multiple environment variables +:: + + flytectl demo start --env USER=foo --env PASSWORD=bar + + +Usage + + +:: + + flytectl demo start [flags] + +Options +~~~~~~~ + +:: + + --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + -h, --help help for start + --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. + --imagePullOptions.platform string Forces a specific platform's image to be pulled.' + --imagePullOptions.registryAuth string The base64 encoded credentials for the registry. + --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) + --pre Optional. Pre release Version of flyte will be used for sandbox. + --source string Path of your source code + --version string Version of flyte. Only supports flyte releases greater than v0.10.0 + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. + diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst new file mode 100644 index 0000000000..6308a14c4a --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -0,0 +1,96 @@ +.. _flytectl_demo_status: + +flytectl demo status +-------------------- + +Gets the status of the demo environment. + +Synopsis +~~~~~~~~ + + + +Retrieves the status of the demo environment. Currently, Flyte demo runs as a local Docker container. + +Usage +:: + + flytectl demo status + + + +:: + + flytectl demo status [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for status + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. + diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst new file mode 100644 index 0000000000..3ba921e968 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -0,0 +1,96 @@ +.. _flytectl_demo_teardown: + +flytectl demo teardown +---------------------- + +Cleans up the demo environment + +Synopsis +~~~~~~~~ + + + +Removes the demo cluster and all the Flyte config created by 'demo start': +:: + + flytectl demo teardown + + +Usage + + +:: + + flytectl demo teardown [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for teardown + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. + From d04b1e22b32ee0bf0eb503efb230db6ae02a1a03 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 12 Apr 2022 23:22:54 +0530 Subject: [PATCH 246/356] Adding overriden filter for get workflow (#310) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/config/subcommand/workflow/workflow_config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flytectl/cmd/config/subcommand/workflow/workflow_config.go b/flytectl/cmd/config/subcommand/workflow/workflow_config.go index 34049e08b9..a731cd2f25 100644 --- a/flytectl/cmd/config/subcommand/workflow/workflow_config.go +++ b/flytectl/cmd/config/subcommand/workflow/workflow_config.go @@ -7,8 +7,12 @@ import ( //go:generate pflags Config --default-var DefaultConfig --bind-default-var var ( + wfDefaultFilter = filters.Filters{ + Limit: filters.DefaultLimit, + Page: 1, + } DefaultConfig = &Config{ - Filter: filters.DefaultFilter, + Filter: wfDefaultFilter, } ) From f0930de1faf8809488d43c4db2a62cda6f2b8764 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:12:21 -0700 Subject: [PATCH 247/356] flytectl demo start should print nicely (#311) Signed-off-by: Ketan Umare --- flytectl/cmd/demo/start.go | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 459b5568f4..116bee98a4 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -96,6 +96,28 @@ type ExecResult struct { ExitCode int } +func primeFlytekitPod(ctx context.Context, podService corev1.PodInterface) { + _, err := podService.Create(ctx, &corev1api.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "py39-cacher", + }, + Spec: corev1api.PodSpec{ + RestartPolicy: corev1api.RestartPolicyNever, + Containers: []corev1api.Container{ + { + Name: "flytekit", + Image: "ghcr.io/flyteorg/flytekit:py3.9-latest", + Command: []string{"echo"}, + Args: []string{"Flyte"}, + }, + }, + }, + }, v1.CreateOptions{}) + if err != nil { + fmt.Printf("Failed to create primer pod - %s", err) + } +} + func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { cli, err := docker.GetDockerClient() if err != nil { @@ -129,6 +151,7 @@ func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Command if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } + primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) util.PrintSandboxMessage(util.DemoConsolePort) } return nil @@ -250,7 +273,7 @@ func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface var total, ready int total = len(pods.Items) ready = 0 - if total != 0 { + if total > 0 { for _, v := range pods.Items { if isPodReady(v) { ready++ @@ -261,14 +284,15 @@ func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface } table.Render() if total == ready { - break + return nil } + } else { + table.Append([]string{"k8s: This might take a little bit", "Bootstrapping", ""}) + table.Render() } - time.Sleep(40 * time.Second) + time.Sleep(10 * time.Second) } - - return nil } func isPodReady(v corev1api.Pod) bool { From e5e923f3db2e15264f7787c64347fac65846dd3d Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 15 Apr 2022 05:35:42 +0530 Subject: [PATCH 248/356] fix: revert sandbox lite image tag prefix to sha (#312) * fix: revert sandbox lite image tag prefix to sha Signed-off-by: Yuvraj * fix: make lint Signed-off-by: Yuvraj * fix: unit test fixed for sandbox lite Signed-off-by: Yuvraj * Remove mentions of sandbox in the docs and remove extraneous space Signed-off-by: eduardo apolinario Co-authored-by: Yuvraj Co-authored-by: eduardo apolinario --- .../flyte/golang_support_tools/tools.go | 3 +- flytectl/cmd/demo/start.go | 24 +++++++++--- flytectl/cmd/demo/start_test.go | 38 +++++++++---------- flytectl/cmd/sandbox/start.go | 12 +++--- flytectl/cmd/sandbox/start_test.go | 36 +++++++++--------- flytectl/pkg/githubutil/githubutil.go | 4 +- flytectl/pkg/githubutil/githubutil_test.go | 6 +-- 7 files changed, 68 insertions(+), 55 deletions(-) diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index d970d2106a..da7b933302 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools @@ -6,6 +7,6 @@ import ( _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" - _ "github.com/vektra/mockery/cmd/mockery" _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" + _ "github.com/vektra/mockery/cmd/mockery" ) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 116bee98a4..0102b9d8cb 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -40,11 +40,11 @@ Starts the demo cluster without any source code: :: flytectl demo start - + Mounts your source code repository inside the demo cluster: :: - flytectl demo start --source=$HOME/flyteorg/flytesnacks + flytectl demo start --source=$HOME/flyteorg/flytesnacks Specify a Flyte demo compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -52,11 +52,24 @@ Specify a Flyte demo compliant image with the registry. This is useful in case y flytectl demo start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte demo image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: - flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + +Runs a specific version of Flyte. Flytectl demo only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +:: + + flytectl demo start --version=v0.14.0 + +.. note:: + Flytectl demo is only supported for Flyte versions >= v1.0.0 + +Runs the latest pre release of Flyte. +:: + + flytectl demo start --pre Start demo cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. eg : for passing timeout value in secs for the demo container use the following. @@ -64,7 +77,6 @@ eg : for passing timeout value in secs for the demo container use the following. flytectl demo start --env FLYTE_TIMEOUT=700 - The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: s - seconds (default) m - minutes @@ -199,7 +211,7 @@ func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio } demoImage := sandboxConfig.DefaultConfig.Image if len(demoImage) == 0 { - image, version, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease) + image, version, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease) if err != nil { return nil, err } diff --git a/flytectl/cmd/demo/start_test.go b/flytectl/cmd/demo/start_test.go index 50fe22d78d..b04a595a91 100644 --- a/flytectl/cmd/demo/start_test.go +++ b/flytectl/cmd/demo/start_test.go @@ -91,7 +91,7 @@ func TestStartDemoFunc(t *testing.T) { errCh := make(chan error) sandboxConfig.DefaultConfig.Version = "v0.19.1" bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -122,7 +122,7 @@ func TestStartDemoFunc(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -171,7 +171,7 @@ func TestStartDemoFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -213,7 +213,7 @@ func TestStartDemoFunc(t *testing.T) { Source: absPath, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -248,7 +248,7 @@ func TestStartDemoFunc(t *testing.T) { sandboxConfig.DefaultConfig.Version = "v0.18.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -283,7 +283,7 @@ func TestStartDemoFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -316,7 +316,7 @@ func TestStartDemoFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := docker.Volumes @@ -362,7 +362,7 @@ func TestStartDemoFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -404,7 +404,7 @@ func TestStartDemoFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -443,7 +443,7 @@ func TestStartDemoFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -483,7 +483,7 @@ func TestStartDemoFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -527,7 +527,7 @@ func TestStartDemoFunc(t *testing.T) { if err != nil { t.Error(err) } - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -570,7 +570,7 @@ func TestStartDemoFunc(t *testing.T) { mockDocker := &mocks.Docker{} errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -705,26 +705,26 @@ func TestGetNodeTaintStatus(t *testing.T) { func TestGetDemoImage(t *testing.T) { t.Run("Get Latest demo cluster", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox-lite:dind-")) + assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox-lite:sha-")) }) t.Run("Get demo image with version ", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("v0.14.0", demoImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("sha", "v0.14.0", demoImageName, false) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(image, demoImageName)) }) t.Run("Get demo image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("v100.1.0", demoImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("sha", "v100.1.0", demoImageName, false) assert.NotNil(t, err) }) t.Run("Get demo image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("aaaaaa", demoImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("sha", "aaaaaa", demoImageName, false) assert.NotNil(t, err) }) t.Run("Get demo image with version that is not supported", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("v0.10.0", demoImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("sha", "v0.10.0", demoImageName, false) assert.NotNil(t, err) }) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index ceda4c04cd..c7afba967b 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -40,12 +40,12 @@ Starts the sandbox cluster without any source code: :: flytectl sandbox start - + Mounts your source code repository inside the sandbox: :: - flytectl sandbox start --source=$HOME/flyteorg/flytesnacks - + flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: @@ -59,7 +59,7 @@ Runs the latest pre release of Flyte. flytectl sandbox start --pre -Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -67,7 +67,7 @@ Specify a Flyte Sandbox compliant image with the registry. This is useful in cas flytectl sandbox start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: @@ -191,7 +191,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } sandboxImage := sandboxConfig.DefaultConfig.Image if len(sandboxImage) == 0 { - image, version, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease) + image, version, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease) if err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index d6c789fd7b..fd6623c766 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -92,7 +92,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) sandboxConfig.DefaultConfig.Version = "v0.19.1" bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -123,7 +123,7 @@ func TestStartSandboxFunc(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} errCh := make(chan error) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -172,7 +172,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -214,7 +214,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: absPath, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -249,7 +249,7 @@ func TestStartSandboxFunc(t *testing.T) { sandboxConfig.DefaultConfig.Version = "v0.18.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName(sandboxConfig.DefaultConfig.Version, sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -284,7 +284,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Version = "v0.1444.0" sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) volumes := docker.Volumes mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -317,7 +317,7 @@ func TestStartSandboxFunc(t *testing.T) { errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker := &mocks.Docker{} - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) sandboxConfig.DefaultConfig.Source = f.UserHomeDir() volumes := docker.Volumes @@ -363,7 +363,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -405,7 +405,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -444,7 +444,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -484,7 +484,7 @@ func TestStartSandboxFunc(t *testing.T) { Source: sandboxConfig.DefaultConfig.Source, Target: docker.Source, }) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -528,7 +528,7 @@ func TestStartSandboxFunc(t *testing.T) { if err != nil { t.Error(err) } - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) bodyStatus := make(chan container.ContainerWaitOKBody) mockDocker.OnContainerCreate(ctx, &container.Config{ @@ -571,7 +571,7 @@ func TestStartSandboxFunc(t *testing.T) { mockDocker := &mocks.Docker{} errCh := make(chan error) bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) mockDocker.OnContainerCreate(ctx, &container.Config{ Env: docker.Environment, @@ -706,26 +706,26 @@ func TestGetNodeTaintStatus(t *testing.T) { func TestGetSandboxImage(t *testing.T) { t.Run("Get Latest sandbox", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox:dind-")) }) t.Run("Get sandbox image with version ", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("v0.14.0", sandboxImageName, false) + image, _, err := githubutil.GetFullyQualifiedImageName("dind", "v0.14.0", sandboxImageName, false) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("v100.1.0", sandboxImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("dind", "v100.1.0", sandboxImageName, false) assert.NotNil(t, err) }) t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("aaaaaa", sandboxImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("dind", "aaaaaa", sandboxImageName, false) assert.NotNil(t, err) }) t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("v0.10.0", sandboxImageName, false) + _, _, err := githubutil.GetFullyQualifiedImageName("dind", "v0.10.0", sandboxImageName, false) assert.NotNil(t, err) }) diff --git a/flytectl/pkg/githubutil/githubutil.go b/flytectl/pkg/githubutil/githubutil.go index d36fe78800..5fa3dacc6e 100644 --- a/flytectl/pkg/githubutil/githubutil.go +++ b/flytectl/pkg/githubutil/githubutil.go @@ -218,11 +218,11 @@ func CheckBrewInstall(goos platformutil.Platform) (string, error) { // if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} is used // else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. // If pre release is true then use latest pre release of Flyte, In that case User don't need to pass version -func GetFullyQualifiedImageName(version, image string, pre bool) (string, string, error) { +func GetFullyQualifiedImageName(prefix, version, image string, pre bool) (string, string, error) { sha, version, err := GetSandboxImageSha(version, pre) if err != nil { return "", version, err } - return fmt.Sprintf("%s:%s", image, fmt.Sprintf("dind-%s", sha)), version, nil + return fmt.Sprintf("%s:%s", image, fmt.Sprintf("%s-%s", prefix, sha)), version, nil } diff --git a/flytectl/pkg/githubutil/githubutil_test.go b/flytectl/pkg/githubutil/githubutil_test.go index 5de7709940..037a0ede14 100644 --- a/flytectl/pkg/githubutil/githubutil_test.go +++ b/flytectl/pkg/githubutil/githubutil_test.go @@ -49,19 +49,19 @@ func TestCheckVersionExist(t *testing.T) { func TestGetFullyQualifiedImageName(t *testing.T) { t.Run("Get tFully Qualified Image Name ", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("", sandboxImageName, false) + image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, false) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(tag, "v")) assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) }) t.Run("Get tFully Qualified Image Name with pre release", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("", sandboxImageName, true) + image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, true) assert.Nil(t, err) assert.Equal(t, true, strings.HasPrefix(tag, "v")) assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) }) t.Run("Get tFully Qualified Image Name with specific version", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("v0.19.0", sandboxImageName, true) + image, tag, err := GetFullyQualifiedImageName("dind", "v0.19.0", sandboxImageName, true) assert.Nil(t, err) assert.Equal(t, "v0.19.0", tag) assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) From 790a96566d195c601017e8a95aa0aec986b6ff7e Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Wed, 20 Apr 2022 11:38:14 -0700 Subject: [PATCH 249/356] Bind 30080 to 30081 in the case of sandbox (#313) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/cmd/demo/start.go | 2 +- flytectl/cmd/demo/start_test.go | 2 +- flytectl/pkg/docker/docker_util.go | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 0102b9d8cb..2ee48d9a0f 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -224,7 +224,7 @@ func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio } fmt.Printf("%v booting flyte-demo container\n", emoji.FactoryWorker) - exposedPorts, portBindings, _ := docker.GetSandboxPorts() + exposedPorts, portBindings, _ := docker.GetDemoPorts() ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, demoImage, sandboxDefaultConfig.Env) diff --git a/flytectl/cmd/demo/start_test.go b/flytectl/cmd/demo/start_test.go index b04a595a91..70ab2cb749 100644 --- a/flytectl/cmd/demo/start_test.go +++ b/flytectl/cmd/demo/start_test.go @@ -78,7 +78,7 @@ var fakePod = corev1.Pod{ } func TestStartDemoFunc(t *testing.T) { - p1, p2, _ := docker.GetSandboxPorts() + p1, p2, _ := docker.GetDemoPorts() assert.Nil(t, util.SetupFlyteDir()) assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 84374481ea..b6bef9549e 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -93,6 +93,21 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { // GetSandboxPorts will return sandbox ports func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { + return nat.ParsePortSpecs([]string{ + // Notice that two host ports are mapped to the same container port in the case of Flyteconsole, this is done to + // support the generated URLs produced by pyflyte run + "0.0.0.0:30080:30081", // Flyteconsole Port. + "0.0.0.0:30081:30081", // Flyteadmin Port + "0.0.0.0:30082:30082", // K8s Dashboard Port + "0.0.0.0:30084:30084", // Minio API Port + "0.0.0.0:30086:30086", // K8s cluster + "0.0.0.0:30088:30088", // Minio Console Port + "0.0.0.0:30089:30089", // Postgres Port + }) +} + +// GetDemoPorts will return demo ports +func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ "0.0.0.0:30080:30080", // Flyteconsole Port "0.0.0.0:30081:30081", // Flyteadmin Port From 440ad3171f187867be35b916851ad81936b8e91a Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 23 Apr 2022 00:23:03 +0530 Subject: [PATCH 250/356] Demo fit and finish (#317) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/demo/start.go | 6 +++--- flytectl/pkg/configutil/configutil.go | 5 +++++ flytectl/pkg/configutil/configutil_test.go | 1 + flytectl/pkg/util/util.go | 13 +++++++++---- flytectl/pkg/util/util_test.go | 6 ++++++ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 2ee48d9a0f..893bdce116 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -164,7 +164,7 @@ func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Command return err } primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) - util.PrintSandboxMessage(util.DemoConsolePort) + util.PrintDemoMessage(util.DemoConsolePort) } return nil } @@ -186,7 +186,7 @@ func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio return nil, err } fmt.Printf("Existing details of your demo cluster") - util.PrintSandboxMessage(util.DemoConsolePort) + util.PrintDemoMessage(util.DemoConsolePort) return nil, nil } @@ -198,7 +198,7 @@ func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio Host: "localhost:30081", Insecure: true, } - if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetSandboxTemplate(), templateValues); err != nil { + if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetDemoTemplate(), templateValues); err != nil { return nil, err } diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index c0df7f9b31..cedad69146 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -65,6 +65,11 @@ func GetSandboxTemplate() string { return AdminConfigTemplate + StorageConfigTemplate } +// GetDemoTemplate return demo cluster config +func GetDemoTemplate() string { + return AdminConfigTemplate +} + // GetAWSCloudTemplate return aws Flyte config with storage config func GetAWSCloudTemplate() string { return AdminConfigTemplate + StorageS3ConfigTemplate diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index 6908f06144..e79964af18 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -52,4 +52,5 @@ func TestAwsConfig(t *testing.T) { assert.Equal(t, AdminConfigTemplate+StorageS3ConfigTemplate, GetAWSCloudTemplate()) assert.Equal(t, AdminConfigTemplate+StorageGCSConfigTemplate, GetGoogleCloudTemplate()) assert.Equal(t, AdminConfigTemplate+StorageConfigTemplate, GetSandboxTemplate()) + assert.Equal(t, AdminConfigTemplate, GetDemoTemplate()) } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index a34aeba5c4..091ea21707 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -5,16 +5,15 @@ import ( "io" "io/ioutil" "net/http" - "os" "strings" - hversion "github.com/hashicorp/go-version" - - "github.com/enescakir/emoji" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + + "github.com/enescakir/emoji" + hversion "github.com/hashicorp/go-version" ) const ( @@ -66,6 +65,12 @@ func PrintSandboxMessage(flyteConsolePort int) { fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) } +// PrintDemoMessage will print demo success message +func PrintDemoMessage(flyteConsolePort int) { + successMsg := fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) +} + // SendRequest will create request and return the response func SendRequest(method, url string, option io.Reader) (*http.Response, error) { client := &http.Client{} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 718a244d9c..ebf67a902d 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -29,6 +29,12 @@ func TestPrintSandboxMessage(t *testing.T) { }) } +func TestPrintDemoMessage(t *testing.T) { + t.Run("Print Demo Message", func(t *testing.T) { + PrintDemoMessage(DemoConsolePort) + }) +} + func TestSendRequest(t *testing.T) { t.Run("Successful get request", func(t *testing.T) { response, err := SendRequest("GET", "https://github.com", nil) From 262af6e268743233eee677195203c83f33b668ee Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Mon, 25 Apr 2022 22:29:55 +0530 Subject: [PATCH 251/356] Mocking github repo service and refactoring (#315) * Mocking github repo service and refactoring Signed-off-by: Prafulla Mahindrakar * compilation fix Signed-off-by: Prafulla Mahindrakar * More fixes Signed-off-by: Prafulla Mahindrakar * Refactored tests and fix error checks Signed-off-by: Prafulla Mahindrakar * more fixes Signed-off-by: Prafulla Mahindrakar * more fixes Signed-off-by: Prafulla Mahindrakar * more fixes Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/demo/exec.go | 5 +- flytectl/cmd/demo/start.go | 10 +- flytectl/cmd/demo/start_test.go | 495 ++++------------- flytectl/cmd/demo/status.go | 5 +- flytectl/cmd/demo/teardown.go | 5 +- flytectl/cmd/register/examples.go | 10 +- flytectl/cmd/register/register_util.go | 8 +- flytectl/cmd/register/register_util_test.go | 28 +- flytectl/cmd/sandbox/exec.go | 5 +- flytectl/cmd/sandbox/start.go | 12 +- flytectl/cmd/sandbox/start_test.go | 516 ++++-------------- flytectl/cmd/sandbox/status.go | 5 +- flytectl/cmd/sandbox/teardown.go | 5 +- flytectl/cmd/upgrade/upgrade.go | 12 +- flytectl/cmd/upgrade/upgrade_test.go | 18 +- flytectl/cmd/version/version.go | 6 +- flytectl/go.mod | 2 +- flytectl/go.sum | 4 +- flytectl/pkg/docker/docker_util.go | 17 +- flytectl/pkg/docker/docker_util_test.go | 106 ++-- .../pkg/{githubutil => github}/githubutil.go | 152 +++--- flytectl/pkg/github/githubutil_test.go | 205 +++++++ flytectl/pkg/github/mocks/gh_repo_service.go | 213 ++++++++ flytectl/pkg/githubutil/githubutil_test.go | 150 ----- 24 files changed, 858 insertions(+), 1136 deletions(-) rename flytectl/pkg/{githubutil => github}/githubutil.go (64%) create mode 100644 flytectl/pkg/github/githubutil_test.go create mode 100644 flytectl/pkg/github/mocks/gh_repo_service.go delete mode 100644 flytectl/pkg/githubutil/githubutil_test.go diff --git a/flytectl/cmd/demo/exec.go b/flytectl/cmd/demo/exec.go index b0d9510c72..1cda6d0e49 100644 --- a/flytectl/cmd/demo/exec.go +++ b/flytectl/cmd/demo/exec.go @@ -33,7 +33,10 @@ func demoClusterExec(ctx context.Context, args []string, cmdCtx cmdCore.CommandC } func execute(ctx context.Context, cli docker.Docker, args []string) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c != nil { exec, err := docker.ExecCommend(ctx, cli, c.ID, args) if err != nil { diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 893bdce116..ceff28febb 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -10,7 +10,7 @@ import ( "time" "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/githubutil" + "github.com/flyteorg/flytectl/pkg/github" "github.com/avast/retry-go" "github.com/olekukonko/tablewriter" @@ -136,7 +136,9 @@ func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Command return err } - reader, err := startDemo(ctx, cli, os.Stdin) + ghRepo := github.GetGHRepoService() + + reader, err := startDemo(ctx, cli, ghRepo, os.Stdin) if err != nil { return err } @@ -178,7 +180,7 @@ func updateLocalKubeContext() error { return k8sCtxMgr.CopyContext(srcConfigAccess, demoDockerContext, demoContextName) } -func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { +func startDemo(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { @@ -211,7 +213,7 @@ func startDemo(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio } demoImage := sandboxConfig.DefaultConfig.Image if len(demoImage) == 0 { - image, version, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease) + image, version, err := github.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease, g) if err != nil { return nil, err } diff --git a/flytectl/cmd/demo/start_test.go b/flytectl/cmd/demo/start_test.go index 70ab2cb749..11ebacc796 100644 --- a/flytectl/cmd/demo/start_test.go +++ b/flytectl/cmd/demo/start_test.go @@ -6,26 +6,23 @@ import ( "io" "io/ioutil" "os" - "path/filepath" "strings" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin" - - "github.com/flyteorg/flytectl/pkg/githubutil" - - "github.com/flyteorg/flytectl/pkg/k8s" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/mount" sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flyteidl/clients/go/admin" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" corev1 "k8s.io/api/core/v1" @@ -64,6 +61,12 @@ users: provideClusterInfo: true ` +var ( + githubMock *ghMocks.GHRepoService + ctx context.Context + mockDocker *mocks.Docker +) + var fakeNode = &corev1.Node{ Spec: corev1.NodeSpec{ Taints: []corev1.Taint{}, @@ -77,8 +80,22 @@ var fakePod = corev1.Pod{ }, } +func demoSetup() { + ctx = context.Background() + mockDocker = &mocks.Docker{} + errCh := make(chan error) + sandboxConfig.DefaultConfig.Version = "v0.19.1" + bodyStatus := make(chan container.ContainerWaitOKBody) + githubMock = &ghMocks.GHRepoService{} + sandboxConfig.DefaultConfig.Image = "dummyimage" + mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) +} + func TestStartDemoFunc(t *testing.T) { - p1, p2, _ := docker.GetDemoPorts() assert.Nil(t, util.SetupFlyteDir()) assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) @@ -86,58 +103,21 @@ func TestStartDemoFunc(t *testing.T) { fakePod.SetName("flyte") t.Run("Successfully run demo cluster", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - errCh := make(chan error) - sandboxConfig.DefaultConfig.Version = "v0.19.1" - bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - errCh := make(chan error) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { ID: docker.FlyteSandboxClusterName, @@ -147,46 +127,23 @@ func TestStartDemoFunc(t *testing.T) { }, }, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - reader, err := startDemo(ctx, mockDocker, strings.NewReader("n")) + reader, err := startDemo(ctx, mockDocker, githubMock, strings.NewReader("n")) assert.Nil(t, err) assert.Nil(t, reader) }) t.Run("Successfully run demo cluster with source code", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = f.UserHomeDir() sandboxConfig.DefaultConfig.Version = "" - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -194,41 +151,15 @@ func TestStartDemoFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} sandboxConfig.DefaultConfig.Source = "../" sandboxConfig.DefaultConfig.Version = "" - absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) - assert.Nil(t, err) - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: absPath, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -236,35 +167,13 @@ func TestStartDemoFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.18.0" - sandboxConfig.DefaultConfig.Source = "" - - image, _, err := githubutil.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, false) - assert.Nil(t, err) - volumes := docker.Volumes - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -272,111 +181,42 @@ func TestStartDemoFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + sandboxConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.1444.0" - sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - volumes := docker.Volumes - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + sandboxConfig.DefaultConfig.Image = "" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "non-existent-tag", err.Error()) }) t.Run("Error in pulling image", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) + sandboxConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to pull", err.Error()) }) t.Run("Error in removing existing cluster", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { ID: docker.FlyteSandboxClusterName, @@ -386,136 +226,53 @@ func TestStartDemoFunc(t *testing.T) { }, }, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("error")) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, strings.NewReader("y")) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) + _, err := startDemo(ctx, mockDocker, githubMock, strings.NewReader("y")) assert.NotNil(t, err) + assert.Equal(t, "failed to remove container", err.Error()) }) t.Run("Error in start container", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = "" - sandboxConfig.DefaultConfig.Version = "" - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, fmt.Errorf("error")) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to run container", err.Error()) }) t.Run("Error in reading logs", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, - }).Return(nil, fmt.Errorf("error")) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) + }).Return(nil, fmt.Errorf("failed to get container logs")) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to get container logs", err.Error()) }) t.Run("Error in list container", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - sandboxConfig.DefaultConfig.Version = "" - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + demoSetup() + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startDemo(ctx, mockDocker, os.Stdin) - assert.Nil(t, err) + _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) + assert.NotNil(t, err) + assert.Equal(t, "failed to list containers", err.Error()) }) t.Run("Successfully run demo cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) - ctx := context.Background() cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - mockDocker := &mocks.Docker{} - errCh := make(chan error) client := testclient.NewSimpleClientset() k8s.Client = client _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) @@ -527,24 +284,11 @@ func TestStartDemoFunc(t *testing.T) { if err != nil { t.Error(err) } - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + demoSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + stringReader := strings.NewReader(docker.SuccessMessage) reader := ioutil.NopCloser(stringReader) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ @@ -553,7 +297,6 @@ func TestStartDemoFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(reader, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) mockK8sContextMgr := &k8sMocks.ContextOps{} docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" @@ -565,40 +308,19 @@ func TestStartDemoFunc(t *testing.T) { }) t.Run("Error in running demo cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) - ctx := context.Background() cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - mockDocker := &mocks.Docker{} - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + demoSetup() + docker.Client = mockDocker + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - stringReader := strings.NewReader(docker.SuccessMessage) - reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, - }).Return(reader, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - docker.Client = mockDocker - sandboxConfig.DefaultConfig.Source = "" - err = startDemoCluster(ctx, []string{}, cmdCtx) + }).Return(nil, nil) + err := startDemoCluster(ctx, []string{}, cmdCtx) assert.NotNil(t, err) }) } @@ -702,30 +424,3 @@ func TestGetNodeTaintStatus(t *testing.T) { assert.Equal(t, true, c) }) } - -func TestGetDemoImage(t *testing.T) { - t.Run("Get Latest demo cluster", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "", demoImageName, false) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox-lite:sha-")) - }) - - t.Run("Get demo image with version ", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("sha", "v0.14.0", demoImageName, false) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, demoImageName)) - }) - t.Run("Get demo image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("sha", "v100.1.0", demoImageName, false) - assert.NotNil(t, err) - }) - t.Run("Get demo image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("sha", "aaaaaa", demoImageName, false) - assert.NotNil(t, err) - }) - t.Run("Get demo image with version that is not supported", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("sha", "v0.10.0", demoImageName, false) - assert.NotNil(t, err) - }) - -} diff --git a/flytectl/cmd/demo/status.go b/flytectl/cmd/demo/status.go index 67a7767afb..942b561d8c 100644 --- a/flytectl/cmd/demo/status.go +++ b/flytectl/cmd/demo/status.go @@ -32,7 +32,10 @@ func demoClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.Comman } func printStatus(ctx context.Context, cli docker.Docker) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c == nil { fmt.Printf("%v no demo cluster found \n", emoji.StopSign) return nil diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go index 1308b10b14..bd98b22e37 100644 --- a/flytectl/cmd/demo/teardown.go +++ b/flytectl/cmd/demo/teardown.go @@ -38,7 +38,10 @@ func teardownDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm } func tearDownDemo(ctx context.Context, cli docker.Docker) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c != nil { if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index eb3feff8ec..04d34be9e1 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -5,13 +5,12 @@ import ( "fmt" "github.com/flyteorg/flytectl/cmd/config" - + rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + g "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytestdlib/logger" "github.com/google/go-github/v42/github" - - rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" - cmdCore "github.com/flyteorg/flytectl/cmd/core" ) const ( @@ -44,7 +43,8 @@ func registerExamplesFunc(ctx context.Context, args []string, cmdCtx cmdCore.Com // Deprecated checks for --k8Service deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) - examples, tag, err := getAllExample(flytesnacks, rconfig.DefaultFilesConfig.Version) + ghRepo := g.GetGHRepoService() + examples, tag, err := getAllExample(flytesnacks, rconfig.DefaultFilesConfig.Version, ghRepo) if err != nil { return err } diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 3d68cca648..90c18c7444 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -22,7 +22,7 @@ import ( "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" - "github.com/flyteorg/flytectl/pkg/githubutil" + g "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils" @@ -654,15 +654,15 @@ func filterExampleFromRelease(releases *github.RepositoryRelease) []*github.Rele return assets } -func getAllExample(repository, version string) ([]*github.ReleaseAsset, *github.RepositoryRelease, error) { +func getAllExample(repository, version string, repoService g.GHRepoService) ([]*github.ReleaseAsset, *github.RepositoryRelease, error) { if len(version) > 0 { - release, err := githubutil.CheckVersionExist(version, repository) + release, err := g.GetReleaseByTag(version, repository, repoService) if err != nil { return nil, nil, err } return filterExampleFromRelease(release), release, nil } - release, err := githubutil.GetLatestVersion(repository) + release, err := g.GetLatestRelease(repository, repoService) if err != nil { return nil, nil, err } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 8b614ed0f6..e1d3093410 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -12,6 +12,7 @@ import ( "strings" "testing" + ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" "github.com/flyteorg/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" @@ -29,6 +30,7 @@ import ( rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/grpc/codes" @@ -434,15 +436,35 @@ func TestGetStorageClient(t *testing.T) { func TestGetAllFlytesnacksExample(t *testing.T) { t.Run("Failed to get manifest with wrong name", func(t *testing.T) { - _, _, err := getAllExample("no////ne", "") + mockGh := &ghMocks.GHRepoService{} + mockGh.OnGetLatestReleaseMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("failed")) + _, _, err := getAllExample("no////ne", "", mockGh) assert.NotNil(t, err) }) t.Run("Failed to get release", func(t *testing.T) { - _, _, err := getAllExample("homebrew-tap", "") + mockGh := &ghMocks.GHRepoService{} + tag := "v0.15.0" + sandboxManifest := "flyte_sandbox_manifest.tgz" + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + Assets: []*github.ReleaseAsset{{ + Name: &sandboxManifest, + }}, + }, nil, fmt.Errorf("failed")) + _, _, err := getAllExample("homebrew-tap", "1.0", mockGh) assert.NotNil(t, err) }) t.Run("Successfully get examples", func(t *testing.T) { - assets, r, err := getAllExample("flytesnacks", "v0.2.175") + mockGh := &ghMocks.GHRepoService{} + tag := "v0.15.0" + sandboxManifest := "flyte_sandbox_manifest.tgz" + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + Assets: []*github.ReleaseAsset{{ + Name: &sandboxManifest, + }}, + }, nil, nil) + assets, r, err := getAllExample("flytesnacks", tag, mockGh) assert.Nil(t, err) assert.Greater(t, len(*r.TagName), 0) assert.Greater(t, len(assets), 0) diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index 327d2e4f23..0d45c235e4 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -33,7 +33,10 @@ func sandboxClusterExec(ctx context.Context, args []string, cmdCtx cmdCore.Comma } func execute(ctx context.Context, cli docker.Docker, args []string) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c != nil { exec, err := docker.ExecCommend(ctx, cli, c.ID, args) if err != nil { diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index c7afba967b..9e9013b6f5 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -10,7 +10,7 @@ import ( "time" "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/githubutil" + "github.com/flyteorg/flytectl/pkg/github" "github.com/avast/retry-go" "github.com/olekukonko/tablewriter" @@ -42,11 +42,13 @@ Starts the sandbox cluster without any source code: flytectl sandbox start Mounts your source code repository inside the sandbox: + :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. + :: flytectl sandbox start --version=v0.14.0 @@ -117,7 +119,9 @@ func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm return err } - reader, err := startSandbox(ctx, cli, os.Stdin) + ghRepo := github.GetGHRepoService() + + reader, err := startSandbox(ctx, cli, ghRepo, os.Stdin) if err != nil { return err } @@ -158,7 +162,7 @@ func updateLocalKubeContext() error { return k8sCtxMgr.CopyContext(srcConfigAccess, sandboxDockerContext, sandboxContextName) } -func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bufio.Scanner, error) { +func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { @@ -191,7 +195,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, reader io.Reader) (*bu } sandboxImage := sandboxConfig.DefaultConfig.Image if len(sandboxImage) == 0 { - image, version, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease) + image, version, err := github.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease, g) if err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index fd6623c766..8e1f28c5c8 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -6,26 +6,24 @@ import ( "io" "io/ioutil" "os" - "path/filepath" "strings" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin" - - "github.com/flyteorg/flytectl/pkg/githubutil" - - "github.com/flyteorg/flytectl/pkg/k8s" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/mount" sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + ghutil "github.com/flyteorg/flytectl/pkg/github" + ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flyteidl/clients/go/admin" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" corev1 "k8s.io/api/core/v1" @@ -77,68 +75,50 @@ var fakePod = corev1.Pod{ }, } -func TestStartSandboxFunc(t *testing.T) { - p1, p2, _ := docker.GetSandboxPorts() +var ( + githubMock *ghMocks.GHRepoService + ctx context.Context + mockDocker *mocks.Docker +) + +func sandboxSetup() { + ctx = context.Background() + mockDocker = &mocks.Docker{} + errCh := make(chan error) + sandboxConfig.DefaultConfig.Version = "v0.19.1" + bodyStatus := make(chan container.ContainerWaitOKBody) + githubMock = &ghMocks.GHRepoService{} + sandboxConfig.DefaultConfig.Image = "dummyimage" + mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) +} + +func TestStartFunc(t *testing.T) { assert.Nil(t, util.SetupFlyteDir()) assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) - fakePod.SetName("flyte") fakePod.SetName("flyte") - t.Run("Successfully run sandbox cluster", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - errCh := make(chan error) - sandboxConfig.DefaultConfig.Version = "v0.19.1" - bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + t.Run("Successfully run demo cluster", func(t *testing.T) { + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) - t.Run("Successfully exit when sandbox cluster exist", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - errCh := make(chan error) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { ID: docker.FlyteSandboxClusterName, @@ -148,46 +128,23 @@ func TestStartSandboxFunc(t *testing.T) { }, }, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - reader, err := startSandbox(ctx, mockDocker, strings.NewReader("n")) + reader, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("n")) assert.Nil(t, err) assert.Nil(t, reader) }) - t.Run("Successfully run sandbox cluster with source code", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} + t.Run("Successfully run demo cluster with source code", func(t *testing.T) { sandboxConfig.DefaultConfig.Source = f.UserHomeDir() sandboxConfig.DefaultConfig.Version = "" - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -195,41 +152,15 @@ func TestStartSandboxFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) - t.Run("Successfully run sandbox cluster with abs path of source code", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} + t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { sandboxConfig.DefaultConfig.Source = "../" sandboxConfig.DefaultConfig.Version = "" - absPath, err := filepath.Abs(sandboxConfig.DefaultConfig.Source) - assert.Nil(t, err) - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: absPath, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -237,35 +168,13 @@ func TestStartSandboxFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) - t.Run("Successfully run sandbox cluster with specific version", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.18.0" - sandboxConfig.DefaultConfig.Source = "" - - image, _, err := githubutil.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, false) - assert.Nil(t, err) - volumes := docker.Volumes - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -273,111 +182,42 @@ func TestStartSandboxFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + sandboxConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.Nil(t, err) }) - t.Run("Failed run sandbox cluster with wrong version", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Version = "v0.1444.0" - sandboxConfig.DefaultConfig.Source = "" - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - volumes := docker.Volumes - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + sandboxConfig.DefaultConfig.Image = "" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "non-existent-tag", err.Error()) }) t.Run("Error in pulling image", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) + sandboxConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to pull", err.Error()) }) t.Run("Error in removing existing cluster", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ { ID: docker.FlyteSandboxClusterName, @@ -387,136 +227,53 @@ func TestStartSandboxFunc(t *testing.T) { }, }, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("error")) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, strings.NewReader("y")) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) + _, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("y")) assert.NotNil(t, err) + assert.Equal(t, "failed to remove container", err.Error()) }) t.Run("Error in start container", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = "" - sandboxConfig.DefaultConfig.Version = "" - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, fmt.Errorf("error")) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to run container", err.Error()) }) t.Run("Error in reading logs", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, - }).Return(nil, fmt.Errorf("error")) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) + }).Return(nil, fmt.Errorf("failed to get container logs")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) assert.NotNil(t, err) + assert.Equal(t, "failed to get container logs", err.Error()) }) t.Run("Error in list container", func(t *testing.T) { - ctx := context.Background() - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker := &mocks.Docker{} - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - sandboxConfig.DefaultConfig.Version = "" - volumes := docker.Volumes - volumes = append(volumes, mount.Mount{ - Type: mount.TypeBind, - Source: sandboxConfig.DefaultConfig.Source, - Target: docker.Source, - }) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + sandboxSetup() + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - _, err = startSandbox(ctx, mockDocker, os.Stdin) - assert.Nil(t, err) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) + assert.NotNil(t, err) + assert.Equal(t, "failed to list containers", err.Error()) }) - t.Run("Successfully run sandbox cluster command", func(t *testing.T) { + t.Run("Successfully run demo cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) - ctx := context.Background() cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - mockDocker := &mocks.Docker{} - errCh := make(chan error) client := testclient.NewSimpleClientset() k8s.Client = client _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) @@ -528,24 +285,11 @@ func TestStartSandboxFunc(t *testing.T) { if err != nil { t.Error(err) } - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - bodyStatus := make(chan container.ContainerWaitOKBody) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + stringReader := strings.NewReader(docker.SuccessMessage) reader := ioutil.NopCloser(stringReader) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ @@ -554,52 +298,31 @@ func TestStartSandboxFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(reader, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) mockK8sContextMgr := &k8sMocks.ContextOps{} docker.Client = mockDocker sandboxConfig.DefaultConfig.Source = "" sandboxConfig.DefaultConfig.Version = "" k8s.ContextMgr = mockK8sContextMgr + ghutil.Client = githubMock mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) err = startSandboxCluster(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) - t.Run("Error in running sandbox cluster command", func(t *testing.T) { + t.Run("Error in running demo cluster command", func(t *testing.T) { mockOutStream := new(io.Writer) - ctx := context.Background() cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - mockDocker := &mocks.Docker{} - errCh := make(chan error) - bodyStatus := make(chan container.ContainerWaitOKBody) - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - mockDocker.OnContainerCreate(ctx, &container.Config{ - Env: docker.Environment, - Image: image, - Tty: false, - ExposedPorts: p1, - }, &container.HostConfig{ - Mounts: docker.Volumes, - PortBindings: p2, - Privileged: true, - }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, fmt.Errorf("error")) + sandboxSetup() + docker.Client = mockDocker + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - stringReader := strings.NewReader(docker.SuccessMessage) - reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, - }).Return(reader, nil) - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) - docker.Client = mockDocker - sandboxConfig.DefaultConfig.Source = "" - err = startSandboxCluster(ctx, []string{}, cmdCtx) + }).Return(nil, nil) + err := startSandboxCluster(ctx, []string{}, cmdCtx) assert.NotNil(t, err) }) } @@ -703,30 +426,3 @@ func TestGetNodeTaintStatus(t *testing.T) { assert.Equal(t, true, c) }) } - -func TestGetSandboxImage(t *testing.T) { - t.Run("Get Latest sandbox", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, "cr.flyte.org/flyteorg/flyte-sandbox:dind-")) - }) - - t.Run("Get sandbox image with version ", func(t *testing.T) { - image, _, err := githubutil.GetFullyQualifiedImageName("dind", "v0.14.0", sandboxImageName, false) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) - }) - t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("dind", "v100.1.0", sandboxImageName, false) - assert.NotNil(t, err) - }) - t.Run("Get sandbox image with wrong version ", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("dind", "aaaaaa", sandboxImageName, false) - assert.NotNil(t, err) - }) - t.Run("Get sandbox image with version that is not supported", func(t *testing.T) { - _, _, err := githubutil.GetFullyQualifiedImageName("dind", "v0.10.0", sandboxImageName, false) - assert.NotNil(t, err) - }) - -} diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index 49e5fb77b7..30160ef7e8 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -32,7 +32,10 @@ func sandboxClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.Com } func printStatus(ctx context.Context, cli docker.Docker) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c == nil { fmt.Printf("%v no Sandbox found \n", emoji.StopSign) return nil diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 16ca11bf20..9280e303a5 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -38,7 +38,10 @@ func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.C } func tearDownSandbox(ctx context.Context, cli docker.Docker) error { - c := docker.GetSandbox(ctx, cli) + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } if c != nil { if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index eb1dde2b3e..f8c4099e4e 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -12,7 +12,7 @@ import ( stdlibversion "github.com/flyteorg/flytestdlib/version" - "github.com/flyteorg/flytectl/pkg/githubutil" + "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytestdlib/logger" "github.com/mouuff/go-rocket-update/pkg/updater" @@ -67,7 +67,7 @@ func selfUpgrade(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte if args[0] == rollBackSubCommand && !isRollBackSupported(goos) { return nil } - ext, err := githubutil.FlytectlReleaseConfig.GetExecutable() + ext, err := github.FlytectlReleaseConfig.GetExecutable() if err != nil { return err } @@ -75,7 +75,7 @@ func selfUpgrade(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte if _, err := os.Stat(backupBinary); err != nil { return errors.New("flytectl backup doesn't exist. Rollback is not possible") } - return githubutil.FlytectlReleaseConfig.Rollback() + return github.FlytectlReleaseConfig.Rollback() } if isSupported, err := isUpgradeSupported(goos); err != nil { @@ -84,7 +84,7 @@ func selfUpgrade(ctx context.Context, args []string, cmdCtx cmdCore.CommandConte return nil } - if message, err := upgrade(githubutil.FlytectlReleaseConfig); err != nil { + if message, err := upgrade(github.FlytectlReleaseConfig); err != nil { return err } else if len(message) > 0 { logger.Info(ctx, message) @@ -109,7 +109,7 @@ func upgrade(u *updater.Updater) (string, error) { } func isUpgradeSupported(goos platformutil.Platform) (bool, error) { - latest, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() + latest, err := github.FlytectlReleaseConfig.GetLatestVersion() if err != nil { return false, err } @@ -121,7 +121,7 @@ func isUpgradeSupported(goos platformutil.Platform) (bool, error) { return false, nil } - message, err := githubutil.GetUpgradeMessage(latest, goos) + message, err := github.GetUpgradeMessage(latest, goos) if err != nil { return false, err } diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 5d4ac283ef..7b5b211e41 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flytectl/pkg/githubutil" + "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytectl/pkg/platformutil" @@ -48,9 +48,9 @@ func TestUpgradeCommand(t *testing.T) { func TestUpgrade(t *testing.T) { _ = util.WriteIntoFile([]byte("data"), tempExt) stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt t.Run("Successful upgrade", func(t *testing.T) { - message, err := upgrade(githubutil.FlytectlReleaseConfig) + message, err := upgrade(github.FlytectlReleaseConfig) assert.Nil(t, err) assert.Contains(t, message, "Successfully updated to version") }) @@ -61,7 +61,7 @@ func TestCheckGoosForRollback(t *testing.T) { linux := platformutil.Linux windows := platformutil.Windows darwin := platformutil.Darwin - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt t.Run("checkGOOSForRollback on linux", func(t *testing.T) { assert.Equal(t, true, isRollBackSupported(linux)) assert.Equal(t, false, isRollBackSupported(windows)) @@ -71,7 +71,7 @@ func TestCheckGoosForRollback(t *testing.T) { func TestIsUpgradeable(t *testing.T) { stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt linux := platformutil.Linux windows := platformutil.Windows darwin := platformutil.Darwin @@ -106,7 +106,7 @@ func TestIsUpgradeable(t *testing.T) { func TestSelfUpgrade(t *testing.T) { stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful upgrade", func(t *testing.T) { s := testutils.Setup() @@ -120,7 +120,7 @@ func TestSelfUpgrade(t *testing.T) { func TestSelfUpgradeError(t *testing.T) { stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful upgrade", func(t *testing.T) { s := testutils.Setup() @@ -135,7 +135,7 @@ func TestSelfUpgradeError(t *testing.T) { func TestSelfUpgradeRollback(t *testing.T) { stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = tempExt + github.FlytectlReleaseConfig.OverrideExecutable = tempExt goos = platformutil.Linux t.Run("Successful rollback", func(t *testing.T) { s := testutils.Setup() @@ -171,7 +171,7 @@ func TestSelfUpgradeRollback(t *testing.T) { stdlibversion.Build = "" stdlibversion.BuildTime = "" stdlibversion.Version = version - githubutil.FlytectlReleaseConfig.OverrideExecutable = "/" + github.FlytectlReleaseConfig.OverrideExecutable = "/" assert.Nil(t, selfUpgrade(s.Ctx, args, s.CmdCtx)) }) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 927ca755f5..f802c69b10 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -6,7 +6,7 @@ import ( "fmt" "runtime" - "github.com/flyteorg/flytectl/pkg/githubutil" + "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytectl/pkg/platformutil" @@ -53,11 +53,11 @@ func GetVersionCommand(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { goos := platformutil.Platform(runtime.GOOS) - version, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() + version, err := github.FlytectlReleaseConfig.GetLatestVersion() if err != nil { logger.Error(ctx, "Unable to get the latest version because %v", err) } else { - message, err := githubutil.GetUpgradeMessage(version, goos) + message, err := github.GetUpgradeMessage(version, goos) if err != nil { logger.Error(ctx, "Unable to detect a new version because %v", err) } diff --git a/flytectl/go.mod b/flytectl/go.mod index 2d68091af6..30190ad03f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.24.15 + github.com/flyteorg/flyteidl v0.24.21 github.com/flyteorg/flytestdlib v0.4.16 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 23095dc02a..5a749e8e12 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -364,8 +364,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.24.15 h1:Iqbwx3w1a4Dh6byRZrZMlHsKPKoOZbBiS9vR0iXzacY= -github.com/flyteorg/flyteidl v0.24.15/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= +github.com/flyteorg/flyteidl v0.24.21 h1:9dowP4gQHBe/1sRfYa5PP2snT/7/ZwgRsYkof4zr19c= +github.com/flyteorg/flyteidl v0.24.21/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index b6bef9549e..aeaae89510 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -65,21 +65,28 @@ func GetDockerClient() (Docker, error) { } // GetSandbox will return sandbox container if it exist -func GetSandbox(ctx context.Context, cli Docker) *types.Container { - containers, _ := cli.ContainerList(ctx, types.ContainerListOptions{ +func GetSandbox(ctx context.Context, cli Docker) (*types.Container, error) { + containers, err := cli.ContainerList(ctx, types.ContainerListOptions{ All: true, }) + if err != nil { + return nil, err + } for _, v := range containers { if strings.Contains(v.Names[0], FlyteSandboxClusterName) { - return &v + return &v, nil } } - return nil + return nil, nil } // RemoveSandbox will remove sandbox container if exist func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { - if c := GetSandbox(ctx, cli); c != nil { + c, err := GetSandbox(ctx, cli) + if err != nil { + return err + } + if c != nil { if cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index a5124fb2bf..37d91f9085 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -43,29 +43,31 @@ func TestGetSandbox(t *testing.T) { setupSandbox() t.Run("Successfully get sandbox container", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() - mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) - c := GetSandbox(context, mockDocker) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + c, err := GetSandbox(ctx, mockDocker) assert.Equal(t, c.Names[0], FlyteSandboxClusterName) + assert.Nil(t, err) }) t.Run("Successfully get sandbox container with zero result", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() - mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - c := GetSandbox(context, mockDocker) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + c, err := GetSandbox(ctx, mockDocker) assert.Nil(t, c) + assert.Nil(t, err) }) t.Run("Error in get sandbox container", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() - mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) - mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) - err := RemoveSandbox(context, mockDocker, strings.NewReader("y")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(ctx, mockDocker, strings.NewReader("y")) assert.Nil(t, err) }) @@ -75,23 +77,23 @@ func TestRemoveSandboxWithNoReply(t *testing.T) { setupSandbox() t.Run("Successfully remove sandbox container", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return(containers, nil) - mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) - err := RemoveSandbox(context, mockDocker, strings.NewReader("n")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(ctx, mockDocker, strings.NewReader("n")) assert.NotNil(t, err) }) t.Run("Successfully remove sandbox container with zero sandbox containers are running", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnContainerList(context, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerRemove(context, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) - err := RemoveSandbox(context, mockDocker, strings.NewReader("n")) + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + err := RemoveSandbox(ctx, mockDocker, strings.NewReader("n")) assert.Nil(t, err) }) @@ -101,39 +103,39 @@ func TestPullDockerImage(t *testing.T) { t.Run("Successfully pull image Always", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) t.Run("Error in pull image", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) assert.NotNil(t, err) }) t.Run("Successfully pull image IfNotPresent", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(context, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnImageListMatch(context, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent, sandboxConfig.ImagePullOptions{}) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) t.Run("Successfully pull image Never", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() - err := PullDockerImage(context, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever, sandboxConfig.ImagePullOptions{}) + ctx := context.Background() + err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever, sandboxConfig.ImagePullOptions{}) assert.Nil(t, err) }) } @@ -144,10 +146,10 @@ func TestStartContainer(t *testing.T) { t.Run("Successfully create a container", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnContainerCreate(context, &container.Config{ + mockDocker.OnContainerCreate(ctx, &container.Config{ Env: Environment, Image: imageName, Tty: false, @@ -159,8 +161,8 @@ func TestStartContainer(t *testing.T) { }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) - mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") @@ -169,14 +171,14 @@ func TestStartContainer(t *testing.T) { t.Run("Successfully create a container with Env", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Setup additional env additionalEnv := []string{"a=1", "b=2"} expectedEnv := append(Environment, "a=1") expectedEnv = append(expectedEnv, "b=2") // Verify the attributes - mockDocker.OnContainerCreate(context, &container.Config{ + mockDocker.OnContainerCreate(ctx, &container.Config{ Env: expectedEnv, Image: imageName, Tty: false, @@ -188,8 +190,8 @@ func TestStartContainer(t *testing.T) { }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) - mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, additionalEnv) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, additionalEnv) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") @@ -199,10 +201,10 @@ func TestStartContainer(t *testing.T) { t.Run("Error in creating container", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnContainerCreate(context, &container.Config{ + mockDocker.OnContainerCreate(ctx, &container.Config{ Env: Environment, Image: imageName, Tty: false, @@ -214,8 +216,8 @@ func TestStartContainer(t *testing.T) { }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "", }, fmt.Errorf("error")) - mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") @@ -224,10 +226,10 @@ func TestStartContainer(t *testing.T) { t.Run("Error in start of a container", func(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} - context := context.Background() + ctx := context.Background() // Verify the attributes - mockDocker.OnContainerCreate(context, &container.Config{ + mockDocker.OnContainerCreate(ctx, &container.Config{ Env: Environment, Image: imageName, Tty: false, @@ -239,8 +241,8 @@ func TestStartContainer(t *testing.T) { }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) - mockDocker.OnContainerStart(context, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - id, err := StartContainer(context, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") @@ -252,27 +254,27 @@ func TestReadLogs(t *testing.T) { t.Run("Successfully read logs", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() - mockDocker.OnContainerLogsMatch(context, mock.Anything, types.ContainerLogsOptions{ + ctx := context.Background() + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - _, err := ReadLogs(context, mockDocker, "test") + _, err := ReadLogs(ctx, mockDocker, "test") assert.Nil(t, err) }) t.Run("Error in reading logs", func(t *testing.T) { mockDocker := &mocks.Docker{} - context := context.Background() - mockDocker.OnContainerLogsMatch(context, mock.Anything, types.ContainerLogsOptions{ + ctx := context.Background() + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, fmt.Errorf("error")) - _, err := ReadLogs(context, mockDocker, "test") + _, err := ReadLogs(ctx, mockDocker, "test") assert.NotNil(t, err) }) } diff --git a/flytectl/pkg/githubutil/githubutil.go b/flytectl/pkg/github/githubutil.go similarity index 64% rename from flytectl/pkg/githubutil/githubutil.go rename to flytectl/pkg/github/githubutil.go index 5fa3dacc6e..e65feaa189 100644 --- a/flytectl/pkg/githubutil/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -1,36 +1,30 @@ -package githubutil +package github import ( "context" + "fmt" "net/http" "os" "path/filepath" "runtime" "strings" - "golang.org/x/text/cases" - "golang.org/x/text/language" - + "github.com/flyteorg/flytectl/pkg/platformutil" "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flytestdlib/logger" - - "golang.org/x/oauth2" - - "github.com/flyteorg/flytectl/pkg/platformutil" stdlibversion "github.com/flyteorg/flytestdlib/version" - "github.com/mouuff/go-rocket-update/pkg/provider" - "github.com/mouuff/go-rocket-update/pkg/updater" - - "fmt" "github.com/google/go-github/v42/github" + "github.com/mouuff/go-rocket-update/pkg/provider" + "github.com/mouuff/go-rocket-update/pkg/updater" + "golang.org/x/oauth2" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) const ( owner = "flyteorg" flyte = "flyte" - sandboxManifest = "flyte_sandbox_manifest.yaml" flytectl = "flytectl" sandboxSupportedVersion = "v0.10.0" flytectlRepository = "github.com/flyteorg/flytectl" @@ -42,6 +36,8 @@ const ( brewInstallDirectory = "/Cellar/flytectl" ) +var Client GHRepoService + // FlytectlReleaseConfig represent the updater config for flytectl binary var FlytectlReleaseConfig = &updater.Updater{ Provider: &provider.Github{ @@ -56,31 +52,28 @@ var ( arch = platformutil.Arch(runtime.GOARCH) ) -//GetGHClient will return github client -func GetGHClient() *github.Client { - if len(os.Getenv("GITHUB_TOKEN")) > 0 { - return github.NewClient(oauth2.NewClient(context.Background(), oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")}, - ))) - } - return github.NewClient(&http.Client{}) +//go:generate mockery -name=GHRepoService -case=underscore + +type GHRepoService interface { + GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error) + ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error) + GetReleaseByTag(ctx context.Context, owner, repo, tag string) (*github.RepositoryRelease, *github.Response, error) + GetCommitSHA1(ctx context.Context, owner, repo, ref, lastSHA string) (string, *github.Response, error) } -// GetLatestVersion returns the latest non-prerelease version of provided repository, as +// GetLatestRelease returns the latest non-prerelease version of provided repoName, as // described in https://docs.github.com/en/rest/reference/releases#get-the-latest-release -func GetLatestVersion(repository string) (*github.RepositoryRelease, error) { - client := GetGHClient() - release, _, err := client.Repositories.GetLatestRelease(context.Background(), owner, repository) +func GetLatestRelease(repoName string, g GHRepoService) (*github.RepositoryRelease, error) { + release, _, err := g.GetLatestRelease(context.Background(), owner, repoName) if err != nil { return nil, err } return release, err } -// GetListRelease returns the list of release of provided repository -func GetListRelease(repository string) ([]*github.RepositoryRelease, error) { - client := GetGHClient() - releases, _, err := client.Repositories.ListReleases(context.Background(), owner, repository, &github.ListOptions{ +// ListReleases returns the list of release of provided repoName +func ListReleases(repoName string, g GHRepoService) ([]*github.RepositoryRelease, error) { + releases, _, err := g.ListReleases(context.Background(), owner, repoName, &github.ListOptions{ PerPage: 100, }) if err != nil { @@ -89,11 +82,43 @@ func GetListRelease(repository string) ([]*github.RepositoryRelease, error) { return releases, err } +// GetReleaseByTag returns the provided tag release if tag exist in repository +func GetReleaseByTag(repoName, tag string, g GHRepoService) (*github.RepositoryRelease, error) { + release, _, err := g.GetReleaseByTag(context.Background(), owner, repoName, tag) + if err != nil { + return nil, err + } + return release, err +} + +// GetCommitSHA1 returns sha hash against the version +func GetCommitSHA1(repoName, version string, g GHRepoService) (string, error) { + sha, _, err := g.GetCommitSHA1(context.Background(), owner, repoName, version, "") + if err != nil { + return "", err + } + return sha, err +} + +// GetAssetFromRelease returns the asset using assetName from github release with tag +func GetAssetFromRelease(tag, assetName, repoName string, g GHRepoService) (*github.ReleaseAsset, error) { + release, _, err := g.GetReleaseByTag(context.Background(), owner, repoName, tag) + if err != nil { + return nil, err + } + for _, v := range release.Assets { + if v.GetName() == assetName { + return v, nil + } + } + return nil, fmt.Errorf("assest is not found in %s[%s] release", repoName, tag) +} + // GetSandboxImageSha returns the sha as per input -func GetSandboxImageSha(version string, pre bool) (string, string, error) { +func GetSandboxImageSha(tag string, pre bool, g GHRepoService) (string, string, error) { var release *github.RepositoryRelease - if len(version) == 0 { - releases, err := GetListRelease(flyte) + if len(tag) == 0 { + releases, err := ListReleases(flyte, g) if err != nil { return "", release.GetTagName(), err } @@ -107,8 +132,8 @@ func GetSandboxImageSha(version string, pre bool) (string, string, error) { } } logger.Infof(context.Background(), "starting with release %s", release.GetTagName()) - } else if len(version) > 0 { - r, err := CheckVersionExist(version, flyte) + } else if len(tag) > 0 { + r, err := GetReleaseByTag(flyte, tag, g) if err != nil { return "", r.GetTagName(), err } @@ -121,7 +146,7 @@ func GetSandboxImageSha(version string, pre bool) (string, string, error) { if !isGreater { return "", release.GetTagName(), fmt.Errorf("version flag only supported with flyte %s+ release", sandboxSupportedVersion) } - sha, err := GetSHAFromVersion(release.GetTagName(), flyte) + sha, err := GetCommitSHA1(flyte, release.GetTagName(), g) if err != nil { return "", release.GetTagName(), err } @@ -137,40 +162,6 @@ func getFlytectlAssetName() string { return fmt.Sprintf("flytectl_%s_%s.tar.gz", cases.Title(language.English).String(runtime.GOOS), arch.String()) } -// CheckVersionExist returns the provided version release if version exist in repository -func CheckVersionExist(version, repository string) (*github.RepositoryRelease, error) { - client := GetGHClient() - release, _, err := client.Repositories.GetReleaseByTag(context.Background(), owner, repository, version) - if err != nil { - return nil, err - } - return release, err -} - -// GetSHAFromVersion returns sha commit hash against a release -func GetSHAFromVersion(version, repository string) (string, error) { - client := GetGHClient() - sha, _, err := client.Repositories.GetCommitSHA1(context.Background(), owner, repository, version, "") - if err != nil { - return "", err - } - return sha, err -} - -// GetAssetsFromRelease returns the asset from github release -func GetAssetsFromRelease(version, assets, repository string) (*github.ReleaseAsset, error) { - release, err := CheckVersionExist(version, repository) - if err != nil { - return nil, err - } - for _, v := range release.Assets { - if v.GetName() == assets { - return v, nil - } - } - return nil, fmt.Errorf("assest is not found in %s[%s] release", repository, version) -} - // GetUpgradeMessage return the upgrade message func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error) { isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version) @@ -218,11 +209,28 @@ func CheckBrewInstall(goos platformutil.Platform) (string, error) { // if no version is specified then the Latest release of cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA} is used // else cr.flyte.org/flyteorg/flyte-sandbox:dind-{SHA}, where sha is derived from the version. // If pre release is true then use latest pre release of Flyte, In that case User don't need to pass version -func GetFullyQualifiedImageName(prefix, version, image string, pre bool) (string, string, error) { - sha, version, err := GetSandboxImageSha(version, pre) + +func GetFullyQualifiedImageName(prefix, version, image string, pre bool, g GHRepoService) (string, string, error) { + sha, version, err := GetSandboxImageSha(version, pre, g) if err != nil { return "", version, err } return fmt.Sprintf("%s:%s", image, fmt.Sprintf("%s-%s", prefix, sha)), version, nil } + +// GetGHRepoService returns the initialized github repo service client. +func GetGHRepoService() GHRepoService { + if Client == nil { + var gh *github.Client + if len(os.Getenv("GITHUB_TOKEN")) > 0 { + gh = github.NewClient(oauth2.NewClient(context.Background(), oauth2.StaticTokenSource( + &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")}, + ))) + } else { + gh = github.NewClient(&http.Client{}) + } + return gh.Repositories + } + return Client +} diff --git a/flytectl/pkg/github/githubutil_test.go b/flytectl/pkg/github/githubutil_test.go new file mode 100644 index 0000000000..920f7682ec --- /dev/null +++ b/flytectl/pkg/github/githubutil_test.go @@ -0,0 +1,205 @@ +package github + +import ( + "fmt" + "runtime" + "strings" + "testing" + + "github.com/flyteorg/flytectl/pkg/github/mocks" + "github.com/flyteorg/flytectl/pkg/platformutil" + stdlibversion "github.com/flyteorg/flytestdlib/version" + "github.com/google/go-github/v42/github" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "golang.org/x/text/cases" + "golang.org/x/text/language" +) + +var sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" + +func TestGetLatestVersion(t *testing.T) { + t.Run("Get latest release with wrong url", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetLatestReleaseMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("failed")) + _, err := GetLatestRelease("fl", mockGh) + assert.NotNil(t, err) + }) + t.Run("Get latest release", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetLatestReleaseMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, nil) + _, err := GetLatestRelease("flytectl", mockGh) + assert.Nil(t, err) + }) +} + +func TestGetLatestRelease(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v1.0.0" + mockGh.OnGetLatestReleaseMatch(mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + release, err := GetLatestRelease("flyte", mockGh) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) +} + +func TestCheckVersionExist(t *testing.T) { + t.Run("Invalid Tag", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("failed")) + _, err := GetReleaseByTag("v100.0.0", "flyte", mockGh) + assert.NotNil(t, err) + }) + t.Run("Valid Tag", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v1.0.0" + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + release, err := GetReleaseByTag(tag, "flyte", mockGh) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) + }) +} + +func TestGetFullyQualifiedImageName(t *testing.T) { + t.Run("Get tFully Qualified Image Name ", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v0.15.0" + isPreRelease := false + releases := []*github.RepositoryRelease{{ + TagName: &tag, + Prerelease: &isPreRelease, + }} + mockGh.OnListReleasesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(releases, nil, nil) + mockGh.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sandboxImageName, nil, nil) + image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, false, mockGh) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(tag, "v")) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) + t.Run("Get Fully Qualified Image Name with pre release", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v0.15.0-pre" + isPreRelease := true + releases := []*github.RepositoryRelease{{ + TagName: &tag, + Prerelease: &isPreRelease, + }} + mockGh.OnListReleasesMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(releases, nil, nil) + mockGh.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sandboxImageName, nil, nil) + image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, isPreRelease, mockGh) + assert.Nil(t, err) + assert.Equal(t, true, strings.HasPrefix(tag, "v")) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) + t.Run("Get Fully Qualified Image Name with specific version", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v0.19.0" + isPreRelease := true + release := &github.RepositoryRelease{ + TagName: &tag, + Prerelease: &isPreRelease, + } + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(release, nil, nil) + mockGh.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(sandboxImageName, nil, nil) + image, tag, err := GetFullyQualifiedImageName("dind", "v0.19.0", sandboxImageName, isPreRelease, mockGh) + assert.Nil(t, err) + assert.Equal(t, "v0.19.0", tag) + assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) + }) +} + +func TestGetSHAFromVersion(t *testing.T) { + t.Run("Invalid Tag", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("", nil, fmt.Errorf("failed")) + _, err := GetCommitSHA1("v100.0.0", "flyte", mockGh) + assert.NotNil(t, err) + }) + t.Run("Valid Tag", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("v1.15.0", nil, nil) + release, err := GetCommitSHA1("v0.15.0", "flyte", mockGh) + assert.Nil(t, err) + assert.Greater(t, len(release), 0) + }) +} + +func TestGetAssetsFromRelease(t *testing.T) { + t.Run("Successful get assets", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + tag := "v0.15.0" + sandboxManifest := "flyte_sandbox_manifest.yaml" + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + Assets: []*github.ReleaseAsset{{ + Name: &sandboxManifest, + }, + }, + }, nil, nil) + assets, err := GetAssetFromRelease(tag, sandboxManifest, flyte, mockGh) + assert.Nil(t, err) + assert.NotNil(t, assets) + assert.Equal(t, sandboxManifest, *assets.Name) + }) + + t.Run("Failed get assets with wrong name", func(t *testing.T) { + mockGh := &mocks.GHRepoService{} + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("failed")) + assets, err := GetAssetFromRelease("v0.15.0", "test", flyte, mockGh) + assert.NotNil(t, err) + assert.Nil(t, assets) + }) +} + +func TestGetAssetsName(t *testing.T) { + t.Run("Get Assets name", func(t *testing.T) { + expected := fmt.Sprintf("flytectl_%s_386.tar.gz", cases.Title(language.English).String(runtime.GOOS)) + arch = platformutil.Arch386 + assert.Equal(t, expected, getFlytectlAssetName()) + }) +} + +func TestCheckBrewInstall(t *testing.T) { + symlink, err := CheckBrewInstall(platformutil.Darwin) + assert.Nil(t, err) + assert.Equal(t, len(symlink), 0) + symlink, err = CheckBrewInstall(platformutil.Linux) + assert.Nil(t, err) + assert.Equal(t, 0, len(symlink)) +} + +func TestGetUpgradeMessage(t *testing.T) { + var darwin = platformutil.Darwin + var linux = platformutil.Linux + var windows = platformutil.Linux + + var version = "v0.2.20" + stdlibversion.Version = "v0.2.10" + message, err := GetUpgradeMessage(version, darwin) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) + + version = "v0.2.09" + message, err = GetUpgradeMessage(version, darwin) + assert.Nil(t, err) + assert.Equal(t, 63, len(message)) + + version = "v" + message, err = GetUpgradeMessage(version, darwin) + assert.NotNil(t, err) + assert.Equal(t, 0, len(message)) + + version = "v0.2.20" + message, err = GetUpgradeMessage(version, windows) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) + + version = "v0.2.20" + message, err = GetUpgradeMessage(version, linux) + assert.Nil(t, err) + assert.Equal(t, 157, len(message)) +} diff --git a/flytectl/pkg/github/mocks/gh_repo_service.go b/flytectl/pkg/github/mocks/gh_repo_service.go new file mode 100644 index 0000000000..04c2bfebc1 --- /dev/null +++ b/flytectl/pkg/github/mocks/gh_repo_service.go @@ -0,0 +1,213 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + github "github.com/google/go-github/v42/github" + mock "github.com/stretchr/testify/mock" +) + +// GHRepoService is an autogenerated mock type for the GHRepoService type +type GHRepoService struct { + mock.Mock +} + +type GHRepoService_GetCommitSHA1 struct { + *mock.Call +} + +func (_m GHRepoService_GetCommitSHA1) Return(_a0 string, _a1 *github.Response, _a2 error) *GHRepoService_GetCommitSHA1 { + return &GHRepoService_GetCommitSHA1{Call: _m.Call.Return(_a0, _a1, _a2)} +} + +func (_m *GHRepoService) OnGetCommitSHA1(ctx context.Context, owner string, repo string, ref string, lastSHA string) *GHRepoService_GetCommitSHA1 { + c := _m.On("GetCommitSHA1", ctx, owner, repo, ref, lastSHA) + return &GHRepoService_GetCommitSHA1{Call: c} +} + +func (_m *GHRepoService) OnGetCommitSHA1Match(matchers ...interface{}) *GHRepoService_GetCommitSHA1 { + c := _m.On("GetCommitSHA1", matchers...) + return &GHRepoService_GetCommitSHA1{Call: c} +} + +// GetCommitSHA1 provides a mock function with given fields: ctx, owner, repo, ref, lastSHA +func (_m *GHRepoService) GetCommitSHA1(ctx context.Context, owner string, repo string, ref string, lastSHA string) (string, *github.Response, error) { + ret := _m.Called(ctx, owner, repo, ref, lastSHA) + + var r0 string + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) string); ok { + r0 = rf(ctx, owner, repo, ref, lastSHA) + } else { + r0 = ret.Get(0).(string) + } + + var r1 *github.Response + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) *github.Response); ok { + r1 = rf(ctx, owner, repo, ref, lastSHA) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + var r2 error + if rf, ok := ret.Get(2).(func(context.Context, string, string, string, string) error); ok { + r2 = rf(ctx, owner, repo, ref, lastSHA) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +type GHRepoService_GetLatestRelease struct { + *mock.Call +} + +func (_m GHRepoService_GetLatestRelease) Return(_a0 *github.RepositoryRelease, _a1 *github.Response, _a2 error) *GHRepoService_GetLatestRelease { + return &GHRepoService_GetLatestRelease{Call: _m.Call.Return(_a0, _a1, _a2)} +} + +func (_m *GHRepoService) OnGetLatestRelease(ctx context.Context, owner string, repo string) *GHRepoService_GetLatestRelease { + c := _m.On("GetLatestRelease", ctx, owner, repo) + return &GHRepoService_GetLatestRelease{Call: c} +} + +func (_m *GHRepoService) OnGetLatestReleaseMatch(matchers ...interface{}) *GHRepoService_GetLatestRelease { + c := _m.On("GetLatestRelease", matchers...) + return &GHRepoService_GetLatestRelease{Call: c} +} + +// GetLatestRelease provides a mock function with given fields: ctx, owner, repo +func (_m *GHRepoService) GetLatestRelease(ctx context.Context, owner string, repo string) (*github.RepositoryRelease, *github.Response, error) { + ret := _m.Called(ctx, owner, repo) + + var r0 *github.RepositoryRelease + if rf, ok := ret.Get(0).(func(context.Context, string, string) *github.RepositoryRelease); ok { + r0 = rf(ctx, owner, repo) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.RepositoryRelease) + } + } + + var r1 *github.Response + if rf, ok := ret.Get(1).(func(context.Context, string, string) *github.Response); ok { + r1 = rf(ctx, owner, repo) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + var r2 error + if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok { + r2 = rf(ctx, owner, repo) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +type GHRepoService_GetReleaseByTag struct { + *mock.Call +} + +func (_m GHRepoService_GetReleaseByTag) Return(_a0 *github.RepositoryRelease, _a1 *github.Response, _a2 error) *GHRepoService_GetReleaseByTag { + return &GHRepoService_GetReleaseByTag{Call: _m.Call.Return(_a0, _a1, _a2)} +} + +func (_m *GHRepoService) OnGetReleaseByTag(ctx context.Context, owner string, repo string, tag string) *GHRepoService_GetReleaseByTag { + c := _m.On("GetReleaseByTag", ctx, owner, repo, tag) + return &GHRepoService_GetReleaseByTag{Call: c} +} + +func (_m *GHRepoService) OnGetReleaseByTagMatch(matchers ...interface{}) *GHRepoService_GetReleaseByTag { + c := _m.On("GetReleaseByTag", matchers...) + return &GHRepoService_GetReleaseByTag{Call: c} +} + +// GetReleaseByTag provides a mock function with given fields: ctx, owner, repo, tag +func (_m *GHRepoService) GetReleaseByTag(ctx context.Context, owner string, repo string, tag string) (*github.RepositoryRelease, *github.Response, error) { + ret := _m.Called(ctx, owner, repo, tag) + + var r0 *github.RepositoryRelease + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *github.RepositoryRelease); ok { + r0 = rf(ctx, owner, repo, tag) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*github.RepositoryRelease) + } + } + + var r1 *github.Response + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) *github.Response); ok { + r1 = rf(ctx, owner, repo, tag) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + var r2 error + if rf, ok := ret.Get(2).(func(context.Context, string, string, string) error); ok { + r2 = rf(ctx, owner, repo, tag) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +type GHRepoService_ListReleases struct { + *mock.Call +} + +func (_m GHRepoService_ListReleases) Return(_a0 []*github.RepositoryRelease, _a1 *github.Response, _a2 error) *GHRepoService_ListReleases { + return &GHRepoService_ListReleases{Call: _m.Call.Return(_a0, _a1, _a2)} +} + +func (_m *GHRepoService) OnListReleases(ctx context.Context, owner string, repo string, opts *github.ListOptions) *GHRepoService_ListReleases { + c := _m.On("ListReleases", ctx, owner, repo, opts) + return &GHRepoService_ListReleases{Call: c} +} + +func (_m *GHRepoService) OnListReleasesMatch(matchers ...interface{}) *GHRepoService_ListReleases { + c := _m.On("ListReleases", matchers...) + return &GHRepoService_ListReleases{Call: c} +} + +// ListReleases provides a mock function with given fields: ctx, owner, repo, opts +func (_m *GHRepoService) ListReleases(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error) { + ret := _m.Called(ctx, owner, repo, opts) + + var r0 []*github.RepositoryRelease + if rf, ok := ret.Get(0).(func(context.Context, string, string, *github.ListOptions) []*github.RepositoryRelease); ok { + r0 = rf(ctx, owner, repo, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*github.RepositoryRelease) + } + } + + var r1 *github.Response + if rf, ok := ret.Get(1).(func(context.Context, string, string, *github.ListOptions) *github.Response); ok { + r1 = rf(ctx, owner, repo, opts) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*github.Response) + } + } + + var r2 error + if rf, ok := ret.Get(2).(func(context.Context, string, string, *github.ListOptions) error); ok { + r2 = rf(ctx, owner, repo, opts) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} diff --git a/flytectl/pkg/githubutil/githubutil_test.go b/flytectl/pkg/githubutil/githubutil_test.go deleted file mode 100644 index 037a0ede14..0000000000 --- a/flytectl/pkg/githubutil/githubutil_test.go +++ /dev/null @@ -1,150 +0,0 @@ -package githubutil - -import ( - "fmt" - "runtime" - "strings" - "testing" - - "golang.org/x/text/cases" - "golang.org/x/text/language" - - stdlibversion "github.com/flyteorg/flytestdlib/version" - - "github.com/flyteorg/flytectl/pkg/platformutil" - - "github.com/stretchr/testify/assert" -) - -var sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" - -func TestGetLatestVersion(t *testing.T) { - t.Run("Get latest release with wrong url", func(t *testing.T) { - _, err := GetLatestVersion("fl") - assert.NotNil(t, err) - }) - t.Run("Get latest release", func(t *testing.T) { - _, err := GetLatestVersion("flytectl") - assert.Nil(t, err) - }) -} - -func TestGetLatestRelease(t *testing.T) { - release, err := GetLatestVersion("flyte") - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) -} - -func TestCheckVersionExist(t *testing.T) { - t.Run("Invalid Tag", func(t *testing.T) { - _, err := CheckVersionExist("v100.0.0", "flyte") - assert.NotNil(t, err) - }) - t.Run("Valid Tag", func(t *testing.T) { - release, err := CheckVersionExist("v0.15.0", "flyte") - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(release.GetTagName(), "v")) - }) -} - -func TestGetFullyQualifiedImageName(t *testing.T) { - t.Run("Get tFully Qualified Image Name ", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, false) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(tag, "v")) - assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) - }) - t.Run("Get tFully Qualified Image Name with pre release", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("dind", "", sandboxImageName, true) - assert.Nil(t, err) - assert.Equal(t, true, strings.HasPrefix(tag, "v")) - assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) - }) - t.Run("Get tFully Qualified Image Name with specific version", func(t *testing.T) { - image, tag, err := GetFullyQualifiedImageName("dind", "v0.19.0", sandboxImageName, true) - assert.Nil(t, err) - assert.Equal(t, "v0.19.0", tag) - assert.Equal(t, true, strings.HasPrefix(image, sandboxImageName)) - }) -} - -func TestGetSHAFromVersion(t *testing.T) { - t.Run("Invalid Tag", func(t *testing.T) { - _, err := GetSHAFromVersion("v100.0.0", "flyte") - assert.NotNil(t, err) - }) - t.Run("Valid Tag", func(t *testing.T) { - release, err := GetSHAFromVersion("v0.15.0", "flyte") - assert.Nil(t, err) - assert.Greater(t, len(release), 0) - }) -} - -func TestGetAssetsFromRelease(t *testing.T) { - t.Run("Successful get assets", func(t *testing.T) { - assets, err := GetAssetsFromRelease("v0.15.0", sandboxManifest, flyte) - assert.Nil(t, err) - assert.NotNil(t, assets) - assert.Equal(t, sandboxManifest, *assets.Name) - }) - - t.Run("Failed get assets with wrong name", func(t *testing.T) { - assets, err := GetAssetsFromRelease("v0.15.0", "test", flyte) - assert.NotNil(t, err) - assert.Nil(t, assets) - }) - t.Run("Successful get assets with wrong version", func(t *testing.T) { - assets, err := GetAssetsFromRelease("v100.15.0", "test", flyte) - assert.NotNil(t, err) - assert.Nil(t, assets) - }) -} - -func TestGetAssetsName(t *testing.T) { - t.Run("Get Assets name", func(t *testing.T) { - expected := fmt.Sprintf("flytectl_%s_386.tar.gz", cases.Title(language.English).String(runtime.GOOS)) - arch = platformutil.Arch386 - assert.Equal(t, expected, getFlytectlAssetName()) - }) -} - -func TestCheckBrewInstall(t *testing.T) { - symlink, err := CheckBrewInstall(platformutil.Darwin) - assert.Nil(t, err) - assert.Equal(t, len(symlink), 0) - symlink, err = CheckBrewInstall(platformutil.Linux) - assert.Nil(t, err) - assert.Equal(t, 0, len(symlink)) -} - -func TestGetUpgradeMessage(t *testing.T) { - var darwin = platformutil.Darwin - var linux = platformutil.Linux - var windows = platformutil.Linux - - var version = "v0.2.20" - stdlibversion.Version = "v0.2.10" - message, err := GetUpgradeMessage(version, darwin) - assert.Nil(t, err) - assert.Equal(t, 157, len(message)) - - version = "v0.2.09" - message, err = GetUpgradeMessage(version, darwin) - assert.Nil(t, err) - assert.Equal(t, 63, len(message)) - - version = "v" - message, err = GetUpgradeMessage(version, darwin) - assert.NotNil(t, err) - assert.Equal(t, 0, len(message)) - - version = "v0.2.20" - message, err = GetUpgradeMessage(version, windows) - assert.Nil(t, err) - assert.Equal(t, 157, len(message)) - - version = "v0.2.20" - message, err = GetUpgradeMessage(version, linux) - assert.Nil(t, err) - assert.Equal(t, 157, len(message)) -} From 3b49630cfbd4c957583f850e952b927c2968f945 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 28 Apr 2022 09:36:51 +0530 Subject: [PATCH 252/356] Added docs for demo and updated docs for workflow execution config with more details (#316) --- .../matchable_workflow_execution_config.go | 3 ++ .../matchable_workflow_execution_config.go | 50 +++++++++++++++++++ .../matchable_workflow_execution_config.go | 6 +++ flytectl/docs/source/demo.rst | 12 +++++ ...tectl_delete_workflow-execution-config.rst | 3 ++ .../docs/source/gen/flytectl_demo_start.rst | 22 ++++++-- ...flytectl_get_workflow-execution-config.rst | 50 +++++++++++++++++++ .../docs/source/gen/flytectl_get_workflow.rst | 2 +- .../source/gen/flytectl_sandbox_start.rst | 10 ++-- ...tectl_update_workflow-execution-config.rst | 6 +++ flytectl/docs/source/nouns.rst | 1 + flytectl/docs/source/verbs.rst | 1 + 12 files changed, 155 insertions(+), 11 deletions(-) create mode 100644 flytectl/docs/source/demo.rst diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index 4aa47acc23..fda9525f80 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -34,6 +34,9 @@ For example, here's the config file wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 7e75c2a93b..35fd4ce06d 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -69,6 +69,56 @@ Example: content of wec.yaml: project: flytectldemo max_parallelism: 5 +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + + +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain workflow level + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml flytectl get workflow-execution-config --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + workflow: k8s_spark.dataframe_passing.my_smart_structured_dataset + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + Usage ` ) diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 57e20c065d..5a1c28d2d2 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -27,6 +27,9 @@ Example: content of wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo :: @@ -42,6 +45,9 @@ For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo proje project: flytectldemo workflow: core.control_flow.run_merge_sort.merge_sort max_parallelism: 5 + security_context: + run_as: + k8s_service_account: mergesortsa :: diff --git a/flytectl/docs/source/demo.rst b/flytectl/docs/source/demo.rst new file mode 100644 index 0000000000..38e7b49374 --- /dev/null +++ b/flytectl/docs/source/demo.rst @@ -0,0 +1,12 @@ +Sandbox +------- +It specifies the actions to be performed on the 'demo' resource. + +.. toctree:: + :maxdepth: 1 + :caption: Sandbox + + gen/flytectl_demo_start + gen/flytectl_demo_status + gen/flytectl_demo_teardown + gen/flytectl_demo_exec diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 8094452bd6..3f0ef09907 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -30,6 +30,9 @@ For example, here's the config file wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index 694f0e1390..71bcb4a1df 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -17,11 +17,11 @@ Starts the demo cluster without any source code: :: flytectl demo start - + Mounts your source code repository inside the demo cluster: :: - flytectl demo start --source=$HOME/flyteorg/flytesnacks + flytectl demo start --source=$HOME/flyteorg/flytesnacks Specify a Flyte demo compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -29,11 +29,24 @@ Specify a Flyte demo compliant image with the registry. This is useful in case y flytectl demo start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte demo image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: - flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + flytectl demo start --image docker.io/my-override:latest --imagePullPolicy Always + +Runs a specific version of Flyte. Flytectl demo only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +:: + + flytectl demo start --version=v0.14.0 + +.. note:: + Flytectl demo is only supported for Flyte versions >= v1.0.0 + +Runs the latest pre release of Flyte. +:: + + flytectl demo start --pre Start demo cluster passing environment variables. This can be used to pass docker specific env variables or flyte specific env variables. eg : for passing timeout value in secs for the demo container use the following. @@ -41,7 +54,6 @@ eg : for passing timeout value in secs for the demo container use the following. flytectl demo start --env FLYTE_TIMEOUT=700 - The DURATION can be a positive integer or a floating-point number, followed by an optional unit suffix:: s - seconds (default) m - minutes diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 0faeb3c3a7..c3b6123c00 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -61,6 +61,56 @@ Example: content of wec.yaml: project: flytectldemo max_parallelism: 5 +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + + +Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain workflow level + +:: + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml flytectl get workflow-execution-config --gen + + +.. code-block:: yaml + + annotations: + values: + cliAnnotationKey: cliAnnotationValue + domain: development + labels: + values: + cliLabelKey: cliLabelValue + max_parallelism: 10 + project: flytesnacks + workflow: k8s_spark.dataframe_passing.my_smart_structured_dataset + raw_output_data_config: + output_location_prefix: cliOutputLocationPrefix + security_context: + run_as: + k8s_service_account: default + + Usage diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index e3ddfded83..845a89ab86 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -93,7 +93,7 @@ Options --filter.fieldSelector string Specifies the Field selector --filter.limit int32 Specifies the limit (default 100) --filter.page int32 Specifies the page number, in case there are multiple pages of results (default 1) - --filter.sortBy string Specifies which field to sort results (default "created_at") + --filter.sortBy string Specifies which field to sort results -h, --help help for workflow --latest flag to indicate to fetch the latest version, version flag will be ignored in this case --version string version of the workflow to be fetched. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index a638e5cfd0..bfde221cfe 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -17,12 +17,12 @@ Starts the sandbox cluster without any source code: :: flytectl sandbox start - + Mounts your source code repository inside the sandbox: :: - flytectl sandbox start --source=$HOME/flyteorg/flytesnacks - + flytectl sandbox start --source=$HOME/flyteorg/flytesnacks + Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: @@ -36,7 +36,7 @@ Runs the latest pre release of Flyte. flytectl sandbox start --pre -Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -44,7 +44,7 @@ Specify a Flyte Sandbox compliant image with the registry. This is useful in cas flytectl sandbox start --image docker.io/my-override:latest Note: If image flag is passed then Flytectl will ignore version and pre flags. - + Specify a Flyte Sandbox image pull policy. Possible pull policy values are Always, IfNotPresent, or Never: :: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 783ef3795c..a3ec158822 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -24,6 +24,9 @@ Example: content of wec.yaml: domain: development project: flytectldemo max_parallelism: 5 + security_context: + run_as: + k8s_service_account: demo :: @@ -39,6 +42,9 @@ For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo proje project: flytectldemo workflow: core.control_flow.run_merge_sort.merge_sort max_parallelism: 5 + security_context: + run_as: + k8s_service_account: mergesortsa :: diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index 197ce67a02..150d3cab0c 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -23,3 +23,4 @@ Flytectl nouns specify the resource on which the action needs to be performed. E files config sandbox + demo diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index a1763a35b2..50eb37071e 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -15,5 +15,6 @@ Flytectl verbs specify the actions to be performed on the resources. Example: cr gen/flytectl_register gen/flytectl_config gen/flytectl_sandbox + gen/flytectl_demo gen/flytectl_version gen/flytectl_upgrade From b69fc961fac4f11f543a58c68b2272307e44d2f2 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 30 Apr 2022 09:53:09 +0530 Subject: [PATCH 253/356] Removed storage config and updated boilerplate (#319) --- .../flyte/golang_support_tools/go.mod | 6 +- .../flyte/golang_support_tools/go.sum | 8 +- .../flyte/golang_support_tools/tools.go | 2 +- .../golang_test_targets/download_tooling.sh | 4 +- .../config/subcommand/config/config_flags.go | 1 - .../subcommand/config/config_flags_test.go | 14 -- .../config/subcommand/config/init_flags.go | 2 - flytectl/cmd/configuration/configuration.go | 27 +--- .../cmd/configuration/configuration_test.go | 12 +- flytectl/cmd/demo/start.go | 2 +- flytectl/cmd/sandbox/start.go | 2 +- .../cmd/update/interfaces/mocks/updater.go | 8 +- .../docs/source/gen/flytectl_completion.rst | 2 + flytectl/docs/source/index.rst | 27 ---- flytectl/pkg/configutil/configutil.go | 50 +----- flytectl/pkg/configutil/configutil_test.go | 5 +- flytectl/pkg/docker/mocks/docker.go | 88 +++++----- .../ext/mocks/admin_deleter_ext_interface.go | 24 +-- .../ext/mocks/admin_fetcher_ext_interface.go | 152 +++++++++--------- .../ext/mocks/admin_updater_ext_interface.go | 24 +-- flytectl/pkg/github/mocks/gh_repo_service.go | 32 ++-- flytectl/pkg/k8s/mocks/context_ops.go | 16 +- flytectl/pkg/visualize/mocks/graphvizer.go | 64 ++++---- 23 files changed, 228 insertions(+), 344 deletions(-) diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index 441224926c..dbf94f4113 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -3,11 +3,11 @@ module github.com/flyteorg/boilerplate go 1.17 require ( + github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.4.16 github.com/golangci/golangci-lint v1.38.0 github.com/pseudomuto/protoc-gen-doc v1.4.1 - github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 ) require ( @@ -152,7 +152,7 @@ require ( github.com/spf13/viper v1.7.1 // indirect github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect github.com/stretchr/objx v0.3.0 // indirect - github.com/stretchr/testify v1.7.0 // indirect + github.com/stretchr/testify v1.7.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect github.com/tetafro/godot v1.4.4 // indirect @@ -191,6 +191,4 @@ require ( mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect ) -replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 - replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index 755f8cf6ef..02895fb574 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -79,6 +79,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf h1:M7A2Tn3R8rVgsoJHHKkmkpiNOItys4GxJj6JytRjdDg= +github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf/go.mod h1:Kya4Y46gyq/3TEyAzeNe5UkCk+W9apy5KbuX+5KnZ6M= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -194,8 +196,6 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 h1:qxIJwfSemSCqhG3/lEw1Rm+wYbegjuKsqy0ZqnIpL14= -github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0/go.mod h1:KfdIkmkpVY3n2sc1ykFj01uMviOiXH2HMhUCvA5FYGg= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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= @@ -773,8 +773,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= @@ -1035,7 +1036,6 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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= diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index da7b933302..43de03450c 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -4,9 +4,9 @@ package tools import ( + _ "github.com/EngHabu/mockery/cmd/mockery" _ "github.com/alvaroloes/enumer" _ "github.com/flyteorg/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" - _ "github.com/vektra/mockery/cmd/mockery" ) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index f205cb9cd0..003220ea70 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -16,8 +16,8 @@ set -e # List of tools to go get # In the format of ":" or ":" if no cli tools=( - "github.com/vektra/mockery/cmd/mockery" - "github.com/flyteorg/flytestdlib/cli/pflags" + "github.com/EngHabu/mockery/cmd/mockery" + "github.com/flyteorg/flytestdlib/cli/pflags@latest" "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" diff --git a/flytectl/cmd/config/subcommand/config/config_flags.go b/flytectl/cmd/config/subcommand/config/config_flags.go index f22213b004..21ce498e28 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags.go +++ b/flytectl/cmd/config/subcommand/config/config_flags.go @@ -52,6 +52,5 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) cmdFlags.StringVar(&DefaultConfig.Host, fmt.Sprintf("%v%v", prefix, "host"), DefaultConfig.Host, "Endpoint of flyte admin") cmdFlags.BoolVar(&DefaultConfig.Insecure, fmt.Sprintf("%v%v", prefix, "insecure"), DefaultConfig.Insecure, "Enable insecure mode") - cmdFlags.BoolVar(&DefaultConfig.Storage, fmt.Sprintf("%v%v", prefix, "storage"), DefaultConfig.Storage, "Enable storage provider config") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/config/config_flags_test.go b/flytectl/cmd/config/subcommand/config/config_flags_test.go index aaf191eb4e..c7cf208df4 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/config/config_flags_test.go @@ -127,18 +127,4 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_storage", func(t *testing.T) { - - t.Run("Override", func(t *testing.T) { - testValue := "1" - - cmdFlags.Set("storage", testValue) - if vBool, err := cmdFlags.GetBool("storage"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Storage) - - } else { - assert.FailNow(t, err.Error()) - } - }) - }) } diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index cb2047dec6..1e14634711 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -4,7 +4,6 @@ package config var ( DefaultConfig = &Config{ Insecure: false, - Storage: false, } ) @@ -12,5 +11,4 @@ var ( type Config struct { Host string `json:"host" pflag:",Endpoint of flyte admin"` Insecure bool `json:"insecure" pflag:",Enable insecure mode"` - Storage bool `json:"storage" pflag:",Enable storage provider config"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 30e506c2f1..6d660583a7 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -8,8 +8,6 @@ import ( "os" "strings" - "github.com/flyteorg/flytestdlib/logger" - "github.com/flyteorg/flytectl/pkg/util" "github.com/flyteorg/flytectl/pkg/configutil" @@ -19,7 +17,6 @@ import ( cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flytestdlib/config/viper" "github.com/go-ozzo/ozzo-validation/v4/is" - "github.com/manifoldco/promptui" "github.com/spf13/cobra" ) @@ -58,11 +55,6 @@ Generate Flytectl config with a storage provider: ` ) -var prompt = promptui.Select{ - Label: "Select Storage Provider", - Items: []string{"S3", "GCS"}, -} - var endpointPrefix = [3]string{"dns:///", "http://", "https://"} // CreateConfigCommand will return configuration command @@ -80,10 +72,10 @@ func CreateConfigCommand() *cobra.Command { } func configInitFunc(ctx context.Context, args []string, cmdCtx cmdcore.CommandContext) error { - return initFlytectlConfig(ctx, os.Stdin) + return initFlytectlConfig(os.Stdin) } -func initFlytectlConfig(ctx context.Context, reader io.Reader) error { +func initFlytectlConfig(reader io.Reader) error { if err := util.SetupFlyteDir(); err != nil { return err @@ -93,7 +85,7 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { Host: "dns:///localhost:30081", Insecure: true, } - templateStr := configutil.GetSandboxTemplate() + templateStr := configutil.GetTemplate() if len(initConfig.DefaultConfig.Host) > 0 { trimHost := trimEndpoint(initConfig.DefaultConfig.Host) @@ -102,19 +94,6 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error { } templateValues.Host = fmt.Sprintf("dns:///%s", trimHost) templateValues.Insecure = initConfig.DefaultConfig.Insecure - templateStr = configutil.AdminConfigTemplate - if initConfig.DefaultConfig.Storage { - templateStr = configutil.GetAWSCloudTemplate() - _, result, err := prompt.Run() - if err != nil { - return err - } - if strings.ToUpper(result) == "GCS" { - templateStr = configutil.GetGoogleCloudTemplate() - } - } else { - logger.Infof(ctx, "Init flytectl config for remote cluster, Please update your storage config in %s. Learn more about the config here https://docs.flyte.org/projects/flytectl/en/latest/index.html#configure", configutil.ConfigFile) - } } var _err error if _, err := os.Stat(configutil.ConfigFile); os.IsNotExist(err) { diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index da5b0a6f97..19c90a13f4 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -59,15 +59,13 @@ func TestSetupConfigFunc(t *testing.T) { initConfig.DefaultConfig.Host = "" assert.Nil(t, err) - assert.Nil(t, initFlytectlConfig(ctx, yes)) - assert.Nil(t, initFlytectlConfig(ctx, yes)) - assert.Nil(t, initFlytectlConfig(ctx, no)) + assert.Nil(t, initFlytectlConfig(yes)) + assert.Nil(t, initFlytectlConfig(no)) initConfig.DefaultConfig.Host = "flyte.org" - assert.Nil(t, initFlytectlConfig(ctx, no)) + assert.Nil(t, initFlytectlConfig(no)) initConfig.DefaultConfig.Host = "localhost:30081" - assert.Nil(t, initFlytectlConfig(ctx, no)) - initConfig.DefaultConfig.Storage = true - assert.NotNil(t, initFlytectlConfig(ctx, yes)) + assert.Nil(t, initFlytectlConfig(no)) + assert.Nil(t, initFlytectlConfig(yes)) } func TestTrimFunc(t *testing.T) { diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index ceff28febb..4cb13d54e3 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -200,7 +200,7 @@ func startDemo(ctx context.Context, cli docker.Docker, g github.GHRepoService, r Host: "localhost:30081", Insecure: true, } - if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetDemoTemplate(), templateValues); err != nil { + if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetTemplate(), templateValues); err != nil { return nil, err } diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index 9e9013b6f5..af09b1f64d 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -182,7 +182,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService Host: "localhost:30081", Insecure: true, } - if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetSandboxTemplate(), templateValues); err != nil { + if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { return nil, err } diff --git a/flytectl/cmd/update/interfaces/mocks/updater.go b/flytectl/cmd/update/interfaces/mocks/updater.go index 30935bb156..3b56f35add 100644 --- a/flytectl/cmd/update/interfaces/mocks/updater.go +++ b/flytectl/cmd/update/interfaces/mocks/updater.go @@ -26,13 +26,13 @@ func (_m Updater_UpdateNamedEntity) Return(_a0 error) *Updater_UpdateNamedEntity } func (_m *Updater) OnUpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdcore.CommandContext) *Updater_UpdateNamedEntity { - c := _m.On("UpdateNamedEntity", ctx, name, project, domain, rsType, cmdCtx) - return &Updater_UpdateNamedEntity{Call: c} + c_call := _m.On("UpdateNamedEntity", ctx, name, project, domain, rsType, cmdCtx) + return &Updater_UpdateNamedEntity{Call: c_call} } func (_m *Updater) OnUpdateNamedEntityMatch(matchers ...interface{}) *Updater_UpdateNamedEntity { - c := _m.On("UpdateNamedEntity", matchers...) - return &Updater_UpdateNamedEntity{Call: c} + c_call := _m.On("UpdateNamedEntity", matchers...) + return &Updater_UpdateNamedEntity{Call: c_call} } // UpdateNamedEntity provides a mock function with given fields: ctx, name, project, domain, rsType, cmdCtx diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index cec584ee98..27579c223f 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -19,11 +19,13 @@ To load completion, run the following commands in accordance with the shell you To load completions for each session: - Linux + :: $ flytectl completion bash > /etc/bash_completion.d/flytectl - macOS + :: $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index e78875f917..3a10b2437a 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -72,16 +72,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:///localhost:30081 insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). authType: Pkce # authType: Pkce # if using authentication or just drop this. - storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: my-region-here - secret-key: miniostorage - container: my-s3-bucket - type: minio .. tabbed:: AWS Configuration @@ -92,14 +82,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:/// authType: Pkce # authType: Pkce # if using authentication or just drop this. insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket .. tabbed:: GCS Configuration @@ -110,15 +92,6 @@ The full list of available configurable options can be found by running ``flytec endpoint: dns:/// authType: Pkce # authType: Pkce # if using authentication or just drop this. insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - storage: - type: stow - stow: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have access to this bucket .. tabbed:: Others diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index cedad69146..dc60c3d35f 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -16,37 +16,6 @@ const ( logger: show-source: true level: 0` - StorageConfigTemplate = ` -storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: us-east-1 - secret-key: miniostorage - type: minio - container: "my-s3-bucket" - enable-multicontainer: true` - StorageS3ConfigTemplate = ` -storage: - type: stow - stow: - kind: s3 - config: - auth_type: iam - region: # Example: us-east-2 - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` - StorageGCSConfigTemplate = ` -storage: - type: stow - stow: - kind: google - config: - json: "" - project_id: # TODO: replace with the GCP project ID - scopes: https://www.googleapis.com/auth/devstorage.read_write - container: # Example my-bucket. Flyte k8s cluster / service account for execution should have read access to this bucket` ) type ConfigTemplateSpec struct { @@ -60,26 +29,11 @@ var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") ) -// GetSandboxTemplate return sandbox cluster config -func GetSandboxTemplate() string { - return AdminConfigTemplate + StorageConfigTemplate -} - -// GetDemoTemplate return demo cluster config -func GetDemoTemplate() string { +// GetTemplate returns cluster config +func GetTemplate() string { return AdminConfigTemplate } -// GetAWSCloudTemplate return aws Flyte config with storage config -func GetAWSCloudTemplate() string { - return AdminConfigTemplate + StorageS3ConfigTemplate -} - -// GetGoogleCloudTemplate return google Flyte config with storage config -func GetGoogleCloudTemplate() string { - return AdminConfigTemplate + StorageGCSConfigTemplate -} - // SetupConfig download the Flyte sandbox config func SetupConfig(filename, templateStr string, templateSpec ConfigTemplateSpec) error { tmpl := template.New("config") diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index e79964af18..936e0ea682 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -49,8 +49,5 @@ func TestSetupFlytectlConfig(t *testing.T) { } func TestAwsConfig(t *testing.T) { - assert.Equal(t, AdminConfigTemplate+StorageS3ConfigTemplate, GetAWSCloudTemplate()) - assert.Equal(t, AdminConfigTemplate+StorageGCSConfigTemplate, GetGoogleCloudTemplate()) - assert.Equal(t, AdminConfigTemplate+StorageConfigTemplate, GetSandboxTemplate()) - assert.Equal(t, AdminConfigTemplate, GetDemoTemplate()) + assert.Equal(t, AdminConfigTemplate, GetTemplate()) } diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index b08cf0d51a..b1f234f97f 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -32,13 +32,13 @@ func (_m Docker_ContainerCreate) Return(_a0 container.ContainerCreateCreatedBody } func (_m *Docker) OnContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) *Docker_ContainerCreate { - c := _m.On("ContainerCreate", ctx, config, hostConfig, networkingConfig, platform, containerName) - return &Docker_ContainerCreate{Call: c} + c_call := _m.On("ContainerCreate", ctx, config, hostConfig, networkingConfig, platform, containerName) + return &Docker_ContainerCreate{Call: c_call} } func (_m *Docker) OnContainerCreateMatch(matchers ...interface{}) *Docker_ContainerCreate { - c := _m.On("ContainerCreate", matchers...) - return &Docker_ContainerCreate{Call: c} + c_call := _m.On("ContainerCreate", matchers...) + return &Docker_ContainerCreate{Call: c_call} } // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName @@ -71,13 +71,13 @@ func (_m Docker_ContainerExecAttach) Return(_a0 types.HijackedResponse, _a1 erro } func (_m *Docker) OnContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) *Docker_ContainerExecAttach { - c := _m.On("ContainerExecAttach", ctx, execID, config) - return &Docker_ContainerExecAttach{Call: c} + c_call := _m.On("ContainerExecAttach", ctx, execID, config) + return &Docker_ContainerExecAttach{Call: c_call} } func (_m *Docker) OnContainerExecAttachMatch(matchers ...interface{}) *Docker_ContainerExecAttach { - c := _m.On("ContainerExecAttach", matchers...) - return &Docker_ContainerExecAttach{Call: c} + c_call := _m.On("ContainerExecAttach", matchers...) + return &Docker_ContainerExecAttach{Call: c_call} } // ContainerExecAttach provides a mock function with given fields: ctx, execID, config @@ -110,13 +110,13 @@ func (_m Docker_ContainerExecCreate) Return(_a0 types.IDResponse, _a1 error) *Do } func (_m *Docker) OnContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) *Docker_ContainerExecCreate { - c := _m.On("ContainerExecCreate", ctx, _a1, config) - return &Docker_ContainerExecCreate{Call: c} + c_call := _m.On("ContainerExecCreate", ctx, _a1, config) + return &Docker_ContainerExecCreate{Call: c_call} } func (_m *Docker) OnContainerExecCreateMatch(matchers ...interface{}) *Docker_ContainerExecCreate { - c := _m.On("ContainerExecCreate", matchers...) - return &Docker_ContainerExecCreate{Call: c} + c_call := _m.On("ContainerExecCreate", matchers...) + return &Docker_ContainerExecCreate{Call: c_call} } // ContainerExecCreate provides a mock function with given fields: ctx, _a1, config @@ -149,13 +149,13 @@ func (_m Docker_ContainerExecInspect) Return(_a0 types.ContainerExecInspect, _a1 } func (_m *Docker) OnContainerExecInspect(ctx context.Context, execID string) *Docker_ContainerExecInspect { - c := _m.On("ContainerExecInspect", ctx, execID) - return &Docker_ContainerExecInspect{Call: c} + c_call := _m.On("ContainerExecInspect", ctx, execID) + return &Docker_ContainerExecInspect{Call: c_call} } func (_m *Docker) OnContainerExecInspectMatch(matchers ...interface{}) *Docker_ContainerExecInspect { - c := _m.On("ContainerExecInspect", matchers...) - return &Docker_ContainerExecInspect{Call: c} + c_call := _m.On("ContainerExecInspect", matchers...) + return &Docker_ContainerExecInspect{Call: c_call} } // ContainerExecInspect provides a mock function with given fields: ctx, execID @@ -188,13 +188,13 @@ func (_m Docker_ContainerList) Return(_a0 []types.Container, _a1 error) *Docker_ } func (_m *Docker) OnContainerList(ctx context.Context, options types.ContainerListOptions) *Docker_ContainerList { - c := _m.On("ContainerList", ctx, options) - return &Docker_ContainerList{Call: c} + c_call := _m.On("ContainerList", ctx, options) + return &Docker_ContainerList{Call: c_call} } func (_m *Docker) OnContainerListMatch(matchers ...interface{}) *Docker_ContainerList { - c := _m.On("ContainerList", matchers...) - return &Docker_ContainerList{Call: c} + c_call := _m.On("ContainerList", matchers...) + return &Docker_ContainerList{Call: c_call} } // ContainerList provides a mock function with given fields: ctx, options @@ -229,13 +229,13 @@ func (_m Docker_ContainerLogs) Return(_a0 io.ReadCloser, _a1 error) *Docker_Cont } func (_m *Docker) OnContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) *Docker_ContainerLogs { - c := _m.On("ContainerLogs", ctx, _a1, options) - return &Docker_ContainerLogs{Call: c} + c_call := _m.On("ContainerLogs", ctx, _a1, options) + return &Docker_ContainerLogs{Call: c_call} } func (_m *Docker) OnContainerLogsMatch(matchers ...interface{}) *Docker_ContainerLogs { - c := _m.On("ContainerLogs", matchers...) - return &Docker_ContainerLogs{Call: c} + c_call := _m.On("ContainerLogs", matchers...) + return &Docker_ContainerLogs{Call: c_call} } // ContainerLogs provides a mock function with given fields: ctx, _a1, options @@ -270,13 +270,13 @@ func (_m Docker_ContainerRemove) Return(_a0 error) *Docker_ContainerRemove { } func (_m *Docker) OnContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) *Docker_ContainerRemove { - c := _m.On("ContainerRemove", ctx, containerID, options) - return &Docker_ContainerRemove{Call: c} + c_call := _m.On("ContainerRemove", ctx, containerID, options) + return &Docker_ContainerRemove{Call: c_call} } func (_m *Docker) OnContainerRemoveMatch(matchers ...interface{}) *Docker_ContainerRemove { - c := _m.On("ContainerRemove", matchers...) - return &Docker_ContainerRemove{Call: c} + c_call := _m.On("ContainerRemove", matchers...) + return &Docker_ContainerRemove{Call: c_call} } // ContainerRemove provides a mock function with given fields: ctx, containerID, options @@ -302,13 +302,13 @@ func (_m Docker_ContainerStart) Return(_a0 error) *Docker_ContainerStart { } func (_m *Docker) OnContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) *Docker_ContainerStart { - c := _m.On("ContainerStart", ctx, containerID, options) - return &Docker_ContainerStart{Call: c} + c_call := _m.On("ContainerStart", ctx, containerID, options) + return &Docker_ContainerStart{Call: c_call} } func (_m *Docker) OnContainerStartMatch(matchers ...interface{}) *Docker_ContainerStart { - c := _m.On("ContainerStart", matchers...) - return &Docker_ContainerStart{Call: c} + c_call := _m.On("ContainerStart", matchers...) + return &Docker_ContainerStart{Call: c_call} } // ContainerStart provides a mock function with given fields: ctx, containerID, options @@ -334,13 +334,13 @@ func (_m Docker_ContainerWait) Return(_a0 <-chan container.ContainerWaitOKBody, } func (_m *Docker) OnContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) *Docker_ContainerWait { - c := _m.On("ContainerWait", ctx, containerID, condition) - return &Docker_ContainerWait{Call: c} + c_call := _m.On("ContainerWait", ctx, containerID, condition) + return &Docker_ContainerWait{Call: c_call} } func (_m *Docker) OnContainerWaitMatch(matchers ...interface{}) *Docker_ContainerWait { - c := _m.On("ContainerWait", matchers...) - return &Docker_ContainerWait{Call: c} + c_call := _m.On("ContainerWait", matchers...) + return &Docker_ContainerWait{Call: c_call} } // ContainerWait provides a mock function with given fields: ctx, containerID, condition @@ -377,13 +377,13 @@ func (_m Docker_ImageList) Return(_a0 []types.ImageSummary, _a1 error) *Docker_I } func (_m *Docker) OnImageList(ctx context.Context, listOption types.ImageListOptions) *Docker_ImageList { - c := _m.On("ImageList", ctx, listOption) - return &Docker_ImageList{Call: c} + c_call := _m.On("ImageList", ctx, listOption) + return &Docker_ImageList{Call: c_call} } func (_m *Docker) OnImageListMatch(matchers ...interface{}) *Docker_ImageList { - c := _m.On("ImageList", matchers...) - return &Docker_ImageList{Call: c} + c_call := _m.On("ImageList", matchers...) + return &Docker_ImageList{Call: c_call} } // ImageList provides a mock function with given fields: ctx, listOption @@ -418,13 +418,13 @@ func (_m Docker_ImagePull) Return(_a0 io.ReadCloser, _a1 error) *Docker_ImagePul } func (_m *Docker) OnImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) *Docker_ImagePull { - c := _m.On("ImagePull", ctx, refStr, options) - return &Docker_ImagePull{Call: c} + c_call := _m.On("ImagePull", ctx, refStr, options) + return &Docker_ImagePull{Call: c_call} } func (_m *Docker) OnImagePullMatch(matchers ...interface{}) *Docker_ImagePull { - c := _m.On("ImagePull", matchers...) - return &Docker_ImagePull{Call: c} + c_call := _m.On("ImagePull", matchers...) + return &Docker_ImagePull{Call: c_call} } // ImagePull provides a mock function with given fields: ctx, refStr, options diff --git a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go index 2f55293a80..1456f4e3bf 100644 --- a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go @@ -26,13 +26,13 @@ func (_m AdminDeleterExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminDeleterExtInterface) OnAdminServiceClient() *AdminDeleterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminDeleterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminDeleterExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminDeleterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminDeleterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminDeleterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminDeleterExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -60,13 +60,13 @@ func (_m AdminDeleterExtInterface_DeleteProjectDomainAttributes) Return(_a0 erro } func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { - c := _m.On("DeleteProjectDomainAttributes", ctx, project, domain, rsType) - return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} + c_call := _m.On("DeleteProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c_call} } func (_m *AdminDeleterExtInterface) OnDeleteProjectDomainAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteProjectDomainAttributes { - c := _m.On("DeleteProjectDomainAttributes", matchers...) - return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c} + c_call := _m.On("DeleteProjectDomainAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteProjectDomainAttributes{Call: c_call} } // DeleteProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType @@ -92,13 +92,13 @@ func (_m AdminDeleterExtInterface_DeleteWorkflowAttributes) Return(_a0 error) *A } func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteWorkflowAttributes { - c := _m.On("DeleteWorkflowAttributes", ctx, project, domain, name, rsType) - return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} + c_call := _m.On("DeleteWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c_call} } func (_m *AdminDeleterExtInterface) OnDeleteWorkflowAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteWorkflowAttributes { - c := _m.On("DeleteWorkflowAttributes", matchers...) - return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c} + c_call := _m.On("DeleteWorkflowAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteWorkflowAttributes{Call: c_call} } // DeleteWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 18906ce863..b1032f05b2 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -28,13 +28,13 @@ func (_m AdminFetcherExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminFetcherExtInterface) OnAdminServiceClient() *AdminFetcherExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminFetcherExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminFetcherExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminFetcherExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminFetcherExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminFetcherExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminFetcherExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -62,13 +62,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfLP) Return(_a0 []*admin.LaunchPla } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLP(ctx context.Context, lpName string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfLP { - c := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} + c_call := _m.On("FetchAllVerOfLP", ctx, lpName, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfLPMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfLP { - c := _m.On("FetchAllVerOfLP", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c} + c_call := _m.On("FetchAllVerOfLP", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfLP{Call: c_call} } // FetchAllVerOfLP provides a mock function with given fields: ctx, lpName, project, domain, filter @@ -103,13 +103,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfTask) Return(_a0 []*admin.Task, _ } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTask(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfTask { - c := _m.On("FetchAllVerOfTask", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} + c_call := _m.On("FetchAllVerOfTask", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfTaskMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfTask { - c := _m.On("FetchAllVerOfTask", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c} + c_call := _m.On("FetchAllVerOfTask", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfTask{Call: c_call} } // FetchAllVerOfTask provides a mock function with given fields: ctx, name, project, domain, filter @@ -144,13 +144,13 @@ func (_m AdminFetcherExtInterface_FetchAllVerOfWorkflow) Return(_a0 []*admin.Wor } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflow(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { - c := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} + c_call := _m.On("FetchAllVerOfWorkflow", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllVerOfWorkflowMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllVerOfWorkflow { - c := _m.On("FetchAllVerOfWorkflow", matchers...) - return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c} + c_call := _m.On("FetchAllVerOfWorkflow", matchers...) + return &AdminFetcherExtInterface_FetchAllVerOfWorkflow{Call: c_call} } // FetchAllVerOfWorkflow provides a mock function with given fields: ctx, name, project, domain, filter @@ -185,13 +185,13 @@ func (_m AdminFetcherExtInterface_FetchAllWorkflows) Return(_a0 []*admin.NamedEn } func (_m *AdminFetcherExtInterface) OnFetchAllWorkflows(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchAllWorkflows { - c := _m.On("FetchAllWorkflows", ctx, project, domain, filter) - return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} + c_call := _m.On("FetchAllWorkflows", ctx, project, domain, filter) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchAllWorkflowsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchAllWorkflows { - c := _m.On("FetchAllWorkflows", matchers...) - return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c} + c_call := _m.On("FetchAllWorkflows", matchers...) + return &AdminFetcherExtInterface_FetchAllWorkflows{Call: c_call} } // FetchAllWorkflows provides a mock function with given fields: ctx, project, domain, filter @@ -226,13 +226,13 @@ func (_m AdminFetcherExtInterface_FetchExecution) Return(_a0 *admin.Execution, _ } func (_m *AdminFetcherExtInterface) OnFetchExecution(ctx context.Context, name string, project string, domain string) *AdminFetcherExtInterface_FetchExecution { - c := _m.On("FetchExecution", ctx, name, project, domain) - return &AdminFetcherExtInterface_FetchExecution{Call: c} + c_call := _m.On("FetchExecution", ctx, name, project, domain) + return &AdminFetcherExtInterface_FetchExecution{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchExecution { - c := _m.On("FetchExecution", matchers...) - return &AdminFetcherExtInterface_FetchExecution{Call: c} + c_call := _m.On("FetchExecution", matchers...) + return &AdminFetcherExtInterface_FetchExecution{Call: c_call} } // FetchExecution provides a mock function with given fields: ctx, name, project, domain @@ -267,13 +267,13 @@ func (_m AdminFetcherExtInterface_FetchLPLatestVersion) Return(_a0 *admin.Launch } func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchLPLatestVersion { - c := _m.On("FetchLPLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} + c_call := _m.On("FetchLPLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchLPLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPLatestVersion { - c := _m.On("FetchLPLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c} + c_call := _m.On("FetchLPLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPLatestVersion{Call: c_call} } // FetchLPLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -308,13 +308,13 @@ func (_m AdminFetcherExtInterface_FetchLPVersion) Return(_a0 *admin.LaunchPlan, } func (_m *AdminFetcherExtInterface) OnFetchLPVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchLPVersion { - c := _m.On("FetchLPVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchLPVersion{Call: c} + c_call := _m.On("FetchLPVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchLPVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchLPVersion { - c := _m.On("FetchLPVersion", matchers...) - return &AdminFetcherExtInterface_FetchLPVersion{Call: c} + c_call := _m.On("FetchLPVersion", matchers...) + return &AdminFetcherExtInterface_FetchLPVersion{Call: c_call} } // FetchLPVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -349,13 +349,13 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionData) Return(_a0 *admin.Node } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionData(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchNodeExecutionData { - c := _m.On("FetchNodeExecutionData", ctx, nodeID, execName, project, domain) - return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} + c_call := _m.On("FetchNodeExecutionData", ctx, nodeID, execName, project, domain) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDataMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionData { - c := _m.On("FetchNodeExecutionData", matchers...) - return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c} + c_call := _m.On("FetchNodeExecutionData", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionData{Call: c_call} } // FetchNodeExecutionData provides a mock function with given fields: ctx, nodeID, execName, project, domain @@ -390,13 +390,13 @@ func (_m AdminFetcherExtInterface_FetchNodeExecutionDetails) Return(_a0 *admin.N } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetails(ctx context.Context, name string, project string, domain string, uniqueParentID string) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentID) - return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} + c_call := _m.On("FetchNodeExecutionDetails", ctx, name, project, domain, uniqueParentID) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchNodeExecutionDetailsMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchNodeExecutionDetails { - c := _m.On("FetchNodeExecutionDetails", matchers...) - return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c} + c_call := _m.On("FetchNodeExecutionDetails", matchers...) + return &AdminFetcherExtInterface_FetchNodeExecutionDetails{Call: c_call} } // FetchNodeExecutionDetails provides a mock function with given fields: ctx, name, project, domain, uniqueParentID @@ -431,13 +431,13 @@ func (_m AdminFetcherExtInterface_FetchProjectDomainAttributes) Return(_a0 *admi } func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributes(ctx context.Context, project string, domain string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchProjectDomainAttributes { - c := _m.On("FetchProjectDomainAttributes", ctx, project, domain, rsType) - return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} + c_call := _m.On("FetchProjectDomainAttributes", ctx, project, domain, rsType) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchProjectDomainAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchProjectDomainAttributes { - c := _m.On("FetchProjectDomainAttributes", matchers...) - return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c} + c_call := _m.On("FetchProjectDomainAttributes", matchers...) + return &AdminFetcherExtInterface_FetchProjectDomainAttributes{Call: c_call} } // FetchProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, rsType @@ -472,13 +472,13 @@ func (_m AdminFetcherExtInterface_FetchTaskExecutionsOnNode) Return(_a0 *admin.T } func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNode(ctx context.Context, nodeID string, execName string, project string, domain string) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { - c := _m.On("FetchTaskExecutionsOnNode", ctx, nodeID, execName, project, domain) - return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} + c_call := _m.On("FetchTaskExecutionsOnNode", ctx, nodeID, execName, project, domain) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskExecutionsOnNodeMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskExecutionsOnNode { - c := _m.On("FetchTaskExecutionsOnNode", matchers...) - return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c} + c_call := _m.On("FetchTaskExecutionsOnNode", matchers...) + return &AdminFetcherExtInterface_FetchTaskExecutionsOnNode{Call: c_call} } // FetchTaskExecutionsOnNode provides a mock function with given fields: ctx, nodeID, execName, project, domain @@ -513,13 +513,13 @@ func (_m AdminFetcherExtInterface_FetchTaskLatestVersion) Return(_a0 *admin.Task } func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchTaskLatestVersion { - c := _m.On("FetchTaskLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} + c_call := _m.On("FetchTaskLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskLatestVersion { - c := _m.On("FetchTaskLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c} + c_call := _m.On("FetchTaskLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskLatestVersion{Call: c_call} } // FetchTaskLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -554,13 +554,13 @@ func (_m AdminFetcherExtInterface_FetchTaskVersion) Return(_a0 *admin.Task, _a1 } func (_m *AdminFetcherExtInterface) OnFetchTaskVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchTaskVersion { - c := _m.On("FetchTaskVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} + c_call := _m.On("FetchTaskVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchTaskVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchTaskVersion { - c := _m.On("FetchTaskVersion", matchers...) - return &AdminFetcherExtInterface_FetchTaskVersion{Call: c} + c_call := _m.On("FetchTaskVersion", matchers...) + return &AdminFetcherExtInterface_FetchTaskVersion{Call: c_call} } // FetchTaskVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -595,13 +595,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowAttributes) Return(_a0 *admin.Wor } func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributes(ctx context.Context, project string, domain string, name string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchWorkflowAttributes { - c := _m.On("FetchWorkflowAttributes", ctx, project, domain, name, rsType) - return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} + c_call := _m.On("FetchWorkflowAttributes", ctx, project, domain, name, rsType) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowAttributes { - c := _m.On("FetchWorkflowAttributes", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c} + c_call := _m.On("FetchWorkflowAttributes", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowAttributes{Call: c_call} } // FetchWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, rsType @@ -636,13 +636,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowLatestVersion) Return(_a0 *admin. } func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersion(ctx context.Context, name string, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { - c := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain, filter) - return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} + c_call := _m.On("FetchWorkflowLatestVersion", ctx, name, project, domain, filter) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowLatestVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowLatestVersion { - c := _m.On("FetchWorkflowLatestVersion", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c} + c_call := _m.On("FetchWorkflowLatestVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowLatestVersion{Call: c_call} } // FetchWorkflowLatestVersion provides a mock function with given fields: ctx, name, project, domain, filter @@ -677,13 +677,13 @@ func (_m AdminFetcherExtInterface_FetchWorkflowVersion) Return(_a0 *admin.Workfl } func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersion(ctx context.Context, name string, version string, project string, domain string) *AdminFetcherExtInterface_FetchWorkflowVersion { - c := _m.On("FetchWorkflowVersion", ctx, name, version, project, domain) - return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} + c_call := _m.On("FetchWorkflowVersion", ctx, name, version, project, domain) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c_call} } func (_m *AdminFetcherExtInterface) OnFetchWorkflowVersionMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchWorkflowVersion { - c := _m.On("FetchWorkflowVersion", matchers...) - return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c} + c_call := _m.On("FetchWorkflowVersion", matchers...) + return &AdminFetcherExtInterface_FetchWorkflowVersion{Call: c_call} } // FetchWorkflowVersion provides a mock function with given fields: ctx, name, version, project, domain @@ -718,13 +718,13 @@ func (_m AdminFetcherExtInterface_ListExecution) Return(_a0 *admin.ExecutionList } func (_m *AdminFetcherExtInterface) OnListExecution(ctx context.Context, project string, domain string, filter filters.Filters) *AdminFetcherExtInterface_ListExecution { - c := _m.On("ListExecution", ctx, project, domain, filter) - return &AdminFetcherExtInterface_ListExecution{Call: c} + c_call := _m.On("ListExecution", ctx, project, domain, filter) + return &AdminFetcherExtInterface_ListExecution{Call: c_call} } func (_m *AdminFetcherExtInterface) OnListExecutionMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListExecution { - c := _m.On("ListExecution", matchers...) - return &AdminFetcherExtInterface_ListExecution{Call: c} + c_call := _m.On("ListExecution", matchers...) + return &AdminFetcherExtInterface_ListExecution{Call: c_call} } // ListExecution provides a mock function with given fields: ctx, project, domain, filter @@ -759,13 +759,13 @@ func (_m AdminFetcherExtInterface_ListProjects) Return(_a0 *admin.Projects, _a1 } func (_m *AdminFetcherExtInterface) OnListProjects(ctx context.Context, filter filters.Filters) *AdminFetcherExtInterface_ListProjects { - c := _m.On("ListProjects", ctx, filter) - return &AdminFetcherExtInterface_ListProjects{Call: c} + c_call := _m.On("ListProjects", ctx, filter) + return &AdminFetcherExtInterface_ListProjects{Call: c_call} } func (_m *AdminFetcherExtInterface) OnListProjectsMatch(matchers ...interface{}) *AdminFetcherExtInterface_ListProjects { - c := _m.On("ListProjects", matchers...) - return &AdminFetcherExtInterface_ListProjects{Call: c} + c_call := _m.On("ListProjects", matchers...) + return &AdminFetcherExtInterface_ListProjects{Call: c_call} } // ListProjects provides a mock function with given fields: ctx, filter diff --git a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go index d944ff5a82..93f8370556 100644 --- a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go @@ -26,13 +26,13 @@ func (_m AdminUpdaterExtInterface_AdminServiceClient) Return(_a0 service.AdminSe } func (_m *AdminUpdaterExtInterface) OnAdminServiceClient() *AdminUpdaterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient") - return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient") + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnAdminServiceClientMatch(matchers ...interface{}) *AdminUpdaterExtInterface_AdminServiceClient { - c := _m.On("AdminServiceClient", matchers...) - return &AdminUpdaterExtInterface_AdminServiceClient{Call: c} + c_call := _m.On("AdminServiceClient", matchers...) + return &AdminUpdaterExtInterface_AdminServiceClient{Call: c_call} } // AdminServiceClient provides a mock function with given fields: @@ -60,13 +60,13 @@ func (_m AdminUpdaterExtInterface_UpdateProjectDomainAttributes) Return(_a0 erro } func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributes(ctx context.Context, project string, domain string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { - c := _m.On("UpdateProjectDomainAttributes", ctx, project, domain, matchingAttr) - return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} + c_call := _m.On("UpdateProjectDomainAttributes", ctx, project, domain, matchingAttr) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnUpdateProjectDomainAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateProjectDomainAttributes { - c := _m.On("UpdateProjectDomainAttributes", matchers...) - return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c} + c_call := _m.On("UpdateProjectDomainAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateProjectDomainAttributes{Call: c_call} } // UpdateProjectDomainAttributes provides a mock function with given fields: ctx, project, domain, matchingAttr @@ -92,13 +92,13 @@ func (_m AdminUpdaterExtInterface_UpdateWorkflowAttributes) Return(_a0 error) *A } func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributes(ctx context.Context, project string, domain string, name string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { - c := _m.On("UpdateWorkflowAttributes", ctx, project, domain, name, matchingAttr) - return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} + c_call := _m.On("UpdateWorkflowAttributes", ctx, project, domain, name, matchingAttr) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c_call} } func (_m *AdminUpdaterExtInterface) OnUpdateWorkflowAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateWorkflowAttributes { - c := _m.On("UpdateWorkflowAttributes", matchers...) - return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c} + c_call := _m.On("UpdateWorkflowAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateWorkflowAttributes{Call: c_call} } // UpdateWorkflowAttributes provides a mock function with given fields: ctx, project, domain, name, matchingAttr diff --git a/flytectl/pkg/github/mocks/gh_repo_service.go b/flytectl/pkg/github/mocks/gh_repo_service.go index 04c2bfebc1..fd3f932152 100644 --- a/flytectl/pkg/github/mocks/gh_repo_service.go +++ b/flytectl/pkg/github/mocks/gh_repo_service.go @@ -23,13 +23,13 @@ func (_m GHRepoService_GetCommitSHA1) Return(_a0 string, _a1 *github.Response, _ } func (_m *GHRepoService) OnGetCommitSHA1(ctx context.Context, owner string, repo string, ref string, lastSHA string) *GHRepoService_GetCommitSHA1 { - c := _m.On("GetCommitSHA1", ctx, owner, repo, ref, lastSHA) - return &GHRepoService_GetCommitSHA1{Call: c} + c_call := _m.On("GetCommitSHA1", ctx, owner, repo, ref, lastSHA) + return &GHRepoService_GetCommitSHA1{Call: c_call} } func (_m *GHRepoService) OnGetCommitSHA1Match(matchers ...interface{}) *GHRepoService_GetCommitSHA1 { - c := _m.On("GetCommitSHA1", matchers...) - return &GHRepoService_GetCommitSHA1{Call: c} + c_call := _m.On("GetCommitSHA1", matchers...) + return &GHRepoService_GetCommitSHA1{Call: c_call} } // GetCommitSHA1 provides a mock function with given fields: ctx, owner, repo, ref, lastSHA @@ -71,13 +71,13 @@ func (_m GHRepoService_GetLatestRelease) Return(_a0 *github.RepositoryRelease, _ } func (_m *GHRepoService) OnGetLatestRelease(ctx context.Context, owner string, repo string) *GHRepoService_GetLatestRelease { - c := _m.On("GetLatestRelease", ctx, owner, repo) - return &GHRepoService_GetLatestRelease{Call: c} + c_call := _m.On("GetLatestRelease", ctx, owner, repo) + return &GHRepoService_GetLatestRelease{Call: c_call} } func (_m *GHRepoService) OnGetLatestReleaseMatch(matchers ...interface{}) *GHRepoService_GetLatestRelease { - c := _m.On("GetLatestRelease", matchers...) - return &GHRepoService_GetLatestRelease{Call: c} + c_call := _m.On("GetLatestRelease", matchers...) + return &GHRepoService_GetLatestRelease{Call: c_call} } // GetLatestRelease provides a mock function with given fields: ctx, owner, repo @@ -121,13 +121,13 @@ func (_m GHRepoService_GetReleaseByTag) Return(_a0 *github.RepositoryRelease, _a } func (_m *GHRepoService) OnGetReleaseByTag(ctx context.Context, owner string, repo string, tag string) *GHRepoService_GetReleaseByTag { - c := _m.On("GetReleaseByTag", ctx, owner, repo, tag) - return &GHRepoService_GetReleaseByTag{Call: c} + c_call := _m.On("GetReleaseByTag", ctx, owner, repo, tag) + return &GHRepoService_GetReleaseByTag{Call: c_call} } func (_m *GHRepoService) OnGetReleaseByTagMatch(matchers ...interface{}) *GHRepoService_GetReleaseByTag { - c := _m.On("GetReleaseByTag", matchers...) - return &GHRepoService_GetReleaseByTag{Call: c} + c_call := _m.On("GetReleaseByTag", matchers...) + return &GHRepoService_GetReleaseByTag{Call: c_call} } // GetReleaseByTag provides a mock function with given fields: ctx, owner, repo, tag @@ -171,13 +171,13 @@ func (_m GHRepoService_ListReleases) Return(_a0 []*github.RepositoryRelease, _a1 } func (_m *GHRepoService) OnListReleases(ctx context.Context, owner string, repo string, opts *github.ListOptions) *GHRepoService_ListReleases { - c := _m.On("ListReleases", ctx, owner, repo, opts) - return &GHRepoService_ListReleases{Call: c} + c_call := _m.On("ListReleases", ctx, owner, repo, opts) + return &GHRepoService_ListReleases{Call: c_call} } func (_m *GHRepoService) OnListReleasesMatch(matchers ...interface{}) *GHRepoService_ListReleases { - c := _m.On("ListReleases", matchers...) - return &GHRepoService_ListReleases{Call: c} + c_call := _m.On("ListReleases", matchers...) + return &GHRepoService_ListReleases{Call: c_call} } // ListReleases provides a mock function with given fields: ctx, owner, repo, opts diff --git a/flytectl/pkg/k8s/mocks/context_ops.go b/flytectl/pkg/k8s/mocks/context_ops.go index 11b7003d0f..0d9e82dd38 100644 --- a/flytectl/pkg/k8s/mocks/context_ops.go +++ b/flytectl/pkg/k8s/mocks/context_ops.go @@ -22,13 +22,13 @@ func (_m ContextOps_CopyContext) Return(_a0 error) *ContextOps_CopyContext { } func (_m *ContextOps) OnCopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) *ContextOps_CopyContext { - c := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) - return &ContextOps_CopyContext{Call: c} + c_call := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) + return &ContextOps_CopyContext{Call: c_call} } func (_m *ContextOps) OnCopyContextMatch(matchers ...interface{}) *ContextOps_CopyContext { - c := _m.On("CopyContext", matchers...) - return &ContextOps_CopyContext{Call: c} + c_call := _m.On("CopyContext", matchers...) + return &ContextOps_CopyContext{Call: c_call} } // CopyContext provides a mock function with given fields: srcConfigAccess, srcCtxName, targetCtxName @@ -54,13 +54,13 @@ func (_m ContextOps_RemoveContext) Return(_a0 error) *ContextOps_RemoveContext { } func (_m *ContextOps) OnRemoveContext(ctxName string) *ContextOps_RemoveContext { - c := _m.On("RemoveContext", ctxName) - return &ContextOps_RemoveContext{Call: c} + c_call := _m.On("RemoveContext", ctxName) + return &ContextOps_RemoveContext{Call: c_call} } func (_m *ContextOps) OnRemoveContextMatch(matchers ...interface{}) *ContextOps_RemoveContext { - c := _m.On("RemoveContext", matchers...) - return &ContextOps_RemoveContext{Call: c} + c_call := _m.On("RemoveContext", matchers...) + return &ContextOps_RemoveContext{Call: c_call} } // RemoveContext provides a mock function with given fields: ctxName diff --git a/flytectl/pkg/visualize/mocks/graphvizer.go b/flytectl/pkg/visualize/mocks/graphvizer.go index e36204ed77..1b1f8b6e24 100644 --- a/flytectl/pkg/visualize/mocks/graphvizer.go +++ b/flytectl/pkg/visualize/mocks/graphvizer.go @@ -21,13 +21,13 @@ func (_m Graphvizer_AddAttr) Return(_a0 error) *Graphvizer_AddAttr { } func (_m *Graphvizer) OnAddAttr(parentGraph string, field string, value string) *Graphvizer_AddAttr { - c := _m.On("AddAttr", parentGraph, field, value) - return &Graphvizer_AddAttr{Call: c} + c_call := _m.On("AddAttr", parentGraph, field, value) + return &Graphvizer_AddAttr{Call: c_call} } func (_m *Graphvizer) OnAddAttrMatch(matchers ...interface{}) *Graphvizer_AddAttr { - c := _m.On("AddAttr", matchers...) - return &Graphvizer_AddAttr{Call: c} + c_call := _m.On("AddAttr", matchers...) + return &Graphvizer_AddAttr{Call: c_call} } // AddAttr provides a mock function with given fields: parentGraph, field, value @@ -53,13 +53,13 @@ func (_m Graphvizer_AddEdge) Return(_a0 error) *Graphvizer_AddEdge { } func (_m *Graphvizer) OnAddEdge(src string, dst string, directed bool, attrs map[string]string) *Graphvizer_AddEdge { - c := _m.On("AddEdge", src, dst, directed, attrs) - return &Graphvizer_AddEdge{Call: c} + c_call := _m.On("AddEdge", src, dst, directed, attrs) + return &Graphvizer_AddEdge{Call: c_call} } func (_m *Graphvizer) OnAddEdgeMatch(matchers ...interface{}) *Graphvizer_AddEdge { - c := _m.On("AddEdge", matchers...) - return &Graphvizer_AddEdge{Call: c} + c_call := _m.On("AddEdge", matchers...) + return &Graphvizer_AddEdge{Call: c_call} } // AddEdge provides a mock function with given fields: src, dst, directed, attrs @@ -85,13 +85,13 @@ func (_m Graphvizer_AddNode) Return(_a0 error) *Graphvizer_AddNode { } func (_m *Graphvizer) OnAddNode(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddNode { - c := _m.On("AddNode", parentGraph, name, attrs) - return &Graphvizer_AddNode{Call: c} + c_call := _m.On("AddNode", parentGraph, name, attrs) + return &Graphvizer_AddNode{Call: c_call} } func (_m *Graphvizer) OnAddNodeMatch(matchers ...interface{}) *Graphvizer_AddNode { - c := _m.On("AddNode", matchers...) - return &Graphvizer_AddNode{Call: c} + c_call := _m.On("AddNode", matchers...) + return &Graphvizer_AddNode{Call: c_call} } // AddNode provides a mock function with given fields: parentGraph, name, attrs @@ -117,13 +117,13 @@ func (_m Graphvizer_AddSubGraph) Return(_a0 error) *Graphvizer_AddSubGraph { } func (_m *Graphvizer) OnAddSubGraph(parentGraph string, name string, attrs map[string]string) *Graphvizer_AddSubGraph { - c := _m.On("AddSubGraph", parentGraph, name, attrs) - return &Graphvizer_AddSubGraph{Call: c} + c_call := _m.On("AddSubGraph", parentGraph, name, attrs) + return &Graphvizer_AddSubGraph{Call: c_call} } func (_m *Graphvizer) OnAddSubGraphMatch(matchers ...interface{}) *Graphvizer_AddSubGraph { - c := _m.On("AddSubGraph", matchers...) - return &Graphvizer_AddSubGraph{Call: c} + c_call := _m.On("AddSubGraph", matchers...) + return &Graphvizer_AddSubGraph{Call: c_call} } // AddSubGraph provides a mock function with given fields: parentGraph, name, attrs @@ -149,13 +149,13 @@ func (_m Graphvizer_DoesEdgeExist) Return(_a0 bool) *Graphvizer_DoesEdgeExist { } func (_m *Graphvizer) OnDoesEdgeExist(src string, dest string) *Graphvizer_DoesEdgeExist { - c := _m.On("DoesEdgeExist", src, dest) - return &Graphvizer_DoesEdgeExist{Call: c} + c_call := _m.On("DoesEdgeExist", src, dest) + return &Graphvizer_DoesEdgeExist{Call: c_call} } func (_m *Graphvizer) OnDoesEdgeExistMatch(matchers ...interface{}) *Graphvizer_DoesEdgeExist { - c := _m.On("DoesEdgeExist", matchers...) - return &Graphvizer_DoesEdgeExist{Call: c} + c_call := _m.On("DoesEdgeExist", matchers...) + return &Graphvizer_DoesEdgeExist{Call: c_call} } // DoesEdgeExist provides a mock function with given fields: src, dest @@ -181,13 +181,13 @@ func (_m Graphvizer_GetEdge) Return(_a0 *gographviz.Edge) *Graphvizer_GetEdge { } func (_m *Graphvizer) OnGetEdge(src string, dest string) *Graphvizer_GetEdge { - c := _m.On("GetEdge", src, dest) - return &Graphvizer_GetEdge{Call: c} + c_call := _m.On("GetEdge", src, dest) + return &Graphvizer_GetEdge{Call: c_call} } func (_m *Graphvizer) OnGetEdgeMatch(matchers ...interface{}) *Graphvizer_GetEdge { - c := _m.On("GetEdge", matchers...) - return &Graphvizer_GetEdge{Call: c} + c_call := _m.On("GetEdge", matchers...) + return &Graphvizer_GetEdge{Call: c_call} } // GetEdge provides a mock function with given fields: src, dest @@ -215,13 +215,13 @@ func (_m Graphvizer_GetNode) Return(_a0 *gographviz.Node) *Graphvizer_GetNode { } func (_m *Graphvizer) OnGetNode(key string) *Graphvizer_GetNode { - c := _m.On("GetNode", key) - return &Graphvizer_GetNode{Call: c} + c_call := _m.On("GetNode", key) + return &Graphvizer_GetNode{Call: c_call} } func (_m *Graphvizer) OnGetNodeMatch(matchers ...interface{}) *Graphvizer_GetNode { - c := _m.On("GetNode", matchers...) - return &Graphvizer_GetNode{Call: c} + c_call := _m.On("GetNode", matchers...) + return &Graphvizer_GetNode{Call: c_call} } // GetNode provides a mock function with given fields: key @@ -249,13 +249,13 @@ func (_m Graphvizer_SetName) Return(_a0 error) *Graphvizer_SetName { } func (_m *Graphvizer) OnSetName(name string) *Graphvizer_SetName { - c := _m.On("SetName", name) - return &Graphvizer_SetName{Call: c} + c_call := _m.On("SetName", name) + return &Graphvizer_SetName{Call: c_call} } func (_m *Graphvizer) OnSetNameMatch(matchers ...interface{}) *Graphvizer_SetName { - c := _m.On("SetName", matchers...) - return &Graphvizer_SetName{Call: c} + c_call := _m.On("SetName", matchers...) + return &Graphvizer_SetName{Call: c_call} } // SetName provides a mock function with given fields: name From 86e764778e05994d77024becc574e9f4d78c5cbf Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Wed, 4 May 2022 18:06:38 -0700 Subject: [PATCH 254/356] Fix getAllExample (#320) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/cmd/register/register_util.go | 2 +- flytectl/cmd/register/register_util_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 90c18c7444..8231026385 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -656,7 +656,7 @@ func filterExampleFromRelease(releases *github.RepositoryRelease) []*github.Rele func getAllExample(repository, version string, repoService g.GHRepoService) ([]*github.ReleaseAsset, *github.RepositoryRelease, error) { if len(version) > 0 { - release, err := g.GetReleaseByTag(version, repository, repoService) + release, err := g.GetReleaseByTag(repository, version, repoService) if err != nil { return nil, nil, err } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index e1d3093410..c9d90280dd 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -458,7 +458,7 @@ func TestGetAllFlytesnacksExample(t *testing.T) { mockGh := &ghMocks.GHRepoService{} tag := "v0.15.0" sandboxManifest := "flyte_sandbox_manifest.tgz" - mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, tag).Return(&github.RepositoryRelease{ TagName: &tag, Assets: []*github.ReleaseAsset{{ Name: &sandboxManifest, From d32425d47f132d0e60c603c3274cf7d653b58f5b Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 11 May 2022 20:11:55 +0800 Subject: [PATCH 255/356] flyetcl version should ignore talking to admin if host is not configures (#318) * flyetcl version should ignore talking to admin if host is not configures Signed-off-by: Kevin Su * update test Signed-off-by: Kevin Su * fix test Signed-off-by: Kevin Su * fix test Signed-off-by: Kevin Su * update Signed-off-by: Kevin Su * More tests Signed-off-by: Kevin Su --- flytectl/cmd/core/cmd.go | 4 ++++ flytectl/cmd/core/cmd_test.go | 25 ++++++++++++++++++------- flytectl/cmd/version/version.go | 6 ++++++ flytectl/cmd/version/version_test.go | 7 ++++++- flytectl/pkg/github/githubutil.go | 4 +++- flytectl/pkg/github/githubutil_test.go | 2 +- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 20188130a6..3c37f28ab6 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -61,6 +61,10 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] } adminCfg := admin.GetConfig(ctx) + if len(adminCfg.Endpoint.String()) == 0 { + return cmdEntry.CmdFunc(ctx, args, CommandContext{}) + } + clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). WithTokenCache(pkce.TokenCacheKeyringProvider{ ServiceUser: fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), diff --git a/flytectl/cmd/core/cmd_test.go b/flytectl/cmd/core/cmd_test.go index f0bab3bc53..7ed13743a9 100644 --- a/flytectl/cmd/core/cmd_test.go +++ b/flytectl/cmd/core/cmd_test.go @@ -17,11 +17,22 @@ func testCommandFunc(ctx context.Context, args []string, cmdCtx CommandContext) } func TestGenerateCommandFunc(t *testing.T) { - adminCfg := admin.GetConfig(context.Background()) - adminCfg.Endpoint = config.URL{URL: url.URL{Host: "dummyHost"}} - adminCfg.AuthType = admin.AuthTypePkce - rootCmd := &cobra.Command{} - cmdEntry := CommandEntry{CmdFunc: testCommandFunc, ProjectDomainNotRequired: true} - fn := generateCommandFunc(cmdEntry) - assert.Nil(t, fn(rootCmd, []string{})) + t.Run("dummy host name", func(t *testing.T) { + adminCfg := admin.GetConfig(context.Background()) + adminCfg.Endpoint = config.URL{URL: url.URL{Host: "dummyHost"}} + adminCfg.AuthType = admin.AuthTypePkce + rootCmd := &cobra.Command{} + cmdEntry := CommandEntry{CmdFunc: testCommandFunc, ProjectDomainNotRequired: true} + fn := generateCommandFunc(cmdEntry) + assert.Nil(t, fn(rootCmd, []string{})) + }) + + t.Run("host is not configured", func(t *testing.T) { + adminCfg := admin.GetConfig(context.Background()) + adminCfg.Endpoint = config.URL{URL: url.URL{Host: ""}} + rootCmd := &cobra.Command{} + cmdEntry := CommandEntry{CmdFunc: testCommandFunc, ProjectDomainNotRequired: true} + fn := generateCommandFunc(cmdEntry) + assert.Nil(t, fn(rootCmd, []string{})) + }) } diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index f802c69b10..89e3c9eb80 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -75,6 +75,7 @@ func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContex }); err != nil { return err } + // Print Flyteadmin version if available if err := getControlPlaneVersion(ctx, cmdCtx); err != nil { logger.Debug(ctx, err) @@ -92,6 +93,11 @@ func printVersion(response versionOutput) error { } func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) error { + if cmdCtx.ClientSet() == nil { + logger.Debug(ctx, "Ignore talking to admin if host is not configured") + return nil + } + v, err := cmdCtx.AdminClient().GetVersion(ctx, &admin.GetVersionRequest{}) if err != nil || v == nil { logger.Debugf(ctx, "Failed to get version of control plane %v: \n", err) diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 991d50765e..9f67577aa9 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -115,5 +115,10 @@ func TestVersionUtilFunc(t *testing.T) { err := getVersion(ctx, []string{}, cmdCtx) assert.Nil(t, err) }) - + t.Run("ClientSet is empty", func(t *testing.T) { + ctx := context.Background() + cmdCtx := cmdCore.CommandContext{} + err := getVersion(ctx, []string{}, cmdCtx) + assert.Nil(t, err) + }) } diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index e65feaa189..142bc5ca51 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -168,8 +168,10 @@ func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error if err != nil { return "", err } - message := fmt.Sprintf(commonMessage, stdlibversion.Version, latest) + + var message string if isGreater { + message = fmt.Sprintf(commonMessage, stdlibversion.Version, latest) symlink, err := CheckBrewInstall(goos) if err != nil { return "", err diff --git a/flytectl/pkg/github/githubutil_test.go b/flytectl/pkg/github/githubutil_test.go index 920f7682ec..ec303bd03e 100644 --- a/flytectl/pkg/github/githubutil_test.go +++ b/flytectl/pkg/github/githubutil_test.go @@ -186,7 +186,7 @@ func TestGetUpgradeMessage(t *testing.T) { version = "v0.2.09" message, err = GetUpgradeMessage(version, darwin) assert.Nil(t, err) - assert.Equal(t, 63, len(message)) + assert.Equal(t, 0, len(message)) version = "v" message, err = GetUpgradeMessage(version, darwin) From 931c651f0b484141d2f9f4005021452bc4c6f147 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Tue, 17 May 2022 09:55:02 +0800 Subject: [PATCH 256/356] Expose webhook service (#323) Signed-off-by: Kevin Su --- flytectl/pkg/docker/docker_util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index aeaae89510..8c9d47348f 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -123,6 +123,7 @@ func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, erro "0.0.0.0:30086:30086", // K8s cluster "0.0.0.0:30088:30088", // Minio Console Port "0.0.0.0:30089:30089", // Postgres Port + "0.0.0.0:30090:30090", // Webhook service }) } From 02cf19ed61788ba306a71d0f3bcda46bd7ef6851 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 19 May 2022 21:26:51 +0530 Subject: [PATCH 257/356] Added enableSchedule option on registration and linked missing docs (#324) * Added enableSchedule option on registration Signed-off-by: Prafulla Mahindrakar * Added docs and linked missing docs Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/completion.go | 4 ++++ .../subcommand/register/files_config.go | 1 + .../subcommand/register/filesconfig_flags.go | 1 + .../register/filesconfig_flags_test.go | 14 ++++++++++++ flytectl/cmd/get/execution.go | 1 + flytectl/cmd/register/files.go | 6 +++++ flytectl/cmd/register/files_test.go | 6 ++++- flytectl/cmd/register/register_util.go | 22 ++++++++++++++++--- flytectl/cmd/register/register_util_test.go | 3 ++- flytectl/docs/source/config.rst | 1 + flytectl/docs/source/execution.rst | 1 + flytectl/docs/source/gen/flytectl.rst | 1 + .../docs/source/gen/flytectl_completion.rst | 3 +++ flytectl/docs/source/gen/flytectl_config.rst | 1 + .../source/gen/flytectl_config_discover.rst | 1 + .../docs/source/gen/flytectl_config_docs.rst | 1 + .../docs/source/gen/flytectl_config_init.rst | 2 +- .../source/gen/flytectl_config_validate.rst | 1 + flytectl/docs/source/gen/flytectl_create.rst | 1 + .../source/gen/flytectl_create_execution.rst | 1 + .../source/gen/flytectl_create_project.rst | 1 + flytectl/docs/source/gen/flytectl_delete.rst | 1 + ...ectl_delete_cluster-resource-attribute.rst | 1 + ...lytectl_delete_execution-cluster-label.rst | 1 + ...tectl_delete_execution-queue-attribute.rst | 1 + .../source/gen/flytectl_delete_execution.rst | 1 + .../gen/flytectl_delete_plugin-override.rst | 1 + ...lytectl_delete_task-resource-attribute.rst | 1 + ...tectl_delete_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_demo.rst | 1 + .../docs/source/gen/flytectl_demo_exec.rst | 1 + .../docs/source/gen/flytectl_demo_start.rst | 1 + .../docs/source/gen/flytectl_demo_status.rst | 1 + .../source/gen/flytectl_demo_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_get.rst | 1 + ...lytectl_get_cluster-resource-attribute.rst | 1 + .../flytectl_get_execution-cluster-label.rst | 1 + ...flytectl_get_execution-queue-attribute.rst | 1 + .../source/gen/flytectl_get_execution.rst | 1 + .../source/gen/flytectl_get_launchplan.rst | 1 + .../gen/flytectl_get_plugin-override.rst | 1 + .../docs/source/gen/flytectl_get_project.rst | 1 + .../flytectl_get_task-resource-attribute.rst | 1 + .../docs/source/gen/flytectl_get_task.rst | 1 + ...flytectl_get_workflow-execution-config.rst | 1 + .../docs/source/gen/flytectl_get_workflow.rst | 1 + .../docs/source/gen/flytectl_register.rst | 1 + .../source/gen/flytectl_register_examples.rst | 2 ++ .../source/gen/flytectl_register_files.rst | 8 +++++++ flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + .../docs/source/gen/flytectl_sandbox_exec.rst | 1 + .../source/gen/flytectl_sandbox_start.rst | 3 +++ .../source/gen/flytectl_sandbox_status.rst | 1 + .../source/gen/flytectl_sandbox_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_update.rst | 1 + ...ectl_update_cluster-resource-attribute.rst | 1 + ...lytectl_update_execution-cluster-label.rst | 1 + ...tectl_update_execution-queue-attribute.rst | 1 + .../source/gen/flytectl_update_execution.rst | 1 + .../gen/flytectl_update_launchplan-meta.rst | 1 + .../source/gen/flytectl_update_launchplan.rst | 1 + .../gen/flytectl_update_plugin-override.rst | 1 + .../source/gen/flytectl_update_project.rst | 1 + .../source/gen/flytectl_update_task-meta.rst | 1 + ...lytectl_update_task-resource-attribute.rst | 1 + ...tectl_update_workflow-execution-config.rst | 1 + .../gen/flytectl_update_workflow-meta.rst | 1 + flytectl/docs/source/gen/flytectl_upgrade.rst | 1 + flytectl/docs/source/gen/flytectl_version.rst | 1 + 69 files changed, 125 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go index 34b3c17104..a243c7f0c1 100644 --- a/flytectl/cmd/completion.go +++ b/flytectl/cmd/completion.go @@ -35,11 +35,13 @@ var completionCmd = &cobra.Command{ To load completions for each session: - Linux + :: $ flytectl completion bash > /etc/bash_completion.d/flytectl - macOS + :: $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl @@ -61,6 +63,7 @@ var completionCmd = &cobra.Command{ Start a new shell for this setup to take effect. - fish + :: $ flytectl completion fish | source @@ -72,6 +75,7 @@ var completionCmd = &cobra.Command{ $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish - PowerShell + :: PS> flytectl completion powershell | Out-String | Invoke-Expression diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index ea2333583a..3a54203478 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -26,6 +26,7 @@ type FilesConfig struct { DeprecatedSourceUploadPath string `json:"sourceUploadPath" pflag:",Deprecated: Update flyte admin to avoid having to configure storage access from flytectl."` DestinationDirectory string `json:"destinationDirectory" pflag:",Location of source code in container."` DryRun bool `json:"dryRun" pflag:",Execute command without making any modifications."` + EnableSchedule bool `json:"enableSchedule" pflag:",Enable the schedule if the files contain schedulable launchplan."` } func GetConfig() *FilesConfig { diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go index 9ca76123d8..10d4756cfb 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags.go @@ -61,5 +61,6 @@ func (cfg FilesConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultFilesConfig.DeprecatedSourceUploadPath, fmt.Sprintf("%v%v", prefix, "sourceUploadPath"), DefaultFilesConfig.DeprecatedSourceUploadPath, "Deprecated: Update flyte admin to avoid having to configure storage access from flytectl.") cmdFlags.StringVar(&DefaultFilesConfig.DestinationDirectory, fmt.Sprintf("%v%v", prefix, "destinationDirectory"), DefaultFilesConfig.DestinationDirectory, "Location of source code in container.") cmdFlags.BoolVar(&DefaultFilesConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultFilesConfig.DryRun, "Execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultFilesConfig.EnableSchedule, fmt.Sprintf("%v%v", prefix, "enableSchedule"), DefaultFilesConfig.EnableSchedule, "Enable the schedule if the files contain schedulable launchplan.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go index 911df3dc31..14fbc00ed2 100755 --- a/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/register/filesconfig_flags_test.go @@ -253,4 +253,18 @@ func TestFilesConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_enableSchedule", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("enableSchedule", testValue) + if vBool, err := cmdFlags.GetBool("enableSchedule"); err == nil { + testDecodeJson_FilesConfig(t, fmt.Sprintf("%v", vBool), &actual.EnableSchedule) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 657d283499..26ec0b792a 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -93,6 +93,7 @@ var hundredChars = 100 var executionColumns = []printer.Column{ {Header: "Name", JSONPath: "$.id.name"}, {Header: "Launch Plan Name", JSONPath: "$.spec.launchPlan.name"}, + {Header: "Version", JSONPath: "$.spec.launchPlan.version"}, {Header: "Type", JSONPath: "$.spec.launchPlan.resourceType"}, {Header: "Phase", JSONPath: "$.closure.phase"}, {Header: "Scheduled Time", JSONPath: "$.spec.metadata.scheduledAt"}, diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 18f43c40c0..10421a66e4 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -102,6 +102,12 @@ Override Destination dir of source code in container during registration: :: flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --destinationDirectory "/root" + +Enable schedule for the launchplans part of the serialized protobuf files: + +:: + + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --enableSchedule Usage ` diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index ea167f2971..0a9eb330e3 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -31,6 +31,7 @@ func TestRegisterFromFiles(t *testing.T) { s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) err := registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) @@ -52,7 +53,7 @@ func TestRegisterFromFiles(t *testing.T) { s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) - + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) mockDataProxy := s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient) mockDataProxy.OnCreateUploadLocationMatch(s.Ctx, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) @@ -75,6 +76,7 @@ func TestRegisterFromFiles(t *testing.T) { s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) err = Register(s.Ctx, args, config.GetConfig(), s.CmdCtx) assert.Nil(t, err) @@ -95,6 +97,7 @@ func TestRegisterFromFiles(t *testing.T) { s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.NotNil(t, err) }) @@ -163,6 +166,7 @@ func TestRegisterFromFiles(t *testing.T) { s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient).OnCreateUploadLocationMatch(mock.Anything, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 8231026385..9d61085ffa 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -125,7 +125,7 @@ func unMarshalContents(ctx context.Context, fileContents []byte, fname string) ( } -func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun bool) error { +func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun, enableSchedule bool) error { switch v := message.(type) { case *admin.LaunchPlan: launchPlan := message.(*admin.LaunchPlan) @@ -144,7 +144,23 @@ func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.Command }, Spec: launchPlan.Spec, }) - return err + if err != nil { + return err + } + // Activate the launchplan + if enableSchedule { + _, err = cmdCtx.AdminClient().UpdateLaunchPlan(ctx, &admin.LaunchPlanUpdateRequest{ + Id: &core.Identifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: launchPlan.Id.Name, + Version: launchPlan.Id.Version, + }, + State: admin.LaunchPlanState_ACTIVE, + }) + return err + } + return nil case *admin.WorkflowSpec: workflowSpec := message.(*admin.WorkflowSpec) if dryRun { @@ -581,7 +597,7 @@ func registerFile(ctx context.Context, fileName string, registerResults []Result registerResults = append(registerResults, registerResult) return registerResults, err } - if err := register(ctx, spec, cmdCtx, config.DryRun); err != nil { + if err := register(ctx, spec, cmdCtx, config.DryRun, config.EnableSchedule); err != nil { // If error is AlreadyExists then dont consider this to be an error but just a warning state if grpcError := status.Code(err); grpcError == codes.AlreadyExists { registerResult = Result{Name: fileName, Status: "Success", Info: fmt.Sprintf("%v", grpcError.String())} diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index c9d90280dd..13ae96cd18 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -62,6 +62,7 @@ func registerFilesSetup() { rconfig.DefaultFilesConfig.AssumableIamRole = "" rconfig.DefaultFilesConfig.K8sServiceAccount = "" rconfig.DefaultFilesConfig.OutputLocationPrefix = "" + rconfig.DefaultFilesConfig.EnableSchedule = true } func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { @@ -476,7 +477,7 @@ func TestRegister(t *testing.T) { s := setup() registerFilesSetup() node := &admin.NodeExecution{} - err := register(s.Ctx, node, s.CmdCtx, rconfig.DefaultFilesConfig.DryRun) + err := register(s.Ctx, node, s.CmdCtx, rconfig.DefaultFilesConfig.DryRun, rconfig.DefaultFilesConfig.EnableSchedule) assert.NotNil(t, err) }) } diff --git a/flytectl/docs/source/config.rst b/flytectl/docs/source/config.rst index 1bf12d6016..60dd45ea3c 100644 --- a/flytectl/docs/source/config.rst +++ b/flytectl/docs/source/config.rst @@ -8,4 +8,5 @@ It specifies the actions to be performed on the resource 'config'. gen/flytectl_config_validate gen/flytectl_config_init + gen/flytectl_config_docs gen/flytectl_config_discover diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst index 2669831019..6acfc7e3e8 100644 --- a/flytectl/docs/source/execution.rst +++ b/flytectl/docs/source/execution.rst @@ -8,4 +8,5 @@ It specifies the actions to be performed on the 'execution' resource. gen/flytectl_create_execution gen/flytectl_get_execution + gen/flytectl_update_execution gen/flytectl_delete_execution diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 08ff0e3b50..06511bf337 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -42,6 +42,7 @@ Options --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 27579c223f..f6529fbf6e 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -47,6 +47,7 @@ To load completion, run the following commands in accordance with the shell you Start a new shell for this setup to take effect. - fish + :: $ flytectl completion fish | source @@ -58,6 +59,7 @@ To load completion, run the following commands in accordance with the shell you $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish - PowerShell + :: PS> flytectl completion powershell | Out-String | Invoke-Expression @@ -113,6 +115,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 43e3c3f1e7..493ab33653 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -51,6 +51,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 63144832b5..fefd54f7ea 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -55,6 +55,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index 79a9313af6..5c02341006 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -55,6 +55,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index d26dd15c91..7ca884adc5 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -52,7 +52,6 @@ Options -h, --help help for init --host string Endpoint of flyte admin --insecure Enable insecure mode - --storage Enable storage provider config Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -87,6 +86,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 28c7fe2002..5a46a46637 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -57,6 +57,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 3caac8361c..2d6c94f998 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -54,6 +54,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index a46f88cc0e..48ee14600e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -177,6 +177,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 0164bdb98c..b5f7aa04bc 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -90,6 +90,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index e4541836e6..aa1453c301 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -54,6 +54,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index ffe631f9fa..1591bd4750 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -89,6 +89,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 2ada648bd1..ea415b6a99 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -86,6 +86,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 890563a367..6d48e44e96 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -90,6 +90,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 0275e5661a..6aac95b551 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -97,6 +97,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index a581ac9339..ed7ba605f7 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -91,6 +91,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 25e05a9ee1..42d305438a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -91,6 +91,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 3f0ef09907..38f59eb659 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -89,6 +89,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index 47949f304f..504b770678 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -72,6 +72,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index 9d71ade418..c55169861a 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index 71bcb4a1df..dc62740582 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -121,6 +121,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index 6308a14c4a..aaa7ff3814 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index 3ba921e968..58650c4bca 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 59ca8cb792..71d85bcf15 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -54,6 +54,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 9b390ba8a5..73de33c82f 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -97,6 +97,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index aaedb7f86d..1186dd1835 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -96,6 +96,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index ab34f09fd6..2bf8699323 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -99,6 +99,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index cf7579c496..618e621eae 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -129,6 +129,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index c1de87a09f..c2cd4a8697 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -153,6 +153,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index d4708a6f27..ce88f36675 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -118,6 +118,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 98b6d84989..7bfb482d1e 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -101,6 +101,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index a2bf5a7f87..ddfb59c910 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -101,6 +101,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 3fad267133..0d3076e683 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -145,6 +145,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index c3b6123c00..1c126ef959 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -158,6 +158,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 845a89ab86..a7e46b607e 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -129,6 +129,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 556ba2a7c2..5c61b1b818 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -54,6 +54,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 4fa44a4876..5086fb491e 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -40,6 +40,7 @@ Options --continueOnError Continue on error when registering files. --destinationDirectory string Location of source code in container. --dryRun Execute command without making any modifications. + --enableSchedule Enable the schedule if the files contain schedulable launchplan. --force Force use of version number on entities registered with flyte. -h, --help help for examples --k8ServiceAccount string Deprecated. Please use --K8sServiceAccount @@ -79,6 +80,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index acf414b3e7..a30391d3fb 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -93,6 +93,12 @@ Override Destination dir of source code in container during registration: :: flytectl register file _pb_output/* -d development -p flytesnacks --continueOnError --version v2 --destinationDirectory "/root" + +Enable schedule for the launchplans part of the serialized protobuf files: + +:: + + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --enableSchedule Usage @@ -111,6 +117,7 @@ Options --continueOnError Continue on error when registering files. --destinationDirectory string Location of source code in container. --dryRun Execute command without making any modifications. + --enableSchedule Enable the schedule if the files contain schedulable launchplan. --force Force use of version number on entities registered with flyte. -h, --help help for files --k8ServiceAccount string Deprecated. Please use --K8sServiceAccount @@ -150,6 +157,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 97a8478b8e..ddebcdefdc 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -72,6 +72,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 0cf40d8033..65f131a303 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index bfde221cfe..765e9f3df4 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -19,11 +19,13 @@ Starts the sandbox cluster without any source code: flytectl sandbox start Mounts your source code repository inside the sandbox: + :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. + :: flytectl sandbox start --version=v0.14.0 @@ -124,6 +126,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index b887fe1fcb..2891e7d53d 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 2f0a8963da..9c3c5c9bf5 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index e65d21155c..6cc96e9b60 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -56,6 +56,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index c18ed0d263..0dab5c753a 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -96,6 +96,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 978a731b9e..61e0588dc6 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -89,6 +89,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 593716c991..fa5c5ec997 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -100,6 +100,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 6f6096fbd5..f46100530d 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -69,6 +69,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index a80d575972..235a93f0dd 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -74,6 +74,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index d5140d52fb..8b41776a43 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 047c6a41db..d574bcf93e 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -102,6 +102,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 97e00e97ef..22d93ef02a 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -129,6 +129,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index da3faef868..507db9cfa5 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -74,6 +74,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index ba6124eca8..5faa148be2 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -102,6 +102,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index a3ec158822..f7ae581c08 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -98,6 +98,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 5a09fd32aa..6a3905d8df 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -74,6 +74,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 802356b635..be4ce3f70a 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -69,6 +69,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 1ce459bfec..d0ecf3a2d8 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -58,6 +58,7 @@ Options inherited from parent commands --files.continueOnError Continue on error when registering files. --files.destinationDirectory string Location of source code in container. --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. --files.force Force use of version number on entities registered with flyte. --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. From b09214614127ff85e002f8a4af24370c643ac52e Mon Sep 17 00:00:00 2001 From: David Przybilla Date: Mon, 23 May 2022 18:06:50 +0900 Subject: [PATCH 258/356] Compile command (#321) * adding flytepropeller dep Signed-off-by: David Przybilla * add compile cmd Signed-off-by: David Przybilla * printing summary Signed-off-by: David Przybilla * compile cmd tests Signed-off-by: David Przybilla This reverts commit 75665de7db90646a3e5d7ec65f64c61739c31955. Signed-off-by: David Przybilla * ci fix: go 1.18 Signed-off-by: David Przybilla * compilecmd: fix typos & err handling Signed-off-by: David Przybilla * compilecmd: more tests Signed-off-by: David Przybilla * exporting UnMarshalContents Signed-off-by: David Przybilla * compile uses UnMarshalContents Signed-off-by: David Przybilla * compile cmd usage examples Signed-off-by: David Przybilla * compilecmd: popping errors up Signed-off-by: David Przybilla * compilecmd: add flag config Signed-off-by: David Przybilla * compilecmd better docstring Signed-off-by: David Przybilla * compilecmd uses flags config Signed-off-by: David Przybilla * clean up Signed-off-by: David Przybilla --- flytectl/.github/workflows/checks.yml | 12 +- flytectl/cmd/compile/compile.go | 146 +++++++++ flytectl/cmd/compile/compile_test.go | 71 ++++ .../compile/testdata/bad-workflow-package.tgz | Bin 0 -> 1289 bytes flytectl/cmd/compile/testdata/invalid.tgz | 1 + .../compile/testdata/invalidlaunchplan.tgz | Bin 0 -> 214 bytes flytectl/cmd/compile/testdata/invalidtask.tgz | Bin 0 -> 200 bytes .../cmd/compile/testdata/invalidworkflow.tgz | Bin 0 -> 217 bytes .../cmd/compile/testdata/valid-package.tgz | Bin 0 -> 999 bytes .../subcommand/compile/compile_config.go | 11 + .../config/subcommand/compile/config_flags.go | 55 ++++ .../subcommand/compile/config_flags_test.go | 116 +++++++ flytectl/cmd/register/files.go | 2 +- flytectl/cmd/register/register_util.go | 6 +- flytectl/cmd/register/register_util_test.go | 20 +- flytectl/cmd/root.go | 3 + flytectl/go.mod | 39 +-- flytectl/go.sum | 307 ++++++++++++++++-- 18 files changed, 719 insertions(+), 70 deletions(-) create mode 100644 flytectl/cmd/compile/compile.go create mode 100644 flytectl/cmd/compile/compile_test.go create mode 100644 flytectl/cmd/compile/testdata/bad-workflow-package.tgz create mode 100644 flytectl/cmd/compile/testdata/invalid.tgz create mode 100644 flytectl/cmd/compile/testdata/invalidlaunchplan.tgz create mode 100644 flytectl/cmd/compile/testdata/invalidtask.tgz create mode 100644 flytectl/cmd/compile/testdata/invalidworkflow.tgz create mode 100644 flytectl/cmd/compile/testdata/valid-package.tgz create mode 100644 flytectl/cmd/config/subcommand/compile/compile_config.go create mode 100755 flytectl/cmd/config/subcommand/compile/config_flags.go create mode 100755 flytectl/cmd/config/subcommand/compile/config_flags_test.go diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index eee6209b0c..2283b69920 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -20,7 +20,7 @@ jobs: name: Lint uses: flyteorg/flytetools/.github/workflows/lint.yml@master with: - go-version: 1.17 + go-version: 1.18 tests: name: Unit Tests @@ -28,13 +28,13 @@ jobs: secrets: FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} with: - go-version: 1.17 + go-version: 1.18 generate: name: Check Go Gennerate uses: flyteorg/flytetools/.github/workflows/go_generate.yml@master with: - go-version: 1.17 + go-version: 1.18 dry_run_goreleaser: name: Dry Run Goreleaser @@ -52,7 +52,7 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - uses: actions/setup-go@v3 with: - go-version: '1.17' + go-version: '1.18' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: @@ -74,7 +74,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Build Flytectl binary run: make compile - name: Create a sandbox cluster @@ -104,7 +104,7 @@ jobs: lfs: true - uses: actions/setup-go@v1 with: - go-version: '1.17' + go-version: '1.18' - uses: actions/setup-python@v1 with: python-version: 3.8 diff --git a/flytectl/cmd/compile/compile.go b/flytectl/cmd/compile/compile.go new file mode 100644 index 0000000000..ffbbbad90e --- /dev/null +++ b/flytectl/cmd/compile/compile.go @@ -0,0 +1,146 @@ +package compile + +import ( + "context" + "fmt" + "io/ioutil" + "os" + + config "github.com/flyteorg/flytectl/cmd/config/subcommand/compile" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/register" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytepropeller/pkg/compiler" + "github.com/flyteorg/flytepropeller/pkg/compiler/common" +) + +// Utility function for compiling a list of Tasks +func compileTasks(tasks []*core.TaskTemplate) ([]*core.CompiledTask, error) { + res := make([]*core.CompiledTask, 0, len(tasks)) + for _, task := range tasks { + compiledTask, err := compiler.CompileTask(task) + if err != nil { + return nil, err + } + res = append(res, compiledTask) + } + return res, nil +} + +/* + Utility to compile a packaged workflow locally. + compilation is done locally so no flyte cluster is required. +*/ +func compileFromPackage(packagePath string) error { + args := []string{packagePath} + fileList, tmpDir, err := register.GetSerializeOutputFiles(context.Background(), args, true) + defer os.RemoveAll(tmpDir) + if err != nil { + fmt.Println("Error found while extracting package..") + return err + } + fmt.Println("Successfully extracted package...") + fmt.Println("Processing Protobuf files...") + workflows := make(map[string]*admin.WorkflowSpec) + plans := make(map[string]*admin.LaunchPlan) + tasks := []*admin.TaskSpec{} + + for _, pbFilePath := range fileList { + rawTsk, err := ioutil.ReadFile(pbFilePath) + if err != nil { + fmt.Printf("error unmarshalling task..") + return err + } + spec, err := register.UnMarshalContents(context.Background(), rawTsk, pbFilePath) + if err != nil { + return err + } + + switch v := spec.(type) { + case *admin.TaskSpec: + tasks = append(tasks, v) + case *admin.WorkflowSpec: + workflows[v.Template.Id.Name] = v + case *admin.LaunchPlan: + plans[v.Id.Name] = v + } + } + + // compile tasks + taskTemplates := []*core.TaskTemplate{} + for _, task := range tasks { + taskTemplates = append(taskTemplates, task.Template) + } + + fmt.Println("\nCompiling tasks...") + compiledTasks, err := compileTasks(taskTemplates) + if err != nil { + fmt.Println("Error while compiling tasks...") + return err + } + + // compile workflows + for wfName, workflow := range workflows { + + fmt.Println("\nCompiling workflow:", wfName) + plan := plans[wfName] + + _, err := compiler.CompileWorkflow(workflow.Template, + workflow.SubWorkflows, + compiledTasks, + []common.InterfaceProvider{compiler.NewLaunchPlanInterfaceProvider(*plan)}) + if err != nil { + fmt.Println(":( Error Compiling workflow:", wfName) + return err + } + + } + + fmt.Println("All Workflows compiled successfully!") + fmt.Println("\nSummary:") + fmt.Println(len(workflows), " workflows found in package") + fmt.Println(len(tasks), " Tasks found in package") + fmt.Println(len(plans), " Launch plans found in package") + return nil +} + +const ( + compileShort = `Validate flyte packages without registration needed.` + compileLong = ` +Validate workflows by compiling flyte's serialized protobuf files (task, workflows and launch plans). This is useful for testing workflows and tasks without neededing to talk with a flyte cluster. + +:: + + flytectl compile --file my-flyte-package.tgz + +:: + + flytectl compile --file /home/user/dags/my-flyte-package.tgz + +.. note:: + Input file is a path to a tgz. This file is generated by either pyflyte or jflyte. tgz file contains protobuf files describing workflows, tasks and launch plans. + +` +) + +func compile(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + packageFilePath := config.DefaultCompileConfig.File + if packageFilePath == "" { + return fmt.Errorf("path to package tgz's file is a required flag") + } + return compileFromPackage(packageFilePath) +} + +func CreateCompileCommand() map[string]cmdCore.CommandEntry { + compileResourcesFuncs := map[string]cmdCore.CommandEntry{ + "compile": { + Short: compileShort, + Long: compileLong, + CmdFunc: compile, + PFlagProvider: config.DefaultCompileConfig, + ProjectDomainNotRequired: true, + }, + } + return compileResourcesFuncs +} diff --git a/flytectl/cmd/compile/compile_test.go b/flytectl/cmd/compile/compile_test.go new file mode 100644 index 0000000000..83c555964c --- /dev/null +++ b/flytectl/cmd/compile/compile_test.go @@ -0,0 +1,71 @@ +package compile + +import ( + "context" + "testing" + + config "github.com/flyteorg/flytectl/cmd/config/subcommand/compile" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + u "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" +) + +func TestCompileCommand(t *testing.T) { + rootCmd := &cobra.Command{ + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", + Use: "flytectl", + DisableAutoGenTag: true, + } + compileCommand := CreateCompileCommand() + cmdCore.AddCommands(rootCmd, compileCommand) + cmdNouns := rootCmd.Commands() + assert.Equal(t, cmdNouns[0].Use, "compile") + assert.Equal(t, cmdNouns[0].Flags().Lookup("file").Name, "file") + // check shorthand + assert.Equal(t, cmdNouns[0].Short, compileShort) + + // compiling via cobra command + compileCfg := config.DefaultCompileConfig + compileCfg.File = "testdata/valid-package.tgz" + var setup = u.Setup + s := setup() + compileCmd := CreateCompileCommand()["compile"] + err := compileCmd.CmdFunc(context.Background(), []string{}, s.CmdCtx) + assert.Nil(t, err, "compiling via cmd returns err") + + // calling command with empty file flag + compileCfg = config.DefaultCompileConfig + compileCfg.File = "" + err = compileCmd.CmdFunc(context.Background(), []string{}, s.CmdCtx) + assert.NotNil(t, err, "calling compile with Empty file flag does not error") +} + +func TestCompilePackage(t *testing.T) { + // valid package contains two workflows + // with three tasks + err := compileFromPackage("testdata/valid-package.tgz") + assert.Nil(t, err, "unable to compile a valid package") + + // invalid gzip header + err = compileFromPackage("testdata/invalid.tgz") + assert.NotNil(t, err, "compiling an invalid package returns no error") + + // invalid workflow, types do not match + err = compileFromPackage("testdata/bad-workflow-package.tgz") + assert.NotNil(t, err, "compilin an invalid workflow returns no error") + + // testing badly serialized task + err = compileFromPackage("testdata/invalidtask.tgz") + assert.NotNil(t, err, "unable to handle invalid task") + + // testing badly serialized launchplan + err = compileFromPackage("testdata/invalidlaunchplan.tgz") + assert.NotNil(t, err, "unable to handle invalid launchplan") + + // testing badly serialized workflow + err = compileFromPackage("testdata/invalidworkflow.tgz") + assert.NotNil(t, err, "unable to handle invalid workflow") + +} diff --git a/flytectl/cmd/compile/testdata/bad-workflow-package.tgz b/flytectl/cmd/compile/testdata/bad-workflow-package.tgz new file mode 100644 index 0000000000000000000000000000000000000000..183be1bae5aae6d4d97eb2485bd8fe4fbc25b3e8 GIT binary patch literal 1289 zcmV+k1@`(MiwFqpE_Gr8|7L7?bY(4YVPk7yXJsyQXLR|qCux)?q-~Z? z(rhUc%(RCvQnaf#D>EG!;J~dt04HWN!d@qy*p{*7ywK@|;Z%li!H41F6qw=6N{$^{ zRva@;)HHs6K6tfSN$W_@{{Op=V|`cO{o+M%@{I_pqN7|3MxTq`4a2m~%W*wpmd%yz z6D0?F-6-hD%U|_}d{5xz?PgSOif7ERS=n;R9@n|YoHDaPL2f;}Ib0)-2lp&AT*vN* z2v5cQc>MD?{_Q;DzZx7FhIes0*{oK(eetj3_>bd%di*bYj%`>t{?7r1FHVAHyCL+! z`@U$2P7n#d6?U3I!>`tSrni55%g}Hv>!R_W8J0U9|C~v^P_~Uc<9|-afB0h&o~ngX z>GH>bthP_1gRrGVLHCe8CR=KOtQop|eO47mq7k;~oqmfQrSu(?;Q=gl>-)`stU^&O zlKut|SZs=*MIfn6%J2acT4Y&P6o@Qr!6p<#gRH~qmn&qs9dv%`iHOK5{%;Z14n(67 z`p03XQQc$oUi-AxIE{oRPDG^_394#Zz18kTT?#K>>Phj{D|%1U!d@iHTDv1^^%J@- zclK*uBo(sFLrv=h$Afm&APNSJAIipZ*Yjl0*K)`3m~~C79Ei$cJFK_lxr69{K9Y^k z>z-B-h^VQY{*65X(IBs$bfKIUOP(ko#{=>5O6AM~QouY|2A zsLT7MS4A!8H6lO0MgH*6qNdT+xJqk=)m}r;d#SrkSCYN0peZPsyz?a-CvPk0|Iq(s z_&<+Z9{RsIfKB+nO4yWwC43ndQTJ`F-)#QRuv7leU=~OJmy7@VWf4A+{_pYB$KZci zzh{sbIB6Ku22NIO!(Hj^7*P}VCrin;G2AxzUuf~J+v2T_-CT5c=>O3Fq5m7n|40RP z8T!9DfKT|pDJyhg2I%QbHu=3v0iph*{%8FEFY|2F|9Qa4)PFNq{pYqlssASGe=hpJsV-!T z|8Iq9#sD)wIR8iezqR^rSr-2O$2{O>=)ZXb=Kn6{f8O={-%QW{7jXWM^Z#qne{)j* z8R~y7`tN4yzw4p=&jsa7{m*;;?@sDJ{{G85o&THU_rf$|un$|Y7(al4F(50lD7Bdz z#;mjcSym8m1pq-11VIo4K@bE%5ClOG1VIo4K@bE%5ClOGB%A*LVr*eU0C)fZAi<>g literal 0 HcmV?d00001 diff --git a/flytectl/cmd/compile/testdata/invalid.tgz b/flytectl/cmd/compile/testdata/invalid.tgz new file mode 100644 index 0000000000..3f37575e6a --- /dev/null +++ b/flytectl/cmd/compile/testdata/invalid.tgz @@ -0,0 +1 @@ +invalid tgz file diff --git a/flytectl/cmd/compile/testdata/invalidlaunchplan.tgz b/flytectl/cmd/compile/testdata/invalidlaunchplan.tgz new file mode 100644 index 0000000000000000000000000000000000000000..650a0d5a92ef86771d9d2dac9da85d069f33c20d GIT binary patch literal 214 zcmb2|=3po^YffTdetX`!i^)->^`Vr{9EWm+Ff+HR-;rmuVw{3=mAmft{$Mgb7?8#+ zyi+u`!`i@X>(+xVX*@hGKlVQfIJ)rFy~KSRUK-52`Etc%-NiT50<)f1<{S9s%2mEC zTr*EiY2o|V-m?sLEZgyPrwGffkFoJi=Zj<9yOVpwwRF$d|GiOTwRv*Vlp}gB`~JTZ z-CFm5e)%ciFS_?#ii1P#=f92!?c3cSRk-o~yj_uZbMkwquKXh>6~F51CP_vHWbpmm M0uR>d3>pj!0M_bY3jhEB literal 0 HcmV?d00001 diff --git a/flytectl/cmd/compile/testdata/invalidtask.tgz b/flytectl/cmd/compile/testdata/invalidtask.tgz new file mode 100644 index 0000000000000000000000000000000000000000..cb129ab1604f347f7edae04efd15c7d1d0550b09 GIT binary patch literal 200 zcmb2|=3to5*__0{{Pw&p*C7LmV;?=lWxuc`na%yutD-yakg~^8jz{c|+z8v`;pu$$fWi^~xP4F(1PZbe)1 literal 0 HcmV?d00001 diff --git a/flytectl/cmd/compile/testdata/invalidworkflow.tgz b/flytectl/cmd/compile/testdata/invalidworkflow.tgz new file mode 100644 index 0000000000000000000000000000000000000000..4192456119db8dbabe729f3ef268fbf715d8d93c GIT binary patch literal 217 zcmb2|=3q!PYffTdetX_F>#%{uvBIf3ZztSa5E5;zx<2>jqUA3HdwL98YIfY{bKd4~ zYyx-5snA=^U)bjEKGu2A+haG2*MtAjaw>95zRRA?GM8LBRr~nimqvauQu?2g=J%=N8 z?`LO4emiabR&Cd5?TS zi8l%0ut*LLNbgc4Wg7@mG(Gf|9GY7JVk@m;!F+|HY`H-$J?3-t!}Q~%m!7kv9pJF3=Pk5F53S&Q^7tF|29|oLfc_w#{Yuu|M1r`Jkl$M z@%h())RMF8D2~ibbdTwMvaMIhImVcgxXJQWHk}#>z>SrGTHxDVf{!3LF}K# zY0x_4bR#)y2WOcyWnVUXnWVaDcA})0bt$}gV->}>Z|R0<#=T6H%_NoWPM>b7%7NuY zVNgDIOfwayBfpl&#K`%Ma#mH(i<+NR#kkF;X*Q2!^Ein+k?LDyNA#|8{%CtXIfn9A zeV&|aM7NcHZhJO1jlDt5NOt4kM5gqhc+BHYW;NqfT7&eQSxgKC!r{?oj{X_n$@8fAhcpcS`(<@5gmb3Dxd3qXBd z{;!vt|7~|p{&z6{my-Xt^rgAU|6S!1x+M)KYqS0kFCdMj)AP9mW2!bF8f*=TjAP9mW2!bF8 Vf*=TjAP9nt_yA(=Xtn@Q000(Y3oQTu literal 0 HcmV?d00001 diff --git a/flytectl/cmd/config/subcommand/compile/compile_config.go b/flytectl/cmd/config/subcommand/compile/compile_config.go new file mode 100644 index 0000000000..6fe24bca41 --- /dev/null +++ b/flytectl/cmd/config/subcommand/compile/compile_config.go @@ -0,0 +1,11 @@ +package compile + +//go:generate pflags Config --default-var DefaultCompileConfig --bind-default-var +var ( + DefaultCompileConfig = &Config{} +) + +// Config stores the flags required by compile command +type Config struct { + File string `json:"file" pflag:",Path to a flyte package file. Flyte packages are tgz files generated by pyflyte or jflyte."` +} diff --git a/flytectl/cmd/config/subcommand/compile/config_flags.go b/flytectl/cmd/config/subcommand/compile/config_flags.go new file mode 100755 index 0000000000..4e826f1b67 --- /dev/null +++ b/flytectl/cmd/config/subcommand/compile/config_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package compile + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultCompileConfig.File, fmt.Sprintf("%v%v", prefix, "file"), DefaultCompileConfig.File, "Path to a flyte package file. Flyte packages are tgz files generated by pyflyte or jflyte.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/compile/config_flags_test.go b/flytectl/cmd/config/subcommand/compile/config_flags_test.go new file mode 100755 index 0000000000..be3845ec1a --- /dev/null +++ b/flytectl/cmd/config/subcommand/compile/config_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package compile + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_file", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("file", testValue) + if vString, err := cmdFlags.GetString("file"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.File) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index 10421a66e4..f87f353efc 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -126,7 +126,7 @@ func Register(ctx context.Context, args []string, cfg *config.Config, cmdCtx cmd deprecatedCheck(ctx, &rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.K8ServiceAccount) // getSerializeOutputFiles will return you all proto and source code compress file in sorted order - dataRefs, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + dataRefs, tmpDir, err := GetSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) if err != nil { logger.Errorf(ctx, "error while un-archiving files in tmp dir due to %v", err) return err diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 9d61085ffa..d05aa25d67 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -92,7 +92,7 @@ var projectColumns = []printer.Column{ {Header: "Additional Info", JSONPath: "$.Info"}, } -func unMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { +func UnMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { workflowSpec := &admin.WorkflowSpec{} errCollection := errors2.ErrorCollection{} err := proto.Unmarshal(fileContents, workflowSpec) @@ -482,7 +482,7 @@ Get serialize output file list from the args list. If the archive flag is on then download the archives to temp directory and extract it. In case of fast register it will also return the compressed source code The o/p of this function would be sorted list of the file locations. */ -func getSerializeOutputFiles(ctx context.Context, args []string, archive bool) ([]string, string, error) { +func GetSerializeOutputFiles(ctx context.Context, args []string, archive bool) ([]string, string, error) { if !archive { /* * Sorting is required for non-archived case since its possible for the user to pass in a list of unordered @@ -578,7 +578,7 @@ func registerFile(ctx context.Context, fileName string, registerResults []Result registerResults = append(registerResults, Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error reading file due to %v", err)}) return registerResults, err } - spec, err := unMarshalContents(ctx, fileContents, fileName) + spec, err := UnMarshalContents(ctx, fileContents, fileName) if err != nil { registerResult = Result{Name: fileName, Status: "Failed", Info: fmt.Sprintf("Error unmarshalling file due to %v", err)} registerResults = append(registerResults, registerResult) diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 13ae96cd18..7820913573 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -70,7 +70,7 @@ func TestGetSortedArchivedFileWithParentFolderList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/valid-parent-folder-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "parentfolder", "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -87,7 +87,7 @@ func TestGetSortedArchivedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -104,7 +104,7 @@ func TestGetSortedArchivedFileUnorderedList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/valid-unordered-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -121,7 +121,7 @@ func TestGetSortedArchivedCorruptedFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/invalid.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 0) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -134,7 +134,7 @@ func TestGetSortedArchivedTgzList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/valid-register.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -150,7 +150,7 @@ func TestGetSortedArchivedCorruptedTgzFileList(t *testing.T) { s := setup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/invalid.tgz"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -163,7 +163,7 @@ func TestGetSortedArchivedInvalidArchiveFileList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"testdata/invalid-extension-register.zip"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -176,7 +176,7 @@ func TestGetSortedArchivedFileThroughInvalidHttpList(t *testing.T) { s := setup() rconfig.DefaultFilesConfig.Archive = true args := []string{"http://invalidhost:invalidport/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) @@ -189,7 +189,7 @@ func TestGetSortedArchivedFileThroughValidHttpList(t *testing.T) { registerFilesSetup() rconfig.DefaultFilesConfig.Archive = true args := []string{"http://dummyhost:80/testdata/valid-register.tar"} - fileList, tmpDir, err := getSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(s.Ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, len(fileList), 4) assert.Equal(t, filepath.Join(tmpDir, "014_recipes.core.basic.basic_workflow.t1_1.pb"), fileList[0]) assert.Equal(t, filepath.Join(tmpDir, "015_recipes.core.basic.basic_workflow.t2_1.pb"), fileList[1]) @@ -207,7 +207,7 @@ func TestGetSortedArchivedFileThroughValidHttpWithNullContextList(t *testing.T) rconfig.DefaultFilesConfig.Archive = true args := []string{"http://dummyhost:80/testdata/valid-register.tar"} var ctx context.Context = nil - fileList, tmpDir, err := getSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) + fileList, tmpDir, err := GetSerializeOutputFiles(ctx, args, rconfig.DefaultFilesConfig.Archive) assert.Equal(t, 0, len(fileList)) assert.True(t, strings.HasPrefix(tmpDir, "/tmp/register")) assert.NotNil(t, err) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 7ebdd46ab2..760cf3bafc 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,6 +5,7 @@ import ( "fmt" "os" + "github.com/flyteorg/flytectl/cmd/compile" "github.com/flyteorg/flytectl/cmd/config" configuration "github.com/flyteorg/flytectl/cmd/configuration" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -57,6 +58,8 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats())) rootCmd.AddCommand(get.CreateGetCommand()) + compileCmd := compile.CreateCompileCommand() + cmdCore.AddCommands(rootCmd, compileCmd) rootCmd.AddCommand(create.RemoteCreateCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) diff --git a/flytectl/go.mod b/flytectl/go.mod index 30190ad03f..8b95a84bd6 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/flytectl -go 1.17 +go 1.18 require ( github.com/avast/retry-go v3.0.0+incompatible @@ -9,8 +9,8 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v0.24.21 - github.com/flyteorg/flytestdlib v0.4.16 + github.com/flyteorg/flyteidl v1.1.0 + github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.0 @@ -20,7 +20,6 @@ require ( github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/manifoldco/promptui v0.8.0 github.com/mitchellh/mapstructure v1.4.1 github.com/mouuff/go-rocket-update v1.5.1 github.com/olekukonko/tablewriter v0.0.5 @@ -33,7 +32,7 @@ require ( github.com/stretchr/testify v1.7.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 - golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 + golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 google.golang.org/grpc v1.36.0 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 @@ -45,10 +44,13 @@ require ( sigs.k8s.io/yaml v1.2.0 ) -require golang.org/x/text v0.3.7 +require ( + github.com/flyteorg/flytepropeller v1.1.1 + golang.org/x/text v0.3.7 +) require ( - cloud.google.com/go v0.75.0 // indirect + cloud.google.com/go v0.78.0 // indirect cloud.google.com/go/storage v1.12.0 // indirect github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect @@ -62,11 +64,10 @@ require ( github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect - github.com/aws/aws-sdk-go v1.37.1 // indirect + github.com/aws/aws-sdk-go v1.37.3 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect github.com/containerd/containerd v1.5.10 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect @@ -77,7 +78,8 @@ require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/evanphx/json-patch v4.9.0+incompatible // indirect github.com/fatih/color v1.10.0 // indirect - github.com/flyteorg/stow v0.3.1 // indirect + github.com/flyteorg/flyteplugins v1.0.0 // indirect + github.com/flyteorg/stow v0.3.3 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-logr/logr v0.4.0 // indirect @@ -86,9 +88,9 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect github.com/google/go-cmp v0.5.6 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect - github.com/googleapis/gnostic v0.4.1 // indirect + github.com/googleapis/gnostic v0.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect @@ -100,9 +102,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.10 // indirect github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect - github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect github.com/magiconair/properties v1.8.4 // indirect github.com/mattn/go-colorable v0.1.8 // indirect github.com/mattn/go-isatty v0.0.13 // indirect @@ -116,9 +116,9 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml v1.8.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.9.0 // indirect + github.com/prometheus/client_golang v1.10.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.15.0 // indirect + github.com/prometheus/common v0.18.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect @@ -131,6 +131,7 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.22.6 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect @@ -139,13 +140,13 @@ require ( golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/api v0.38.0 // indirect + google.golang.org/api v0.40.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect + google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect k8s.io/klog/v2 v2.8.0 // indirect k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect - k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect + k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 5a749e8e12..9bdfe27256 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -7,6 +7,7 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -17,8 +18,9 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0 h1:oKpsiyKMfVpwR3zSAkQixGzlVE5ovitBuO0qSmCf0bI= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -41,8 +43,6 @@ cloud.google.com/go/storage v1.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lU cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= @@ -57,20 +57,24 @@ github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -84,7 +88,11 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295/go.mod h1:e0aH495YLkrsIe9fhedd6aSR6fgU/qhKvtroi6y7G/M= +github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= +github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -108,19 +116,26 @@ github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:m github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= +github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -129,6 +144,7 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= @@ -136,13 +152,25 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= +github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d/go.mod h1:mZUP7GJmjiWtf8v3FD1X/QdK08BqyeH/1Ejt0qhNzCs= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.37.3 h1:1f0groABc4AuapskpHf6EBRaG2tqw0Sx3ebCMwfp1Ys= +github.com/aws/aws-sdk-go v1.37.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.0.0/go.mod h1:WysE/OpUgE37tjtmtJd8GXgT8s1euilE5XtUkRNUQ1w= +github.com/aws/aws-sdk-go-v2/credentials v1.0.0/go.mod h1:/SvsiqBf509hG4Bddigr3NB12MIpfHhZapyBurJe8aY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0/go.mod h1:wpMHDCXvOXZxGCRSidyepa8uJHY4vaBGfY2/+oKU/Bc= +github.com/aws/aws-sdk-go-v2/service/athena v1.0.0/go.mod h1:qY8QFbemf2ceqweXcS6hQqiiIe1z42WqTvHsK2Lb0rE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0/go.mod h1:3jExOmpbjgPnz2FJaMOfbSk1heTkZ66aD3yNtVhnjvI= +github.com/aws/aws-sdk-go-v2/service/sts v1.0.0/go.mod h1:5f+cELGATgill5Pu3/vK3Ebuigstc+qYEHW5MvGWZO4= +github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -154,6 +182,7 @@ github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngE github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradleyfalzon/ghinstallation/v2 v2.0.3/go.mod h1:tlgi+JWCXnKFx/Y4WtnDbZEINo31N5bcvnCoqieefmk= @@ -174,11 +203,8 @@ github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOo github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= @@ -281,6 +307,7 @@ github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kp github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -293,7 +320,10 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -325,6 +355,7 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -333,6 +364,7 @@ github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6Uezg github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= @@ -348,6 +380,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -358,19 +391,26 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y 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/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= +github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v0.24.21 h1:9dowP4gQHBe/1sRfYa5PP2snT/7/ZwgRsYkof4zr19c= -github.com/flyteorg/flyteidl v0.24.21/go.mod h1:vHSugApgS3hRITIafzQDU8DZD/W8wFRfFcgaFU35Dww= -github.com/flyteorg/flytestdlib v0.3.13/go.mod h1:Tz8JCECAbX6VWGwFT6cmEQ+RJpZ/6L9pswu3fzWs220= -github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= -github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= -github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= -github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= +github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= +github.com/flyteorg/flyteidl v1.1.0 h1:f8tdMXOuorS/d+4Ut2QarfDbdCOriK0S+EnlQzrwz9E= +github.com/flyteorg/flyteidl v1.1.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= +github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= +github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= +github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= +github.com/flyteorg/flytepropeller v1.1.1/go.mod h1:x7vIuy9vmOPw9JSd+xAijeiHShmuieFZsTT1yLXhR90= +github.com/flyteorg/flytestdlib v1.0.0 h1:gb99ignMsVcNTUmWzArtcIDdkRjyzQQVBkWNOQakiFg= +github.com/flyteorg/flytestdlib v1.0.0/go.mod h1:QSVN5wIM1lM9d60eAEbX7NwweQXW96t5x4jbyftn89c= +github.com/flyteorg/stow v0.3.3 h1:tzeNl8mSZFL3oJDi0ACZj6FAineQAF4qyEp6bXtIdQY= +github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -384,6 +424,8 @@ github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYis github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= 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= @@ -396,21 +438,68 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= +github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= @@ -446,6 +535,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -484,8 +574,9 @@ github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vK github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -502,6 +593,7 @@ github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -512,8 +604,13 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -526,7 +623,6 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graymeta/stow v0.2.7/go.mod h1:JAs139Zr29qfsecy7b+h9DRsWXbFbsd7LCrbCDYI84k= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -574,6 +670,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= @@ -582,6 +679,9 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -590,6 +690,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -601,8 +702,6 @@ github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfE github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= @@ -629,28 +728,34 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kubeflow/common v0.4.0/go.mod h1:X15/dRQQoB77wrqrPwVn4GqG2ubgk8xR24A80i61d/4= +github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec/go.mod h1:cTBmZKLlrIXBWQ0A9Ik8h0i4zoGhR7ApHwUfrLDbhQc= +github.com/kubeflow/pytorch-operator v0.6.0/go.mod h1:zHblV+yTwVG4PCgKTU2wPfOmQ6TJdfT87lDfHrP1a1Y= +github.com/kubeflow/tf-operator v0.5.3/go.mod h1:EBtz5LQoKaHUl/5fV5vD1qXVNVNyn3TrFaH6eVoQ8SY= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo= -github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/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.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -728,13 +833,17 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= @@ -805,8 +914,9 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= +github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -823,8 +933,9 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.18.0 h1:WCVKW7aL6LEe1uryfI9dnEc2ZqNB1Fn0ok930v0iL1Y= +github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -834,6 +945,7 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -846,6 +958,8 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -854,6 +968,7 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -883,6 +998,7 @@ github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= @@ -896,11 +1012,13 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -924,13 +1042,16 @@ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -960,7 +1081,11 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -975,28 +1100,42 @@ go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1010,6 +1149,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-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4= +golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= 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= @@ -1034,11 +1175,15 @@ 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.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1048,6 +1193,7 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1071,6 +1217,7 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1086,6 +1233,7 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= @@ -1098,8 +1246,10 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 h1:alLDrZkL34Y2bnGHfvC1CYBRBXCXgx8AC2vY4MRtYX4= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1111,6 +1261,7 @@ 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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -1119,8 +1270,12 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1164,6 +1319,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1187,9 +1343,13 @@ golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1198,6 +1358,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= @@ -1219,8 +1380,10 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1231,14 +1394,17 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1260,8 +1426,10 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1278,6 +1446,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1285,6 +1454,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1307,8 +1478,9 @@ google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQW google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.38.0 h1:vDyWk6eup8eQAidaZ31sNWIn8tZEL8qpbtGkBD4ytQo= google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.40.0 h1:uWrpz12dpVPn7cojP82mk02XDgTJLDPc2KbVTxrWb4A= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1362,8 +1534,9 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c h1:7A9LQhrZmuCPI79/sYSbscFqBp4XFYf6oaIQuV1xji4= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1443,9 +1616,12 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= @@ -1460,52 +1636,120 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= +k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.19.6/go.mod h1:Plxx44Nh4zVblkJrIgxVPgPre1mvng6tXf1Sj3bs0fU= +k8s.io/api v0.19.9/go.mod h1:RcFj+riKQ1fAITdmtA6InI3LVEeKi+9LuvU7GVMeXJI= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= +k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= +k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= +k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= +k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= +k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.19.6/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= +k8s.io/apimachinery v0.19.9/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= +k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= +k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= +k8s.io/apiserver v0.19.6/go.mod h1:05XquZxCDzQ27ebk7uV2LrFIK4lm5Yt47XkkUvLAoAM= +k8s.io/apiserver v0.19.9/go.mod h1:g6zpD+kcZFlO73pktPWRvL0tUGqj7/KaOowmRk8EpGg= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= +k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= +k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= +k8s.io/client-go v0.19.6/go.mod h1:gEiS+efRlXYUEQ9Oz4lmNXlxAl5JZ8y2zbTDGhvXXnk= +k8s.io/client-go v0.19.9/go.mod h1:8GArfSmN7MwTidMGcLGM3QTYa7uekI/B6IOrM0s1XPs= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.21.3 h1:J9nxZTOmvkInRDCzcSNQmPJbDYN/PjlxXT9Mos3HcLg= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= +k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.19.6/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= +k8s.io/code-generator v0.19.9/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.19.6/go.mod h1:8Btsf8J00/fVDa/YFmXjei7gVkcFrlKZXjSeP4SZNJg= +k8s.io/component-base v0.19.9/go.mod h1:x9UmpImvXgVry1s9/hINgLz6iGBYUGvy3Xm7KZh1nnI= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= +k8s.io/sample-controller v0.19.9/go.mod h1:pzC7f1rPpf0+o9rg45Ju8GY83nGARzWABmPblej9v/M= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= +sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= +sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= @@ -1514,3 +1758,4 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +volcano.sh/apis v1.2.0-k8s1.19.6/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= From 096e377e10f507ada36a32771ea71d581851b1a2 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Sat, 4 Jun 2022 22:19:06 +0530 Subject: [PATCH 259/356] Using security context during registration (#328) Signed-off-by: Prafulla Mahindrakar --- flytectl/cmd/register/register_util.go | 8 +++++++- flytectl/cmd/register/register_util_test.go | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index d05aa25d67..922ff211da 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -402,8 +402,14 @@ func hydrateLaunchPlanSpec(configAssumableIamRole string, configK8sServiceAccoun outputLocationPrefix := len(configOutputLocationPrefix) > 0 if assumableIamRole || k8sServiceAcct { lpSpec.AuthRole = &admin.AuthRole{ - AssumableIamRole: configAssumableIamRole, KubernetesServiceAccount: configK8sServiceAccount, + AssumableIamRole: configAssumableIamRole, + } + lpSpec.SecurityContext = &core.SecurityContext{ + RunAs: &core.Identity{ + IamRole: configAssumableIamRole, + K8SServiceAccount: configK8sServiceAccount, + }, } } if outputLocationPrefix { diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 7820913573..7be93359c0 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -347,6 +347,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole"}, lpSpec.AuthRole) + assert.Equal(t, &core.SecurityContext{RunAs: &core.Identity{IamRole: "iamRole"}}, lpSpec.SecurityContext) }) t.Run("k8sService account override", func(t *testing.T) { registerFilesSetup() @@ -355,6 +356,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { err := hydrateLaunchPlanSpec(rconfig.DefaultFilesConfig.AssumableIamRole, rconfig.DefaultFilesConfig.K8sServiceAccount, rconfig.DefaultFilesConfig.OutputLocationPrefix, lpSpec) assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) + assert.Equal(t, &core.SecurityContext{RunAs: &core.Identity{K8SServiceAccount: "k8Account"}}, lpSpec.SecurityContext) }) t.Run("Both k8sService and IamRole", func(t *testing.T) { registerFilesSetup() @@ -365,6 +367,7 @@ func TestHydrateLaunchPlanSpec(t *testing.T) { assert.Nil(t, err) assert.Equal(t, &admin.AuthRole{AssumableIamRole: "iamRole", KubernetesServiceAccount: "k8Account"}, lpSpec.AuthRole) + assert.Equal(t, &core.SecurityContext{RunAs: &core.Identity{IamRole: "iamRole", K8SServiceAccount: "k8Account"}}, lpSpec.SecurityContext) }) t.Run("Output prefix", func(t *testing.T) { registerFilesSetup() From 5b70d88e91b67bef44beb56cca69720a48baa0d8 Mon Sep 17 00:00:00 2001 From: David Przybilla Date: Mon, 6 Jun 2022 17:32:11 +0900 Subject: [PATCH 260/356] Start sandbox logic shared for demo/sandbox cmds #minor (#326) --- .../subcommand/sandbox/sandbox_config.go | 42 +- flytectl/cmd/demo/demo.go | 4 +- flytectl/cmd/demo/start.go | 272 +---------- flytectl/cmd/demo/start_test.go | 425 ----------------- flytectl/cmd/sandbox/sandbox.go | 4 +- flytectl/cmd/sandbox/start.go | 250 +--------- flytectl/cmd/sandbox/start_test.go | 427 ----------------- flytectl/pkg/docker/docker.go | 30 ++ flytectl/pkg/docker/docker_util.go | 10 +- flytectl/pkg/docker/docker_util_test.go | 10 +- .../docker}/imagepullpolicy_enumer.go | 2 +- flytectl/pkg/sandbox/start.go | 308 ++++++++++++ flytectl/pkg/sandbox/start_test.go | 438 ++++++++++++++++++ 13 files changed, 806 insertions(+), 1416 deletions(-) rename flytectl/{cmd/config/subcommand/sandbox => pkg/docker}/imagepullpolicy_enumer.go (99%) create mode 100644 flytectl/pkg/sandbox/start.go create mode 100644 flytectl/pkg/sandbox/start_test.go diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 7381a398b7..44f76f614c 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -1,34 +1,6 @@ package sandbox -//go:generate enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json -type ImagePullPolicy int - -const ( - ImagePullPolicyAlways ImagePullPolicy = iota - ImagePullPolicyIfNotPresent - ImagePullPolicyNever -) - -// Set implements PFlag's Value interface to attempt to set the value of the flag from string. -func (i *ImagePullPolicy) Set(val string) error { - policy, err := ImagePullPolicyString(val) - if err != nil { - return err - } - - *i = policy - return nil -} - -// Type implements PFlag's Value interface to return type name. -func (i ImagePullPolicy) Type() string { - return "ImagePullPolicy" -} - -//go:generate pflags Config --default-var DefaultConfig --bind-default-var -var ( - DefaultConfig = &Config{} -) +import "github.com/flyteorg/flytectl/pkg/docker" //Config holds configuration flags for sandbox command. type Config struct { @@ -52,12 +24,12 @@ type Config struct { // Optionally it is possible to use local sandbox image // Flytectl will not pull the image from the registry if the local flag passes. It is usually useful while testing your local images without pushing them to a registry. - ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` + ImagePullPolicy docker.ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` - ImagePullOptions ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"` + ImagePullOptions docker.ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"` } -type ImagePullOptions struct { - RegistryAuth string `json:"registryAuth" pflag:",The base64 encoded credentials for the registry."` - Platform string `json:"platform" pflag:",Forces a specific platform's image to be pulled.'"` -} +//go:generate pflags Config --default-var DefaultConfig --bind-default-var +var ( + DefaultConfig = &Config{} +) diff --git a/flytectl/cmd/demo/demo.go b/flytectl/cmd/demo/demo.go index 83cb8afe11..30b29c8040 100644 --- a/flytectl/cmd/demo/demo.go +++ b/flytectl/cmd/demo/demo.go @@ -1,7 +1,7 @@ package demo import ( - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -46,7 +46,7 @@ func CreateDemoCommand() *cobra.Command { demoResourcesFuncs := map[string]cmdcore.CommandEntry{ "start": {CmdFunc: startDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, - Long: startLong, PFlagProvider: sandboxConfig.DefaultConfig}, + Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig}, "teardown": {CmdFunc: teardownDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, Long: teardownLong}, diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 4cb13d54e3..247111ffca 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -1,33 +1,12 @@ package demo import ( - "bufio" "context" - "fmt" - "io" - "os" - "path/filepath" - "time" - "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/github" + "github.com/flyteorg/flytectl/pkg/sandbox" - "github.com/avast/retry-go" - "github.com/olekukonko/tablewriter" - corev1api "k8s.io/api/core/v1" - corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - - "github.com/docker/docker/api/types/mount" - "github.com/flyteorg/flytectl/pkg/configutil" - "github.com/flyteorg/flytectl/pkg/k8s" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/enescakir/emoji" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/docker" - "github.com/flyteorg/flytectl/pkg/util" - "k8s.io/client-go/tools/clientcmd" ) const ( @@ -93,252 +72,11 @@ eg : for passing multiple environment variables Usage ` - k8sEndpoint = "https://127.0.0.1:30086" - flyteNamespace = "flyte" - diskPressureTaint = "node.kubernetes.io/disk-pressure" - taintEffect = "NoSchedule" - demoContextName = "flyte-sandbox" - demoDockerContext = "default" - demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-lite" + demoContextName = "flyte-sandbox" ) -type ExecResult struct { - StdOut string - StdErr string - ExitCode int -} - -func primeFlytekitPod(ctx context.Context, podService corev1.PodInterface) { - _, err := podService.Create(ctx, &corev1api.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "py39-cacher", - }, - Spec: corev1api.PodSpec{ - RestartPolicy: corev1api.RestartPolicyNever, - Containers: []corev1api.Container{ - { - Name: "flytekit", - Image: "ghcr.io/flyteorg/flytekit:py3.9-latest", - Command: []string{"echo"}, - Args: []string{"Flyte"}, - }, - }, - }, - }, v1.CreateOptions{}) - if err != nil { - fmt.Printf("Failed to create primer pod - %s", err) - } -} - func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - cli, err := docker.GetDockerClient() - if err != nil { - return err - } - - ghRepo := github.GetGHRepoService() - - reader, err := startDemo(ctx, cli, ghRepo, os.Stdin) - if err != nil { - return err - } - if reader != nil { - docker.WaitForSandbox(reader, docker.SuccessMessage) - } - - if reader != nil { - var k8sClient k8s.K8s - err = retry.Do( - func() error { - k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) - return err - }, - retry.Attempts(10), - ) - if err != nil { - return err - } - if err = updateLocalKubeContext(); err != nil { - return err - } - - if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { - return err - } - primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) - util.PrintDemoMessage(util.DemoConsolePort) - } - return nil -} - -func updateLocalKubeContext() error { - srcConfigAccess := &clientcmd.PathOptions{ - GlobalFile: docker.Kubeconfig, - LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), - } - k8sCtxMgr := k8s.NewK8sContextManager() - return k8sCtxMgr.CopyContext(srcConfigAccess, demoDockerContext, demoContextName) -} - -func startDemo(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader) (*bufio.Scanner, error) { - fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) - - if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { - if err.Error() != clierrors.ErrSandboxExists { - return nil, err - } - fmt.Printf("Existing details of your demo cluster") - util.PrintDemoMessage(util.DemoConsolePort) - return nil, nil - } - - if err := util.SetupFlyteDir(); err != nil { - return nil, err - } - - templateValues := configutil.ConfigTemplateSpec{ - Host: "localhost:30081", - Insecure: true, - } - if err := configutil.SetupConfig(configutil.ConfigFile, configutil.GetTemplate(), templateValues); err != nil { - return nil, err - } - - volumes := docker.Volumes - sandboxDefaultConfig := sandboxConfig.DefaultConfig - if vol, err := mountVolume(sandboxDefaultConfig.Source, docker.Source); err != nil { - return nil, err - } else if vol != nil { - volumes = append(volumes, *vol) - } - demoImage := sandboxConfig.DefaultConfig.Image - if len(demoImage) == 0 { - image, version, err := github.GetFullyQualifiedImageName("sha", sandboxConfig.DefaultConfig.Version, demoImageName, sandboxConfig.DefaultConfig.Prerelease, g) - if err != nil { - return nil, err - } - demoImage = image - fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) - } - fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, demoImage) - if err := docker.PullDockerImage(ctx, cli, demoImage, sandboxConfig.DefaultConfig.ImagePullPolicy, sandboxConfig.DefaultConfig.ImagePullOptions); err != nil { - return nil, err - } - - fmt.Printf("%v booting flyte-demo container\n", emoji.FactoryWorker) - exposedPorts, portBindings, _ := docker.GetDemoPorts() - ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, - demoImage, sandboxDefaultConfig.Env) - - if err != nil { - fmt.Printf("%v Something went wrong: Failed to start demo container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) - return nil, err - } - - logReader, err := docker.ReadLogs(ctx, cli, ID) - if err != nil { - return nil, err - } - - return logReader, nil -} - -func mountVolume(file, destination string) (*mount.Mount, error) { - if len(file) > 0 { - source, err := filepath.Abs(file) - if err != nil { - return nil, err - } - return &mount.Mount{ - Type: mount.TypeBind, - Source: source, - Target: destination, - }, nil - } - return nil, nil -} - -func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { - var data = os.Stdout - table := tablewriter.NewWriter(data) - table.SetHeader([]string{"Service", "Status", "Namespace"}) - table.SetRowLine(true) - - for { - isTaint, err := isNodeTainted(ctx, appsClient) - if err != nil { - return err - } - if isTaint { - return fmt.Errorf("docker sandbox doesn't have sufficient memory available. Please run docker system prune -a --volumes") - } - - pods, err := getFlyteDeployment(ctx, appsClient) - if err != nil { - return err - } - table.ClearRows() - table.SetAutoWrapText(false) - table.SetAutoFormatHeaders(true) - - // Clear os.Stdout - _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") - - var total, ready int - total = len(pods.Items) - ready = 0 - if total > 0 { - for _, v := range pods.Items { - if isPodReady(v) { - ready++ - } - if len(v.Status.Conditions) > 0 { - table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) - } - } - table.Render() - if total == ready { - return nil - } - } else { - table.Append([]string{"k8s: This might take a little bit", "Bootstrapping", ""}) - table.Render() - } - - time.Sleep(10 * time.Second) - } -} - -func isPodReady(v corev1api.Pod) bool { - if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { - return true - } - return false -} - -func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { - pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) - if err != nil { - return nil, err - } - return pods, nil -} + sandboxDefaultConfig := sandboxCmdConfig.DefaultConfig + return sandbox.StartDemoCluster(ctx, args, sandboxDefaultConfig) -func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { - nodes, err := client.Nodes().List(ctx, v1.ListOptions{}) - if err != nil { - return false, err - } - match := 0 - for _, node := range nodes.Items { - for _, c := range node.Spec.Taints { - if c.Key == diskPressureTaint && c.Effect == taintEffect { - match++ - } - } - } - if match > 0 { - return true, nil - } - return false, nil } diff --git a/flytectl/cmd/demo/start_test.go b/flytectl/cmd/demo/start_test.go index 11ebacc796..bed5a16777 100644 --- a/flytectl/cmd/demo/start_test.go +++ b/flytectl/cmd/demo/start_test.go @@ -1,426 +1 @@ package demo - -import ( - "context" - "fmt" - "io" - "io/ioutil" - "os" - "strings" - "testing" - - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/docker" - "github.com/flyteorg/flytectl/pkg/docker/mocks" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" - "github.com/flyteorg/flytectl/pkg/k8s" - k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" - "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flyteidl/clients/go/admin" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/google/go-github/v42/github" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testclient "k8s.io/client-go/kubernetes/fake" -) - -var content = ` -apiVersion: v1 -clusters: -- cluster: - server: https://localhost:8080 - extensions: - - name: client.authentication.k8s.io/exec - extension: - audience: foo - other: bar - name: default -contexts: -- context: - cluster: default - user: default - namespace: bar - name: default -current-context: default -kind: Config -users: -- name: default - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - arg-1 - - arg-2 - command: foo-command - provideClusterInfo: true -` - -var ( - githubMock *ghMocks.GHRepoService - ctx context.Context - mockDocker *mocks.Docker -) - -var fakeNode = &corev1.Node{ - Spec: corev1.NodeSpec{ - Taints: []corev1.Taint{}, - }, -} - -var fakePod = corev1.Pod{ - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - Conditions: []corev1.PodCondition{}, - }, -} - -func demoSetup() { - ctx = context.Background() - mockDocker = &mocks.Docker{} - errCh := make(chan error) - sandboxConfig.DefaultConfig.Version = "v0.19.1" - bodyStatus := make(chan container.ContainerWaitOKBody) - githubMock = &ghMocks.GHRepoService{} - sandboxConfig.DefaultConfig.Image = "dummyimage" - mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) -} - -func TestStartDemoFunc(t *testing.T) { - assert.Nil(t, util.SetupFlyteDir()) - assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) - assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) - - fakePod.SetName("flyte") - - t.Run("Successfully run demo cluster", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ - { - ID: docker.FlyteSandboxClusterName, - Names: []string{ - docker.FlyteSandboxClusterName, - }, - }, - }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - reader, err := startDemo(ctx, mockDocker, githubMock, strings.NewReader("n")) - assert.Nil(t, err) - assert.Nil(t, reader) - }) - t.Run("Successfully run demo cluster with source code", func(t *testing.T) { - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - sandboxConfig.DefaultConfig.Version = "" - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { - sandboxConfig.DefaultConfig.Source = "../" - sandboxConfig.DefaultConfig.Version = "" - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - sandboxConfig.DefaultConfig.Image = "" - tag := "v0.15.0" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ - TagName: &tag, - }, nil, nil) - - githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - sandboxConfig.DefaultConfig.Image = "" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "non-existent-tag", err.Error()) - }) - t.Run("Error in pulling image", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) - sandboxConfig.DefaultConfig.Image = "" - tag := "v0.15.0" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ - TagName: &tag, - }, nil, nil) - - githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to pull", err.Error()) - }) - t.Run("Error in removing existing cluster", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ - { - ID: docker.FlyteSandboxClusterName, - Names: []string{ - docker.FlyteSandboxClusterName, - }, - }, - }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) - _, err := startDemo(ctx, mockDocker, githubMock, strings.NewReader("y")) - assert.NotNil(t, err) - assert.Equal(t, "failed to remove container", err.Error()) - }) - t.Run("Error in start container", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to run container", err.Error()) - }) - t.Run("Error in reading logs", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, fmt.Errorf("failed to get container logs")) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to get container logs", err.Error()) - }) - t.Run("Error in list container", func(t *testing.T) { - demoSetup() - mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startDemo(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to list containers", err.Error()) - }) - t.Run("Successfully run demo cluster command", func(t *testing.T) { - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - client := testclient.NewSimpleClientset() - k8s.Client = client - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - demoSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - - stringReader := strings.NewReader(docker.SuccessMessage) - reader := ioutil.NopCloser(stringReader) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(reader, nil) - mockK8sContextMgr := &k8sMocks.ContextOps{} - docker.Client = mockDocker - sandboxConfig.DefaultConfig.Source = "" - sandboxConfig.DefaultConfig.Version = "" - k8s.ContextMgr = mockK8sContextMgr - mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = startDemoCluster(ctx, []string{}, cmdCtx) - assert.Nil(t, err) - }) - t.Run("Error in running demo cluster command", func(t *testing.T) { - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - demoSetup() - docker.Client = mockDocker - mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - err := startDemoCluster(ctx, []string{}, cmdCtx) - assert.NotNil(t, err) - }) -} - -func TestMonitorFlyteDeployment(t *testing.T) { - t.Run("Monitor k8s deployment fail because of storage", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - k8s.Client = client - fakePod.SetName("flyte") - fakePod.SetName("flyte") - - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - fakeNode.Spec.Taints = append(fakeNode.Spec.Taints, corev1.Taint{ - Effect: "NoSchedule", - Key: "node.kubernetes.io/disk-pressure", - }) - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - - err = watchFlyteDeployment(ctx, client.CoreV1()) - assert.NotNil(t, err) - - }) - - t.Run("Monitor k8s deployment success", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - k8s.Client = client - fakePod.SetName("flyte") - fakePod.SetName("flyte") - - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - fakeNode.Spec.Taints = []corev1.Taint{} - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - - err = watchFlyteDeployment(ctx, client.CoreV1()) - assert.Nil(t, err) - - }) - -} - -func TestGetFlyteDeploymentCount(t *testing.T) { - - ctx := context.Background() - client := testclient.NewSimpleClientset() - c, err := getFlyteDeployment(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, 0, len(c.Items)) -} - -func TestGetNodeTaintStatus(t *testing.T) { - t.Run("Check node taint with success", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - fakeNode.SetName("master") - _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - c, err := isNodeTainted(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, false, c) - }) - t.Run("Check node taint with fail", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - fakeNode.SetName("master") - _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - node, err := client.CoreV1().Nodes().Get(ctx, "master", v1.GetOptions{}) - if err != nil { - t.Error(err) - } - node.Spec.Taints = append(node.Spec.Taints, corev1.Taint{ - Effect: taintEffect, - Key: diskPressureTaint, - }) - _, err = client.CoreV1().Nodes().Update(ctx, node, v1.UpdateOptions{}) - if err != nil { - t.Error(err) - } - c, err := isNodeTainted(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, true, c) - }) -} diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 26e9453f7e..2dc5ab95a4 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -1,7 +1,7 @@ package sandbox import ( - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdcore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" ) @@ -46,7 +46,7 @@ func CreateSandboxCommand() *cobra.Command { sandboxResourcesFuncs := map[string]cmdcore.CommandEntry{ "start": {CmdFunc: startSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, - Long: startLong, PFlagProvider: sandboxConfig.DefaultConfig}, + Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig}, "teardown": {CmdFunc: teardownSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, Long: teardownLong}, diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index af09b1f64d..d409637032 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -1,33 +1,11 @@ package sandbox import ( - "bufio" "context" - "fmt" - "io" - "os" - "path/filepath" - "time" - "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/github" - - "github.com/avast/retry-go" - "github.com/olekukonko/tablewriter" - corev1api "k8s.io/api/core/v1" - corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - - "github.com/docker/docker/api/types/mount" - "github.com/flyteorg/flytectl/pkg/configutil" - "github.com/flyteorg/flytectl/pkg/k8s" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/enescakir/emoji" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/docker" - "github.com/flyteorg/flytectl/pkg/util" - "k8s.io/client-go/tools/clientcmd" + "github.com/flyteorg/flytectl/pkg/sandbox" ) const ( @@ -98,228 +76,10 @@ eg : for passing multiple environment variables Usage ` - k8sEndpoint = "https://127.0.0.1:30086" - flyteNamespace = "flyte" - diskPressureTaint = "node.kubernetes.io/disk-pressure" - taintEffect = "NoSchedule" - sandboxContextName = "flyte-sandbox" - sandboxDockerContext = "default" - sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" + sandboxContextName = "flyte-sandbox" ) -type ExecResult struct { - StdOut string - StdErr string - ExitCode int -} - func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - cli, err := docker.GetDockerClient() - if err != nil { - return err - } - - ghRepo := github.GetGHRepoService() - - reader, err := startSandbox(ctx, cli, ghRepo, os.Stdin) - if err != nil { - return err - } - if reader != nil { - docker.WaitForSandbox(reader, docker.SuccessMessage) - } - - if reader != nil { - var k8sClient k8s.K8s - err = retry.Do( - func() error { - k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) - return err - }, - retry.Attempts(10), - ) - if err != nil { - return err - } - if err = updateLocalKubeContext(); err != nil { - return err - } - - if err := watchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { - return err - } - util.PrintSandboxMessage(util.SandBoxConsolePort) - } - return nil -} - -func updateLocalKubeContext() error { - srcConfigAccess := &clientcmd.PathOptions{ - GlobalFile: docker.Kubeconfig, - LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), - } - k8sCtxMgr := k8s.NewK8sContextManager() - return k8sCtxMgr.CopyContext(srcConfigAccess, sandboxDockerContext, sandboxContextName) -} - -func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader) (*bufio.Scanner, error) { - fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) - - if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { - if err.Error() != clierrors.ErrSandboxExists { - return nil, err - } - fmt.Printf("Existing details of your sandbox") - util.PrintSandboxMessage(util.SandBoxConsolePort) - return nil, nil - } - - if err := util.SetupFlyteDir(); err != nil { - return nil, err - } - - templateValues := configutil.ConfigTemplateSpec{ - Host: "localhost:30081", - Insecure: true, - } - if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { - return nil, err - } - - volumes := docker.Volumes - sandboxDefaultConfig := sandboxConfig.DefaultConfig - if vol, err := mountVolume(sandboxDefaultConfig.Source, docker.Source); err != nil { - return nil, err - } else if vol != nil { - volumes = append(volumes, *vol) - } - sandboxImage := sandboxConfig.DefaultConfig.Image - if len(sandboxImage) == 0 { - image, version, err := github.GetFullyQualifiedImageName("dind", sandboxConfig.DefaultConfig.Version, sandboxImageName, sandboxConfig.DefaultConfig.Prerelease, g) - if err != nil { - return nil, err - } - sandboxImage = image - fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) - } - fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, sandboxImage) - if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.DefaultConfig.ImagePullPolicy, sandboxConfig.DefaultConfig.ImagePullOptions); err != nil { - return nil, err - } - - fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) - exposedPorts, portBindings, _ := docker.GetSandboxPorts() - ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, - sandboxImage, sandboxDefaultConfig.Env) - - if err != nil { - fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) - return nil, err - } - - logReader, err := docker.ReadLogs(ctx, cli, ID) - if err != nil { - return nil, err - } - - return logReader, nil -} - -func mountVolume(file, destination string) (*mount.Mount, error) { - if len(file) > 0 { - source, err := filepath.Abs(file) - if err != nil { - return nil, err - } - return &mount.Mount{ - Type: mount.TypeBind, - Source: source, - Target: destination, - }, nil - } - return nil, nil -} - -func watchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { - var data = os.Stdout - table := tablewriter.NewWriter(data) - table.SetHeader([]string{"Service", "Status", "Namespace"}) - table.SetRowLine(true) - - for { - isTaint, err := isNodeTainted(ctx, appsClient) - if err != nil { - return err - } - if isTaint { - return fmt.Errorf("docker sandbox doesn't have sufficient memory available. Please run docker system prune -a --volumes") - } - - pods, err := getFlyteDeployment(ctx, appsClient) - if err != nil { - return err - } - table.ClearRows() - table.SetAutoWrapText(false) - table.SetAutoFormatHeaders(true) - - // Clear os.Stdout - _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") - - var total, ready int - total = len(pods.Items) - ready = 0 - if total != 0 { - for _, v := range pods.Items { - if isPodReady(v) { - ready++ - } - if len(v.Status.Conditions) > 0 { - table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) - } - } - table.Render() - if total == ready { - break - } - } - - time.Sleep(40 * time.Second) - } - - return nil -} - -func isPodReady(v corev1api.Pod) bool { - if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { - return true - } - return false -} - -func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { - pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) - if err != nil { - return nil, err - } - return pods, nil -} - -func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { - nodes, err := client.Nodes().List(ctx, v1.ListOptions{}) - if err != nil { - return false, err - } - match := 0 - for _, node := range nodes.Items { - for _, c := range node.Spec.Taints { - if c.Key == diskPressureTaint && c.Effect == taintEffect { - match++ - } - } - } - if match > 0 { - return true, nil - } - return false, nil + sandboxDefaultConfig := sandboxCmdConfig.DefaultConfig + return sandbox.StartSandboxCluster(ctx, args, sandboxDefaultConfig) } diff --git a/flytectl/cmd/sandbox/start_test.go b/flytectl/cmd/sandbox/start_test.go index 8e1f28c5c8..3bee1abdbc 100644 --- a/flytectl/cmd/sandbox/start_test.go +++ b/flytectl/cmd/sandbox/start_test.go @@ -1,428 +1 @@ package sandbox - -import ( - "context" - "fmt" - "io" - "io/ioutil" - "os" - "strings" - "testing" - - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/docker" - "github.com/flyteorg/flytectl/pkg/docker/mocks" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" - ghutil "github.com/flyteorg/flytectl/pkg/github" - ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" - "github.com/flyteorg/flytectl/pkg/k8s" - k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" - "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flyteidl/clients/go/admin" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/container" - "github.com/google/go-github/v42/github" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testclient "k8s.io/client-go/kubernetes/fake" -) - -var content = ` -apiVersion: v1 -clusters: -- cluster: - server: https://localhost:8080 - extensions: - - name: client.authentication.k8s.io/exec - extension: - audience: foo - other: bar - name: default -contexts: -- context: - cluster: default - user: default - namespace: bar - name: default -current-context: default -kind: Config -users: -- name: default - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - arg-1 - - arg-2 - command: foo-command - provideClusterInfo: true -` - -var fakeNode = &corev1.Node{ - Spec: corev1.NodeSpec{ - Taints: []corev1.Taint{}, - }, -} - -var fakePod = corev1.Pod{ - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - Conditions: []corev1.PodCondition{}, - }, -} - -var ( - githubMock *ghMocks.GHRepoService - ctx context.Context - mockDocker *mocks.Docker -) - -func sandboxSetup() { - ctx = context.Background() - mockDocker = &mocks.Docker{} - errCh := make(chan error) - sandboxConfig.DefaultConfig.Version = "v0.19.1" - bodyStatus := make(chan container.ContainerWaitOKBody) - githubMock = &ghMocks.GHRepoService{} - sandboxConfig.DefaultConfig.Image = "dummyimage" - mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ - ID: "Hello", - }, nil) - - mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) -} - -func TestStartFunc(t *testing.T) { - assert.Nil(t, util.SetupFlyteDir()) - assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) - assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) - - fakePod.SetName("flyte") - - t.Run("Successfully run demo cluster", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ - { - ID: docker.FlyteSandboxClusterName, - Names: []string{ - docker.FlyteSandboxClusterName, - }, - }, - }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - reader, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("n")) - assert.Nil(t, err) - assert.Nil(t, reader) - }) - t.Run("Successfully run demo cluster with source code", func(t *testing.T) { - sandboxConfig.DefaultConfig.Source = f.UserHomeDir() - sandboxConfig.DefaultConfig.Version = "" - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { - sandboxConfig.DefaultConfig.Source = "../" - sandboxConfig.DefaultConfig.Version = "" - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - sandboxConfig.DefaultConfig.Image = "" - tag := "v0.15.0" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ - TagName: &tag, - }, nil, nil) - - githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.Nil(t, err) - }) - t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - sandboxConfig.DefaultConfig.Image = "" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "non-existent-tag", err.Error()) - }) - t.Run("Error in pulling image", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) - sandboxConfig.DefaultConfig.Image = "" - tag := "v0.15.0" - githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ - TagName: &tag, - }, nil, nil) - - githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to pull", err.Error()) - }) - t.Run("Error in removing existing cluster", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ - { - ID: docker.FlyteSandboxClusterName, - Names: []string{ - docker.FlyteSandboxClusterName, - }, - }, - }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) - _, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("y")) - assert.NotNil(t, err) - assert.Equal(t, "failed to remove container", err.Error()) - }) - t.Run("Error in start container", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to run container", err.Error()) - }) - t.Run("Error in reading logs", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, fmt.Errorf("failed to get container logs")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to get container logs", err.Error()) - }) - t.Run("Error in list container", func(t *testing.T) { - sandboxSetup() - mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin) - assert.NotNil(t, err) - assert.Equal(t, "failed to list containers", err.Error()) - }) - t.Run("Successfully run demo cluster command", func(t *testing.T) { - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - client := testclient.NewSimpleClientset() - k8s.Client = client - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - sandboxSetup() - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - - stringReader := strings.NewReader(docker.SuccessMessage) - reader := ioutil.NopCloser(stringReader) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(reader, nil) - mockK8sContextMgr := &k8sMocks.ContextOps{} - docker.Client = mockDocker - sandboxConfig.DefaultConfig.Source = "" - sandboxConfig.DefaultConfig.Version = "" - k8s.ContextMgr = mockK8sContextMgr - ghutil.Client = githubMock - mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) - err = startSandboxCluster(ctx, []string{}, cmdCtx) - assert.Nil(t, err) - }) - t.Run("Error in running demo cluster command", func(t *testing.T) { - mockOutStream := new(io.Writer) - cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) - sandboxSetup() - docker.Client = mockDocker - mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ - ShowStderr: true, - ShowStdout: true, - Timestamps: true, - Follow: true, - }).Return(nil, nil) - err := startSandboxCluster(ctx, []string{}, cmdCtx) - assert.NotNil(t, err) - }) -} - -func TestMonitorFlyteDeployment(t *testing.T) { - t.Run("Monitor k8s deployment fail because of storage", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - k8s.Client = client - fakePod.SetName("flyte") - fakePod.SetName("flyte") - - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - fakeNode.Spec.Taints = append(fakeNode.Spec.Taints, corev1.Taint{ - Effect: "NoSchedule", - Key: "node.kubernetes.io/disk-pressure", - }) - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - - err = watchFlyteDeployment(ctx, client.CoreV1()) - assert.NotNil(t, err) - - }) - - t.Run("Monitor k8s deployment success", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - k8s.Client = client - fakePod.SetName("flyte") - fakePod.SetName("flyte") - - _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - fakeNode.SetName("master") - fakeNode.Spec.Taints = []corev1.Taint{} - _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - - err = watchFlyteDeployment(ctx, client.CoreV1()) - assert.Nil(t, err) - - }) - -} - -func TestGetFlyteDeploymentCount(t *testing.T) { - - ctx := context.Background() - client := testclient.NewSimpleClientset() - c, err := getFlyteDeployment(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, 0, len(c.Items)) -} - -func TestGetNodeTaintStatus(t *testing.T) { - t.Run("Check node taint with success", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - fakeNode.SetName("master") - _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - c, err := isNodeTainted(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, false, c) - }) - t.Run("Check node taint with fail", func(t *testing.T) { - ctx := context.Background() - client := testclient.NewSimpleClientset() - fakeNode.SetName("master") - _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) - if err != nil { - t.Error(err) - } - node, err := client.CoreV1().Nodes().Get(ctx, "master", v1.GetOptions{}) - if err != nil { - t.Error(err) - } - node.Spec.Taints = append(node.Spec.Taints, corev1.Taint{ - Effect: taintEffect, - Key: diskPressureTaint, - }) - _, err = client.CoreV1().Nodes().Update(ctx, node, v1.UpdateOptions{}) - if err != nil { - t.Error(err) - } - c, err := isNodeTainted(ctx, client.CoreV1()) - assert.Nil(t, err) - assert.Equal(t, true, c) - }) -} diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index cb08092b5f..84f9fb3365 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -30,3 +30,33 @@ type Docker interface { type FlyteDocker struct { *client.Client } + +//go:generate enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json +type ImagePullPolicy int + +const ( + ImagePullPolicyAlways ImagePullPolicy = iota + ImagePullPolicyIfNotPresent + ImagePullPolicyNever +) + +// Set implements PFlag's Value interface to attempt to set the value of the flag from string. +func (i *ImagePullPolicy) Set(val string) error { + policy, err := ImagePullPolicyString(val) + if err != nil { + return err + } + + *i = policy + return nil +} + +// Type implements PFlag's Value interface to return type name. +func (i ImagePullPolicy) Type() string { + return "ImagePullPolicy" +} + +type ImagePullOptions struct { + RegistryAuth string `json:"registryAuth" pflag:",The base64 encoded credentials for the registry."` + Platform string `json:"platform" pflag:",Forces a specific platform's image to be pulled.'"` +} diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 8c9d47348f..de7adda9b9 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -12,8 +12,6 @@ import ( "github.com/docker/docker/client" "github.com/enescakir/emoji" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - "github.com/flyteorg/flytectl/clierrors" "github.com/docker/docker/api/types" @@ -128,11 +126,11 @@ func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, erro } // PullDockerImage will Pull docker image -func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy sandboxConfig.ImagePullPolicy, - imagePullOptions sandboxConfig.ImagePullOptions) error { +func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy ImagePullPolicy, + imagePullOptions ImagePullOptions) error { - if pullPolicy == sandboxConfig.ImagePullPolicyAlways || pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { - if pullPolicy == sandboxConfig.ImagePullPolicyIfNotPresent { + if pullPolicy == ImagePullPolicyAlways || pullPolicy == ImagePullPolicyIfNotPresent { + if pullPolicy == ImagePullPolicyIfNotPresent { imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) if err != nil { return err diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 37d91f9085..8524443641 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -8,8 +8,6 @@ import ( "strings" "testing" - sandboxConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/docker/docker/api/types/container" @@ -106,7 +104,7 @@ func TestPullDockerImage(t *testing.T) { ctx := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}) assert.Nil(t, err) }) @@ -116,7 +114,7 @@ func TestPullDockerImage(t *testing.T) { ctx := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyAlways, sandboxConfig.ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}) assert.NotNil(t, err) }) @@ -127,7 +125,7 @@ func TestPullDockerImage(t *testing.T) { // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyIfNotPresent, sandboxConfig.ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyIfNotPresent, ImagePullOptions{}) assert.Nil(t, err) }) @@ -135,7 +133,7 @@ func TestPullDockerImage(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} ctx := context.Background() - err := PullDockerImage(ctx, mockDocker, "nginx:latest", sandboxConfig.ImagePullPolicyNever, sandboxConfig.ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyNever, ImagePullOptions{}) assert.Nil(t, err) }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go b/flytectl/pkg/docker/imagepullpolicy_enumer.go similarity index 99% rename from flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go rename to flytectl/pkg/docker/imagepullpolicy_enumer.go index 8416741819..a5f09b9ee8 100644 --- a/flytectl/cmd/config/subcommand/sandbox/imagepullpolicy_enumer.go +++ b/flytectl/pkg/docker/imagepullpolicy_enumer.go @@ -1,7 +1,7 @@ // Code generated by "enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json"; DO NOT EDIT. // -package sandbox +package docker import ( "encoding/json" diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go new file mode 100644 index 0000000000..e934ab5372 --- /dev/null +++ b/flytectl/pkg/sandbox/start.go @@ -0,0 +1,308 @@ +package sandbox + +import ( + "bufio" + "context" + "fmt" + "io" + "os" + "path/filepath" + "time" + + "github.com/avast/retry-go" + "github.com/docker/docker/api/types/mount" + "github.com/docker/go-connections/nat" + "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/clierrors" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/github" + "github.com/flyteorg/flytectl/pkg/k8s" + "github.com/flyteorg/flytectl/pkg/util" + "github.com/kataras/tablewriter" + corev1api "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/clientcmd" +) + +const ( + flyteNamespace = "flyte" + diskPressureTaint = "node.kubernetes.io/disk-pressure" + taintEffect = "NoSchedule" + sandboxContextName = "flyte-sandbox" + sandboxDockerContext = "default" + k8sEndpoint = "https://127.0.0.1:30086" + sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" + demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-lite" +) + +func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { + nodes, err := client.Nodes().List(ctx, v1.ListOptions{}) + if err != nil { + return false, err + } + match := 0 + for _, node := range nodes.Items { + for _, c := range node.Spec.Taints { + if c.Key == diskPressureTaint && c.Effect == taintEffect { + match++ + } + } + } + if match > 0 { + return true, nil + } + return false, nil +} + +func isPodReady(v corev1api.Pod) bool { + if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { + return true + } + return false +} + +func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { + pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) + if err != nil { + return nil, err + } + return pods, nil +} + +func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { + var data = os.Stdout + table := tablewriter.NewWriter(data) + table.SetHeader([]string{"Service", "Status", "Namespace"}) + table.SetRowLine(true) + + for { + isTaint, err := isNodeTainted(ctx, appsClient) + if err != nil { + return err + } + if isTaint { + return fmt.Errorf("docker sandbox doesn't have sufficient memory available. Please run docker system prune -a --volumes") + } + + pods, err := getFlyteDeployment(ctx, appsClient) + if err != nil { + return err + } + table.ClearRows() + table.SetAutoWrapText(false) + table.SetAutoFormatHeaders(true) + + // Clear os.Stdout + _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") + + var total, ready int + total = len(pods.Items) + ready = 0 + if total != 0 { + for _, v := range pods.Items { + if isPodReady(v) { + ready++ + } + if len(v.Status.Conditions) > 0 { + table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) + } + } + table.Render() + if total == ready { + break + } + } else { + table.Append([]string{"k8s: This might take a little bit", "Bootstrapping", ""}) + table.Render() + } + + time.Sleep(40 * time.Second) + } + + return nil +} + +func MountVolume(file, destination string) (*mount.Mount, error) { + if len(file) > 0 { + source, err := filepath.Abs(file) + if err != nil { + return nil, err + } + return &mount.Mount{ + Type: mount.TypeBind, + Source: source, + Target: destination, + }, nil + } + return nil, nil +} + +func UpdateLocalKubeContext(dockerCtx string, contextName string) error { + srcConfigAccess := &clientcmd.PathOptions{ + GlobalFile: docker.Kubeconfig, + LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), + } + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.CopyContext(srcConfigAccess, dockerCtx, contextName) +} + +func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader, sandboxConfig *sandboxCmdConfig.Config, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) (*bufio.Scanner, error) { + fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + if err.Error() != clierrors.ErrSandboxExists { + return nil, err + } + fmt.Printf("Existing details of your sandbox") + util.PrintSandboxMessage(consolePort) + return nil, nil + } + + if err := util.SetupFlyteDir(); err != nil { + return nil, err + } + + templateValues := configutil.ConfigTemplateSpec{ + Host: "localhost:30081", + Insecure: true, + } + if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { + return nil, err + } + + volumes := docker.Volumes + if vol, err := MountVolume(sandboxConfig.Source, docker.Source); err != nil { + return nil, err + } else if vol != nil { + volumes = append(volumes, *vol) + } + sandboxImage := sandboxConfig.Image + if len(sandboxImage) == 0 { + image, version, err := github.GetFullyQualifiedImageName(defaultImagePrefix, sandboxConfig.Version, defaultImageName, sandboxConfig.Prerelease, g) + if err != nil { + return nil, err + } + sandboxImage = image + fmt.Printf("%s Fully Qualified image\n", image) + fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) + } + fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, sandboxImage) + if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.ImagePullPolicy, sandboxConfig.ImagePullOptions); err != nil { + return nil, err + } + + fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, + sandboxImage, sandboxConfig.Env) + + if err != nil { + fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) + return nil, err + } + + logReader, err := docker.ReadLogs(ctx, cli, ID) + if err != nil { + return nil, err + } + + return logReader, nil +} + +func primeFlytekitPod(ctx context.Context, podService corev1.PodInterface) { + _, err := podService.Create(ctx, &corev1api.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "py39-cacher", + }, + Spec: corev1api.PodSpec{ + RestartPolicy: corev1api.RestartPolicyNever, + Containers: []corev1api.Container{ + { + + Name: "flytekit", + Image: "ghcr.io/flyteorg/flytekit:py3.9-latest", + Command: []string{"echo"}, + Args: []string{"Flyte"}, + }, + }, + }, + }, v1.CreateOptions{}) + if err != nil { + fmt.Printf("Failed to create primer pod - %s", err) + } +} + +func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, primePod bool, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + ghRepo := github.GetGHRepoService() + + reader, err := startSandbox(ctx, cli, ghRepo, os.Stdin, sandboxConfig, defaultImageName, defaultImagePrefix, exposedPorts, portBindings, consolePort) + if err != nil { + return err + } + if reader != nil { + docker.WaitForSandbox(reader, docker.SuccessMessage) + } + + if reader != nil { + var k8sClient k8s.K8s + err = retry.Do( + func() error { + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + return err + }, + retry.Attempts(10), + ) + if err != nil { + return err + } + if err = UpdateLocalKubeContext(sandboxDockerContext, sandboxContextName); err != nil { + return err + } + + if err := WatchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { + return err + } + if primePod { + primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) + } + + } + return nil +} + +func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config) error { + primePod := true + sandboxImagePrefix := "sha" + exposedPorts, portBindings, err := docker.GetDemoPorts() + if err != nil { + return err + } + err = StartCluster(ctx, args, sandboxConfig, primePod, demoImageName, sandboxImagePrefix, exposedPorts, portBindings, util.DemoConsolePort) + if err != nil { + return err + } + util.PrintDemoMessage(util.DemoConsolePort) + return nil +} + +func StartSandboxCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config) error { + primePod := false + demoImagePrefix := "dind" + exposedPorts, portBindings, err := docker.GetSandboxPorts() + if err != nil { + return err + } + err = StartCluster(ctx, args, sandboxConfig, primePod, sandboxImageName, demoImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + if err != nil { + return err + } + util.PrintSandboxMessage(util.SandBoxConsolePort) + return nil +} diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go new file mode 100644 index 0000000000..f4d46b2321 --- /dev/null +++ b/flytectl/pkg/sandbox/start_test.go @@ -0,0 +1,438 @@ +package sandbox + +import ( + "context" + "fmt" + "io/ioutil" + "os" + "strings" + "testing" + + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + f "github.com/flyteorg/flytectl/pkg/filesystemutils" + ghutil "github.com/flyteorg/flytectl/pkg/github" + ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/flyteorg/flytectl/pkg/util" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" + "github.com/google/go-github/v42/github" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + testclient "k8s.io/client-go/kubernetes/fake" +) + +var content = ` +apiVersion: v1 +clusters: +- cluster: + server: https://localhost:8080 + extensions: + - name: client.authentication.k8s.io/exec + extension: + audience: foo + other: bar + name: default +contexts: +- context: + cluster: default + user: default + namespace: bar + name: default +current-context: default +kind: Config +users: +- name: default + user: + exec: + apiVersion: client.authentication.k8s.io/v1alpha1 + args: + - arg-1 + - arg-2 + command: foo-command + provideClusterInfo: true +` + +var fakeNode = &corev1.Node{ + Spec: corev1.NodeSpec{ + Taints: []corev1.Taint{}, + }, +} + +var fakePod = corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + Conditions: []corev1.PodCondition{}, + }, +} + +var ( + githubMock *ghMocks.GHRepoService + ctx context.Context + mockDocker *mocks.Docker +) + +func sandboxSetup() { + ctx = context.Background() + mockDocker = &mocks.Docker{} + errCh := make(chan error) + sandboxCmdConfig.DefaultConfig.Version = "v0.19.1" + bodyStatus := make(chan container.ContainerWaitOKBody) + githubMock = &ghMocks.GHRepoService{} + sandboxCmdConfig.DefaultConfig.Image = "dummyimage" + mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ + ID: "Hello", + }, nil) + + mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) +} + +func TestStartFunc(t *testing.T) { + defaultImagePrefix := "dind" + exposedPorts, portBindings, _ := docker.GetSandboxPorts() + config := sandboxCmdConfig.DefaultConfig + config.Image = "dummyimage" + config.ImagePullOptions = docker.ImagePullOptions{ + RegistryAuth: "", + Platform: "", + } + assert.Nil(t, util.SetupFlyteDir()) + assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) + assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) + + fakePod.SetName("flyte") + + t.Run("Successfully run demo cluster", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.Nil(t, err) + }) + t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + reader, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("n"), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.Nil(t, err) + assert.Nil(t, reader) + }) + t.Run("Successfully run demo cluster with source code", func(t *testing.T) { + sandboxCmdConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxCmdConfig.DefaultConfig.Version = "" + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.Nil(t, err) + }) + t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { + sandboxCmdConfig.DefaultConfig.Source = "../" + sandboxCmdConfig.DefaultConfig.Version = "" + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.Nil(t, err) + }) + t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + sandboxCmdConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.Nil(t, err) + }) + t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + sandboxCmdConfig.DefaultConfig.Image = "" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "non-existent-tag", err.Error()) + }) + t.Run("Error in pulling image", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) + sandboxCmdConfig.DefaultConfig.Image = "" + tag := "v0.15.0" + githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + TagName: &tag, + }, nil, nil) + + githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "failed to pull", err.Error()) + }) + t.Run("Error in removing existing cluster", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) + _, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("y"), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "failed to remove container", err.Error()) + }) + t.Run("Error in start container", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "failed to run container", err.Error()) + }) + t.Run("Error in reading logs", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, fmt.Errorf("failed to get container logs")) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "failed to get container logs", err.Error()) + }) + t.Run("Error in list container", func(t *testing.T) { + sandboxSetup() + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + assert.NotNil(t, err) + assert.Equal(t, "failed to list containers", err.Error()) + }) + t.Run("Successfully run demo cluster command", func(t *testing.T) { + // mockOutStream := new(io.Writer) + //cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + client := testclient.NewSimpleClientset() + k8s.Client = client + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + sandboxSetup() + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + + stringReader := strings.NewReader(docker.SuccessMessage) + reader := ioutil.NopCloser(stringReader) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(reader, nil) + mockK8sContextMgr := &k8sMocks.ContextOps{} + docker.Client = mockDocker + sandboxCmdConfig.DefaultConfig.Source = "" + sandboxCmdConfig.DefaultConfig.Version = "" + k8s.ContextMgr = mockK8sContextMgr + ghutil.Client = githubMock + mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) + err = StartSandboxCluster(context.Background(), []string{}, config) + assert.Nil(t, err) + err = StartDemoCluster(context.Background(), []string{}, config) + assert.Nil(t, err) + }) + t.Run("Error in running demo cluster command", func(t *testing.T) { + //mockOutStream := new(io.Writer) + //cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + sandboxSetup() + docker.Client = mockDocker + mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) + mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ + ShowStderr: true, + ShowStdout: true, + Timestamps: true, + Follow: true, + }).Return(nil, nil) + err := StartSandboxCluster(context.Background(), []string{}, config) + assert.NotNil(t, err) + err = StartDemoCluster(context.Background(), []string{}, config) + assert.NotNil(t, err) + }) +} + +func TestMonitorFlyteDeployment(t *testing.T) { + t.Run("Monitor k8s deployment fail because of storage", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = append(fakeNode.Spec.Taints, corev1.Taint{ + Effect: "NoSchedule", + Key: "node.kubernetes.io/disk-pressure", + }) + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = WatchFlyteDeployment(ctx, client.CoreV1()) + assert.NotNil(t, err) + + }) + + t.Run("Monitor k8s deployment success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + k8s.Client = client + fakePod.SetName("flyte") + fakePod.SetName("flyte") + + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + fakeNode.SetName("master") + fakeNode.Spec.Taints = []corev1.Taint{} + _, err = client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + + err = WatchFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + + }) + +} + +func TestGetFlyteDeploymentCount(t *testing.T) { + + ctx := context.Background() + client := testclient.NewSimpleClientset() + c, err := getFlyteDeployment(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, 0, len(c.Items)) +} + +func TestGetNodeTaintStatus(t *testing.T) { + t.Run("Check node taint with success", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, false, c) + }) + t.Run("Check node taint with fail", func(t *testing.T) { + ctx := context.Background() + client := testclient.NewSimpleClientset() + fakeNode.SetName("master") + _, err := client.CoreV1().Nodes().Create(ctx, fakeNode, v1.CreateOptions{}) + if err != nil { + t.Error(err) + } + node, err := client.CoreV1().Nodes().Get(ctx, "master", v1.GetOptions{}) + if err != nil { + t.Error(err) + } + node.Spec.Taints = append(node.Spec.Taints, corev1.Taint{ + Effect: taintEffect, + Key: diskPressureTaint, + }) + _, err = client.CoreV1().Nodes().Update(ctx, node, v1.UpdateOptions{}) + if err != nil { + t.Error(err) + } + c, err := isNodeTainted(ctx, client.CoreV1()) + assert.Nil(t, err) + assert.Equal(t, true, c) + }) +} From 4d78b8e93b743fe31649f3d409c2aa4cd4070bd7 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 15 Jun 2022 20:42:34 +0530 Subject: [PATCH 261/356] add the missing exports for demo (#330) Signed-off-by: Prafulla Mahindrakar --- flytectl/pkg/sandbox/start.go | 2 +- flytectl/pkg/util/util.go | 6 ------ flytectl/pkg/util/util_test.go | 6 ------ 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index e934ab5372..012f104b41 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -288,7 +288,7 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox if err != nil { return err } - util.PrintDemoMessage(util.DemoConsolePort) + util.PrintSandboxMessage(util.DemoConsolePort) return nil } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 091ea21707..5fc54438ec 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -65,12 +65,6 @@ func PrintSandboxMessage(flyteConsolePort int) { fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) } -// PrintDemoMessage will print demo success message -func PrintDemoMessage(flyteConsolePort int) { - successMsg := fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) - fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) -} - // SendRequest will create request and return the response func SendRequest(method, url string, option io.Reader) (*http.Response, error) { client := &http.Client{} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index ebf67a902d..718a244d9c 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -29,12 +29,6 @@ func TestPrintSandboxMessage(t *testing.T) { }) } -func TestPrintDemoMessage(t *testing.T) { - t.Run("Print Demo Message", func(t *testing.T) { - PrintDemoMessage(DemoConsolePort) - }) -} - func TestSendRequest(t *testing.T) { t.Run("Successful get request", func(t *testing.T) { response, err := SendRequest("GET", "https://github.com", nil) From 3e9525f6b8659bfee99f5356ef25300270c26a29 Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:50:50 +0530 Subject: [PATCH 262/356] Add commands to fetch active and archived launchplans (#331) Issue: https://github.com/flyteorg/flyte/issues/2620 Slack conversation: https://flyte-org.slack.com/archives/CP2HDHKE1/p1655433353538459 * Add commands to fetch active and archived launchplans * Removed 'with filters' * Update based on comments Signed-off-by: SmritiSatyanV --- flytectl/cmd/get/launch_plan.go | 10 ++ flytectl/docs/source/contribute.rst | 1 + flytectl/docs/source/gen/flytectl.rst | 7 +- flytectl/docs/source/gen/flytectl_compile.rst | 104 ++++++++++++++++++ .../docs/source/gen/flytectl_completion.rst | 6 +- flytectl/docs/source/gen/flytectl_config.rst | 6 +- .../source/gen/flytectl_config_discover.rst | 6 +- .../docs/source/gen/flytectl_config_docs.rst | 6 +- .../docs/source/gen/flytectl_config_init.rst | 6 +- .../source/gen/flytectl_config_validate.rst | 6 +- flytectl/docs/source/gen/flytectl_create.rst | 6 +- .../source/gen/flytectl_create_execution.rst | 6 +- .../source/gen/flytectl_create_project.rst | 6 +- flytectl/docs/source/gen/flytectl_delete.rst | 6 +- ...ectl_delete_cluster-resource-attribute.rst | 6 +- ...lytectl_delete_execution-cluster-label.rst | 6 +- ...tectl_delete_execution-queue-attribute.rst | 6 +- .../source/gen/flytectl_delete_execution.rst | 6 +- .../gen/flytectl_delete_plugin-override.rst | 6 +- ...lytectl_delete_task-resource-attribute.rst | 6 +- ...tectl_delete_workflow-execution-config.rst | 6 +- flytectl/docs/source/gen/flytectl_demo.rst | 6 +- .../docs/source/gen/flytectl_demo_exec.rst | 6 +- .../docs/source/gen/flytectl_demo_start.rst | 6 +- .../docs/source/gen/flytectl_demo_status.rst | 6 +- .../source/gen/flytectl_demo_teardown.rst | 6 +- flytectl/docs/source/gen/flytectl_get.rst | 6 +- ...lytectl_get_cluster-resource-attribute.rst | 6 +- .../flytectl_get_execution-cluster-label.rst | 6 +- ...flytectl_get_execution-queue-attribute.rst | 6 +- .../source/gen/flytectl_get_execution.rst | 6 +- .../source/gen/flytectl_get_launchplan.rst | 16 ++- .../gen/flytectl_get_plugin-override.rst | 6 +- .../docs/source/gen/flytectl_get_project.rst | 6 +- .../flytectl_get_task-resource-attribute.rst | 6 +- .../docs/source/gen/flytectl_get_task.rst | 6 +- ...flytectl_get_workflow-execution-config.rst | 6 +- .../docs/source/gen/flytectl_get_workflow.rst | 6 +- .../docs/source/gen/flytectl_register.rst | 6 +- .../source/gen/flytectl_register_examples.rst | 6 +- .../source/gen/flytectl_register_files.rst | 6 +- flytectl/docs/source/gen/flytectl_sandbox.rst | 6 +- .../docs/source/gen/flytectl_sandbox_exec.rst | 6 +- .../source/gen/flytectl_sandbox_start.rst | 6 +- .../source/gen/flytectl_sandbox_status.rst | 6 +- .../source/gen/flytectl_sandbox_teardown.rst | 6 +- flytectl/docs/source/gen/flytectl_update.rst | 6 +- ...ectl_update_cluster-resource-attribute.rst | 6 +- ...lytectl_update_execution-cluster-label.rst | 6 +- ...tectl_update_execution-queue-attribute.rst | 6 +- .../source/gen/flytectl_update_execution.rst | 6 +- .../gen/flytectl_update_launchplan-meta.rst | 6 +- .../source/gen/flytectl_update_launchplan.rst | 6 +- .../gen/flytectl_update_plugin-override.rst | 6 +- .../source/gen/flytectl_update_project.rst | 6 +- .../source/gen/flytectl_update_task-meta.rst | 6 +- ...lytectl_update_task-resource-attribute.rst | 6 +- ...tectl_update_workflow-execution-config.rst | 6 +- .../gen/flytectl_update_workflow-meta.rst | 6 +- flytectl/docs/source/gen/flytectl_upgrade.rst | 6 +- flytectl/docs/source/gen/flytectl_version.rst | 6 +- flytectl/docs/source/verbs.rst | 1 + 62 files changed, 301 insertions(+), 174 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_compile.rst diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 65071c2f7c..c9c1d053de 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -55,6 +55,16 @@ Retrieve all the launch plans with filters: flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" +Retrieve all active launch plans: +:: + + flytectl get launchplan -p flytesnacks -d development -o yaml --filter.fieldSelector "state=1" + +Retrieve all archived launch plans: +:: + + flytectl get launchplan -p flytesnacks -d development -o yaml --filter.fieldSelector "state=0" + Retrieve launch plans entity search across all versions with filters: :: diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst index 9859618635..f5bea5d584 100644 --- a/flytectl/docs/source/contribute.rst +++ b/flytectl/docs/source/contribute.rst @@ -67,6 +67,7 @@ To update the documentation, follow these steps: * - ``version`` - ``flytectl version ...`` - Fetches Flytectl version + Find all the Flytectl commands :ref:`here `. * Run appropriate tests to view the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` in the root directory. diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 06511bf337..302570ce23 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -51,7 +51,7 @@ Options --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. -h, --help help for flytectl --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -68,13 +68,14 @@ Options --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ +* :doc:`flytectl_compile` - Validate flyte packages without registration needed. * :doc:`flytectl_completion` - Generates completion script. * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. * :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_compile.rst b/flytectl/docs/source/gen/flytectl_compile.rst new file mode 100644 index 0000000000..8abba58378 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_compile.rst @@ -0,0 +1,104 @@ +.. _flytectl_compile: + +flytectl compile +---------------- + +Validate flyte packages without registration needed. + +Synopsis +~~~~~~~~ + + + +Validate workflows by compiling flyte's serialized protobuf files (task, workflows and launch plans). This is useful for testing workflows and tasks without neededing to talk with a flyte cluster. + +:: + + flytectl compile --file my-flyte-package.tgz + +:: + + flytectl compile --file /home/user/dags/my-flyte-package.tgz + +.. note:: + Input file is a path to a tgz. This file is generated by either pyflyte or jflyte. tgz file contains protobuf files describing workflows, tasks and launch plans. + + + +:: + + flytectl compile [flags] + +Options +~~~~~~~ + +:: + + --file string Path to a flyte package file. Flyte packages are tgz files generated by pyflyte or jflyte. + -h, --help help for compile + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string (default "5m0s") + --admin.pkceConfig.timeout string (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - Flytectl CLI tool + diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index f6529fbf6e..9453d90396 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -123,7 +123,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -140,8 +140,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 493ab33653..cdc118c07c 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -59,7 +59,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -76,8 +76,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index fefd54f7ea..564cd8b006 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -63,7 +63,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -80,8 +80,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index 5c02341006..632ea87208 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -63,7 +63,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -80,8 +80,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 7ca884adc5..978db2958f 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -94,7 +94,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -111,8 +111,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 5a46a46637..22a7b134b1 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -65,7 +65,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -82,8 +82,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 2d6c94f998..947c32362e 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -62,7 +62,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -79,8 +79,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 48ee14600e..95daf83376 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -185,7 +185,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -202,8 +202,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index b5f7aa04bc..27395b40bf 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -98,7 +98,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -115,8 +115,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index aa1453c301..1b47f263e9 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -62,7 +62,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -79,8 +79,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 1591bd4750..7ba18dab58 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -97,7 +97,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -114,8 +114,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index ea415b6a99..bb4c71a599 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -94,7 +94,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -111,8 +111,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 6d48e44e96..f73ccb7f9d 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -98,7 +98,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -115,8 +115,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 6aac95b551..6ac42e93e0 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -105,7 +105,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -122,8 +122,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index ed7ba605f7..b7aef23a38 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -99,7 +99,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -116,8 +116,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 42d305438a..659f599781 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -99,7 +99,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -116,8 +116,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 38f59eb659..11625d7bed 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -97,7 +97,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -114,8 +114,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index 504b770678..e5b0f470d1 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -80,7 +80,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -97,8 +97,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index c55169861a..56386d2357 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index dc62740582..19e894a589 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -129,7 +129,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -146,8 +146,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index aaa7ff3814..776c61dce7 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index 58650c4bca..75bb1489ff 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 71d85bcf15..76ab0c3b66 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -62,7 +62,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -79,8 +79,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 73de33c82f..f80498937b 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -105,7 +105,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -122,8 +122,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 1186dd1835..b7ef8253f9 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -104,7 +104,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -121,8 +121,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 2bf8699323..c455f435b8 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -107,7 +107,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -124,8 +124,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 618e621eae..e86fdfc04d 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -137,7 +137,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -154,8 +154,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index c2cd4a8697..6d805622bf 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -48,6 +48,16 @@ Retrieve all the launch plans with filters: flytectl get launchplan -p flytesnacks -d development --filter.fieldSelector="name=core.basic.lp.go_greet" +Retrieve all active launch plans: +:: + + flytectl get launchplan -p flytesnacks -d development -o yaml --filter.fieldSelector "state=1" + +Retrieve all archived launch plans: +:: + + flytectl get launchplan -p flytesnacks -d development -o yaml --filter.fieldSelector "state=0" + Retrieve launch plans entity search across all versions with filters: :: @@ -161,7 +171,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -178,8 +188,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index ce88f36675..fd5f2254d3 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -126,7 +126,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -143,8 +143,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 7bfb482d1e..8325efae74 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -109,7 +109,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -126,8 +126,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index ddfb59c910..b367830e9c 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -109,7 +109,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -126,8 +126,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 0d3076e683..172a0e8c75 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -153,7 +153,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -170,8 +170,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 1c126ef959..d120edbe0c 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -166,7 +166,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -183,8 +183,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index a7e46b607e..5ea33497e5 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -137,7 +137,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -154,8 +154,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 5c61b1b818..3d5846a8b5 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -62,7 +62,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -79,8 +79,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 5086fb491e..63834c91f9 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -88,7 +88,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -105,8 +105,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index a30391d3fb..42f429e1b9 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -165,7 +165,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -182,8 +182,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index ddebcdefdc..704ddb5351 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -80,7 +80,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -97,8 +97,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 65f131a303..86c47cda19 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 765e9f3df4..003470fb4b 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -134,7 +134,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -151,8 +151,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 2891e7d53d..8d86bad084 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 9c3c5c9bf5..187871f39f 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -69,7 +69,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -86,8 +86,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 6cc96e9b60..3b101a52cd 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -64,7 +64,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -81,8 +81,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 0dab5c753a..563bfa1750 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -104,7 +104,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -121,8 +121,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 61e0588dc6..1fbbe717d5 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -97,7 +97,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -114,8 +114,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index fa5c5ec997..7e9275abbe 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -108,7 +108,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -125,8 +125,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index f46100530d..433b6d7a9b 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -77,7 +77,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -94,8 +94,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 235a93f0dd..1d23d714fa 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -82,7 +82,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -99,8 +99,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 8b41776a43..45d7e1853d 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -78,7 +78,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -95,8 +95,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index d574bcf93e..bfb615e6bd 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -110,7 +110,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -127,8 +127,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 22d93ef02a..b8da2dc0a9 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -137,7 +137,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -154,8 +154,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 507db9cfa5..d733ddb9eb 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -82,7 +82,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -99,8 +99,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 5faa148be2..4a75a91c71 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -110,7 +110,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -127,8 +127,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index f7ae581c08..2c89aa80bf 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -106,7 +106,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -123,8 +123,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 6a3905d8df..ba2bb2cf87 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -82,7 +82,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -99,8 +99,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index be4ce3f70a..3ba85d765d 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -77,7 +77,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -94,8 +94,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index d0ecf3a2d8..f45d8f236e 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -66,7 +66,7 @@ Options inherited from parent commands --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 4) + --logger.level int Sets the minimum logging level. (default 3) --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. --logger.show-source Includes source code location in logs. -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") @@ -83,8 +83,8 @@ Options inherited from parent commands --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/graymeta/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/graymeta/stow + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index 50eb37071e..403a96ec31 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -14,6 +14,7 @@ Flytectl verbs specify the actions to be performed on the resources. Example: cr gen/flytectl_delete gen/flytectl_register gen/flytectl_config + gen/flytectl_compile gen/flytectl_sandbox gen/flytectl_demo gen/flytectl_version From f35bb2eddf877108c405113c66f6aea01aad882f Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 1 Jul 2022 14:14:42 +0530 Subject: [PATCH 263/356] rename upgrade workflow (#332) Signed-off-by: Yuvraj Co-authored-by: Yuvraj --- .../workflows/{upgrade_automtion.yml => upgrade_automation.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename flytectl/.github/workflows/{upgrade_automtion.yml => upgrade_automation.yml} (100%) diff --git a/flytectl/.github/workflows/upgrade_automtion.yml b/flytectl/.github/workflows/upgrade_automation.yml similarity index 100% rename from flytectl/.github/workflows/upgrade_automtion.yml rename to flytectl/.github/workflows/upgrade_automation.yml From c7e543ae802e0c1c5edb69715925a8ffbf9f1d6f Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Wed, 6 Jul 2022 06:18:13 +0300 Subject: [PATCH 264/356] fix: doc-requirements.txt to reduce vulnerabilities (#334) The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-LXML-2940874 --- flytectl/doc-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index f0ff7cad16..070d7493af 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -31,7 +31,7 @@ imagesize==1.3.0 # via sphinx jinja2==3.0.3 # via sphinx -lxml==4.7.1 +lxml==4.9.1 # via sphinx-material markupsafe==2.0.1 # via jinja2 From 305adae20228cc679d086b234d08b649f710e9d9 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 5 Jul 2022 20:18:46 -0700 Subject: [PATCH 265/356] Update flyteidl version (#333) Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytectl/go.mod | 2 +- flytectl/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 8b95a84bd6..a74e398177 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.0 + github.com/flyteorg/flyteidl v1.1.8 github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 9bdfe27256..736f6cc89f 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -403,6 +403,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= github.com/flyteorg/flyteidl v1.1.0 h1:f8tdMXOuorS/d+4Ut2QarfDbdCOriK0S+EnlQzrwz9E= github.com/flyteorg/flyteidl v1.1.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= +github.com/flyteorg/flyteidl v1.1.8 h1:F4daAffMefK+LiW1Wni75Vw6ya6uWlVHySWF6UhbzaQ= +github.com/flyteorg/flyteidl v1.1.8/go.mod h1:f1tvw5CDjqmrzNxKpRYr6BdAhHL8f7Wp1Duxl0ZOV4g= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= From 09f9d213fea5c23889fb89b0a7ab0cf203fba195 Mon Sep 17 00:00:00 2001 From: David Przybilla Date: Mon, 11 Jul 2022 15:11:12 +0900 Subject: [PATCH 266/356] Teardown logic shared for demo/sandbox cmds (#329) --- flytectl/cmd/demo/start.go | 1 - flytectl/cmd/demo/teardown.go | 37 ++------------------- flytectl/cmd/demo/teardown_test.go | 13 ++++++-- flytectl/cmd/sandbox/start.go | 1 - flytectl/cmd/sandbox/teardown.go | 38 ++------------------- flytectl/cmd/sandbox/teardown_test.go | 40 +++------------------- flytectl/pkg/sandbox/teardown.go | 39 ++++++++++++++++++++++ flytectl/pkg/sandbox/teardown_test.go | 48 +++++++++++++++++++++++++++ 8 files changed, 107 insertions(+), 110 deletions(-) create mode 100644 flytectl/pkg/sandbox/teardown.go create mode 100644 flytectl/pkg/sandbox/teardown_test.go diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 247111ffca..a1e3113398 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -72,7 +72,6 @@ eg : for passing multiple environment variables Usage ` - demoContextName = "flyte-sandbox" ) func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go index bd98b22e37..399a904ab7 100644 --- a/flytectl/cmd/demo/teardown.go +++ b/flytectl/cmd/demo/teardown.go @@ -2,17 +2,12 @@ package demo import ( "context" - "fmt" - "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/sandbox" "github.com/flyteorg/flytectl/pkg/docker" - "github.com/docker/docker/api/types" - "github.com/enescakir/emoji" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/k8s" ) const ( @@ -33,33 +28,5 @@ func teardownDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if err != nil { return err } - - return tearDownDemo(ctx, cli) -} - -func tearDownDemo(ctx context.Context, cli docker.Docker) error { - c, err := docker.GetSandbox(ctx, cli) - if err != nil { - return err - } - if c != nil { - if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ - Force: true, - }); err != nil { - return err - } - } - if err := configutil.ConfigCleanup(); err != nil { - fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) - } - if err := removeDemoKubeContext(); err != nil { - fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) - } - fmt.Printf("%v %v Demo cluster is removed successfully. \n", emoji.Broom, emoji.Broom) - return nil -} - -func removeDemoKubeContext() error { - k8sCtxMgr := k8s.NewK8sContextManager() - return k8sCtxMgr.RemoveContext(demoContextName) + return sandbox.Teardown(ctx, cli) } diff --git a/flytectl/cmd/demo/teardown_test.go b/flytectl/cmd/demo/teardown_test.go index 7741272a2b..34a25f23f5 100644 --- a/flytectl/cmd/demo/teardown_test.go +++ b/flytectl/cmd/demo/teardown_test.go @@ -12,6 +12,7 @@ import ( "github.com/flyteorg/flytectl/pkg/docker/mocks" "github.com/flyteorg/flytectl/pkg/k8s" k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/flyteorg/flytectl/pkg/sandbox" "github.com/flyteorg/flytectl/pkg/util" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -36,7 +37,7 @@ func TestTearDownFunc(t *testing.T) { mockK8sContextMgr := &k8sMocks.ContextOps{} k8s.ContextMgr = mockK8sContextMgr mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) - err := tearDownDemo(ctx, mockDocker) + err := sandbox.Teardown(ctx, mockDocker) assert.Nil(t, err) }) t.Run("Error", func(t *testing.T) { @@ -44,7 +45,15 @@ func TestTearDownFunc(t *testing.T) { mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) - err := tearDownDemo(ctx, mockDocker) + err := sandbox.Teardown(ctx, mockDocker) + assert.NotNil(t, err) + }) + + t.Run("Error", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(nil, fmt.Errorf("err")) + err := sandbox.Teardown(ctx, mockDocker) assert.NotNil(t, err) }) diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index d409637032..1996a7f17d 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -76,7 +76,6 @@ eg : for passing multiple environment variables Usage ` - sandboxContextName = "flyte-sandbox" ) func startSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 9280e303a5..4e209a19c1 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -2,17 +2,11 @@ package sandbox import ( "context" - "fmt" - - "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" - - "github.com/docker/docker/api/types" - "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/pkg/k8s" ) const ( @@ -33,33 +27,5 @@ func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.C if err != nil { return err } - - return tearDownSandbox(ctx, cli) -} - -func tearDownSandbox(ctx context.Context, cli docker.Docker) error { - c, err := docker.GetSandbox(ctx, cli) - if err != nil { - return err - } - if c != nil { - if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ - Force: true, - }); err != nil { - return err - } - } - if err := configutil.ConfigCleanup(); err != nil { - fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) - } - if err := removeSandboxKubeContext(); err != nil { - fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) - } - fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) - return nil -} - -func removeSandboxKubeContext() error { - k8sCtxMgr := k8s.NewK8sContextManager() - return k8sCtxMgr.RemoveContext(sandboxContextName) + return sandbox.Teardown(ctx, cli) } diff --git a/flytectl/cmd/sandbox/teardown_test.go b/flytectl/cmd/sandbox/teardown_test.go index 0664342979..63509c22ec 100644 --- a/flytectl/cmd/sandbox/teardown_test.go +++ b/flytectl/cmd/sandbox/teardown_test.go @@ -1,8 +1,6 @@ package sandbox import ( - "context" - "fmt" "testing" "github.com/docker/docker/api/types" @@ -17,40 +15,8 @@ import ( "github.com/stretchr/testify/mock" ) -var containers []types.Container - -func TestTearDownFunc(t *testing.T) { - container1 := types.Container{ - ID: "FlyteSandboxClusterName", - Names: []string{ - docker.FlyteSandboxClusterName, - }, - } - containers = append(containers, container1) - - t.Run("Success", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) - mockK8sContextMgr := &k8sMocks.ContextOps{} - k8s.ContextMgr = mockK8sContextMgr - mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) - err := tearDownSandbox(ctx, mockDocker) - assert.Nil(t, err) - }) - t.Run("Error", func(t *testing.T) { - ctx := context.Background() - mockDocker := &mocks.Docker{} - mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) - mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) - err := tearDownSandbox(ctx, mockDocker) - assert.NotNil(t, err) - }) - -} - func TestTearDownClusterFunc(t *testing.T) { + var containers []types.Container _ = util.SetupFlyteDir() _ = util.WriteIntoFile([]byte("data"), configutil.FlytectlConfig) s := testutils.Setup() @@ -58,6 +24,10 @@ func TestTearDownClusterFunc(t *testing.T) { mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + mockK8sContextMgr := &k8sMocks.ContextOps{} + mockK8sContextMgr.OnRemoveContext(mock.Anything).Return(nil) + k8s.ContextMgr = mockK8sContextMgr + docker.Client = mockDocker err := teardownSandboxCluster(ctx, []string{}, s.CmdCtx) assert.Nil(t, err) diff --git a/flytectl/pkg/sandbox/teardown.go b/flytectl/pkg/sandbox/teardown.go new file mode 100644 index 0000000000..633d026833 --- /dev/null +++ b/flytectl/pkg/sandbox/teardown.go @@ -0,0 +1,39 @@ +package sandbox + +import ( + "context" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/k8s" +) + +func Teardown(ctx context.Context, cli docker.Docker) error { + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } + if c != nil { + if err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ + Force: true, + }); err != nil { + return err + } + } + if err := configutil.ConfigCleanup(); err != nil { + fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) + } + if err := removeSandboxKubeContext(); err != nil { + fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) + } + fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) + return nil +} + +func removeSandboxKubeContext() error { + k8sCtxMgr := k8s.NewK8sContextManager() + return k8sCtxMgr.RemoveContext(sandboxContextName) +} diff --git a/flytectl/pkg/sandbox/teardown_test.go b/flytectl/pkg/sandbox/teardown_test.go new file mode 100644 index 0000000000..9047ee7614 --- /dev/null +++ b/flytectl/pkg/sandbox/teardown_test.go @@ -0,0 +1,48 @@ +package sandbox + +import ( + "context" + "fmt" + "testing" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/flyteorg/flytectl/pkg/k8s" + k8sMocks "github.com/flyteorg/flytectl/pkg/k8s/mocks" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +func TestTearDownFunc(t *testing.T) { + var containers []types.Container + container1 := types.Container{ + ID: "FlyteSandboxClusterName", + Names: []string{ + docker.FlyteSandboxClusterName, + }, + } + containers = append(containers, container1) + ctx := context.Background() + + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) + err := Teardown(ctx, mockDocker) + assert.NotNil(t, err) + + mockDocker = &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(nil, fmt.Errorf("err")) + err = Teardown(ctx, mockDocker) + assert.NotNil(t, err) + + mockDocker = &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + mockK8sContextMgr := &k8sMocks.ContextOps{} + mockK8sContextMgr.OnRemoveContext(mock.Anything).Return(nil) + k8s.ContextMgr = mockK8sContextMgr + err = Teardown(ctx, mockDocker) + assert.Nil(t, err) + +} From e0d7284217a1ab4721e0e377203af523a0a28dac Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Wed, 27 Jul 2022 16:30:18 +0530 Subject: [PATCH 267/356] remove welcome bot from boilerplate (#337) Signed-off-by: Samhita Alla --- flytectl/.github/config.yml | 16 ---------------- .../boilerplate/flyte/welcome_bot/Readme.rst | 8 -------- .../boilerplate/flyte/welcome_bot/config.yml | 16 ---------------- flytectl/boilerplate/flyte/welcome_bot/update.sh | 15 --------------- flytectl/boilerplate/update.cfg | 1 - 5 files changed, 56 deletions(-) delete mode 100644 flytectl/.github/config.yml delete mode 100644 flytectl/boilerplate/flyte/welcome_bot/Readme.rst delete mode 100644 flytectl/boilerplate/flyte/welcome_bot/config.yml delete mode 100755 flytectl/boilerplate/flyte/welcome_bot/update.sh diff --git a/flytectl/.github/config.yml b/flytectl/.github/config.yml deleted file mode 100644 index 73da252e52..0000000000 --- a/flytectl/.github/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: | - Thank you for opening this pull request! 🙌 - - These tips will help get your PR across the finish line: - - - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congrats on merging your first pull request! 🎉 - -# Comment to be posted on first-time issues -newIssueWelcomeComment: > - Thank you for opening your first issue here! 🛠 diff --git a/flytectl/boilerplate/flyte/welcome_bot/Readme.rst b/flytectl/boilerplate/flyte/welcome_bot/Readme.rst deleted file mode 100644 index ea18781185..0000000000 --- a/flytectl/boilerplate/flyte/welcome_bot/Readme.rst +++ /dev/null @@ -1,8 +0,0 @@ -Config File -- Welcome Bot -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Provides a ``config.yml`` file. - -**To Enable:** - -Add ``flyte/config.yml`` to your ``boilerplate/update.cfg`` file. \ No newline at end of file diff --git a/flytectl/boilerplate/flyte/welcome_bot/config.yml b/flytectl/boilerplate/flyte/welcome_bot/config.yml deleted file mode 100644 index 73da252e52..0000000000 --- a/flytectl/boilerplate/flyte/welcome_bot/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Comment to be posted on PRs from first-time contributors in your repository -newPRWelcomeComment: | - Thank you for opening this pull request! 🙌 - - These tips will help get your PR across the finish line: - - - Most of the repos have a PR template; if not, fill it out to the best of your knowledge. - - Sign off your commits (Reference: [DCO Guide](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md)). - -# Comment to be posted to on pull requests merged by a first time user -firstPRMergeComment: > - Congrats on merging your first pull request! 🎉 - -# Comment to be posted on first-time issues -newIssueWelcomeComment: > - Thank you for opening your first issue here! 🛠 diff --git a/flytectl/boilerplate/flyte/welcome_bot/update.sh b/flytectl/boilerplate/flyte/welcome_bot/update.sh deleted file mode 100755 index 2db64ac3f1..0000000000 --- a/flytectl/boilerplate/flyte/welcome_bot/update.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: -# -# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst - -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - -# Clone the config.yml file -echo " - copying ${DIR}/config.yml to the root directory." -cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml - diff --git a/flytectl/boilerplate/update.cfg b/flytectl/boilerplate/update.cfg index f64279bc22..8920ca4162 100644 --- a/flytectl/boilerplate/update.cfg +++ b/flytectl/boilerplate/update.cfg @@ -2,6 +2,5 @@ flyte/golang_test_targets flyte/golangci_file flyte/golang_support_tools flyte/pull_request_template -flyte/welcome_bot flyte/precommit flyte/code_of_conduct From 3989ec8178f3fa3506123c17b7d9cdb21019172b Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Fri, 29 Jul 2022 01:07:30 -0700 Subject: [PATCH 268/356] Update documentation (#335) Signed-off-by: Flyte-Bot Co-authored-by: samhita-alla --- flytectl/docs/source/gen/flytectl.rst | 1 + flytectl/docs/source/gen/flytectl_compile.rst | 1 + flytectl/docs/source/gen/flytectl_completion.rst | 1 + flytectl/docs/source/gen/flytectl_config.rst | 1 + flytectl/docs/source/gen/flytectl_config_discover.rst | 1 + flytectl/docs/source/gen/flytectl_config_docs.rst | 1 + flytectl/docs/source/gen/flytectl_config_init.rst | 1 + flytectl/docs/source/gen/flytectl_config_validate.rst | 1 + flytectl/docs/source/gen/flytectl_create.rst | 1 + flytectl/docs/source/gen/flytectl_create_execution.rst | 1 + flytectl/docs/source/gen/flytectl_create_project.rst | 1 + flytectl/docs/source/gen/flytectl_delete.rst | 1 + .../source/gen/flytectl_delete_cluster-resource-attribute.rst | 1 + .../docs/source/gen/flytectl_delete_execution-cluster-label.rst | 1 + .../source/gen/flytectl_delete_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_delete_execution.rst | 1 + flytectl/docs/source/gen/flytectl_delete_plugin-override.rst | 1 + .../docs/source/gen/flytectl_delete_task-resource-attribute.rst | 1 + .../source/gen/flytectl_delete_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_demo.rst | 1 + flytectl/docs/source/gen/flytectl_demo_exec.rst | 1 + flytectl/docs/source/gen/flytectl_demo_start.rst | 1 + flytectl/docs/source/gen/flytectl_demo_status.rst | 1 + flytectl/docs/source/gen/flytectl_demo_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_get.rst | 1 + .../docs/source/gen/flytectl_get_cluster-resource-attribute.rst | 1 + .../docs/source/gen/flytectl_get_execution-cluster-label.rst | 1 + .../docs/source/gen/flytectl_get_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_get_execution.rst | 1 + flytectl/docs/source/gen/flytectl_get_launchplan.rst | 1 + flytectl/docs/source/gen/flytectl_get_plugin-override.rst | 1 + flytectl/docs/source/gen/flytectl_get_project.rst | 1 + .../docs/source/gen/flytectl_get_task-resource-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_get_task.rst | 1 + .../docs/source/gen/flytectl_get_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_get_workflow.rst | 1 + flytectl/docs/source/gen/flytectl_register.rst | 1 + flytectl/docs/source/gen/flytectl_register_examples.rst | 1 + flytectl/docs/source/gen/flytectl_register_files.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_exec.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_start.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_status.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_update.rst | 1 + .../source/gen/flytectl_update_cluster-resource-attribute.rst | 1 + .../docs/source/gen/flytectl_update_execution-cluster-label.rst | 1 + .../source/gen/flytectl_update_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_update_execution.rst | 1 + flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst | 1 + flytectl/docs/source/gen/flytectl_update_launchplan.rst | 1 + flytectl/docs/source/gen/flytectl_update_plugin-override.rst | 1 + flytectl/docs/source/gen/flytectl_update_project.rst | 1 + flytectl/docs/source/gen/flytectl_update_task-meta.rst | 1 + .../docs/source/gen/flytectl_update_task-resource-attribute.rst | 1 + .../source/gen/flytectl_update_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_update_workflow-meta.rst | 1 + flytectl/docs/source/gen/flytectl_upgrade.rst | 1 + flytectl/docs/source/gen/flytectl_version.rst | 1 + 59 files changed, 59 insertions(+) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 302570ce23..afe6a41400 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -23,6 +23,7 @@ Options --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_compile.rst b/flytectl/docs/source/gen/flytectl_compile.rst index 8abba58378..9d92df44fe 100644 --- a/flytectl/docs/source/gen/flytectl_compile.rst +++ b/flytectl/docs/source/gen/flytectl_compile.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 9453d90396..e18446b99d 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -96,6 +96,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index cdc118c07c..fded48039c 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -32,6 +32,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 564cd8b006..526b9ad732 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -34,6 +34,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index 632ea87208..b258a60b14 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -34,6 +34,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 978db2958f..a26a1c7cf1 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -65,6 +65,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 22a7b134b1..570193c891 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -36,6 +36,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 947c32362e..f64c70dd05 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -35,6 +35,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 95daf83376..35ee472b27 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -158,6 +158,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 27395b40bf..eb040758fa 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -71,6 +71,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 1b47f263e9..f26ed92613 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -35,6 +35,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 7ba18dab58..ee68b7ad4d 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index bb4c71a599..62d9ba8b7a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -67,6 +67,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index f73ccb7f9d..298a66eedc 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -71,6 +71,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 6ac42e93e0..6ee69b6711 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -78,6 +78,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index b7aef23a38..778ea57581 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -72,6 +72,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 659f599781..ed77f80fd3 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -72,6 +72,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 11625d7bed..212567054a 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index e5b0f470d1..74889b9c3e 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -53,6 +53,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index 56386d2357..08539b44b0 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index 19e894a589..f1865e41d5 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -102,6 +102,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index 776c61dce7..2f6d3e8e08 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index 75bb1489ff..8c8305c0d3 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 76ab0c3b66..8272b62ba7 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -35,6 +35,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index f80498937b..f175399b2d 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -78,6 +78,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index b7ef8253f9..79e9f40e11 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -77,6 +77,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index c455f435b8..4be1826963 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -80,6 +80,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index e86fdfc04d..ed4f653928 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -110,6 +110,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 6d805622bf..eded03d90d 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -144,6 +144,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index fd5f2254d3..a2fc2dc06f 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -99,6 +99,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 8325efae74..1d104b3e04 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -82,6 +82,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index b367830e9c..586049d874 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -82,6 +82,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 172a0e8c75..7237869310 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -126,6 +126,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index d120edbe0c..17cd83c401 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -139,6 +139,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 5ea33497e5..5efc06419f 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -110,6 +110,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 3d5846a8b5..cc600b42f4 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -35,6 +35,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 63834c91f9..ea1a4cf9b2 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -61,6 +61,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 42f429e1b9..3f51de91dd 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -138,6 +138,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 704ddb5351..5e03e92672 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -53,6 +53,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 86c47cda19..812c30f211 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 003470fb4b..7e9904d1a9 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -107,6 +107,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 8d86bad084..17462d2788 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 187871f39f..d8a2554777 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 3b101a52cd..f89628772c 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -37,6 +37,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 563bfa1750..97504d3ac8 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -77,6 +77,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 1fbbe717d5..0d196fa31d 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 7e9275abbe..180ed4fda1 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -81,6 +81,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 433b6d7a9b..3920171b12 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -50,6 +50,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 1d23d714fa..b7a8fbb1aa 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -55,6 +55,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 45d7e1853d..295ac45c9e 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -51,6 +51,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index bfb615e6bd..24320676a7 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -83,6 +83,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index b8da2dc0a9..91cfbe14ee 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -110,6 +110,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index d733ddb9eb..f1f807a842 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -55,6 +55,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 4a75a91c71..b0b8b58d42 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -83,6 +83,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 2c89aa80bf..69dcabe7ad 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -79,6 +79,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index ba2bb2cf87..d19d66b4de 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -55,6 +55,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 3ba85d765d..9dda7fc0aa 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -50,6 +50,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index f45d8f236e..1cdc8560a6 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -39,6 +39,7 @@ Options inherited from parent commands --admin.clientId string Client ID (default "flytepropeller") --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' From 9af534f35624bed9247c0401af2b17040f5976c3 Mon Sep 17 00:00:00 2001 From: Tao He Date: Tue, 9 Aug 2022 13:18:25 +0800 Subject: [PATCH 269/356] Fixes the project name and workflow name in the flytectl documentation. (#339) It seems that flytectl no longer register examples to a `flytectldemo` project, rather, the project name should be `flytesnacks`. And, the workflow name `core.advanced.run_merge_sort.merge_sort` and `core.control_flow.run_merge_sort.merge_sort` should be `core.control_flow.merge_sort.merge_sort`. Signed-off-by: Tao He --- flytectl/cmd/create/execution.go | 12 ++++++------ flytectl/cmd/create/execution_test.go | 4 ++-- .../matchable_cluster_resource_attribute.go | 10 +++++----- ...atchable_cluster_resource_attribute_test.go | 8 ++++---- .../matchable_execution_cluster_label.go | 10 +++++----- .../matchable_execution_cluster_label_test.go | 8 ++++---- .../matchable_execution_queue_attribute.go | 10 +++++----- ...matchable_execution_queue_attribute_test.go | 8 ++++---- .../cmd/delete/matchable_plugin_override.go | 10 +++++----- .../delete/matchable_plugin_override_test.go | 8 ++++---- .../matchable_task_resource_attribute.go | 10 +++++----- .../matchable_task_resource_attribute_test.go | 8 ++++---- .../matchable_workflow_execution_config.go | 10 +++++----- ...matchable_workflow_execution_config_test.go | 8 ++++---- .../cmd/delete/testdata/invalid_attribute.yaml | 2 +- ...valid_project_domain_cluster_attribute.yaml | 2 +- ...project_domain_execution_cluster_label.yaml | 2 +- ...oject_domain_execution_queue_attribute.yaml | 2 +- .../valid_project_domain_plugin_override.yaml | 2 +- .../valid_project_domain_task_attribute.yaml | 2 +- ...oject_domain_workflow_execution_config.yaml | 2 +- .../valid_workflow_cluster_attribute.yaml | 4 ++-- ...valid_workflow_execution_cluster_label.yaml | 4 ++-- ...lid_workflow_execution_queue_attribute.yaml | 4 ++-- .../valid_workflow_plugin_override.yaml | 4 ++-- .../valid_workflow_task_attribute.yaml | 4 ++-- ...lid_workflow_workflow_execution_config.yaml | 4 ++-- flytectl/cmd/get/launch_plan.go | 4 ++-- .../matchable_cluster_resource_attribute.go | 14 +++++++------- .../get/matchable_execution_cluster_label.go | 14 +++++++------- .../get/matchable_execution_queue_attribute.go | 14 +++++++------- flytectl/cmd/get/matchable_plugin_override.go | 16 ++++++++-------- .../get/matchable_task_resource_attribute.go | 14 +++++++------- .../get/matchable_workflow_execution_config.go | 18 +++++++++--------- flytectl/cmd/get/task.go | 4 ++-- .../cmd/testdata/invalid_execution_spec.yaml | 4 ++-- .../testdata/launchplan_execution_spec.yaml | 2 +- flytectl/cmd/testdata/task_execution_spec.yaml | 2 +- .../task_execution_spec_with_iamrole.yaml | 2 +- flytectl/cmd/update/execution.go | 4 ++-- flytectl/cmd/update/launch_plan.go | 4 ++-- flytectl/cmd/update/launch_plan_meta.go | 6 +++--- .../matchable_cluster_resource_attribute.go | 8 ++++---- ...atchable_cluster_resource_attribute_test.go | 4 ++-- .../matchable_execution_cluster_label.go | 8 ++++---- .../matchable_execution_cluster_label_test.go | 4 ++-- .../matchable_execution_queue_attribute.go | 8 ++++---- ...matchable_execution_queue_attribute_test.go | 4 ++-- .../cmd/update/matchable_plugin_override.go | 8 ++++---- .../update/matchable_plugin_override_test.go | 4 ++-- .../matchable_task_resource_attribute.go | 8 ++++---- .../matchable_task_resource_attribute_test.go | 4 ++-- .../matchable_workflow_execution_config.go | 8 ++++---- ...matchable_workflow_execution_config_test.go | 4 ++-- flytectl/cmd/update/task_meta.go | 6 +++--- .../cmd/update/testdata/invalid_attribute.yaml | 2 +- ...valid_project_domain_cluster_attribute.yaml | 2 +- ...project_domain_execution_cluster_label.yaml | 2 +- ...oject_domain_execution_queue_attribute.yaml | 2 +- .../valid_project_domain_plugin_override.yaml | 2 +- .../valid_project_domain_task_attribute.yaml | 2 +- ...oject_domain_workflow_execution_config.yaml | 2 +- .../valid_workflow_cluster_attribute.yaml | 4 ++-- ...valid_workflow_execution_cluster_label.yaml | 4 ++-- ...lid_workflow_execution_queue_attribute.yaml | 4 ++-- .../valid_workflow_plugin_override.yaml | 4 ++-- .../valid_workflow_task_attribute.yaml | 4 ++-- ...lid_workflow_workflow_execution_config.yaml | 4 ++-- flytectl/cmd/update/workflow_meta.go | 8 ++++---- .../source/gen/flytectl_create_execution.rst | 12 ++++++------ ...tectl_delete_cluster-resource-attribute.rst | 10 +++++----- ...flytectl_delete_execution-cluster-label.rst | 10 +++++----- ...ytectl_delete_execution-queue-attribute.rst | 10 +++++----- .../gen/flytectl_delete_plugin-override.rst | 10 +++++----- ...flytectl_delete_task-resource-attribute.rst | 10 +++++----- ...ytectl_delete_workflow-execution-config.rst | 10 +++++----- ...flytectl_get_cluster-resource-attribute.rst | 14 +++++++------- .../flytectl_get_execution-cluster-label.rst | 14 +++++++------- .../flytectl_get_execution-queue-attribute.rst | 14 +++++++------- .../source/gen/flytectl_get_launchplan.rst | 4 ++-- .../gen/flytectl_get_plugin-override.rst | 16 ++++++++-------- .../flytectl_get_task-resource-attribute.rst | 14 +++++++------- flytectl/docs/source/gen/flytectl_get_task.rst | 4 ++-- .../flytectl_get_workflow-execution-config.rst | 18 +++++++++--------- ...tectl_update_cluster-resource-attribute.rst | 8 ++++---- ...flytectl_update_execution-cluster-label.rst | 8 ++++---- ...ytectl_update_execution-queue-attribute.rst | 8 ++++---- .../source/gen/flytectl_update_execution.rst | 4 ++-- .../gen/flytectl_update_launchplan-meta.rst | 6 +++--- .../source/gen/flytectl_update_launchplan.rst | 4 ++-- .../gen/flytectl_update_plugin-override.rst | 8 ++++---- .../source/gen/flytectl_update_task-meta.rst | 6 +++--- ...flytectl_update_task-resource-attribute.rst | 8 ++++---- ...ytectl_update_workflow-execution-config.rst | 8 ++++---- .../gen/flytectl_update_workflow-meta.rst | 8 ++++---- 95 files changed, 327 insertions(+), 327 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 3ca734d3ed..dc1ba493c1 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -20,7 +20,7 @@ There are three steps to generate an execution, as outlined below: 1. Generate the execution spec file using the :ref:` + "`get task `" + ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytesnacks core.control_flow.merge_sort.merge --version v2 --execFile execution_spec.yaml The generated file would look similar to the following: @@ -35,7 +35,7 @@ The generated file would look similar to the following: kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: "v2" 2. [Optional] Update the inputs for the execution, if needed. @@ -56,7 +56,7 @@ The generated spec file can be modified to change the input values, as shown bel kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: "v2" 3. Run the execution by passing the generated YAML file. @@ -70,13 +70,13 @@ To relaunch an execution, pass the current execution ID as follows: :: - flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development + flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: - flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. @@ -85,7 +85,7 @@ The following is an example of how generic data can be specified while creating :: - flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml + flytectl get task -d development -p flytesnacks core.type_system.custom_objects.add --execFile adddatanum.yaml The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 1a3a7217e5..cad187f9d0 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -111,7 +111,7 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { } launchPlan1 := &admin.LaunchPlan{ Id: &core.Identifier{ - Name: "core.advanced.run_merge_sort.merge_sort", + Name: "core.control_flow.merge_sort.merge_sort", Version: "v3", }, Spec: &admin.LaunchPlanSpec{ @@ -131,7 +131,7 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { ResourceType: core.ResourceType_LAUNCH_PLAN, Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, - Name: "core.advanced.run_merge_sort.merge_sort", + Name: "core.control_flow.merge_sort.merge_sort", Version: "v2", }, } diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index d94a71741a..2f3eec61ed 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -15,10 +15,10 @@ const ( clusterResourceAttributesLong = ` Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytesnacks -d development To delete cluster resource attribute using the config file that was used to create it, run: @@ -32,18 +32,18 @@ For example, here's the config file cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: +To delete cluster resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete cluster-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index d4556224ff..17d8f02ae3 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -54,7 +54,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -96,7 +96,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -110,7 +110,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_CLUSTER_RESOURCE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -125,6 +125,6 @@ func TestDeleteClusterResourceAttributes(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_CLUSTER_RESOURCE) }) } diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index ff88f7a788..eea32e3256 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -15,10 +15,10 @@ const ( executionClusterLabelLong = ` Delete execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete execution-cluster-label -p flytectldemo -d development + flytectl delete execution-cluster-label -p flytesnacks -d development To delete execution cluster label using the config file that was used to create it, run: @@ -31,16 +31,16 @@ For example, here's the config file ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete the execution cluster label of the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following: +To delete the execution cluster label of the workflow 'core.control_flow.merge_sort.merge_sort', run the following: :: - flytectl delete execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete execution-cluster-label -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index c36248c267..30d60f93e9 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -54,7 +54,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) { err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -96,7 +96,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) { err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -110,7 +110,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) { err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -125,6 +125,6 @@ func TestDeleteExecutionClusterLabels(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) }) } diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index 0c222065ac..63ae7ff561 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -15,10 +15,10 @@ const ( executionQueueAttributesLong = ` Delete execution queue attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development + flytectl delete execution-queue-attribute -p flytesnacks -d development Delete execution queue attribute using the config file which was used to create it. @@ -31,7 +31,7 @@ For example, here's the config file era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar @@ -40,11 +40,11 @@ For example, here's the config file era.yaml: Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update and delete commands. -To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete the execution queue attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete execution-queue-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go index 5c4843ede3..834ae48e78 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -54,7 +54,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) { err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -96,7 +96,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) { err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -110,7 +110,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) { err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_EXECUTION_QUEUE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -125,6 +125,6 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_QUEUE) }) } diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index c96493cd91..a7705ed8d9 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -15,10 +15,10 @@ const ( pluginOverrideLong = ` Delete plugin override for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete plugin-override -p flytectldemo -d development + flytectl delete plugin-override -p flytesnacks -d development To delete plugin override using the config file which was used to create it, run: @@ -31,7 +31,7 @@ For example, here's the config file po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. @@ -41,11 +41,11 @@ For example, here's the config file po.yaml: Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update and delete commands. -To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete plugin override for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete plugin-override -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go index af64254d3c..380412293c 100644 --- a/flytectl/cmd/delete/matchable_plugin_override_test.go +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -54,7 +54,7 @@ func TestPluginOverride(t *testing.T) { err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -96,7 +96,7 @@ func TestPluginOverride(t *testing.T) { err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -110,7 +110,7 @@ func TestPluginOverride(t *testing.T) { err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_PLUGIN_OVERRIDE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -125,6 +125,6 @@ func TestPluginOverride(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_PLUGIN_OVERRIDE) }) } diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 903c1f7dc8..f948ff8c5a 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -15,10 +15,10 @@ const ( taskResourceAttributesLong = ` Delete task resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete task-resource-attribute -p flytectldemo -d development + flytectl delete task-resource-attribute -p flytesnacks -d development To delete task resource attribute using the config file which was used to create it, run: @@ -31,7 +31,7 @@ For example, here's the config file tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" @@ -41,11 +41,11 @@ For example, here's the config file tra.yaml: The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete task resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete task-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 62dd7930ce..71efaafac8 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -54,7 +54,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_TASK_RESOURCE) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -96,7 +96,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_TASK_RESOURCE) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -110,7 +110,7 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { err := deleteTaskResourceAttributes(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_TASK_RESOURCE) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -125,6 +125,6 @@ func TestDeleteTaskResourceAttributes(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_TASK_RESOURCE) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_TASK_RESOURCE) }) } diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index fda9525f80..d0a40c15c4 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -16,10 +16,10 @@ const ( workflowExecutionConfigLong = ` Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development + flytectl delete workflow-execution-config -p flytesnacks -d development To delete workflow execution config using the config file which was used to create it, run: @@ -32,7 +32,7 @@ For example, here's the config file wec.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 security_context: run_as: @@ -40,11 +40,11 @@ For example, here's the config file wec.yaml: Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. -To delete workflow execution config for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: +To delete workflow execution config for the workflow 'core.control_flow.merge_sort.merge_sort', run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete workflow-execution-config -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage ` diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index 592a53edba..800c7329d5 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -55,7 +55,7 @@ func TestDeleteWorkflowExecutionConfig(t *testing.T) { err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("successful workflow attribute deletion", func(t *testing.T) { s := setup() @@ -97,7 +97,7 @@ func TestDeleteWorkflowExecutionConfig(t *testing.T) { err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("workflow attribute deletion non existent file", func(t *testing.T) { @@ -111,7 +111,7 @@ func TestDeleteWorkflowExecutionConfig(t *testing.T) { err := deleteWorkflowExecutionConfig(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes", - s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort", + s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) t.Run("attribute deletion invalid file", func(t *testing.T) { @@ -126,6 +126,6 @@ func TestDeleteWorkflowExecutionConfig(t *testing.T) { fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes", - s.Ctx, "flytectldemo", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) + s.Ctx, "flytesnacks", "development", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) }) } diff --git a/flytectl/cmd/delete/testdata/invalid_attribute.yaml b/flytectl/cmd/delete/testdata/invalid_attribute.yaml index 3804d837a3..1e7868c1e2 100644 --- a/flytectl/cmd/delete/testdata/invalid_attribute.yaml +++ b/flytectl/cmd/delete/testdata/invalid_attribute.yaml @@ -1,5 +1,5 @@ InvalidDomain: development -InvalidProject: flytectldemo +InvalidProject: flytesnacks InvalidWorkflow: "" cpu: "1" memory: 150Mi \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml index c6c25fa904..586fe522f3 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_cluster_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks attributes: "foo": "bar" "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml index 37f8a630c2..afade68509 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_execution_cluster_label.yaml @@ -1,3 +1,3 @@ domain: development -project: flytectldemo +project: flytesnacks value: foo \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml index d04a525b88..1620c65762 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_execution_queue_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks tags: - foo - bar diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml index a8ffc0fef8..9749e17100 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_plugin_override.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks overrides: - task_type: python_task plugin_id: diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml index a16186c80b..cd1a5c9abc 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_task_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml b/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml index c13e67fcd2..84b87197a1 100644 --- a/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml +++ b/flytectl/cmd/delete/testdata/valid_project_domain_workflow_execution_config.yaml @@ -1,3 +1,3 @@ domain: development -project: flytectldemo +project: flytesnacks max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml index f8e7b17f65..e4030e455d 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_cluster_attribute.yaml @@ -1,6 +1,6 @@ Domain: development -Project: flytectldemo -Workflow: core.control_flow.run_merge_sort.merge_sort +Project: flytesnacks +Workflow: core.control_flow.merge_sort.merge_sort attributes: "foo": "bar" "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml b/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml index ccd978fa76..068cbe9926 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_execution_cluster_label.yaml @@ -1,4 +1,4 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort value: foo \ No newline at end of file diff --git a/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml index 7c69c43fec..d8952b1a6c 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_execution_queue_attribute.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort tags: - foo - bar diff --git a/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml b/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml index 6fbb58eae0..5b35e23e31 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_plugin_override.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort overrides: - task_type: python_task plugin_id: diff --git a/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml index 3b8d08cc79..7c22207689 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_task_attribute.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort defaults: cpu: "2" memory: 250Mi diff --git a/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml b/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml index c2b0879f1e..e4f6ec0049 100644 --- a/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml +++ b/flytectl/cmd/delete/testdata/valid_workflow_workflow_execution_config.yaml @@ -1,4 +1,4 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index c9c1d053de..edd7ea7c38 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -97,7 +97,7 @@ Retrieve a launch plan within the project and domain as per a version and genera :: - flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml + flytectl get launchplan -d development -p flytesnacks core.control_flow.merge_sort.merge_sort --execFile execution_spec.yaml The generated file would look similar to this: @@ -113,7 +113,7 @@ The generated file would look similar to this: targetDomain: "" targetProject: "" version: v3 - workflow: core.advanced.run_merge_sort.merge_sort + workflow: core.control_flow.merge_sort.merge_sort Check the :ref:` + "`create execution section`" + ` on how to launch one using the generated file. Usage diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 89830dfec8..6fcf66213e 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -14,28 +14,28 @@ const ( clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes." clusterResourceAttributesLong = ` Retrieve cluster resource attributes for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get cluster-resource-attribute -p flytectldemo -d development + flytectl get cluster-resource-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} + {"project":"flytesnacks","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} Retrieve cluster resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get cluster-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. The config file is written to cra.yaml file. @@ -49,7 +49,7 @@ Example: content of cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index c665a48db0..89cf5cf48d 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -15,28 +15,28 @@ const ( executionClusterLabelLong = ` Retrieve the execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl get execution-cluster-label -p flytectldemo -d development + flytectl get execution-cluster-label -p flytesnacks -d development The output would look like: .. code-block:: json - {"project":"flytectldemo","domain":"development","value":"foo"} + {"project":"flytesnacks","domain":"development","value":"foo"} Retrieve the execution cluster label for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get execution-cluster-label -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. The config file is written to ecl.yaml file. @@ -50,7 +50,7 @@ Example: content of ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo Usage diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 796b405d0d..533b53a6d6 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -14,28 +14,28 @@ const ( executionQueueAttributesShort = "Gets matchable resources of execution queue attributes." executionQueueAttributesLong = ` Retrieve the execution queue attribute for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get execution-queue-attribute -p flytectldemo -d development + flytectl get execution-queue-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} + {"project":"flytesnacks","domain":"development","tags":["foo", "bar"]} Retrieve the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get execution-queue-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. The config file is written to era.yaml file. @@ -49,7 +49,7 @@ Example: content of era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index eaac3d0dee..8ff08ee615 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -14,18 +14,18 @@ const ( pluginOverrideShort = "Gets matchable resources of plugin override." pluginOverrideLong = ` Retrieve the plugin override for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get plugin-override -p flytectldemo -d development + flytectl get plugin-override -p flytesnacks -d development Example: output from the command .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", "overrides": [{ "task_type": "python_task", @@ -35,19 +35,19 @@ Example: output from the command } Retrieve the plugin override for the given project, domain, and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get plugin-override -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", - "workflow": "core.control_flow.run_merge_sort.merge_sort" + "workflow": "core.control_flow.merge_sort.merge_sort" "overrides": [{ "task_type": "python_task", "plugin_id": ["pluginoverride1", "pluginoverride2"], @@ -67,7 +67,7 @@ Example: content of po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 63ef50da19..40183615c1 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -14,28 +14,28 @@ const ( taskResourceAttributesShort = "Gets matchable resources of task attributes." taskResourceAttributesLong = ` Retrieve task resource attributes for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get task-resource-attribute -p flytectldemo -d development + flytectl get task-resource-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytesnacks","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Retrieve task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get task-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. @@ -50,7 +50,7 @@ Example: content of tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 35fd4ce06d..59098e4a1d 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -20,37 +20,37 @@ const ( workflowExecutionConfigLong = ` Retrieve workflow execution config for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get workflow-execution-config -p flytectldemo -d development + flytectl get workflow-execution-config -p flytesnacks -d development Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", "max_parallelism": 5 } Retrieve workflow execution config for the project, domain, and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get workflow-execution-config -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", - "workflow": "core.control_flow.run_merge_sort.merge_sort" + "workflow": "core.control_flow.merge_sort.merge_sort" "max_parallelism": 5 } @@ -60,13 +60,13 @@ Example: content of wec.yaml: :: - flytectl get workflow-execution-config -p flytectldemo -d development --attrFile wec.yaml + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index d4226d86dd..7a5e9dc70d 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -78,7 +78,7 @@ Retrieve tasks within project and domain for a version and generate the executio :: - flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + flytectl get tasks -d development -p flytesnacks core.control_flow.merge_sort.merge --execFile execution_spec.yaml --version v2 The generated file would look similar to this: @@ -93,7 +93,7 @@ The generated file would look similar to this: kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: v2 Check the create execution section on how to launch one using the generated file. diff --git a/flytectl/cmd/testdata/invalid_execution_spec.yaml b/flytectl/cmd/testdata/invalid_execution_spec.yaml index 556bb512c7..cc7d0c32a8 100644 --- a/flytectl/cmd/testdata/invalid_execution_spec.yaml +++ b/flytectl/cmd/testdata/invalid_execution_spec.yaml @@ -8,5 +8,5 @@ kubeServiceAcct: "" targetDomain: "" targetProject: "" version: v3 -workflow: core.advanced.run_merge_sort.merge_sort -task: core.advanced.run_merge_sort.merge +workflow: core.control_flow.merge_sort.merge_sort +task: core.control_flow.merge_sort.merge diff --git a/flytectl/cmd/testdata/launchplan_execution_spec.yaml b/flytectl/cmd/testdata/launchplan_execution_spec.yaml index aa23903ed8..a396f67ba2 100644 --- a/flytectl/cmd/testdata/launchplan_execution_spec.yaml +++ b/flytectl/cmd/testdata/launchplan_execution_spec.yaml @@ -8,4 +8,4 @@ kubeServiceAcct: "" targetDomain: "" targetProject: "" version: v3 -workflow: core.advanced.run_merge_sort.merge_sort +workflow: core.control_flow.merge_sort.merge_sort diff --git a/flytectl/cmd/testdata/task_execution_spec.yaml b/flytectl/cmd/testdata/task_execution_spec.yaml index aa33cdb355..4381c1df75 100644 --- a/flytectl/cmd/testdata/task_execution_spec.yaml +++ b/flytectl/cmd/testdata/task_execution_spec.yaml @@ -11,5 +11,5 @@ inputs: kubeServiceAcct: "kubeServiceAcct" targetDomain: "development" targetProject: "flytesnacks" -task: core.advanced.run_merge_sort.merge +task: core.control_flow.merge_sort.merge version: v2 diff --git a/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml index 14cd2df32d..c74db53eef 100644 --- a/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml +++ b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml @@ -11,5 +11,5 @@ inputs: kubeServiceAcct: "" targetDomain: "development" targetProject: "flytesnacks" -task: core.advanced.run_merge_sort.merge +task: core.control_flow.merge_sort.merge version: v2 diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index a32d4cddc4..517a28a352 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -19,12 +19,12 @@ const ( Activate an execution; and it shows up in the CLI and UI: :: - flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate + flytectl update execution -p flytesnacks -d development oeh94k9r2r --activate Archive an execution; and it is hidden from the CLI and UI: :: - flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive + flytectl update execution -p flytesnacks -d development oeh94k9r2r --archive Usage diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 51552fbf8a..58befbbd65 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -19,12 +19,12 @@ const ( Activates a launch plan which activates the scheduled job associated with it: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate Archives a launch plan which deschedules any scheduled job associated with it: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive Usage diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index 9efa37533e..e9aa1ae9a1 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the launch plan: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" Archiving launch plan named entity is not supported and would throw an error: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive Activating launch plan named entity would be a noop: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate Usage ` diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 7da3bc3c1c..79c03480ba 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -21,7 +21,7 @@ Example: content of cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" @@ -35,13 +35,13 @@ resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get cluster-resource-attribute section on how to generate this file. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort attributes: foo: "bar" buzz: "lightyear" diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 19c9257d69..c9261393a8 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -31,7 +31,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed to update project domain attribute", func(t *testing.T) { s := setup() @@ -54,7 +54,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed to update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index 223001cdfb..e3c41e1015 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -21,7 +21,7 @@ Example: content of ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo :: @@ -30,13 +30,13 @@ Example: content of ecl.yaml: Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort value: foo :: diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index 500c082673..2a4e7d500c 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -31,7 +31,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything).Return(nil) err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -54,7 +54,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index e324fee2e0..feb8d5224b 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -24,7 +24,7 @@ Example: content of era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar @@ -37,13 +37,13 @@ Example: content of era.yaml: Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort tags: - foo - bar diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index 4ba42eadc2..f789c0d8cc 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -31,7 +31,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -54,7 +54,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 52a2837ab8..981a124b50 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -24,7 +24,7 @@ Example: content of po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. @@ -38,13 +38,13 @@ Example: content of po.yaml: Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index 644144a29c..f8fcef96a7 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -31,7 +31,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything).Return(nil) err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -54,7 +54,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index 7b3e72cfda..e18825c069 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -24,7 +24,7 @@ Example: content of tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" @@ -38,13 +38,13 @@ Example: content of tra.yaml: Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort defaults: cpu: "1" memory: "150Mi" diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index 39f1cffc9b..079fee9dce 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -31,7 +31,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -54,7 +54,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 5a1c28d2d2..d6bf2a2ad5 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -25,7 +25,7 @@ Example: content of wec.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 security_context: run_as: @@ -37,13 +37,13 @@ Example: content of wec.yaml: Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 security_context: run_as: diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index 9b9ba63001..f4f1834c83 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -32,7 +32,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything).Return(nil) err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -55,7 +55,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytectldemo project and domain development and workflow core.control_flow.run_merge_sort.merge_sort`) + tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index 40d4ee4410..82f6d7a238 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the task: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" Archiving task named entity is not supported and would throw an error: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --archive Activating task named entity would be a noop since archiving is not possible: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --activate Usage ` diff --git a/flytectl/cmd/update/testdata/invalid_attribute.yaml b/flytectl/cmd/update/testdata/invalid_attribute.yaml index 3804d837a3..1e7868c1e2 100644 --- a/flytectl/cmd/update/testdata/invalid_attribute.yaml +++ b/flytectl/cmd/update/testdata/invalid_attribute.yaml @@ -1,5 +1,5 @@ InvalidDomain: development -InvalidProject: flytectldemo +InvalidProject: flytesnacks InvalidWorkflow: "" cpu: "1" memory: 150Mi \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml index c6c25fa904..586fe522f3 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_cluster_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks attributes: "foo": "bar" "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml b/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml index 37f8a630c2..afade68509 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_execution_cluster_label.yaml @@ -1,3 +1,3 @@ domain: development -project: flytectldemo +project: flytesnacks value: foo \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml index d04a525b88..1620c65762 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_execution_queue_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks tags: - foo - bar diff --git a/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml b/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml index a8ffc0fef8..9749e17100 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_plugin_override.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks overrides: - task_type: python_task plugin_id: diff --git a/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml index a16186c80b..cd1a5c9abc 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_task_attribute.yaml @@ -1,5 +1,5 @@ domain: development -project: flytectldemo +project: flytesnacks defaults: cpu: "1" memory: 150Mi diff --git a/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml b/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml index c13e67fcd2..84b87197a1 100644 --- a/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml +++ b/flytectl/cmd/update/testdata/valid_project_domain_workflow_execution_config.yaml @@ -1,3 +1,3 @@ domain: development -project: flytectldemo +project: flytesnacks max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml index f8e7b17f65..e4030e455d 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_cluster_attribute.yaml @@ -1,6 +1,6 @@ Domain: development -Project: flytectldemo -Workflow: core.control_flow.run_merge_sort.merge_sort +Project: flytesnacks +Workflow: core.control_flow.merge_sort.merge_sort attributes: "foo": "bar" "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml b/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml index ccd978fa76..068cbe9926 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_execution_cluster_label.yaml @@ -1,4 +1,4 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort value: foo \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml index 7c69c43fec..d8952b1a6c 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_execution_queue_attribute.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort tags: - foo - bar diff --git a/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml b/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml index 6fbb58eae0..5b35e23e31 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_plugin_override.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort overrides: - task_type: python_task plugin_id: diff --git a/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml index 3b8d08cc79..7c22207689 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_task_attribute.yaml @@ -1,6 +1,6 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort defaults: cpu: "2" memory: 250Mi diff --git a/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml b/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml index c2b0879f1e..e4f6ec0049 100644 --- a/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml +++ b/flytectl/cmd/update/testdata/valid_workflow_workflow_execution_config.yaml @@ -1,4 +1,4 @@ domain: development -project: flytectldemo -workflow: core.control_flow.run_merge_sort.merge_sort +project: flytesnacks +workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index 5db98b44de..6da5c6bff0 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the workflow: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" -Archiving workflow named entity would cause this to disapper from flyteconsole UI: +Archiving workflow named entity would cause this to disappear from flyteconsole UI: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive Activate workflow named entity: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate Usage ` diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 35ee472b27..4654bb338e 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -17,7 +17,7 @@ There are three steps to generate an execution, as outlined below: 1. Generate the execution spec file using the :ref:`get task ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytesnacks core.control_flow.merge_sort.merge --version v2 --execFile execution_spec.yaml The generated file would look similar to the following: @@ -32,7 +32,7 @@ The generated file would look similar to the following: kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: "v2" 2. [Optional] Update the inputs for the execution, if needed. @@ -53,7 +53,7 @@ The generated spec file can be modified to change the input values, as shown bel kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: "v2" 3. Run the execution by passing the generated YAML file. @@ -67,13 +67,13 @@ To relaunch an execution, pass the current execution ID as follows: :: - flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development + flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: - flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. @@ -82,7 +82,7 @@ The following is an example of how generic data can be specified while creating :: - flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml + flytectl get task -d development -p flytesnacks core.type_system.custom_objects.add --execFile adddatanum.yaml The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index ee68b7ad4d..e2037d0d82 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -12,10 +12,10 @@ Synopsis Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytesnacks -d development To delete cluster resource attribute using the config file that was used to create it, run: @@ -29,18 +29,18 @@ For example, here's the config file cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: +To delete cluster resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete cluster-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 62d9ba8b7a..cafac8401b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -12,10 +12,10 @@ Synopsis Delete execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete execution-cluster-label -p flytectldemo -d development + flytectl delete execution-cluster-label -p flytesnacks -d development To delete execution cluster label using the config file that was used to create it, run: @@ -28,16 +28,16 @@ For example, here's the config file ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete the execution cluster label of the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following: +To delete the execution cluster label of the workflow 'core.control_flow.merge_sort.merge_sort', run the following: :: - flytectl delete execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete execution-cluster-label -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 298a66eedc..9bb961ffe4 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -12,10 +12,10 @@ Synopsis Delete execution queue attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development + flytectl delete execution-queue-attribute -p flytesnacks -d development Delete execution queue attribute using the config file which was used to create it. @@ -28,7 +28,7 @@ For example, here's the config file era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar @@ -37,11 +37,11 @@ For example, here's the config file era.yaml: Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update and delete commands. -To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete the execution queue attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete execution-queue-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 778ea57581..2a535f6ec5 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -12,10 +12,10 @@ Synopsis Delete plugin override for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete plugin-override -p flytectldemo -d development + flytectl delete plugin-override -p flytesnacks -d development To delete plugin override using the config file which was used to create it, run: @@ -28,7 +28,7 @@ For example, here's the config file po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. @@ -38,11 +38,11 @@ For example, here's the config file po.yaml: Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update and delete commands. -To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete plugin override for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete plugin-override -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index ed77f80fd3..c4ad6b2f11 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -12,10 +12,10 @@ Synopsis Delete task resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete task-resource-attribute -p flytectldemo -d development + flytectl delete task-resource-attribute -p flytesnacks -d development To delete task resource attribute using the config file which was used to create it, run: @@ -28,7 +28,7 @@ For example, here's the config file tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" @@ -38,11 +38,11 @@ For example, here's the config file tra.yaml: The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. -To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: +To delete task resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command: :: - flytectl delete task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete task-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 212567054a..fb5c34af6f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -12,10 +12,10 @@ Synopsis Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development + flytectl delete workflow-execution-config -p flytesnacks -d development To delete workflow execution config using the config file which was used to create it, run: @@ -28,7 +28,7 @@ For example, here's the config file wec.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 security_context: run_as: @@ -36,11 +36,11 @@ For example, here's the config file wec.yaml: Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. -To delete workflow execution config for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: +To delete workflow execution config for the workflow 'core.control_flow.merge_sort.merge_sort', run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl delete workflow-execution-config -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Usage diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index f175399b2d..beb1a279db 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -11,28 +11,28 @@ Synopsis Retrieve cluster resource attributes for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get cluster-resource-attribute -p flytectldemo -d development + flytectl get cluster-resource-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} + {"project":"flytesnacks","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} Retrieve cluster resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get cluster-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. The config file is written to cra.yaml file. @@ -46,7 +46,7 @@ Example: content of cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 79e9f40e11..bc79f39878 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -12,28 +12,28 @@ Synopsis Retrieve the execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, run: +For project flytesnacks and development domain, run: :: - flytectl get execution-cluster-label -p flytectldemo -d development + flytectl get execution-cluster-label -p flytesnacks -d development The output would look like: .. code-block:: json - {"project":"flytectldemo","domain":"development","value":"foo"} + {"project":"flytesnacks","domain":"development","value":"foo"} Retrieve the execution cluster label for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get execution-cluster-label -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. The config file is written to ecl.yaml file. @@ -47,7 +47,7 @@ Example: content of ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo Usage diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 4be1826963..acf7b493c6 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -11,28 +11,28 @@ Synopsis Retrieve the execution queue attribute for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get execution-queue-attribute -p flytectldemo -d development + flytectl get execution-queue-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} + {"project":"flytesnacks","domain":"development","tags":["foo", "bar"]} Retrieve the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get execution-queue-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. The config file is written to era.yaml file. @@ -46,7 +46,7 @@ Example: content of era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index eded03d90d..73d6259e0c 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -90,7 +90,7 @@ Retrieve a launch plan within the project and domain as per a version and genera :: - flytectl get launchplan -d development -p flytectldemo core.advanced.run_merge_sort.merge_sort --execFile execution_spec.yaml + flytectl get launchplan -d development -p flytesnacks core.control_flow.merge_sort.merge_sort --execFile execution_spec.yaml The generated file would look similar to this: @@ -106,7 +106,7 @@ The generated file would look similar to this: targetDomain: "" targetProject: "" version: v3 - workflow: core.advanced.run_merge_sort.merge_sort + workflow: core.control_flow.merge_sort.merge_sort Check the :ref:`create execution section` on how to launch one using the generated file. Usage diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index a2fc2dc06f..09b9bf774e 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -11,18 +11,18 @@ Synopsis Retrieve the plugin override for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get plugin-override -p flytectldemo -d development + flytectl get plugin-override -p flytesnacks -d development Example: output from the command .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", "overrides": [{ "task_type": "python_task", @@ -32,19 +32,19 @@ Example: output from the command } Retrieve the plugin override for the given project, domain, and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get plugin-override -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", - "workflow": "core.control_flow.run_merge_sort.merge_sort" + "workflow": "core.control_flow.merge_sort.merge_sort" "overrides": [{ "task_type": "python_task", "plugin_id": ["pluginoverride1", "pluginoverride2"], @@ -64,7 +64,7 @@ Example: content of po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 586049d874..b03b8d4e21 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -11,28 +11,28 @@ Synopsis Retrieve task resource attributes for the given project and domain. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get task-resource-attribute -p flytectldemo -d development + flytectl get task-resource-attribute -p flytesnacks -d development Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytesnacks","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Retrieve task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain, and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get task-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json - {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} + {"project":"flytesnacks","domain":"development","workflow":"core.control_flow.merge_sort.merge_sort","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. @@ -47,7 +47,7 @@ Example: content of tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 7237869310..e8556a3828 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -72,7 +72,7 @@ Retrieve tasks within project and domain for a version and generate the executio :: - flytectl get tasks -d development -p flytesnacks core.advanced.run_merge_sort.merge --execFile execution_spec.yaml --version v2 + flytectl get tasks -d development -p flytesnacks core.control_flow.merge_sort.merge --execFile execution_spec.yaml --version v2 The generated file would look similar to this: @@ -87,7 +87,7 @@ The generated file would look similar to this: kubeServiceAcct: "" targetDomain: "" targetProject: "" - task: core.advanced.run_merge_sort.merge + task: core.control_flow.merge_sort.merge version: v2 Check the create execution section on how to launch one using the generated file. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 17cd83c401..01a8aec44f 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -12,37 +12,37 @@ Synopsis Retrieve workflow execution config for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain: +For project flytesnacks and development domain: :: - flytectl get workflow-execution-config -p flytectldemo -d development + flytectl get workflow-execution-config -p flytesnacks -d development Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", "max_parallelism": 5 } Retrieve workflow execution config for the project, domain, and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': +For project flytesnacks, development domain and workflow 'core.control_flow.merge_sort.merge_sort': :: - flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort + flytectl get workflow-execution-config -p flytesnacks -d development core.control_flow.merge_sort.merge_sort Example: output from the command: .. code-block:: json { - "project": "flytectldemo", + "project": "flytesnacks", "domain": "development", - "workflow": "core.control_flow.run_merge_sort.merge_sort" + "workflow": "core.control_flow.merge_sort.merge_sort" "max_parallelism": 5 } @@ -52,13 +52,13 @@ Example: content of wec.yaml: :: - flytectl get workflow-execution-config -p flytectldemo -d development --attrFile wec.yaml + flytectl get workflow-execution-config -p flytesnacks -d development --attrFile wec.yaml .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 Generate a sample workflow execution config file to be used for creating a new workflow execution config at project domain diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 97504d3ac8..8bd54375f7 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -19,7 +19,7 @@ Example: content of cra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks attributes: foo: "bar" buzz: "lightyear" @@ -33,13 +33,13 @@ resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get cluster-resource-attribute section on how to generate this file. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort attributes: foo: "bar" buzz: "lightyear" diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 0d196fa31d..fedc306bd8 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -19,7 +19,7 @@ Example: content of ecl.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks value: foo :: @@ -28,13 +28,13 @@ Example: content of ecl.yaml: Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort value: foo :: diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 180ed4fda1..660a9e2e08 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -22,7 +22,7 @@ Example: content of era.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks tags: - foo - bar @@ -35,13 +35,13 @@ Example: content of era.yaml: Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort tags: - foo - bar diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 3920171b12..8db38998d0 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -13,12 +13,12 @@ Synopsis Activate an execution; and it shows up in the CLI and UI: :: - flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate + flytectl update execution -p flytesnacks -d development oeh94k9r2r --activate Archive an execution; and it is hidden from the CLI and UI: :: - flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive + flytectl update execution -p flytesnacks -d development oeh94k9r2r --archive Usage diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index b7a8fbb1aa..bb16f09286 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the launch plan: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort example" Archiving launch plan named entity is not supported and would throw an error: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive Activating launch plan named entity would be a noop: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate Usage diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 295ac45c9e..603fc5ad4d 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -13,12 +13,12 @@ Synopsis Activates a launch plan which activates the scheduled job associated with it: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate Archives a launch plan which deschedules any scheduled job associated with it: :: - flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive Usage diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 24320676a7..ed5385fcaa 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -22,7 +22,7 @@ Example: content of po.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. @@ -36,13 +36,13 @@ Example: content of po.yaml: Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort overrides: - task_type: python_task # Task type for which to apply plugin implementation overrides plugin_id: # Plugin id(s) to be used in place of the default for the task type. diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index f1f807a842..5c3b608b29 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the task: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" Archiving task named entity is not supported and would throw an error: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --archive + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --archive Activating task named entity would be a noop since archiving is not possible: :: - flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --activate + flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --activate Usage diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index b0b8b58d42..83eeba649a 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -22,7 +22,7 @@ Example: content of tra.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks defaults: cpu: "1" memory: "150Mi" @@ -36,13 +36,13 @@ Example: content of tra.yaml: Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort defaults: cpu: "1" memory: "150Mi" diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 69dcabe7ad..381dc9f293 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -22,7 +22,7 @@ Example: content of wec.yaml: .. code-block:: yaml domain: development - project: flytectldemo + project: flytesnacks max_parallelism: 5 security_context: run_as: @@ -34,13 +34,13 @@ Example: content of wec.yaml: Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. -For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: +For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, development domain, it is: .. code-block:: yaml domain: development - project: flytectldemo - workflow: core.control_flow.run_merge_sort.merge_sort + project: flytesnacks + workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 security_context: run_as: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index d19d66b4de..304d123230 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the workflow: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" -Archiving workflow named entity would cause this to disapper from flyteconsole UI: +Archiving workflow named entity would cause this to disappear from flyteconsole UI: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --archive + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive Activate workflow named entity: :: - flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --activate + flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate Usage From 5ff3c6d6ada0e4e72f799aacf65f6c0649f2a81b Mon Sep 17 00:00:00 2001 From: Yukesh Kumar Date: Tue, 9 Aug 2022 10:49:20 +0530 Subject: [PATCH 270/356] fixes update message when the version is same (#322) Signed-off-by: Yukesh Kumar --- flytectl/pkg/github/githubutil.go | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index 142bc5ca51..486e75845e 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -169,22 +169,23 @@ func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error return "", err } - var message string - if isGreater { - message = fmt.Sprintf(commonMessage, stdlibversion.Version, latest) - symlink, err := CheckBrewInstall(goos) - if err != nil { - return "", err - } - if len(symlink) > 0 { - message += brewMessage - } else if goos == platformutil.Darwin { - message += darwinMessage - } else if goos == platformutil.Linux { - message += linuxMessage - } - message += fmt.Sprintf(releaseURL, latest) + if !isGreater { + return "", err + } + message := fmt.Sprintf(commonMessage, stdlibversion.Version, latest) + + symlink, err := CheckBrewInstall(goos) + if err != nil { + return "", err + } + if len(symlink) > 0 { + message += brewMessage + } else if goos == platformutil.Darwin { + message += darwinMessage + } else if goos == platformutil.Linux { + message += linuxMessage } + message += fmt.Sprintf(releaseURL, latest) return message, nil } From ae1f5c01824bf2b5f326d2c3a491316fc01f1402 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Tue, 9 Aug 2022 14:27:51 -0700 Subject: [PATCH 271/356] Update flyteidl version (#341) Signed-off-by: Katrina Rogan --- flytectl/go.mod | 3 +-- flytectl/go.sum | 22 ++-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index a74e398177..5d93271a10 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.8 + github.com/flyteorg/flyteidl v1.1.12 github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 @@ -22,7 +22,6 @@ require ( github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/mitchellh/mapstructure v1.4.1 github.com/mouuff/go-rocket-update v1.5.1 - github.com/olekukonko/tablewriter v0.0.5 github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/pkg/errors v0.9.1 diff --git a/flytectl/go.sum b/flytectl/go.sum index 736f6cc89f..fdefa1ef5b 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -88,7 +88,6 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295/go.mod h1:e0aH495YLkrsIe9fhedd6aSR6fgU/qhKvtroi6y7G/M= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -185,7 +184,6 @@ github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bradleyfalzon/ghinstallation/v2 v2.0.3/go.mod h1:tlgi+JWCXnKFx/Y4WtnDbZEINo31N5bcvnCoqieefmk= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -322,7 +320,6 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= @@ -401,10 +398,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.1.0 h1:f8tdMXOuorS/d+4Ut2QarfDbdCOriK0S+EnlQzrwz9E= -github.com/flyteorg/flyteidl v1.1.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.1.8 h1:F4daAffMefK+LiW1Wni75Vw6ya6uWlVHySWF6UhbzaQ= -github.com/flyteorg/flyteidl v1.1.8/go.mod h1:f1tvw5CDjqmrzNxKpRYr6BdAhHL8f7Wp1Duxl0ZOV4g= +github.com/flyteorg/flyteidl v1.1.12 h1:Rmuq7C/A4AXfYtw24GV9bN5MiPNFV96o6tHu8DMzUoM= +github.com/flyteorg/flyteidl v1.1.12/go.mod h1:f1tvw5CDjqmrzNxKpRYr6BdAhHL8f7Wp1Duxl0ZOV4g= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= @@ -496,7 +491,6 @@ github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2K github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= -github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= @@ -504,7 +498,6 @@ github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= @@ -522,7 +515,6 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -570,7 +562,6 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v39 v39.0.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -762,7 +753,6 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -826,8 +816,6 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -960,7 +948,6 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1138,7 +1125,6 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1177,8 +1163,6 @@ 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.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1448,7 +1432,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1715,7 +1698,6 @@ k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From 1fe32fa39b08fcbe8dc54ff37115781c49234e29 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Mon, 15 Aug 2022 22:25:44 +0530 Subject: [PATCH 272/356] Fix flytectl sandbox crash on M1 macs due to json-iterate (#342) Signed-off-by: Prafulla Mahindrakar Signed-off-by: Prafulla Mahindrakar --- flytectl/go.mod | 4 ++-- flytectl/go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 5d93271a10..a01ef12ff7 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -99,7 +99,7 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/json-iterator/go v1.1.10 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/jstemmer/go-junit-report v0.9.1 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/magiconair/properties v1.8.4 // indirect @@ -109,7 +109,7 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/ncw/swift v1.0.53 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index fdefa1ef5b..4caf6b8796 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -688,8 +688,9 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -785,8 +786,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= From bbd546e11994bcf4f43c44d0e13f667b0fe05184 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Tue, 16 Aug 2022 22:07:10 -0700 Subject: [PATCH 273/356] Update launch plan archive help string (#343) --- flytectl/cmd/config/subcommand/launchplan/updateconfig.go | 2 +- flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go index 9fcbb8869d..b7bd87bbc7 100644 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go @@ -7,7 +7,7 @@ var ( // Config type UpdateConfig struct { - Archive bool `json:"archive" pflag:",archive launchplan."` + Archive bool `json:"archive" pflag:",disable the launch plan schedule (if it has an active schedule associated with it)."` Activate bool `json:"activate" pflag:",activate launchplan."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` Version string `json:"version" pflag:",version of the launchplan to be fetched."` diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go index b217372c76..14570a00ca 100755 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go @@ -50,7 +50,7 @@ func (UpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("UpdateConfig", pflag.ExitOnError) - cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "archive launchplan.") + cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "disable the launch plan schedule (if it has an active schedule associated with it).") cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate launchplan.") cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") cmdFlags.StringVar(&UConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), UConfig.Version, "version of the launchplan to be fetched.") From 63d38bf0887a5ee8ca762f6ebb4275fd0c0a33a2 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Wed, 17 Aug 2022 04:39:22 -0700 Subject: [PATCH 274/356] Update documentation (#340) Signed-off-by: Flyte-Bot Signed-off-by: Flyte-Bot Co-authored-by: pmahindrakar-oss --- flytectl/docs/source/gen/flytectl.rst | 1 + flytectl/docs/source/gen/flytectl_compile.rst | 1 + flytectl/docs/source/gen/flytectl_completion.rst | 1 + flytectl/docs/source/gen/flytectl_config.rst | 1 + flytectl/docs/source/gen/flytectl_config_discover.rst | 1 + flytectl/docs/source/gen/flytectl_config_docs.rst | 1 + flytectl/docs/source/gen/flytectl_config_init.rst | 1 + flytectl/docs/source/gen/flytectl_config_validate.rst | 1 + flytectl/docs/source/gen/flytectl_create.rst | 1 + flytectl/docs/source/gen/flytectl_create_execution.rst | 1 + flytectl/docs/source/gen/flytectl_create_project.rst | 1 + flytectl/docs/source/gen/flytectl_delete.rst | 1 + .../gen/flytectl_delete_cluster-resource-attribute.rst | 1 + .../source/gen/flytectl_delete_execution-cluster-label.rst | 1 + .../gen/flytectl_delete_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_delete_execution.rst | 1 + .../docs/source/gen/flytectl_delete_plugin-override.rst | 1 + .../source/gen/flytectl_delete_task-resource-attribute.rst | 1 + .../gen/flytectl_delete_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_demo.rst | 1 + flytectl/docs/source/gen/flytectl_demo_exec.rst | 1 + flytectl/docs/source/gen/flytectl_demo_start.rst | 1 + flytectl/docs/source/gen/flytectl_demo_status.rst | 1 + flytectl/docs/source/gen/flytectl_demo_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_get.rst | 1 + .../source/gen/flytectl_get_cluster-resource-attribute.rst | 1 + .../source/gen/flytectl_get_execution-cluster-label.rst | 1 + .../source/gen/flytectl_get_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_get_execution.rst | 1 + flytectl/docs/source/gen/flytectl_get_launchplan.rst | 1 + flytectl/docs/source/gen/flytectl_get_plugin-override.rst | 1 + flytectl/docs/source/gen/flytectl_get_project.rst | 1 + .../source/gen/flytectl_get_task-resource-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_get_task.rst | 1 + .../source/gen/flytectl_get_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_get_workflow.rst | 1 + flytectl/docs/source/gen/flytectl_register.rst | 1 + flytectl/docs/source/gen/flytectl_register_examples.rst | 1 + flytectl/docs/source/gen/flytectl_register_files.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_exec.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_start.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_status.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_update.rst | 1 + .../gen/flytectl_update_cluster-resource-attribute.rst | 1 + .../source/gen/flytectl_update_execution-cluster-label.rst | 1 + .../gen/flytectl_update_execution-queue-attribute.rst | 1 + flytectl/docs/source/gen/flytectl_update_execution.rst | 1 + .../docs/source/gen/flytectl_update_launchplan-meta.rst | 7 ++++--- flytectl/docs/source/gen/flytectl_update_launchplan.rst | 3 ++- .../docs/source/gen/flytectl_update_plugin-override.rst | 1 + flytectl/docs/source/gen/flytectl_update_project.rst | 1 + flytectl/docs/source/gen/flytectl_update_task-meta.rst | 1 + .../source/gen/flytectl_update_task-resource-attribute.rst | 1 + .../gen/flytectl_update_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_update_workflow-meta.rst | 1 + flytectl/docs/source/gen/flytectl_upgrade.rst | 1 + flytectl/docs/source/gen/flytectl_version.rst | 1 + 59 files changed, 63 insertions(+), 4 deletions(-) diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index afe6a41400..3ab23acf44 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -21,6 +21,7 @@ Options --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_compile.rst b/flytectl/docs/source/gen/flytectl_compile.rst index 9d92df44fe..ad2fc9b207 100644 --- a/flytectl/docs/source/gen/flytectl_compile.rst +++ b/flytectl/docs/source/gen/flytectl_compile.rst @@ -47,6 +47,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index e18446b99d..197129d77a 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -94,6 +94,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index fded48039c..7a21b2b490 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -30,6 +30,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 526b9ad732..6937304aa5 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -32,6 +32,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index b258a60b14..390891fc17 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -32,6 +32,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index a26a1c7cf1..46b00cbda4 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -63,6 +63,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 570193c891..fef71a32aa 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -34,6 +34,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index f64c70dd05..cf6d658bd8 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -33,6 +33,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 4654bb338e..c4982a939d 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -156,6 +156,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index eb040758fa..68cd30b40e 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -69,6 +69,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index f26ed92613..a9e5109b6b 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -33,6 +33,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index e2037d0d82..08e825a06d 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -68,6 +68,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index cafac8401b..b5536698aa 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -65,6 +65,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 9bb961ffe4..63ea3a140b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -69,6 +69,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 6ee69b6711..750ef913e6 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -76,6 +76,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 2a535f6ec5..260a2f6771 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index c4ad6b2f11..90f484e560 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -70,6 +70,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index fb5c34af6f..5659c05253 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -68,6 +68,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index 74889b9c3e..1ff897a135 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -51,6 +51,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index 08539b44b0..5f85653189 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index f1865e41d5..4c4d62f210 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -100,6 +100,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index 2f6d3e8e08..1d44f1de5a 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index 8c8305c0d3..f7d9608965 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 8272b62ba7..e80e57b43e 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -33,6 +33,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index beb1a279db..03ba02c382 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -76,6 +76,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index bc79f39878..74b6acb350 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -75,6 +75,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index acf7b493c6..ef8d50e124 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -78,6 +78,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index ed4f653928..8c735a726f 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -108,6 +108,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 73d6259e0c..8e8bcdb4f1 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -142,6 +142,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 09b9bf774e..bc9267aaa8 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -97,6 +97,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 1d104b3e04..91d3b2e5c4 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -80,6 +80,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index b03b8d4e21..c9077ea1a3 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -80,6 +80,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index e8556a3828..3502df9aa2 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -124,6 +124,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 01a8aec44f..1b505cd60a 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -137,6 +137,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 5efc06419f..1d356e1028 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -108,6 +108,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index cc600b42f4..ab165d19c9 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -33,6 +33,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index ea1a4cf9b2..91d8ade049 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -59,6 +59,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 3f51de91dd..a70618de81 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -136,6 +136,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 5e03e92672..21084366a4 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -51,6 +51,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 812c30f211..51dac4ef61 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 7e9904d1a9..fc1c0ca112 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -105,6 +105,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 17462d2788..497eeed6ef 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index d8a2554777..89adadd478 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -40,6 +40,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index f89628772c..a82adf140e 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -35,6 +35,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 8bd54375f7..d9c40d97fd 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -75,6 +75,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index fedc306bd8..867cc54e9c 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -68,6 +68,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 660a9e2e08..73ac2f84c0 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -79,6 +79,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 8db38998d0..5df845f7ab 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -48,6 +48,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index bb16f09286..33633ec6e4 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the launch plan: :: - flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" Archiving launch plan named entity is not supported and would throw an error: :: - flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive Activating launch plan named entity would be a noop: :: - flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate + flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate Usage @@ -53,6 +53,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 603fc5ad4d..01bc49a6a4 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -34,7 +34,7 @@ Options :: --activate activate launchplan. - --archive archive launchplan. + --archive disable the launch plan schedule (if it has an active schedule associated with it). --dryRun execute command without making any modifications. -h, --help help for launchplan --version string version of the launchplan to be fetched. @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index ed5385fcaa..570d234da8 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -81,6 +81,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 91cfbe14ee..ffcef7e10a 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -108,6 +108,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 5c3b608b29..7e7256abfc 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -53,6 +53,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 83eeba649a..33f5ca64b4 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -81,6 +81,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 381dc9f293..79cc25e306 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -77,6 +77,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 304d123230..d1f4079d0d 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -53,6 +53,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 9dda7fc0aa..9c1141fe7a 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -48,6 +48,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 1cdc8560a6..406996f5bd 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -37,6 +37,7 @@ Options inherited from parent commands --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation --admin.defaultServiceConfig string From 727e952094c66ea33d349c495cf8c37931a53086 Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:20:10 +0530 Subject: [PATCH 275/356] update launch_plan.go (#344) Archive/deactivate launch plan [Issue](https://github.com/flyteorg/flyte/issues/2776) Signed-off-by: SmritiSatyanV smriti@union.ai --- flytectl/cmd/update/launch_plan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 58befbbd65..87af549359 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -21,7 +21,7 @@ Activates a launch plan which activates the scheduled job associated with it: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate -Archives a launch plan which deschedules any scheduled job associated with it: +Archives (deactivates) a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive From 3be778c2ff051489af8ee902fc8a6c729cb7003b Mon Sep 17 00:00:00 2001 From: James Brady Date: Thu, 18 Aug 2022 03:13:58 -0700 Subject: [PATCH 276/356] Fix "Sandbox" typo on Demo page. (#346) Signed-off-by: James Brady Signed-off-by: James Brady --- flytectl/docs/source/demo.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/docs/source/demo.rst b/flytectl/docs/source/demo.rst index 38e7b49374..b103d98ff5 100644 --- a/flytectl/docs/source/demo.rst +++ b/flytectl/docs/source/demo.rst @@ -1,10 +1,10 @@ -Sandbox +Demo ------- -It specifies the actions to be performed on the 'demo' resource. +These are the actions which can be performed on the 'demo' resource. .. toctree:: :maxdepth: 1 - :caption: Sandbox + :caption: Demo gen/flytectl_demo_start gen/flytectl_demo_status From d75142cc4e391dc52feee55127bf8845e03fb1b4 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Fri, 19 Aug 2022 02:32:29 -0700 Subject: [PATCH 277/356] 3 usability improvements -Named executions, improved connection handling and better logging (#349) * Flytectl will clearly print the endpoint that is unable to connect to https://github.com/flyteorg/flyte/issues/2762 Signed-off-by: Ketan Umare * Use an optional name argument to run an execution Signed-off-by: Ketan Umare * Support for skipping initializing flyte client Signed-off-by: Ketan Umare Signed-off-by: Ketan Umare --- flytectl/cmd/compile/compile.go | 1 + flytectl/cmd/core/cmd.go | 32 ++++++++++++++++++---- flytectl/cmd/core/cmd_ctx.go | 21 ++++++++++---- flytectl/cmd/create/execution.go | 30 ++++++++++++++------ flytectl/cmd/create/execution_util.go | 21 ++++++++------ flytectl/cmd/create/execution_util_test.go | 24 ++++++++-------- flytectl/cmd/demo/demo.go | 6 ++-- flytectl/cmd/sandbox/sandbox.go | 6 ++-- flytectl/cmd/upgrade/upgrade.go | 11 ++++++-- 9 files changed, 103 insertions(+), 49 deletions(-) diff --git a/flytectl/cmd/compile/compile.go b/flytectl/cmd/compile/compile.go index ffbbbad90e..d64f079152 100644 --- a/flytectl/cmd/compile/compile.go +++ b/flytectl/cmd/compile/compile.go @@ -140,6 +140,7 @@ func CreateCompileCommand() map[string]cmdCore.CommandEntry { CmdFunc: compile, PFlagProvider: config.DefaultCompileConfig, ProjectDomainNotRequired: true, + DisableFlyteClient: true, }, } return compileResourcesFuncs diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index 3c37f28ab6..a6f7c391df 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -4,6 +4,10 @@ import ( "context" "fmt" + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/pkg/pkce" "github.com/flyteorg/flyteidl/clients/go/admin" @@ -23,6 +27,7 @@ type CommandEntry struct { Short string Long string PFlagProvider PFlagProvider + DisableFlyteClient bool } func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry) { @@ -65,14 +70,29 @@ func generateCommandFunc(cmdEntry CommandEntry) func(cmd *cobra.Command, args [] return cmdEntry.CmdFunc(ctx, args, CommandContext{}) } - clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). - WithTokenCache(pkce.TokenCacheKeyringProvider{ - ServiceUser: fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), - ServiceName: pkce.KeyRingServiceName, - }).Build(ctx) + cmdCtx := NewCommandContextNoClient(cmd.OutOrStdout()) + if !cmdEntry.DisableFlyteClient { + clientSet, err := admin.ClientSetBuilder().WithConfig(admin.GetConfig(ctx)). + WithTokenCache(pkce.TokenCacheKeyringProvider{ + ServiceUser: fmt.Sprintf("%s:%s", adminCfg.Endpoint.String(), pkce.KeyRingServiceUser), + ServiceName: pkce.KeyRingServiceName, + }).Build(ctx) + if err != nil { + return err + } + cmdCtx = NewCommandContext(clientSet, cmd.OutOrStdout()) + } + + err := cmdEntry.CmdFunc(ctx, args, cmdCtx) if err != nil { + if s, ok := status.FromError(err); ok { + if s.Code() == codes.Unavailable || s.Code() == codes.Unauthenticated || s.Code() == codes.Unknown { + return errors.WithMessage(err, + fmt.Sprintf("Connection Info: [Endpoint: %s, InsecureConnection?: %v, AuthMode: %v]", adminCfg.Endpoint.String(), adminCfg.UseInsecureConnection, adminCfg.AuthType)) + } + } return err } - return cmdEntry.CmdFunc(ctx, args, NewCommandContext(clientSet, cmd.OutOrStdout())) + return nil } } diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index 7d02474490..f5cd095c4f 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -18,14 +18,23 @@ type CommandContext struct { out io.Writer } +// NewCommandContextNoClient returns a new commandContext +func NewCommandContextNoClient(out io.Writer) CommandContext { + return NewCommandContext(nil, out) +} + func NewCommandContext(clientSet *admin.Clientset, out io.Writer) CommandContext { - return CommandContext{ - clientSet: clientSet, - out: out, - adminClientFetcherExt: &ext.AdminFetcherExtClient{AdminClient: clientSet.AdminClient()}, - adminClientUpdateExt: &ext.AdminUpdaterExtClient{AdminClient: clientSet.AdminClient()}, - adminClientDeleteExt: &ext.AdminDeleterExtClient{AdminClient: clientSet.AdminClient()}, + var adminClient service.AdminServiceClient + if clientSet != nil { + adminClient = clientSet.AdminClient() } + return NewCommandContextWithExt( + clientSet, + &ext.AdminFetcherExtClient{AdminClient: adminClient}, + &ext.AdminUpdaterExtClient{AdminClient: adminClient}, + &ext.AdminDeleterExtClient{AdminClient: adminClient}, + out, + ) } // NewCommandContextWithExt construct command context with injected extensions. Helps in injecting mocked ones for testing. diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index dc1ba493c1..b3711c49a2 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -66,13 +66,13 @@ It is worth noting that the source's and target's project and domain can be diff flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -To relaunch an execution, pass the current execution ID as follows: +4. To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development -To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: +5. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: @@ -80,7 +80,15 @@ To recover an execution, i.e., recreate it from the last known failure point for See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. -Generic data types are supported for execution in a similar manner. +6. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, +an execution id has to be unique within a project domain. So if the *name* matches an existing execution an already exists exceptioj +will be raised. + +:: + + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development custom_name + +7. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. The following is an example of how generic data can be specified while creating the execution. :: @@ -100,7 +108,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": +8. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -171,21 +179,27 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C var err error sourceProject := config.GetConfig().Project sourceDomain := config.GetConfig().Domain + + var targetExecName string + if len(args) > 0 { + targetExecName = args[0] + } + if execParams, err = readConfigAndValidate(config.GetConfig().Project, config.GetConfig().Domain); err != nil { return err } var executionRequest *admin.ExecutionCreateRequest switch execParams.execType { case Relaunch: - return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig) + return relaunchExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName) case Recover: - return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig) + return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName) case Task: - if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig); err != nil { + if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName); err != nil { return err } case Workflow: - if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig); err != nil { + if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName); err != nil { return err } default: diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index ed862783d0..41c438f274 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -16,7 +16,7 @@ import ( ) func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, - cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) (*admin.ExecutionCreateRequest, error) { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig, targetExecName string) (*admin.ExecutionCreateRequest, error) { // Fetch the launch plan lp, err := cmdCtx.AdminFetcherExt().FetchLPVersion(ctx, workflowName, executionConfig.Version, project, domain) if err != nil { @@ -51,11 +51,11 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName, projec } } - return createExecutionRequest(lp.Id, inputs, securityContext, authRole), nil + return createExecutionRequest(lp.Id, inputs, securityContext, authRole, targetExecName), nil } func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, - cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) (*admin.ExecutionCreateRequest, error) { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig, targetExecName string) (*admin.ExecutionCreateRequest, error) { // Fetch the task task, err := cmdCtx.AdminFetcherExt().FetchTaskVersion(ctx, taskName, executionConfig.Version, project, domain) if err != nil { @@ -97,11 +97,11 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project Version: task.Id.Version, } - return createExecutionRequest(id, inputs, securityContext, authRole), nil + return createExecutionRequest(id, inputs, securityContext, authRole, targetExecName), nil } func relaunchExecution(ctx context.Context, executionName string, project string, domain string, - cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) error { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig, targetExecutionName string) error { if executionConfig.DryRun { logger.Debugf(ctx, "skipping RelaunchExecution request (DryRun)") return nil @@ -112,6 +112,7 @@ func relaunchExecution(ctx context.Context, executionName string, project string Project: project, Domain: domain, }, + Name: targetExecutionName, }) if err != nil { return err @@ -121,7 +122,7 @@ func relaunchExecution(ctx context.Context, executionName string, project string } func recoverExecution(ctx context.Context, executionName string, project string, domain string, - cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig) error { + cmdCtx cmdCore.CommandContext, executionConfig *ExecutionConfig, targetExecName string) error { if executionConfig.DryRun { logger.Debugf(ctx, "skipping RecoverExecution request (DryRun)") return nil @@ -132,6 +133,7 @@ func recoverExecution(ctx context.Context, executionName string, project string, Project: project, Domain: domain, }, + Name: targetExecName, }) if err != nil { return err @@ -141,12 +143,15 @@ func recoverExecution(ctx context.Context, executionName string, project string, } func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securityContext *core.SecurityContext, - authRole *admin.AuthRole) *admin.ExecutionCreateRequest { + authRole *admin.AuthRole, targetExecName string) *admin.ExecutionCreateRequest { + if len(targetExecName) == 0 { + targetExecName = "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19] + } return &admin.ExecutionCreateRequest{ Project: executionConfig.TargetProject, Domain: executionConfig.TargetDomain, - Name: "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19], + Name: targetExecName, Spec: &admin.ExecutionSpec{ LaunchPlan: ID, Metadata: &admin.ExecutionMetadata{ diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index 0342d4b5c7..e36b957890 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -49,7 +49,7 @@ func TestCreateExecutionForRelaunch(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(executionCreateResponse, nil) - err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) } @@ -57,7 +57,7 @@ func TestCreateExecutionForRelaunchNotFound(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(nil, errors.New("unknown execution")) - err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) @@ -67,7 +67,7 @@ func TestCreateExecutionForRecovery(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(executionCreateResponse, nil) - err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) } @@ -75,7 +75,7 @@ func TestCreateExecutionForRecoveryNotFound(t *testing.T) { s := setup() createExecutionUtilSetup() s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(nil, errors.New("unknown execution")) - err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + err := recoverExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Equal(t, err, errors.New("unknown execution")) } @@ -86,7 +86,7 @@ func TestCreateExecutionRequestForWorkflow(t *testing.T) { createExecutionUtilSetup() launchPlan := &admin.LaunchPlan{} s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) - execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) assert.NotNil(t, execCreateRequest) }) @@ -101,7 +101,7 @@ func TestCreateExecutionRequestForWorkflow(t *testing.T) { }, } s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) - execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Nil(t, execCreateRequest) assert.Equal(t, fmt.Errorf("parameter [nilparam] has nil Variable"), err) @@ -110,7 +110,7 @@ func TestCreateExecutionRequestForWorkflow(t *testing.T) { s := setup() createExecutionUtilSetup() s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Nil(t, execCreateRequest) assert.Equal(t, err, errors.New("failed")) @@ -122,7 +122,7 @@ func TestCreateExecutionRequestForWorkflow(t *testing.T) { launchPlan := &admin.LaunchPlan{} s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, mock.Anything).Return(launchPlan, nil) - execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) assert.NotNil(t, execCreateRequest) executionConfig.KubeServiceAcct = "" @@ -139,7 +139,7 @@ func TestCreateExecutionRequestForTask(t *testing.T) { }, } s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) - execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) assert.NotNil(t, execCreateRequest) }) @@ -162,7 +162,7 @@ func TestCreateExecutionRequestForTask(t *testing.T) { }, } s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) - execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Nil(t, execCreateRequest) assert.Equal(t, fmt.Errorf("variable [nilvar] has nil type"), err) @@ -171,7 +171,7 @@ func TestCreateExecutionRequestForTask(t *testing.T) { s := setup() createExecutionUtilSetup() s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) - execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.NotNil(t, err) assert.Nil(t, execCreateRequest) assert.Equal(t, err, errors.New("failed")) @@ -186,7 +186,7 @@ func TestCreateExecutionRequestForTask(t *testing.T) { }, } s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) - execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig) + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") assert.Nil(t, err) assert.NotNil(t, execCreateRequest) executionConfig.KubeServiceAcct = "" diff --git a/flytectl/cmd/demo/demo.go b/flytectl/cmd/demo/demo.go index 30b29c8040..35149b6823 100644 --- a/flytectl/cmd/demo/demo.go +++ b/flytectl/cmd/demo/demo.go @@ -46,16 +46,16 @@ func CreateDemoCommand() *cobra.Command { demoResourcesFuncs := map[string]cmdcore.CommandEntry{ "start": {CmdFunc: startDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, - Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig}, + Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig, DisableFlyteClient: true}, "teardown": {CmdFunc: teardownDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, - Long: teardownLong}, + Long: teardownLong, DisableFlyteClient: true}, "status": {CmdFunc: demoClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, Short: statusShort, Long: statusLong}, "exec": {CmdFunc: demoClusterExec, Aliases: []string{}, ProjectDomainNotRequired: true, Short: execShort, - Long: execLong}, + Long: execLong, DisableFlyteClient: true}, } cmdcore.AddCommands(demo, demoResourcesFuncs) diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 2dc5ab95a4..2e342c41e4 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -46,16 +46,16 @@ func CreateSandboxCommand() *cobra.Command { sandboxResourcesFuncs := map[string]cmdcore.CommandEntry{ "start": {CmdFunc: startSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, - Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig}, + Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig, DisableFlyteClient: true}, "teardown": {CmdFunc: teardownSandboxCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, - Long: teardownLong}, + Long: teardownLong, DisableFlyteClient: true}, "status": {CmdFunc: sandboxClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, Short: statusShort, Long: statusLong}, "exec": {CmdFunc: sandboxClusterExec, Aliases: []string{}, ProjectDomainNotRequired: true, Short: execShort, - Long: execLong}, + Long: execLong, DisableFlyteClient: true}, } cmdcore.AddCommands(sandbox, sandboxResourcesFuncs) diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index f8c4099e4e..b760975a5a 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -54,9 +54,14 @@ var ( // SelfUpgrade will return self upgrade command func SelfUpgrade(rootCmd *cobra.Command) map[string]cmdCore.CommandEntry { getResourcesFuncs := map[string]cmdCore.CommandEntry{ - "upgrade": {CmdFunc: selfUpgrade, Aliases: []string{"upgrade"}, ProjectDomainNotRequired: true, - Short: upgradeCmdShort, - Long: upgradeCmdLong}, + "upgrade": { + CmdFunc: selfUpgrade, + Aliases: []string{"upgrade"}, + ProjectDomainNotRequired: true, + Short: upgradeCmdShort, + Long: upgradeCmdLong, + DisableFlyteClient: true, + }, } return getResourcesFuncs } From 68324ce51f4ca1f47b6ba5e3b7c38e003442c64b Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 7 Sep 2022 11:24:06 +0530 Subject: [PATCH 278/356] Consuming device flow IDL (#350) Signed-off-by: Prafulla Mahindrakar Signed-off-by: Prafulla Mahindrakar --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index a01ef12ff7..93d601fe38 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.12 + github.com/flyteorg/flyteidl v1.1.13 github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 4caf6b8796..5670790b95 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -398,8 +398,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.1.12 h1:Rmuq7C/A4AXfYtw24GV9bN5MiPNFV96o6tHu8DMzUoM= -github.com/flyteorg/flyteidl v1.1.12/go.mod h1:f1tvw5CDjqmrzNxKpRYr6BdAhHL8f7Wp1Duxl0ZOV4g= +github.com/flyteorg/flyteidl v1.1.13 h1:xRUOu9+6c/zTZRTv+He1s4kX7uxmd/K5y7tAP598f8A= +github.com/flyteorg/flyteidl v1.1.13/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= From fce2910db16157eb06566adaeb3642ee01628cb3 Mon Sep 17 00:00:00 2001 From: Flyte Bot Date: Tue, 13 Sep 2022 13:00:04 -0700 Subject: [PATCH 279/356] Update flyteidl version (#336) Signed-off-by: Flyte-Bot Signed-off-by: Flyte-Bot Co-authored-by: flyte-bot --- flytectl/go.mod | 2 +- flytectl/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 93d601fe38..3cc27ebf02 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.13 + github.com/flyteorg/flyteidl v1.1.15 github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 5670790b95..3a940fe8d9 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -400,6 +400,8 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= github.com/flyteorg/flyteidl v1.1.13 h1:xRUOu9+6c/zTZRTv+He1s4kX7uxmd/K5y7tAP598f8A= github.com/flyteorg/flyteidl v1.1.13/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= +github.com/flyteorg/flyteidl v1.1.15 h1:h+T8yeya5OEt7POav0wZkjPdtUatilraVTuwrioqzuA= +github.com/flyteorg/flyteidl v1.1.15/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= From 9c10cd1b2585456f047c622bc1503ba76fe142c9 Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Tue, 20 Sep 2022 15:52:09 +0530 Subject: [PATCH 280/356] update launch_plan.go (#354) * update launch_plan.go add links to activating and deactivating a launch plan Signed-off-by: SmritiSatyanV smriti@union.ai * render correctly Fix rendering Signed-off-by: SmritiSatyanV smriti@union.ai --- flytectl/cmd/get/launch_plan.go | 5 +++-- flytectl/cmd/update/launch_plan.go | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index edd7ea7c38..f83a1d1d4b 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -23,9 +23,10 @@ Retrieve all launch plans within the project and domain: flytectl get launchplan -p flytesnacks -d development .. note:: - The terms launchplan/launchplans are interchangeable in these commands. + + The terms launchplan/launchplans are interchangeable in these commands. - Retrieve a launch plan by name within the project and domain: +Retrieve a launch plan by name within the project and domain: :: diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 87af549359..369f756cd7 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -16,17 +16,16 @@ import ( const ( updateLPShort = "Updates launch plan status" updateLPLong = ` -Activates a launch plan which activates the scheduled job associated with it: +Activates a ` + "`launch plan `__" + ` which activates the scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate -Archives (deactivates) a launch plan which deschedules any scheduled job associated with it: +Archives ` + "`(deactivates) `__" + ` a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive - Usage ` ) From b484b2fcc9f7f32134974b89654edfe7932aaf01 Mon Sep 17 00:00:00 2001 From: Iaroslav Ciupin Date: Sat, 1 Oct 2022 01:08:01 +0300 Subject: [PATCH 281/356] Specify cluster pool when creating execution (#355) * Create execution with specifying clusterPool Signed-off-by: Iaroslav Ciupin * format Signed-off-by: Iaroslav Ciupin * update flyteidl Signed-off-by: Iaroslav Ciupin * refactor Signed-off-by: Iaroslav Ciupin * Address comments Signed-off-by: Iaroslav Ciupin * update flyteidl Signed-off-by: Iaroslav Ciupin * increase coverage Signed-off-by: Iaroslav Ciupin Signed-off-by: Iaroslav Ciupin --- flytectl/cmd/create/execution.go | 29 ++- flytectl/cmd/create/execution_test.go | 237 +++++++++++------- flytectl/cmd/create/execution_util.go | 14 +- flytectl/cmd/create/executionconfig_flags.go | 1 + .../cmd/create/executionconfig_flags_test.go | 14 ++ .../task_execution_spec_with_iamrole.yaml | 1 + flytectl/go.mod | 2 +- flytectl/go.sum | 6 +- 8 files changed, 196 insertions(+), 108 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index b3711c49a2..0d0c8786fc 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -4,10 +4,11 @@ import ( "context" "fmt" - "github.com/flyteorg/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytestdlib/logger" + + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" ) const ( @@ -132,6 +133,13 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 +9. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor + that supports cluster pools, then when creating a new execution, you can assign it to a specific cluster pool: + +:: + + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d development --clusterPool my-gpu-cluster + Usage ` ) @@ -150,6 +158,7 @@ type ExecutionConfig struct { Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` Version string `json:"version" pflag:",specify version of execution workflow/task."` + ClusterPool string `json:"clusterPool" pflag:",specify which cluster pool to assign execution to."` // Non plfag section is read from the execution config generated by get task/launch plan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` @@ -170,13 +179,9 @@ type ExecutionParams struct { execType ExecutionType } -var ( - executionConfig = &ExecutionConfig{} -) +var executionConfig = &ExecutionConfig{} func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - var execParams ExecutionParams - var err error sourceProject := config.GetConfig().Project sourceDomain := config.GetConfig().Domain @@ -185,7 +190,8 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C targetExecName = args[0] } - if execParams, err = readConfigAndValidate(config.GetConfig().Project, config.GetConfig().Domain); err != nil { + execParams, err := readConfigAndValidate(config.GetConfig().Project, config.GetConfig().Domain) + if err != nil { return err } var executionRequest *admin.ExecutionCreateRequest @@ -195,16 +201,19 @@ func createExecutionCommand(ctx context.Context, args []string, cmdCtx cmdCore.C case Recover: return recoverExecution(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName) case Task: - if executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName); err != nil { + executionRequest, err = createExecutionRequestForTask(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName) + if err != nil { return err } case Workflow: - if executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName); err != nil { + executionRequest, err = createExecutionRequestForWorkflow(ctx, execParams.name, sourceProject, sourceDomain, cmdCtx, executionConfig, targetExecName) + if err != nil { return err } default: return fmt.Errorf("invalid execution type %v", execParams.execType) } + if executionConfig.DryRun { logger.Debugf(ctx, "skipping CreateExecution request (DryRun)") } else { diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index cad187f9d0..7aabf5897d 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -4,28 +4,39 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - - "github.com/stretchr/testify/assert" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/cmd/testutils" ) -type TestStruct struct { - executionConfig *ExecutionConfig - args []string +type createSuite struct { + suite.Suite + testutils.TestStruct + originalExecConfig ExecutionConfig } -// This function needs to be called after testutils.Steup() -func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { - ctx := s.Ctx - t.executionConfig = &ExecutionConfig{} +func (s *createSuite) SetupTest() { + s.TestStruct = setup() + // TODO: migrate to new command context from testutils s.CmdCtx = cmdCore.NewCommandContext(s.MockClient, s.MockOutStream) + s.originalExecConfig = *executionConfig +} + +func (s *createSuite) TearDownTest() { + orig := s.originalExecConfig + executionConfig = &orig + s.MockAdminClient.AssertExpectations(s.T()) +} + +func (s *createSuite) onGetTask() { sortedListLiteralType := core.Variable{ Type: &core.LiteralType{ Type: &core.LiteralType_CollectionType{ @@ -60,7 +71,10 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { }, }, } - s.MockAdminClient.OnGetTaskMatch(ctx, mock.Anything).Return(task1, nil) + s.MockAdminClient.OnGetTaskMatch(s.Ctx, mock.Anything).Return(task1, nil) +} + +func (s *createSuite) onGetLaunchPlan() { parameterMap := map[string]*core.Parameter{ "numbers": { Var: &core.Variable{ @@ -132,20 +146,14 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) { Project: config.GetConfig().Project, Domain: config.GetConfig().Domain, Name: "core.control_flow.merge_sort.merge_sort", - Version: "v2", + Version: "v3", }, } - s.MockAdminClient.OnGetLaunchPlanMatch(ctx, objectGetRequest).Return(launchPlan1, nil) - - return TestStruct{ - executionConfig: executionConfig, - args: []string{}, - } + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, objectGetRequest).Return(launchPlan1, nil).Once() } -func TestCreateTaskExecutionFunc(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) +func (s *createSuite) Test_CreateTaskExecution() { + s.onGetTask() executionCreateResponseTask := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -153,31 +161,73 @@ func TestCreateTaskExecutionFunc(t *testing.T) { Name: "ff513c0e44b5b4a35aa5", }, } + expected := &admin.ExecutionCreateRequest{ + Project: "dummyProject", + Domain: "dummyDomain", + Spec: &admin.ExecutionSpec{ + LaunchPlan: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: "dummyProject", + Domain: "dummyDomain", + Name: "task1", + Version: "v2", + }, + Metadata: &admin.ExecutionMetadata{Mode: admin.ExecutionMetadata_MANUAL, Principal: "sdk", Nesting: 0}, + AuthRole: &admin.AuthRole{ + KubernetesServiceAccount: executionConfig.KubeServiceAcct, + AssumableIamRole: "iamRoleARN", + }, + SecurityContext: &core.SecurityContext{ + RunAs: &core.Identity{ + K8SServiceAccount: executionConfig.KubeServiceAcct, + IamRole: "iamRoleARN", + }, + }, + ClusterAssignment: &admin.ClusterAssignment{ClusterPoolName: "gpu"}, + }, + } + s.MockAdminClient. + OnCreateExecutionMatch(s.Ctx, mock.Anything). + Run(func(args mock.Arguments) { + actual := args.Get(1).(*admin.ExecutionCreateRequest) + actual.Name = "" + actual.Inputs = nil + s.True(proto.Equal(expected, actual), actual.String()) + }). + Return(executionCreateResponseTask, nil). + Once() + executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" + + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) - ctx := s.Ctx - s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseTask, nil) - ts.executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" - err := createExecutionCommand(ctx, ts.args, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) + s.NoError(err) + tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) } -func TestCreateTaskExecutionFuncError(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) - ctx := s.Ctx - s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(nil, fmt.Errorf("error launching task")) - ts.executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" - err := createExecutionCommand(ctx, ts.args, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error launching task"), err) - s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) +func (s *createSuite) Test_CreateTaskExecution_GetTaskError() { + expected := fmt.Errorf("error") + s.MockAdminClient.OnGetTaskMatch(s.Ctx, mock.Anything).Return(nil, expected).Once() + executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + + s.Equal(expected, err) +} + +func (s *createSuite) Test_CreateTaskExecution_CreateExecutionError() { + s.onGetTask() + s.MockAdminClient. + OnCreateExecutionMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("error launching task")). + Once() + executionConfig.ExecFile = testDataFolder + "task_execution_spec.yaml" + + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + + s.EqualError(err, "error launching task") } -func TestCreateLaunchPlanExecutionFunc(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) +func (s *createSuite) Test_CreateLaunchPlanExecution() { executionCreateResponseLP := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -185,20 +235,27 @@ func TestCreateLaunchPlanExecutionFunc(t *testing.T) { Name: "f652ea3596e7f4d80a0e", }, } + s.onGetLaunchPlan() + s.MockAdminClient.OnCreateExecutionMatch(s.Ctx, mock.Anything).Return(executionCreateResponseLP, nil) + executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" + + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) - ctx := s.Ctx - s.MockAdminClient.OnCreateExecutionMatch(ctx, mock.Anything).Return(executionCreateResponseLP, nil) - ts.executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" - err := createExecutionCommand(ctx, ts.args, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "CreateExecution", ctx, mock.Anything) - tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) + s.NoError(err) + tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) } -func TestCreateRelaunchExecutionFunc(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) - defer func() { ts.executionConfig.Relaunch = "" }() +func (s *createSuite) Test_CreateLaunchPlan_GetLaunchPlanError() { + expected := fmt.Errorf("error") + s.MockAdminClient.OnGetLaunchPlanMatch(s.Ctx, mock.Anything).Return(nil, expected).Once() + executionConfig.ExecFile = testDataFolder + "launchplan_execution_spec.yaml" + + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + + s.Equal(expected, err) +} + +func (s *createSuite) Test_CreateRelaunchExecution() { relaunchExecResponse := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ Project: "flytesnacks", @@ -206,8 +263,7 @@ func TestCreateRelaunchExecutionFunc(t *testing.T) { Name: "f652ea3596e7f4d80a0e", }, } - - ts.executionConfig.Relaunch = relaunchExecResponse.Id.Name + executionConfig.Relaunch = relaunchExecResponse.Id.Name relaunchRequest := &admin.ExecutionRelaunchRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: executionConfig.Relaunch, @@ -215,19 +271,15 @@ func TestCreateRelaunchExecutionFunc(t *testing.T) { Domain: config.GetConfig().Domain, }, } - ctx := s.Ctx - s.MockAdminClient.OnRelaunchExecutionMatch(ctx, relaunchRequest).Return(relaunchExecResponse, nil) - err := createExecutionCommand(ctx, ts.args, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "RelaunchExecution", ctx, relaunchRequest) - tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) -} + s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(relaunchExecResponse, nil).Once() -func TestCreateRecoverExecutionFunc(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) - defer func() { ts.executionConfig.Recover = "" }() + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + s.NoError(err) + tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) +} + +func (s *createSuite) Test_CreateRecoverExecution() { originalExecutionName := "abc123" recoverExecResponse := &admin.ExecutionCreateResponse{ Id: &core.WorkflowExecutionIdentifier{ @@ -236,8 +288,7 @@ func TestCreateRecoverExecutionFunc(t *testing.T) { Name: "f652ea3596e7f4d80a0e", }, } - - ts.executionConfig.Recover = originalExecutionName + executionConfig.Recover = originalExecutionName recoverRequest := &admin.ExecutionRecoverRequest{ Id: &core.WorkflowExecutionIdentifier{ Name: originalExecutionName, @@ -245,31 +296,39 @@ func TestCreateRecoverExecutionFunc(t *testing.T) { Domain: config.GetConfig().Domain, }, } + s.MockAdminClient.OnRecoverExecutionMatch(s.Ctx, recoverRequest).Return(recoverExecResponse, nil).Once() - ctx := s.Ctx - s.MockAdminClient.OnRecoverExecutionMatch(ctx, recoverRequest).Return(recoverExecResponse, nil) - err := createExecutionCommand(ctx, ts.args, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "RecoverExecution", ctx, recoverRequest) - tearDownAndVerify(t, s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) - ts.executionConfig.Relaunch = "" + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + + s.NoError(err) + tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) } -func TestCreateExecutionFuncInvalid(t *testing.T) { - s := setup() - ts := createExecutionSetup(&s) - executionConfig := ts.executionConfig +func (s *createSuite) TestCreateExecutionFuncInvalid() { executionConfig.Relaunch = "" executionConfig.ExecFile = "" - err := createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("executionConfig, relaunch and recover can't be empty. Run the flytectl get task/launchplan to generate the config"), err) + err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) + s.EqualError(err, "executionConfig, relaunch and recover can't be empty. Run the flytectl get task/launchplan to generate the config") + executionConfig.ExecFile = "Invalid-file" - err = createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from %v yaml file", executionConfig.ExecFile), err) + err = createExecutionCommand(s.Ctx, nil, s.CmdCtx) + s.EqualError(err, fmt.Sprintf("unable to read from %v yaml file", executionConfig.ExecFile)) + executionConfig.ExecFile = testDataFolder + "invalid_execution_spec.yaml" - err = createExecutionCommand(s.Ctx, ts.args, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("either task or workflow name should be specified to launch an execution"), err) + err = createExecutionCommand(s.Ctx, nil, s.CmdCtx) + s.EqualError(err, "either task or workflow name should be specified to launch an execution") +} + +func (s *createSuite) Test_CreateTaskExecution_DryRun() { + s.onGetTask() + executionConfig.DryRun = true + executionConfig.ExecFile = testDataFolder + "task_execution_spec_with_iamrole.yaml" + + err := createExecutionCommand(s.Ctx, []string{"target"}, s.CmdCtx) + + s.NoError(err) +} + +func TestCreateSuite(t *testing.T) { + suite.Run(t, &createSuite{originalExecConfig: *executionConfig}) } diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 41c438f274..85f9dd34a2 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -6,13 +6,14 @@ import ( "io/ioutil" "strings" - cmdCore "github.com/flyteorg/flytectl/cmd/core" - cmdGet "github.com/flyteorg/flytectl/cmd/get" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/logger" "github.com/google/uuid" "sigs.k8s.io/yaml" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdGet "github.com/flyteorg/flytectl/cmd/get" ) func createExecutionRequestForWorkflow(ctx context.Context, workflowName, project, domain string, @@ -148,6 +149,10 @@ func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securi if len(targetExecName) == 0 { targetExecName = "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19] } + var clusterAssignment *admin.ClusterAssignment + if executionConfig.ClusterPool != "" { + clusterAssignment = &admin.ClusterAssignment{ClusterPoolName: executionConfig.ClusterPool} + } return &admin.ExecutionCreateRequest{ Project: executionConfig.TargetProject, Domain: executionConfig.TargetDomain, @@ -159,8 +164,9 @@ func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securi Principal: "sdk", Nesting: 0, }, - AuthRole: authRole, - SecurityContext: securityContext, + AuthRole: authRole, + SecurityContext: securityContext, + ClusterAssignment: clusterAssignment, }, Inputs: inputs, } diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 621a53d253..052d0a74d5 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -59,6 +59,7 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&executionConfig.Recover, fmt.Sprintf("%v%v", prefix, "recover"), executionConfig.Recover, "execution id to be recreated from the last known failure point.") cmdFlags.BoolVar(&executionConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), executionConfig.DryRun, "execute command without making any modifications.") cmdFlags.StringVar(&executionConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), executionConfig.Version, "specify version of execution workflow/task.") + cmdFlags.StringVar(&executionConfig.ClusterPool, fmt.Sprintf("%v%v", prefix, "clusterPool"), executionConfig.ClusterPool, "specify which cluster pool to assign execution to.") cmdFlags.StringVar(&executionConfig.Workflow, fmt.Sprintf("%v%v", prefix, "workflow"), executionConfig.Workflow, "") cmdFlags.StringVar(&executionConfig.Task, fmt.Sprintf("%v%v", prefix, "task"), executionConfig.Task, "") return cmdFlags diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index dcae9e6516..ac59b4fe0b 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -225,6 +225,20 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_clusterPool", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("clusterPool", testValue) + if vString, err := cmdFlags.GetString("clusterPool"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vString), &actual.ClusterPool) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_workflow", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml index c74db53eef..30aea6cbd1 100644 --- a/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml +++ b/flytectl/cmd/testdata/task_execution_spec_with_iamrole.yaml @@ -13,3 +13,4 @@ targetDomain: "development" targetProject: "flytesnacks" task: core.control_flow.merge_sort.merge version: v2 +clusterPool: gpu diff --git a/flytectl/go.mod b/flytectl/go.mod index 3cc27ebf02..cc7402ff3f 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.15 + github.com/flyteorg/flyteidl v1.1.19 github.com/flyteorg/flytestdlib v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 3a940fe8d9..eea38f8a99 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -398,10 +398,8 @@ github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.1.13 h1:xRUOu9+6c/zTZRTv+He1s4kX7uxmd/K5y7tAP598f8A= -github.com/flyteorg/flyteidl v1.1.13/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= -github.com/flyteorg/flyteidl v1.1.15 h1:h+T8yeya5OEt7POav0wZkjPdtUatilraVTuwrioqzuA= -github.com/flyteorg/flyteidl v1.1.15/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= +github.com/flyteorg/flyteidl v1.1.19 h1:1CtSbuFhFHwUbKdv66PqbcER01iacAJU+snh0eTsXc4= +github.com/flyteorg/flyteidl v1.1.19/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= From 92104a8fcb3cb0e751d6fe918bfb7939a1002d80 Mon Sep 17 00:00:00 2001 From: Iaroslav Ciupin Date: Fri, 7 Oct 2022 16:17:59 +0300 Subject: [PATCH 282/356] Fix --clusterPool argument override (#360) * fix clusterPool override * increase coverage Signed-off-by: Iaroslav Ciupin --- flytectl/cmd/create/execution_util.go | 3 +++ flytectl/cmd/create/execution_util_test.go | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 85f9dd34a2..2fdf247688 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -201,6 +201,9 @@ func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain st if executionConfig.Version != "" { toBeOverridden.Version = executionConfig.Version } + if executionConfig.ClusterPool != "" { + toBeOverridden.ClusterPool = executionConfig.ClusterPool + } // Use the root project and domain to launch the task/workflow if target is unspecified if executionConfig.TargetProject == "" { toBeOverridden.TargetProject = project diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index e36b957890..4ce9befcd5 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -5,10 +5,11 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytectl/cmd/config" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -192,3 +193,22 @@ func TestCreateExecutionRequestForTask(t *testing.T) { executionConfig.KubeServiceAcct = "" }) } + +func Test_resolveOverrides(t *testing.T) { + executionConfig.KubeServiceAcct = "k8s-acct" + executionConfig.IamRoleARN = "iam-role" + executionConfig.TargetProject = "t-proj" + executionConfig.TargetDomain = "t-domain" + executionConfig.Version = "v1" + executionConfig.ClusterPool = "gpu" + cfg := &ExecutionConfig{} + + resolveOverrides(cfg, "p1", "d1") + + assert.Equal(t, "k8s-acct", cfg.KubeServiceAcct) + assert.Equal(t, "iam-role", cfg.IamRoleARN) + assert.Equal(t, "t-proj", cfg.TargetProject) + assert.Equal(t, "t-domain", cfg.TargetDomain) + assert.Equal(t, "v1", cfg.Version) + assert.Equal(t, "gpu", cfg.ClusterPool) +} From a64a4162ec0946301a90b66d9fa79bbde8f9b107 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 12 Oct 2022 23:17:19 +0800 Subject: [PATCH 283/356] Add support dev cluster (#353) * Add support dev cluster Signed-off-by: Kevin Su * nit Signed-off-by: Kevin Su * nit Signed-off-by: Kevin Su * nit Signed-off-by: Kevin Su * make generate Signed-off-by: Kevin Su * lint Signed-off-by: Kevin Su Signed-off-by: Kevin Su --- flytectl/cmd/compile/compile.go | 4 ++-- flytectl/cmd/completion.go | 2 +- .../cmd/config/subcommand/config/init_flags.go | 2 +- .../config/subcommand/project/project_config.go | 4 ++-- .../cmd/config/subcommand/sandbox/config_flags.go | 1 + .../config/subcommand/sandbox/config_flags_test.go | 14 ++++++++++++++ .../config/subcommand/sandbox/sandbox_config.go | 5 ++++- flytectl/cmd/demo/start.go | 7 ++++++- flytectl/cmd/upgrade/upgrade_test.go | 1 - flytectl/pkg/docker/docker_util.go | 11 +++++++++++ flytectl/pkg/sandbox/start.go | 9 ++++++++- 11 files changed, 50 insertions(+), 10 deletions(-) diff --git a/flytectl/cmd/compile/compile.go b/flytectl/cmd/compile/compile.go index d64f079152..f8f6957b10 100644 --- a/flytectl/cmd/compile/compile.go +++ b/flytectl/cmd/compile/compile.go @@ -29,8 +29,8 @@ func compileTasks(tasks []*core.TaskTemplate) ([]*core.CompiledTask, error) { } /* - Utility to compile a packaged workflow locally. - compilation is done locally so no flyte cluster is required. +Utility to compile a packaged workflow locally. +compilation is done locally so no flyte cluster is required. */ func compileFromPackage(packagePath string) error { args := []string{packagePath} diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go index a243c7f0c1..b404cb57dd 100644 --- a/flytectl/cmd/completion.go +++ b/flytectl/cmd/completion.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index 1e14634711..22427f0964 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -7,7 +7,7 @@ var ( } ) -//Configs +// Configs type Config struct { Host string `json:"host" pflag:",Endpoint of flyte admin"` Insecure bool `json:"insecure" pflag:",Enable insecure mode"` diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 36e6c41cb9..0cf927f67a 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -44,7 +44,7 @@ var DefaultProjectConfig = &ConfigProject{ Labels: map[string]string{}, } -//GetProjectSpec return project spec from a file/flags +// GetProjectSpec return project spec from a file/flags func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { projectSpec := admin.Project{} if len(c.File) > 0 { @@ -71,7 +71,7 @@ func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { return &projectSpec, nil } -//MapToAdminState return project spec from a file/flags +// MapToAdminState return project spec from a file/flags func (c *ConfigProject) MapToAdminState() (admin.Project_ProjectState, error) { if c.ActivateProject { c.Activate = c.ActivateProject diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 426e24204b..eaa7c88091 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -58,5 +58,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.RegistryAuth, fmt.Sprintf("%v%v", prefix, "imagePullOptions.registryAuth"), DefaultConfig.ImagePullOptions.RegistryAuth, "The base64 encoded credentials for the registry.") cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.Platform, fmt.Sprintf("%v%v", prefix, "imagePullOptions.platform"), DefaultConfig.ImagePullOptions.Platform, "Forces a specific platform's image to be pulled.'") + cmdFlags.BoolVar(&DefaultConfig.Dev, fmt.Sprintf("%v%v", prefix, "dev"), DefaultConfig.Dev, "Optional. Only start minio and postgres in the sandbox.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 3fdc64ba40..39dc790cfe 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -209,4 +209,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dev", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dev", testValue) + if vBool, err := cmdFlags.GetBool("dev"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Dev) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 44f76f614c..c2d37c6407 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -2,7 +2,7 @@ package sandbox import "github.com/flyteorg/flytectl/pkg/docker" -//Config holds configuration flags for sandbox command. +// Config holds configuration flags for sandbox command. type Config struct { Source string `json:"source" pflag:",Path of your source code"` @@ -27,6 +27,9 @@ type Config struct { ImagePullPolicy docker.ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` ImagePullOptions docker.ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"` + + // It's used for development. Users are able to start flyte locally via single binary and save the data to the minio or postgres in the sandbox. + Dev bool `json:"dev" pflag:",Optional. Only start minio and postgres in the sandbox."` } //go:generate pflags Config --default-var DefaultConfig --bind-default-var diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index a1e3113398..1300496a2a 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -20,6 +20,11 @@ Starts the demo cluster without any source code: flytectl demo start +Runs a dev cluster, which only has minio and postgres pod. +:: + + flytectl demo start --dev + Mounts your source code repository inside the demo cluster: :: @@ -45,7 +50,7 @@ Runs a specific version of Flyte. Flytectl demo only supports Flyte version avai .. note:: Flytectl demo is only supported for Flyte versions >= v1.0.0 -Runs the latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl demo start --pre diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 7b5b211e41..44095a5c13 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -44,7 +44,6 @@ func TestUpgradeCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Long, upgradeCmdLong) } -// func TestUpgrade(t *testing.T) { _ = util.WriteIntoFile([]byte("data"), tempExt) stdlibversion.Version = version diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index de7adda9b9..404db17fbc 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -96,6 +96,17 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { return nil } +// GetDevPorts will return dev cluster (minio + postgres) ports +func GetDevPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { + return nat.ParsePortSpecs([]string{ + "0.0.0.0:30082:30082", // K8s Dashboard Port + "0.0.0.0:30084:30084", // Minio API Port + "0.0.0.0:30086:30086", // K8s cluster + "0.0.0.0:30088:30088", // Minio Console Port + "0.0.0.0:30089:30089", // Postgres Port + }) +} + // GetSandboxPorts will return sandbox ports func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 012f104b41..94cb21c0e0 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -193,10 +193,14 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.ImagePullPolicy, sandboxConfig.ImagePullOptions); err != nil { return nil, err } + sandboxEnv := sandboxConfig.Env + if sandboxConfig.Dev { + sandboxEnv = append(sandboxEnv, "FLYTE_DEV=True") + } fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, - sandboxImage, sandboxConfig.Env) + sandboxImage, sandboxEnv) if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) @@ -281,6 +285,9 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox primePod := true sandboxImagePrefix := "sha" exposedPorts, portBindings, err := docker.GetDemoPorts() + if sandboxConfig.Dev { + exposedPorts, portBindings, err = docker.GetDevPorts() + } if err != nil { return err } From e2ed56258e9e29a4b9c8b192c32e787670573d0f Mon Sep 17 00:00:00 2001 From: Andrew Dye Date: Thu, 13 Oct 2022 12:43:09 -0700 Subject: [PATCH 284/356] Add console endpoint config section and init arg (#361) * Add console endpoint init arg and config section Signed-off-by: Andrew Dye * Log invalid endpoint Signed-off-by: Andrew Dye Signed-off-by: Andrew Dye --- .../config/subcommand/config/config_flags.go | 1 + .../subcommand/config/config_flags_test.go | 14 +++ .../config/subcommand/config/console_flags.go | 20 +++ .../subcommand/config/consoleconfig_flags.go | 55 +++++++++ .../config/consoleconfig_flags_test.go | 116 ++++++++++++++++++ .../config/subcommand/config/init_flags.go | 1 + flytectl/cmd/configuration/configuration.go | 16 ++- flytectl/config.yaml | 2 + flytectl/pkg/configutil/configutil.go | 5 + flytectl/pkg/configutil/configutil_test.go | 52 ++++++++ flytectl/pkg/sandbox/start.go | 1 + 11 files changed, 280 insertions(+), 3 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/config/console_flags.go create mode 100755 flytectl/cmd/config/subcommand/config/consoleconfig_flags.go create mode 100755 flytectl/cmd/config/subcommand/config/consoleconfig_flags_test.go diff --git a/flytectl/cmd/config/subcommand/config/config_flags.go b/flytectl/cmd/config/subcommand/config/config_flags.go index 21ce498e28..35b08563cd 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags.go +++ b/flytectl/cmd/config/subcommand/config/config_flags.go @@ -50,6 +50,7 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultConfig.Console, fmt.Sprintf("%v%v", prefix, "console"), DefaultConfig.Console, "Endpoint of console, if different than flyte admin") cmdFlags.StringVar(&DefaultConfig.Host, fmt.Sprintf("%v%v", prefix, "host"), DefaultConfig.Host, "Endpoint of flyte admin") cmdFlags.BoolVar(&DefaultConfig.Insecure, fmt.Sprintf("%v%v", prefix, "insecure"), DefaultConfig.Insecure, "Enable insecure mode") return cmdFlags diff --git a/flytectl/cmd/config/subcommand/config/config_flags_test.go b/flytectl/cmd/config/subcommand/config/config_flags_test.go index c7cf208df4..142d145bc3 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/config/config_flags_test.go @@ -99,6 +99,20 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) + t.Run("Test_console", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("console", testValue) + if vString, err := cmdFlags.GetString("console"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Console) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_host", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/config/console_flags.go b/flytectl/cmd/config/subcommand/config/console_flags.go new file mode 100644 index 0000000000..f980b3ce2f --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/console_flags.go @@ -0,0 +1,20 @@ +package config + +import "github.com/flyteorg/flytestdlib/config" + +//go:generate pflags ConsoleConfig --default-var DefaultConsoleConfig --bind-default-var + +var ( + DefaultConsoleConfig = &ConsoleConfig{} + + cfg = config.MustRegisterSection("console", DefaultConsoleConfig) +) + +// FilesConfig containing flags used for registration +type ConsoleConfig struct { + Endpoint string `json:"endpoint" pflag:",Endpoint of console, if different than flyte admin"` +} + +func GetConfig() *ConsoleConfig { + return cfg.GetConfig().(*ConsoleConfig) +} diff --git a/flytectl/cmd/config/subcommand/config/consoleconfig_flags.go b/flytectl/cmd/config/subcommand/config/consoleconfig_flags.go new file mode 100755 index 0000000000..4135f44009 --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/consoleconfig_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (ConsoleConfig) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (ConsoleConfig) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (ConsoleConfig) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in ConsoleConfig and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg ConsoleConfig) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("ConsoleConfig", pflag.ExitOnError) + cmdFlags.StringVar(&DefaultConsoleConfig.Endpoint, fmt.Sprintf("%v%v", prefix, "endpoint"), DefaultConsoleConfig.Endpoint, "Endpoint of console, if different than flyte admin") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/config/consoleconfig_flags_test.go b/flytectl/cmd/config/subcommand/config/consoleconfig_flags_test.go new file mode 100755 index 0000000000..77cf7ad56c --- /dev/null +++ b/flytectl/cmd/config/subcommand/config/consoleconfig_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package config + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConsoleConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConsoleConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConsoleConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConsoleConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConsoleConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_ConsoleConfig(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConsoleConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_ConsoleConfig(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_ConsoleConfig(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_ConsoleConfig(val, result)) +} + +func testDecodeRaw_ConsoleConfig(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_ConsoleConfig(vStringSlice, result)) +} + +func TestConsoleConfig_GetPFlagSet(t *testing.T) { + val := ConsoleConfig{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConsoleConfig_SetFlags(t *testing.T) { + actual := ConsoleConfig{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_endpoint", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("endpoint", testValue) + if vString, err := cmdFlags.GetString("endpoint"); err == nil { + testDecodeJson_ConsoleConfig(t, fmt.Sprintf("%v", vString), &actual.Endpoint) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index 22427f0964..9c31fa998d 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -9,6 +9,7 @@ var ( // Configs type Config struct { + Console string `json:"console" pflag:",Endpoint of console, if different than flyte admin"` Host string `json:"host" pflag:",Endpoint of flyte admin"` Insecure bool `json:"insecure" pflag:",Enable insecure mode"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 6d660583a7..e759758164 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -34,7 +34,6 @@ Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about the Sandbox deployment :ref:` + "`here `" + `. Generate remote cluster config: - :: flytectl config init --host=flyte.myexample.com @@ -43,11 +42,15 @@ By default, the connection is secure. Read more about remote deployment :ref:` + "`here `" + `. Generate remote cluster config with insecure connection: - :: flytectl config init --host=flyte.myexample.com --insecure + Generate remote cluster config with separate console endpoint: + :: + + flytectl config init --host=flyte.myexample.com --console=console.myexample.com + Generate Flytectl config with a storage provider: :: @@ -90,11 +93,18 @@ func initFlytectlConfig(reader io.Reader) error { if len(initConfig.DefaultConfig.Host) > 0 { trimHost := trimEndpoint(initConfig.DefaultConfig.Host) if !validateEndpointName(trimHost) { - return errors.New("Please use a valid endpoint") + return fmt.Errorf("%s invalid, please use a valid admin endpoint", trimHost) } templateValues.Host = fmt.Sprintf("dns:///%s", trimHost) templateValues.Insecure = initConfig.DefaultConfig.Insecure } + if len(initConfig.DefaultConfig.Console) > 0 { + trimConsole := trimEndpoint(initConfig.DefaultConfig.Console) + if !validateEndpointName(trimConsole) { + return fmt.Errorf("%s invalid, please use a valid console endpoint", trimConsole) + } + templateValues.Console = initConfig.DefaultConfig.Console + } var _err error if _, err := os.Stat(configutil.ConfigFile); os.IsNotExist(err) { _err = configutil.SetupConfig(configutil.ConfigFile, templateStr, templateValues) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index 6447502e59..c26a2e5aef 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -3,6 +3,8 @@ admin: endpoint: dns:///localhost:30081 insecure: true authType: Pkce +console: + endpoint: http://localhost:30080 logger: show-source: true level: 0 diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index dc60c3d35f..5dcde9bd69 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -13,6 +13,10 @@ const ( endpoint: {{.Host}} authType: Pkce insecure: {{.Insecure}} +{{- if .Console}} +console: + endpoint: {{.Console}} +{{- end}} logger: show-source: true level: 0` @@ -21,6 +25,7 @@ logger: type ConfigTemplateSpec struct { Host string Insecure bool + Console string } var ( diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index 936e0ea682..6a689366e0 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -7,8 +7,60 @@ import ( f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) +func TestSetupConfig(t *testing.T) { + file, err := os.CreateTemp("", "*.yaml") + require.NoError(t, err) + + templateValue := ConfigTemplateSpec{ + Host: "dns:///localhost:30081", + Insecure: true, + } + err = SetupConfig(file.Name(), AdminConfigTemplate, templateValue) + assert.NoError(t, err) + configBytes, err := ioutil.ReadAll(file) + assert.NoError(t, err) + expected := `admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + authType: Pkce + insecure: true +logger: + show-source: true + level: 0` + assert.Equal(t, expected, string(configBytes)) + + file, err = os.Create(file.Name()) + require.NoError(t, err) + templateValue = ConfigTemplateSpec{ + Host: "dns:///admin.example.com", + Insecure: true, + Console: "https://console.example.com", + } + err = SetupConfig(file.Name(), AdminConfigTemplate, templateValue) + assert.NoError(t, err) + configBytes, err = ioutil.ReadAll(file) + assert.NoError(t, err) + expected = `admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///admin.example.com + authType: Pkce + insecure: true +console: + endpoint: https://console.example.com +logger: + show-source: true + level: 0` + assert.Equal(t, expected, string(configBytes)) + + // Cleanup + if file != nil { + _ = os.Remove(file.Name()) + } +} + func TestConfigCleanup(t *testing.T) { _, err := os.Stat(f.FilePathJoin(f.UserHomeDir(), ".flyte")) if os.IsNotExist(err) { diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 94cb21c0e0..bbcc7f719b 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -168,6 +168,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService templateValues := configutil.ConfigTemplateSpec{ Host: "localhost:30081", Insecure: true, + Console: fmt.Sprintf("http://localhost:%d", consolePort), } if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { return nil, err From b62243b222d311587ca1f0e10f3357bed42c3191 Mon Sep 17 00:00:00 2001 From: Daniel Shuy Date: Wed, 26 Oct 2022 02:14:36 +0800 Subject: [PATCH 285/356] Share demo/sandbox status command logic (#364) Signed-off-by: Daniel Shuy Signed-off-by: Daniel Shuy --- flytectl/cmd/demo/status.go | 19 +++------------ flytectl/cmd/sandbox/status.go | 19 +++------------ flytectl/pkg/sandbox/status.go | 22 +++++++++++++++++ flytectl/pkg/sandbox/status_test.go | 37 +++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 32 deletions(-) create mode 100644 flytectl/pkg/sandbox/status.go create mode 100644 flytectl/pkg/sandbox/status_test.go diff --git a/flytectl/cmd/demo/status.go b/flytectl/cmd/demo/status.go index 942b561d8c..7b34bed7e5 100644 --- a/flytectl/cmd/demo/status.go +++ b/flytectl/cmd/demo/status.go @@ -2,9 +2,9 @@ package demo import ( "context" - "fmt" - "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/sandbox" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" ) @@ -28,18 +28,5 @@ func demoClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.Comman return err } - return printStatus(ctx, cli) -} - -func printStatus(ctx context.Context, cli docker.Docker) error { - c, err := docker.GetSandbox(ctx, cli) - if err != nil { - return err - } - if c == nil { - fmt.Printf("%v no demo cluster found \n", emoji.StopSign) - return nil - } - fmt.Printf("Flyte demo cluster container image [%s] with status [%s] is in state [%s]", c.Image, c.Status, c.State) - return nil + return sandbox.PrintStatus(ctx, cli) } diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index 30160ef7e8..69476a4301 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -2,9 +2,9 @@ package sandbox import ( "context" - "fmt" - "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/sandbox" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" ) @@ -28,18 +28,5 @@ func sandboxClusterStatus(ctx context.Context, args []string, cmdCtx cmdCore.Com return err } - return printStatus(ctx, cli) -} - -func printStatus(ctx context.Context, cli docker.Docker) error { - c, err := docker.GetSandbox(ctx, cli) - if err != nil { - return err - } - if c == nil { - fmt.Printf("%v no Sandbox found \n", emoji.StopSign) - return nil - } - fmt.Printf("Flyte local sandbox cluster container image [%s] with status [%s] is in state [%s]", c.Image, c.Status, c.State) - return nil + return sandbox.PrintStatus(ctx, cli) } diff --git a/flytectl/pkg/sandbox/status.go b/flytectl/pkg/sandbox/status.go new file mode 100644 index 0000000000..dc965ab138 --- /dev/null +++ b/flytectl/pkg/sandbox/status.go @@ -0,0 +1,22 @@ +package sandbox + +import ( + "context" + "fmt" + + "github.com/enescakir/emoji" + "github.com/flyteorg/flytectl/pkg/docker" +) + +func PrintStatus(ctx context.Context, cli docker.Docker) error { + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } + if c == nil { + fmt.Printf("%v no Sandbox found \n", emoji.StopSign) + return nil + } + fmt.Printf("Flyte local sandbox container image [%s] with status [%s] is in state [%s]", c.Image, c.Status, c.State) + return nil +} diff --git a/flytectl/pkg/sandbox/status_test.go b/flytectl/pkg/sandbox/status_test.go new file mode 100644 index 0000000000..9d3e847b70 --- /dev/null +++ b/flytectl/pkg/sandbox/status_test.go @@ -0,0 +1,37 @@ +package sandbox + +import ( + "testing" + + "github.com/flyteorg/flytectl/cmd/testutils" + + "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/assert" +) + +func TestSandboxStatus(t *testing.T) { + t.Run("Sandbox status with zero result", func(t *testing.T) { + mockDocker := &mocks.Docker{} + s := testutils.Setup() + mockDocker.OnContainerList(s.Ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) + err := PrintStatus(s.Ctx, mockDocker) + assert.Nil(t, err) + }) + t.Run("Sandbox status with running sandbox", func(t *testing.T) { + s := testutils.Setup() + ctx := s.Ctx + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + err := PrintStatus(ctx, mockDocker) + assert.Nil(t, err) + }) +} From 35e67f6a9ca32b06d130d4ba6193a90dcb0bcff8 Mon Sep 17 00:00:00 2001 From: Daniel Shuy Date: Wed, 26 Oct 2022 15:09:56 +0800 Subject: [PATCH 286/356] Check kubeConfig before starting sandbox (#363) Signed-off-by: Daniel Shuy Signed-off-by: Daniel Shuy --- flytectl/pkg/k8s/k8s.go | 9 +++++++- flytectl/pkg/k8s/mocks/context_ops.go | 32 +++++++++++++++++++++++++++ flytectl/pkg/sandbox/start.go | 11 ++++++--- flytectl/pkg/sandbox/start_test.go | 1 + 4 files changed, 49 insertions(+), 4 deletions(-) diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index 6f9ca3e07d..1a34a93bca 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -17,6 +17,7 @@ type K8s interface { //go:generate mockery -name=ContextOps -case=underscore type ContextOps interface { + CheckConfig() error CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error RemoveContext(ctxName string) error } @@ -56,9 +57,15 @@ func GetK8sClient(cfg, master string) (K8s, error) { return Client, nil } +// CheckConfig checks if the kubeConfig pointed to by configAccess exists +func (k *ContextManager) CheckConfig() error { + _, err := k.configAccess.GetStartingConfig() + return err +} + // CopyKubeContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess. func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error { - _, err := k.configAccess.GetStartingConfig() + err := k.CheckConfig() if err != nil { return err } diff --git a/flytectl/pkg/k8s/mocks/context_ops.go b/flytectl/pkg/k8s/mocks/context_ops.go index 0d9e82dd38..6229f02b45 100644 --- a/flytectl/pkg/k8s/mocks/context_ops.go +++ b/flytectl/pkg/k8s/mocks/context_ops.go @@ -13,6 +13,38 @@ type ContextOps struct { mock.Mock } +type ContextOps_CheckConfig struct { + *mock.Call +} + +func (_m ContextOps_CheckConfig) Return(_a0 error) *ContextOps_CheckConfig { + return &ContextOps_CheckConfig{Call: _m.Call.Return(_a0)} +} + +func (_m *ContextOps) OnCheckConfig() *ContextOps_CheckConfig { + c_call := _m.On("CheckConfig") + return &ContextOps_CheckConfig{Call: c_call} +} + +func (_m *ContextOps) OnCheckConfigMatch(matchers ...interface{}) *ContextOps_CheckConfig { + c_call := _m.On("CheckConfig", matchers...) + return &ContextOps_CheckConfig{Call: c_call} +} + +// CheckConfig provides a mock function with given fields: +func (_m *ContextOps) CheckConfig() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + type ContextOps_CopyContext struct { *mock.Call } diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index bbcc7f719b..9260c7f32c 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -140,12 +140,11 @@ func MountVolume(file, destination string) (*mount.Mount, error) { return nil, nil } -func UpdateLocalKubeContext(dockerCtx string, contextName string) error { +func UpdateLocalKubeContext(k8sCtxMgr k8s.ContextOps, dockerCtx string, contextName string) error { srcConfigAccess := &clientcmd.PathOptions{ GlobalFile: docker.Kubeconfig, LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), } - k8sCtxMgr := k8s.NewK8sContextManager() return k8sCtxMgr.CopyContext(srcConfigAccess, dockerCtx, contextName) } @@ -240,6 +239,12 @@ func primeFlytekitPod(ctx context.Context, podService corev1.PodInterface) { } func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, primePod bool, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { + k8sCtxMgr := k8s.NewK8sContextManager() + err := k8sCtxMgr.CheckConfig() + if err != nil { + return err + } + cli, err := docker.GetDockerClient() if err != nil { return err @@ -267,7 +272,7 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC if err != nil { return err } - if err = UpdateLocalKubeContext(sandboxDockerContext, sandboxContextName); err != nil { + if err = UpdateLocalKubeContext(k8sCtxMgr, sandboxDockerContext, sandboxContextName); err != nil { return err } diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index f4d46b2321..c3b22c6be4 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -310,6 +310,7 @@ func TestStartFunc(t *testing.T) { sandboxCmdConfig.DefaultConfig.Version = "" k8s.ContextMgr = mockK8sContextMgr ghutil.Client = githubMock + mockK8sContextMgr.OnCheckConfig().Return(nil) mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) err = StartSandboxCluster(context.Background(), []string{}, config) assert.Nil(t, err) From 26d976d92ec5e0166369de6ba551f9012efe4965 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Fri, 4 Nov 2022 11:10:22 +0530 Subject: [PATCH 287/356] Add default input default behavior check for scheduler workflow registration (#368) --- flytectl/cmd/register/register_util.go | 4 +- flytectl/cmd/register/register_util_test.go | 79 ++++++++++++++++++++- 2 files changed, 80 insertions(+), 3 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 922ff211da..0f646c89b5 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -328,8 +328,8 @@ func validateLPWithSchedule(lpSpec *admin.LaunchPlanSpec, wf *admin.Workflow) er var scheduleParamsWithValues []string // Check for default values if lpSpec.DefaultInputs != nil { - for paramName := range lpSpec.DefaultInputs.Parameters { - if paramName != schedule.KickoffTimeInputArg { + for paramName, paramValue := range lpSpec.DefaultInputs.Parameters { + if paramName != schedule.KickoffTimeInputArg && paramValue.GetDefault() != nil { scheduleParamsWithValues = append(scheduleParamsWithValues, paramName) } } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 7be93359c0..6e31565cec 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -755,7 +755,7 @@ func TestValidateLaunchSpec(t *testing.T) { assert.NotNil(t, err) assert.Contains(t, err.Error(), "param values are missing on scheduled workflow for the following params") }) - t.Run("launchplan spec non empty schedule required param success", func(t *testing.T) { + t.Run("launchplan spec non empty schedule default param success", func(t *testing.T) { s := setup() registerFilesSetup() variableMap := map[string]*core.Variable{ @@ -820,6 +820,21 @@ func TestValidateLaunchSpec(t *testing.T) { Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}, }, }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + }, + }, + }, }, }, }, @@ -844,4 +859,66 @@ func TestValidateLaunchSpec(t *testing.T) { err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) assert.Nil(t, err) }) + + t.Run("launchplan spec non empty schedule required param without value fail", func(t *testing.T) { + s := setup() + registerFilesSetup() + variableMap := map[string]*core.Variable{ + "var1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_CollectionType{ + CollectionType: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + Description: "var1", + }, + } + wf := &admin.Workflow{ + Closure: &admin.WorkflowClosure{ + CompiledWorkflow: &core.CompiledWorkflowClosure{ + Primary: &core.CompiledWorkflow{ + Template: &core.WorkflowTemplate{ + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: variableMap, + }, + }, + }, + }, + }, + }, + } + s.FetcherExt.OnFetchWorkflowVersionMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(wf, nil) + lpSpec := &admin.LaunchPlanSpec{ + WorkflowId: &core.Identifier{ + Project: "projectValue", + Domain: "domainValue", + Name: "workflowNameValue", + Version: "workflowVersionValue", + }, + EntityMetadata: &admin.LaunchPlanMetadata{ + Schedule: &admin.Schedule{ + KickoffTimeInputArg: "kick_off_time_arg", + }, + }, + DefaultInputs: &core.ParameterMap{ + Parameters: map[string]*core.Parameter{ + "var1": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_INTEGER}, + }, + }, + }, + }, + }, + } + err := validateLaunchSpec(ctx, lpSpec, s.CmdCtx) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("param values are missing on scheduled workflow for the following params [var1]. Either specify them having a default or fixed value"), err) + }) } From fc3c99e0fd8732b63fd1e311f4ece147ac7fd00b Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Mon, 7 Nov 2022 23:27:42 +0530 Subject: [PATCH 288/356] Added dryRun flag for printing docker command for demo and sandbox (#367) * Added printCommand flag for printing docker command for demo and sandbox Signed-off-by: pmahindrakar-oss * test fixes Signed-off-by: pmahindrakar-oss * Added pull image command aswell Signed-off-by: pmahindrakar-oss * using dryRun Signed-off-by: pmahindrakar-oss * flytectl config export Signed-off-by: pmahindrakar-oss Signed-off-by: pmahindrakar-oss --- .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 14 +++++ .../subcommand/sandbox/sandbox_config.go | 3 +- flytectl/cmd/demo/start.go | 6 ++ flytectl/cmd/sandbox/sandbox.go | 6 ++ flytectl/pkg/docker/docker_util.go | 62 +++++++++++++++++-- flytectl/pkg/docker/docker_util_test.go | 16 ++--- flytectl/pkg/sandbox/start.go | 40 ++++++------ flytectl/pkg/util/util.go | 27 +++++--- flytectl/pkg/util/util_test.go | 2 +- 10 files changed, 136 insertions(+), 41 deletions(-) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index eaa7c88091..e9fbd5a60e 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -59,5 +59,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.RegistryAuth, fmt.Sprintf("%v%v", prefix, "imagePullOptions.registryAuth"), DefaultConfig.ImagePullOptions.RegistryAuth, "The base64 encoded credentials for the registry.") cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.Platform, fmt.Sprintf("%v%v", prefix, "imagePullOptions.platform"), DefaultConfig.ImagePullOptions.Platform, "Forces a specific platform's image to be pulled.'") cmdFlags.BoolVar(&DefaultConfig.Dev, fmt.Sprintf("%v%v", prefix, "dev"), DefaultConfig.Dev, "Optional. Only start minio and postgres in the sandbox.") + cmdFlags.BoolVar(&DefaultConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultConfig.DryRun, "Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use'") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 39dc790cfe..0d7021b76d 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -223,4 +223,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_dryRun", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("dryRun", testValue) + if vBool, err := cmdFlags.GetBool("dryRun"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.DryRun) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index c2d37c6407..463f751ecc 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -29,7 +29,8 @@ type Config struct { ImagePullOptions docker.ImagePullOptions `json:"imagePullOptions" pflag:",Optional. Defines image pull options (e.g. auth)"` // It's used for development. Users are able to start flyte locally via single binary and save the data to the minio or postgres in the sandbox. - Dev bool `json:"dev" pflag:",Optional. Only start minio and postgres in the sandbox."` + Dev bool `json:"dev" pflag:",Optional. Only start minio and postgres in the sandbox."` + DryRun bool `json:"dryRun" pflag:",Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use'"` } //go:generate pflags Config --default-var DefaultConfig --bind-default-var diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index 1300496a2a..a800ed1795 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -75,6 +75,12 @@ eg : for passing multiple environment variables flytectl demo start --env USER=foo --env PASSWORD=bar +For just printing the docker commands for bringingup the demo container +:: + + flytectl demo start --dryRun + + Usage ` ) diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index 2e342c41e4..0e20df4312 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -32,6 +32,12 @@ To execute commands inside the sandbox container, use exec: :: flytectl sandbox exec -- pwd + +For just printing the docker commands for bringingup the demo container +:: + + flytectl demo start --dryRun + ` ) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 404db17fbc..a3ae226bc8 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -138,8 +138,12 @@ func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, erro // PullDockerImage will Pull docker image func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy ImagePullPolicy, - imagePullOptions ImagePullOptions) error { - + imagePullOptions ImagePullOptions, dryRun bool) error { + if dryRun { + PrintPullImage(image, imagePullOptions) + return nil + } + fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, image) if pullPolicy == ImagePullPolicyAlways || pullPolicy == ImagePullPolicyIfNotPresent { if pullPolicy == ImagePullPolicyIfNotPresent { imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) @@ -169,11 +173,61 @@ func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy I return nil } -//StartContainer will create and start docker container +// PrintPullImage helper function to print the sandbox pull image command +func PrintPullImage(image string, pullOptions ImagePullOptions) { + fmt.Printf("%v Run the following command to pull the sandbox image from registry.\n", emoji.Sparkle) + var sb strings.Builder + sb.WriteString("docker pull ") + if len(pullOptions.Platform) > 0 { + sb.WriteString(fmt.Sprintf("--platform %v ", pullOptions.Platform)) + } + sb.WriteString(fmt.Sprintf("%v", image)) + fmt.Printf(" %v \n", sb.String()) +} + +// PrintRemoveContainer helper function to remove sandbox container +func PrintRemoveContainer(name string) { + fmt.Printf("%v Run the following command to remove the existing sandbox\n", emoji.Sparkle) + fmt.Printf(" docker container rm %v --force\n", name) +} + +// PrintCreateContainer helper function to print the docker command to run +func PrintCreateContainer(volumes []mount.Mount, portBindings map[nat.Port][]nat.PortBinding, name, image string, environment []string) { + var sb strings.Builder + fmt.Printf("%v Run the following command to create new sandbox container\n", emoji.Sparkle) + sb.WriteString(" docker create --privileged ") + for portProto, bindings := range portBindings { + srcPort := portProto.Port() + for _, binding := range bindings { + sb.WriteString(fmt.Sprintf("-p %v:%v:%v ", binding.HostIP, srcPort, binding.HostPort)) + } + } + for _, env := range environment { + sb.WriteString(fmt.Sprintf("--env %v ", env)) + } + + for _, volume := range volumes { + sb.WriteString(fmt.Sprintf("--mount type=%v,source=%v,target=%v ", volume.Type, volume.Source, volume.Target)) + } + sb.WriteString(fmt.Sprintf("--name %v ", name)) + sb.WriteString(fmt.Sprintf("%v", image)) + fmt.Printf("%v\n", sb.String()) + fmt.Printf("%v Run the following command to start the sandbox container\n", emoji.Sparkle) + fmt.Printf(" docker start %v\n", name) + fmt.Printf("%v Run the following command to check the logs and monitor the sandbox container and make sure there are no error during startup and then visit flyteconsole\n", emoji.EightSpokedAsterisk) + fmt.Printf(" docker logs -f %v\n", name) +} + +// StartContainer will create and start docker container func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, exposedPorts map[nat.Port]struct{}, - portBindings map[nat.Port][]nat.PortBinding, name, image string, additionalEnvVars []string) (string, error) { + portBindings map[nat.Port][]nat.PortBinding, name, image string, additionalEnvVars []string, dryRun bool) (string, error) { // Append the additional env variables to the default list of env Environment = append(Environment, additionalEnvVars...) + if dryRun { + PrintCreateContainer(volumes, portBindings, name, image, Environment) + return "", nil + } + fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) resp, err := cli.ContainerCreate(ctx, &container.Config{ Env: Environment, Image: image, diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 8524443641..7b33be9425 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -104,7 +104,7 @@ func TestPullDockerImage(t *testing.T) { ctx := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}, false) assert.Nil(t, err) }) @@ -114,7 +114,7 @@ func TestPullDockerImage(t *testing.T) { ctx := context.Background() // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}, false) assert.NotNil(t, err) }) @@ -125,7 +125,7 @@ func TestPullDockerImage(t *testing.T) { // Verify the attributes mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) - err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyIfNotPresent, ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyIfNotPresent, ImagePullOptions{}, false) assert.Nil(t, err) }) @@ -133,7 +133,7 @@ func TestPullDockerImage(t *testing.T) { setupSandbox() mockDocker := &mocks.Docker{} ctx := context.Background() - err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyNever, ImagePullOptions{}) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyNever, ImagePullOptions{}, false) assert.Nil(t, err) }) } @@ -160,7 +160,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil, false) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") @@ -189,7 +189,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, additionalEnv) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, additionalEnv, false) assert.Nil(t, err) assert.Greater(t, len(id), 0) assert.Equal(t, id, "Hello") @@ -215,7 +215,7 @@ func TestStartContainer(t *testing.T) { ID: "", }, fmt.Errorf("error")) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil, false) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") @@ -240,7 +240,7 @@ func TestStartContainer(t *testing.T) { ID: "Hello", }, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("error")) - id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil) + id, err := StartContainer(ctx, mockDocker, Volumes, p1, p2, "nginx", imageName, nil, false) assert.NotNil(t, err) assert.Equal(t, len(id), 0) assert.Equal(t, id, "") diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 9260c7f32c..3a53923ca1 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -150,16 +150,18 @@ func UpdateLocalKubeContext(k8sCtxMgr k8s.ContextOps, dockerCtx string, contextN func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader, sandboxConfig *sandboxCmdConfig.Config, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) (*bufio.Scanner, error) { fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) - - if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { - if err.Error() != clierrors.ErrSandboxExists { - return nil, err + if sandboxConfig.DryRun { + docker.PrintRemoveContainer(docker.FlyteSandboxClusterName) + } else { + if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { + if err.Error() != clierrors.ErrSandboxExists { + return nil, err + } + fmt.Printf("Existing details of your sandbox") + util.PrintSandboxMessage(consolePort, sandboxConfig.DryRun) + return nil, nil } - fmt.Printf("Existing details of your sandbox") - util.PrintSandboxMessage(consolePort) - return nil, nil } - if err := util.SetupFlyteDir(); err != nil { return nil, err } @@ -186,11 +188,9 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService return nil, err } sandboxImage = image - fmt.Printf("%s Fully Qualified image\n", image) - fmt.Printf("%v Running Flyte %s release\n", emoji.Whale, version) + fmt.Printf("%v Going to use Flyte %s release with image %s \n", emoji.Whale, version, image) } - fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, sandboxImage) - if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.ImagePullPolicy, sandboxConfig.ImagePullOptions); err != nil { + if err := docker.PullDockerImage(ctx, cli, sandboxImage, sandboxConfig.ImagePullPolicy, sandboxConfig.ImagePullOptions, sandboxConfig.DryRun); err != nil { return nil, err } sandboxEnv := sandboxConfig.Env @@ -198,18 +198,20 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService sandboxEnv = append(sandboxEnv, "FLYTE_DEV=True") } - fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, - sandboxImage, sandboxEnv) + sandboxImage, sandboxEnv, sandboxConfig.DryRun) if err != nil { fmt.Printf("%v Something went wrong: Failed to start Sandbox container %v, Please check your docker client and try again. \n", emoji.GrimacingFace, emoji.Whale) return nil, err } - logReader, err := docker.ReadLogs(ctx, cli, ID) - if err != nil { - return nil, err + var logReader *bufio.Scanner + if !sandboxConfig.DryRun { + logReader, err = docker.ReadLogs(ctx, cli, ID) + if err != nil { + return nil, err + } } return logReader, nil @@ -301,7 +303,7 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox if err != nil { return err } - util.PrintSandboxMessage(util.DemoConsolePort) + util.PrintSandboxMessage(util.DemoConsolePort, sandboxConfig.DryRun) return nil } @@ -316,6 +318,6 @@ func StartSandboxCluster(ctx context.Context, args []string, sandboxConfig *sand if err != nil { return err } - util.PrintSandboxMessage(util.SandBoxConsolePort) + util.PrintSandboxMessage(util.SandBoxConsolePort, sandboxConfig.DryRun) return nil } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 5fc54438ec..afdb35967b 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -17,9 +17,10 @@ import ( ) const ( - ProgressSuccessMessage = "Flyte is ready! Flyte UI is available at" - SandBoxConsolePort = 30081 - DemoConsolePort = 30080 + ProgressSuccessMessage = "Flyte is ready! Flyte UI is available at" + ProgressSuccessMessagePending = "Flyte would be ready after this! Flyte UI would be available at" + SandBoxConsolePort = 30081 + DemoConsolePort = 30080 ) var Ext string @@ -52,17 +53,27 @@ func SetupFlyteDir() error { } // PrintSandboxMessage will print sandbox success message -func PrintSandboxMessage(flyteConsolePort int) { +func PrintSandboxMessage(flyteConsolePort int, dryRun bool) { kubeconfig := strings.Join([]string{ "$KUBECONFIG", f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), docker.Kubeconfig, }, ":") - successMsg := fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) + + var successMsg string + if dryRun { + successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) + } else { + successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) + + } fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) - fmt.Printf("Add KUBECONFIG and FLYTECTL_CONFIG to your environment variable \n") - fmt.Printf("export KUBECONFIG=%v \n", kubeconfig) - fmt.Printf("export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) + fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) + fmt.Printf(" export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) + if dryRun { + fmt.Printf("%v Run the following command to export kubeconfig variables for accessing flyte pods locally\n", emoji.Sparkle) + fmt.Printf(" export KUBECONFIG=%v \n", kubeconfig) + } } // SendRequest will create request and return the response diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 718a244d9c..9bbb89964f 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -25,7 +25,7 @@ func TestSetupFlyteDir(t *testing.T) { func TestPrintSandboxMessage(t *testing.T) { t.Run("Print Sandbox Message", func(t *testing.T) { - PrintSandboxMessage(SandBoxConsolePort) + PrintSandboxMessage(SandBoxConsolePort, false) }) } From 3749e3f8fff588ecd8856e6566f3d8dec5066c3f Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Tue, 8 Nov 2022 22:22:31 +0530 Subject: [PATCH 289/356] Adding changes for project level matchable attr api (#357) * Adding changes for project level matchable attr api Signed-off-by: pmahindrakar-oss * Added test for project attribute Signed-off-by: pmahindrakar-oss Signed-off-by: pmahindrakar-oss --- .../cmd/delete/matchable_attribute_util.go | 17 ++++++-- flytectl/cmd/get/get.go | 2 +- flytectl/cmd/get/matchable_attribute_util.go | 21 +++++++--- .../cmd/update/matchable_attribute_util.go | 17 ++++++-- .../pkg/ext/attribute_match_deleter_test.go | 14 +++++++ flytectl/pkg/ext/attribute_match_fetcher.go | 16 ++++++++ .../pkg/ext/attribute_match_fetcher_test.go | 17 ++++++++ flytectl/pkg/ext/attribute_match_updater.go | 11 +++++ .../pkg/ext/attribute_match_updater_test.go | 17 ++++++++ flytectl/pkg/ext/attribute_matcher_deleter.go | 8 ++++ flytectl/pkg/ext/deleter.go | 3 ++ flytectl/pkg/ext/fetcher.go | 3 ++ .../ext/mocks/admin_deleter_ext_interface.go | 32 +++++++++++++++ .../ext/mocks/admin_fetcher_ext_interface.go | 41 +++++++++++++++++++ .../ext/mocks/admin_updater_ext_interface.go | 32 +++++++++++++++ flytectl/pkg/ext/updater.go | 3 ++ 16 files changed, 239 insertions(+), 15 deletions(-) diff --git a/flytectl/cmd/delete/matchable_attribute_util.go b/flytectl/cmd/delete/matchable_attribute_util.go index b2482270e8..020a60968d 100644 --- a/flytectl/cmd/delete/matchable_attribute_util.go +++ b/flytectl/cmd/delete/matchable_attribute_util.go @@ -26,12 +26,21 @@ func deleteMatchableAttr(ctx context.Context, project, domain, workflowName stri if dryRun { fmt.Print("skipping DeleteProjectDomainAttributes request (dryRun)\n") } else { - err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) - if err != nil { - return err + if len(domain) == 0 { + err := deleter.DeleteProjectAttributes(ctx, project, rsType) + if err != nil { + return err + } + fmt.Printf("Deleted matchable resources from %v project \n", project) + } else { + err := deleter.DeleteProjectDomainAttributes(ctx, project, domain, rsType) + if err != nil { + return err + } + fmt.Printf("Deleted matchable resources from %v project and domain %v\n", project, domain) } } - fmt.Printf("Deleted matchable resources from %v project and domain %v\n", project, domain) + } return nil } diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 2e0792166d..7c1b5ea164 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -65,7 +65,7 @@ func CreateGetCommand() *cobra.Command { Long: pluginOverrideLong, PFlagProvider: pluginoverride.DefaultFetchConfig}, "workflow-execution-config": {CmdFunc: getWorkflowExecutionConfigFunc, Aliases: []string{"workflow-execution-config"}, Short: workflowExecutionConfigShort, - Long: workflowExecutionConfigLong, PFlagProvider: workflowexecutionconfig.DefaultFetchConfig}, + Long: workflowExecutionConfigLong, PFlagProvider: workflowexecutionconfig.DefaultFetchConfig, ProjectDomainNotRequired: true}, } cmdcore.AddCommands(getCmd, getResourcesFuncs) diff --git a/flytectl/cmd/get/matchable_attribute_util.go b/flytectl/cmd/get/matchable_attribute_util.go index cddfdab348..0a6358bf39 100644 --- a/flytectl/cmd/get/matchable_attribute_util.go +++ b/flytectl/cmd/get/matchable_attribute_util.go @@ -20,13 +20,22 @@ func FetchAndUnDecorateMatchableAttr(ctx context.Context, project, domain, workf // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. unDecorator.UnDecorate(workflowAttr.GetAttributes().GetMatchingAttributes()) } else { - // Fetch the project domain attribute from the admin - projectDomainAttr, err := fetcher.FetchProjectDomainAttributes(ctx, project, domain, rsType) - if err != nil { - return err + if len(domain) == 0 { + projectAttr, err := fetcher.FetchProjectAttributes(ctx, project, rsType) + if err != nil { + return err + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + unDecorator.UnDecorate(projectAttr.GetAttributes().GetMatchingAttributes()) + } else { + // Fetch the project domain attribute from the admin + projectDomainAttr, err := fetcher.FetchProjectDomainAttributes(ctx, project, domain, rsType) + if err != nil { + return err + } + // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. + unDecorator.UnDecorate(projectDomainAttr.GetAttributes().GetMatchingAttributes()) } - // Update the shadow config with the fetched taskResourceAttribute which can then be written to a file which can then be called for an update. - unDecorator.UnDecorate(projectDomainAttr.GetAttributes().GetMatchingAttributes()) } return nil } diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go index e3f4a2d296..23efa16912 100644 --- a/flytectl/cmd/update/matchable_attribute_util.go +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -27,12 +27,21 @@ func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workfl if dryRun { fmt.Printf("skipping UpdateProjectDomainAttributes request (dryRun)\n") } else { - err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) - if err != nil { - return err + if len(domain) == 0 { + err := updater.UpdateProjectAttributes(ctx, project, matchingAttr) + if err != nil { + return err + } + fmt.Printf("Updated attributes from %v project\n", project) + } else { + err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) + if err != nil { + return err + } + fmt.Printf("Updated attributes from %v project and domain %v\n", project, domain) } } - fmt.Printf("Updated attributes from %v project and domain %v\n", project, domain) + } return nil } diff --git a/flytectl/pkg/ext/attribute_match_deleter_test.go b/flytectl/pkg/ext/attribute_match_deleter_test.go index 9c8c665b08..c0105f99ce 100644 --- a/flytectl/pkg/ext/attribute_match_deleter_test.go +++ b/flytectl/pkg/ext/attribute_match_deleter_test.go @@ -47,3 +47,17 @@ func TestDeleteProjectDomainAttributesError(t *testing.T) { err := adminDeleterExt.DeleteProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) assert.Equal(t, fmt.Errorf("failed"), err) } + +func TestDeleteProjectAttributes(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteProjectAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminDeleterExt.DeleteProjectAttributes(ctx, "dummyProject", admin.MatchableResource_TASK_RESOURCE) + assert.Nil(t, err) +} + +func TestDeleteProjectAttributesError(t *testing.T) { + deleteAttributeMatchFetcherSetup() + adminClient.OnDeleteProjectAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminDeleterExt.DeleteProjectAttributes(ctx, "dummyProject", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index 0af146e8e1..3e33609b3b 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -40,3 +40,19 @@ func (a *AdminFetcherExtClient) FetchProjectDomainAttributes(ctx context.Context } return projectDomainAttr, nil } + +func (a *AdminFetcherExtClient) FetchProjectAttributes(ctx context.Context, project string, + rsType admin.MatchableResource) (*admin.ProjectAttributesGetResponse, error) { + projectDomainAttr, err := a.AdminServiceClient().GetProjectAttributes(ctx, + &admin.ProjectAttributesGetRequest{ + Project: project, + ResourceType: rsType, + }) + if err != nil { + return nil, err + } + if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { + return nil, fmt.Errorf("attribute doesn't exist") + } + return projectDomainAttr, nil +} diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index ea7f29929a..81352d6bc2 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -79,3 +79,20 @@ func TestFetchProjectDomainAttributesError(t *testing.T) { assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) }) } + +func TestFetchProjectAttributesError(t *testing.T) { + t.Run("failed api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + adminClient.OnGetProjectAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + _, err := adminFetcherExt.FetchProjectAttributes(ctx, "dummyProject", admin.MatchableResource_TASK_RESOURCE) + assert.Equal(t, fmt.Errorf("failed"), err) + }) + t.Run("empty data from api", func(t *testing.T) { + getAttributeMatchFetcherSetup() + pResp := &admin.ProjectAttributesGetResponse{} + adminClient.OnGetProjectAttributesMatch(mock.Anything, mock.Anything).Return(pResp, nil) + _, err := adminFetcherExt.FetchProjectAttributes(ctx, "dummyProject", admin.MatchableResource_TASK_RESOURCE) + assert.NotNil(t, err) + assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + }) +} diff --git a/flytectl/pkg/ext/attribute_match_updater.go b/flytectl/pkg/ext/attribute_match_updater.go index d06e22155e..44d00c394c 100644 --- a/flytectl/pkg/ext/attribute_match_updater.go +++ b/flytectl/pkg/ext/attribute_match_updater.go @@ -29,3 +29,14 @@ func (a *AdminUpdaterExtClient) UpdateProjectDomainAttributes(ctx context.Contex }) return err } + +func (a *AdminUpdaterExtClient) UpdateProjectAttributes(ctx context.Context, project string, matchingAttr *admin.MatchingAttributes) error { + _, err := a.AdminServiceClient().UpdateProjectAttributes(ctx, + &admin.ProjectAttributesUpdateRequest{ + Attributes: &admin.ProjectAttributes{ + Project: project, + MatchingAttributes: matchingAttr, + }, + }) + return err +} diff --git a/flytectl/pkg/ext/attribute_match_updater_test.go b/flytectl/pkg/ext/attribute_match_updater_test.go index f57d86a369..0c331c9ef5 100644 --- a/flytectl/pkg/ext/attribute_match_updater_test.go +++ b/flytectl/pkg/ext/attribute_match_updater_test.go @@ -53,3 +53,20 @@ func TestUpdateProjectDomainAttributesError(t *testing.T) { err := adminUpdaterExt.UpdateProjectDomainAttributes(ctx, "dummyProject", "domainValue", nil) assert.Equal(t, fmt.Errorf("failed"), err) } + +func TestUpdateProjectAttributes(t *testing.T) { + updateAttributeMatchFetcherSetup() + matchingAttr := &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{}, + } + adminClient.OnUpdateProjectAttributesMatch(mock.Anything, mock.Anything).Return(nil, nil) + err := adminUpdaterExt.UpdateProjectAttributes(ctx, "dummyProject", matchingAttr) + assert.Nil(t, err) +} + +func TestUpdateProjectAttributesError(t *testing.T) { + updateAttributeMatchFetcherSetup() + adminClient.OnUpdateProjectAttributesMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed")) + err := adminUpdaterExt.UpdateProjectAttributes(ctx, "dummyProject", nil) + assert.Equal(t, fmt.Errorf("failed"), err) +} diff --git a/flytectl/pkg/ext/attribute_matcher_deleter.go b/flytectl/pkg/ext/attribute_matcher_deleter.go index b7fdaec9b2..ef8a5730fb 100644 --- a/flytectl/pkg/ext/attribute_matcher_deleter.go +++ b/flytectl/pkg/ext/attribute_matcher_deleter.go @@ -24,3 +24,11 @@ func (a *AdminDeleterExtClient) DeleteProjectDomainAttributes(ctx context.Contex }) return err } + +func (a *AdminDeleterExtClient) DeleteProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) error { + _, err := a.AdminServiceClient().DeleteProjectAttributes(ctx, &admin.ProjectAttributesDeleteRequest{ + Project: project, + ResourceType: rsType, + }) + return err +} diff --git a/flytectl/pkg/ext/deleter.go b/flytectl/pkg/ext/deleter.go index 03827d1079..db5d97a748 100644 --- a/flytectl/pkg/ext/deleter.go +++ b/flytectl/pkg/ext/deleter.go @@ -18,6 +18,9 @@ type AdminDeleterExtInterface interface { // DeleteProjectDomainAttributes deletes project domain attributes for a particular matchable resource DeleteProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) error + + // DeleteProjectAttributes deletes project attributes for a particular matchable resource + DeleteProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) error } // AdminDeleterExtClient is used for interacting with extended features used for deleting/archiving data in admin service diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 2c40e388f6..b706bf8a53 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -67,6 +67,9 @@ type AdminFetcherExtInterface interface { // FetchProjectDomainAttributes fetches project domain attributes particular resource type in a project, domain FetchProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) + // FetchProjectAttributes fetches project attributes particular resource type in a project + FetchProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) (*admin.ProjectAttributesGetResponse, error) + // ListProjects fetches all projects ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) } diff --git a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go index 1456f4e3bf..414cd17f54 100644 --- a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go @@ -51,6 +51,38 @@ func (_m *AdminDeleterExtInterface) AdminServiceClient() service.AdminServiceCli return r0 } +type AdminDeleterExtInterface_DeleteProjectAttributes struct { + *mock.Call +} + +func (_m AdminDeleterExtInterface_DeleteProjectAttributes) Return(_a0 error) *AdminDeleterExtInterface_DeleteProjectAttributes { + return &AdminDeleterExtInterface_DeleteProjectAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminDeleterExtInterface) OnDeleteProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) *AdminDeleterExtInterface_DeleteProjectAttributes { + c_call := _m.On("DeleteProjectAttributes", ctx, project, rsType) + return &AdminDeleterExtInterface_DeleteProjectAttributes{Call: c_call} +} + +func (_m *AdminDeleterExtInterface) OnDeleteProjectAttributesMatch(matchers ...interface{}) *AdminDeleterExtInterface_DeleteProjectAttributes { + c_call := _m.On("DeleteProjectAttributes", matchers...) + return &AdminDeleterExtInterface_DeleteProjectAttributes{Call: c_call} +} + +// DeleteProjectAttributes provides a mock function with given fields: ctx, project, rsType +func (_m *AdminDeleterExtInterface) DeleteProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) error { + ret := _m.Called(ctx, project, rsType) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, admin.MatchableResource) error); ok { + r0 = rf(ctx, project, rsType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type AdminDeleterExtInterface_DeleteProjectDomainAttributes struct { *mock.Call } diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index b1032f05b2..3162a6b278 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -422,6 +422,47 @@ func (_m *AdminFetcherExtInterface) FetchNodeExecutionDetails(ctx context.Contex return r0, r1 } +type AdminFetcherExtInterface_FetchProjectAttributes struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_FetchProjectAttributes) Return(_a0 *admin.ProjectAttributesGetResponse, _a1 error) *AdminFetcherExtInterface_FetchProjectAttributes { + return &AdminFetcherExtInterface_FetchProjectAttributes{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnFetchProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) *AdminFetcherExtInterface_FetchProjectAttributes { + c_call := _m.On("FetchProjectAttributes", ctx, project, rsType) + return &AdminFetcherExtInterface_FetchProjectAttributes{Call: c_call} +} + +func (_m *AdminFetcherExtInterface) OnFetchProjectAttributesMatch(matchers ...interface{}) *AdminFetcherExtInterface_FetchProjectAttributes { + c_call := _m.On("FetchProjectAttributes", matchers...) + return &AdminFetcherExtInterface_FetchProjectAttributes{Call: c_call} +} + +// FetchProjectAttributes provides a mock function with given fields: ctx, project, rsType +func (_m *AdminFetcherExtInterface) FetchProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) (*admin.ProjectAttributesGetResponse, error) { + ret := _m.Called(ctx, project, rsType) + + var r0 *admin.ProjectAttributesGetResponse + if rf, ok := ret.Get(0).(func(context.Context, string, admin.MatchableResource) *admin.ProjectAttributesGetResponse); ok { + r0 = rf(ctx, project, rsType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ProjectAttributesGetResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, admin.MatchableResource) error); ok { + r1 = rf(ctx, project, rsType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_FetchProjectDomainAttributes struct { *mock.Call } diff --git a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go index 93f8370556..a59d8ca748 100644 --- a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go @@ -51,6 +51,38 @@ func (_m *AdminUpdaterExtInterface) AdminServiceClient() service.AdminServiceCli return r0 } +type AdminUpdaterExtInterface_UpdateProjectAttributes struct { + *mock.Call +} + +func (_m AdminUpdaterExtInterface_UpdateProjectAttributes) Return(_a0 error) *AdminUpdaterExtInterface_UpdateProjectAttributes { + return &AdminUpdaterExtInterface_UpdateProjectAttributes{Call: _m.Call.Return(_a0)} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateProjectAttributes(ctx context.Context, project string, matchingAttr *admin.MatchingAttributes) *AdminUpdaterExtInterface_UpdateProjectAttributes { + c_call := _m.On("UpdateProjectAttributes", ctx, project, matchingAttr) + return &AdminUpdaterExtInterface_UpdateProjectAttributes{Call: c_call} +} + +func (_m *AdminUpdaterExtInterface) OnUpdateProjectAttributesMatch(matchers ...interface{}) *AdminUpdaterExtInterface_UpdateProjectAttributes { + c_call := _m.On("UpdateProjectAttributes", matchers...) + return &AdminUpdaterExtInterface_UpdateProjectAttributes{Call: c_call} +} + +// UpdateProjectAttributes provides a mock function with given fields: ctx, project, matchingAttr +func (_m *AdminUpdaterExtInterface) UpdateProjectAttributes(ctx context.Context, project string, matchingAttr *admin.MatchingAttributes) error { + ret := _m.Called(ctx, project, matchingAttr) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, *admin.MatchingAttributes) error); ok { + r0 = rf(ctx, project, matchingAttr) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type AdminUpdaterExtInterface_UpdateProjectDomainAttributes struct { *mock.Call } diff --git a/flytectl/pkg/ext/updater.go b/flytectl/pkg/ext/updater.go index ddf9f5841e..a87afd4ca0 100644 --- a/flytectl/pkg/ext/updater.go +++ b/flytectl/pkg/ext/updater.go @@ -18,6 +18,9 @@ type AdminUpdaterExtInterface interface { // UpdateProjectDomainAttributes updates project domain attributes for a particular matchable resource UpdateProjectDomainAttributes(ctx context.Context, project, domain string, matchingAttr *admin.MatchingAttributes) error + + // UpdateProjectAttributes updates project attributes for a particular matchable resource + UpdateProjectAttributes(ctx context.Context, project string, matchingAttr *admin.MatchingAttributes) error } // AdminUpdaterExtClient is used for interacting with extended features used for updating data in admin service From d330473e2f4b26055dcd9d86b1ef9727dafbbeb6 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 11 Nov 2022 00:01:32 +0800 Subject: [PATCH 290/356] Add extra host to start command (#369) * Add extra host to start command Signed-off-by: Kevin Su * Fix tests Signed-off-by: Kevin Su * Fix tests Signed-off-by: Kevin Su * Make generate Signed-off-by: Kevin Su * update Signed-off-by: Kevin Su Signed-off-by: Kevin Su --- flytectl/pkg/docker/docker_util.go | 2 ++ flytectl/pkg/docker/docker_util_test.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index a3ae226bc8..bca12b1953 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -47,6 +47,7 @@ var ( } StdWriterPrefixLen = 8 StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 + ExtraHosts = []string{"host.docker.internal:127.0.0.1"} ) // GetDockerClient will returns the docker client @@ -237,6 +238,7 @@ func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, expo Mounts: volumes, PortBindings: portBindings, Privileged: true, + ExtraHosts: ExtraHosts, // add it because linux machine doesn't have this host name by default }, nil, nil, name) diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 7b33be9425..de1d6b09d2 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -156,6 +156,7 @@ func TestStartContainer(t *testing.T) { Mounts: Volumes, PortBindings: p2, Privileged: true, + ExtraHosts: ExtraHosts, }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) @@ -185,6 +186,7 @@ func TestStartContainer(t *testing.T) { Mounts: Volumes, PortBindings: p2, Privileged: true, + ExtraHosts: ExtraHosts, }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) @@ -211,6 +213,7 @@ func TestStartContainer(t *testing.T) { Mounts: Volumes, PortBindings: p2, Privileged: true, + ExtraHosts: ExtraHosts, }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "", }, fmt.Errorf("error")) @@ -236,6 +239,7 @@ func TestStartContainer(t *testing.T) { Mounts: Volumes, PortBindings: p2, Privileged: true, + ExtraHosts: ExtraHosts, }, nil, nil, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) From ebe66f25450addb1dc427e407634f279d046bbfe Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Wed, 16 Nov 2022 10:12:05 -0800 Subject: [PATCH 291/356] New Demo image (#370) # TL;DR This will let flytectl demo use the new bundled sandbox image instead. See the issue for additional information. `flytectl demo start` * Brings up the new container * kubeconfig will now be published to `~/.flyte/state/kubeconfig` (but the context will still be copied to the user's main kubeconfig with "flyte-sandbox" as the context name). `flytectl demo reload` Kills the Flyte pod, allowing the new one to come up. Signed-off-by: Yee Hing Tong --- .../config/subcommand/sandbox/config_flags.go | 2 +- .../subcommand/sandbox/config_flags_test.go | 2 +- .../subcommand/sandbox/sandbox_config.go | 2 +- flytectl/cmd/demo/demo.go | 8 + flytectl/cmd/demo/demo_test.go | 24 +-- flytectl/cmd/demo/reload.go | 58 +++++++ flytectl/cmd/demo/reload_test.go | 51 ++++++ flytectl/cmd/demo/start.go | 13 +- flytectl/cmd/register/files.go | 2 +- flytectl/go.mod | 2 +- flytectl/pkg/docker/docker.go | 2 + flytectl/pkg/docker/docker_util.go | 59 +++++-- flytectl/pkg/docker/docker_util_test.go | 79 ++++++++++ flytectl/pkg/docker/mocks/docker.go | 87 +++++++++++ .../pkg/filesystemutils/file_system_utils.go | 48 ++++++ .../filesystemutils/file_system_utils_test.go | 112 ++++++++++++++ .../flile_system_utils_test.go | 42 ----- flytectl/pkg/k8s/k8s.go | 2 +- flytectl/pkg/sandbox/start.go | 146 +++++++++++++++--- flytectl/pkg/sandbox/start_test.go | 20 +-- flytectl/pkg/util/util.go | 55 ++++++- flytectl/pkg/util/util_test.go | 18 ++- 22 files changed, 726 insertions(+), 108 deletions(-) create mode 100644 flytectl/cmd/demo/reload.go create mode 100644 flytectl/cmd/demo/reload_test.go create mode 100644 flytectl/pkg/filesystemutils/file_system_utils_test.go delete mode 100644 flytectl/pkg/filesystemutils/flile_system_utils_test.go diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index e9fbd5a60e..7b025f541d 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -50,7 +50,7 @@ func (Config) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) - cmdFlags.StringVar(&DefaultConfig.Source, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.Source, "Path of your source code") + cmdFlags.StringVar(&DefaultConfig.DeprecatedSource, fmt.Sprintf("%v%v", prefix, "source"), DefaultConfig.DeprecatedSource, "deprecated, path of your source code, please build images with local daemon") cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") cmdFlags.BoolVar(&DefaultConfig.Prerelease, fmt.Sprintf("%v%v", prefix, "pre"), DefaultConfig.Prerelease, "Optional. Pre release Version of flyte will be used for sandbox.") diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 0d7021b76d..79f6e88f49 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -106,7 +106,7 @@ func TestConfig_SetFlags(t *testing.T) { cmdFlags.Set("source", testValue) if vString, err := cmdFlags.GetString("source"); err == nil { - testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.Source) + testDecodeJson_Config(t, fmt.Sprintf("%v", vString), &actual.DeprecatedSource) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 463f751ecc..1dfce6430f 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -4,7 +4,7 @@ import "github.com/flyteorg/flytectl/pkg/docker" // Config holds configuration flags for sandbox command. type Config struct { - Source string `json:"source" pflag:",Path of your source code"` + DeprecatedSource string `json:"source" pflag:",deprecated, path of your source code, please build images with local daemon"` // Flytectl sandbox only supports Flyte version available in Github release https://github.com/flyteorg/flyte/tags. // Flytectl sandbox will only work for v0.10.0+. diff --git a/flytectl/cmd/demo/demo.go b/flytectl/cmd/demo/demo.go index 35149b6823..23052175bb 100644 --- a/flytectl/cmd/demo/demo.go +++ b/flytectl/cmd/demo/demo.go @@ -6,6 +6,11 @@ import ( "github.com/spf13/cobra" ) +const ( + flyteNs = "flyte" + K8sEndpoint = "https://127.0.0.1:6443" +) + // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( demoShort = `Helps with demo interactions like start, teardown, status, and exec.` @@ -47,6 +52,9 @@ func CreateDemoCommand() *cobra.Command { "start": {CmdFunc: startDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: startShort, Long: startLong, PFlagProvider: sandboxCmdConfig.DefaultConfig, DisableFlyteClient: true}, + "reload": {CmdFunc: reloadDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, + Short: reloadShort, + Long: reloadLong, PFlagProvider: sandboxCmdConfig.DefaultConfig, DisableFlyteClient: true}, "teardown": {CmdFunc: teardownDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, Short: teardownShort, Long: teardownLong, DisableFlyteClient: true}, diff --git a/flytectl/cmd/demo/demo_test.go b/flytectl/cmd/demo/demo_test.go index 0ce332867a..fdc2c09b56 100644 --- a/flytectl/cmd/demo/demo_test.go +++ b/flytectl/cmd/demo/demo_test.go @@ -13,7 +13,8 @@ func TestCreateDemoCommand(t *testing.T) { assert.Equal(t, demoCommand.Use, "demo") assert.Equal(t, demoCommand.Short, "Helps with demo interactions like start, teardown, status, and exec.") fmt.Println(demoCommand.Commands()) - assert.Equal(t, len(demoCommand.Commands()), 4) + + assert.Equal(t, len(demoCommand.Commands()), 5) cmdNouns := demoCommand.Commands() // Sort by Use value. sort.Slice(cmdNouns, func(i, j int) bool { @@ -24,16 +25,19 @@ func TestCreateDemoCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Short, execShort) assert.Equal(t, cmdNouns[0].Long, execLong) - assert.Equal(t, cmdNouns[1].Use, "start") - assert.Equal(t, cmdNouns[1].Short, startShort) - assert.Equal(t, cmdNouns[1].Long, startLong) + assert.Equal(t, cmdNouns[1].Use, "reload") + assert.Equal(t, cmdNouns[1].Short, reloadShort) + assert.Equal(t, cmdNouns[1].Long, reloadLong) - assert.Equal(t, cmdNouns[2].Use, "status") - assert.Equal(t, cmdNouns[2].Short, statusShort) - assert.Equal(t, cmdNouns[2].Long, statusLong) + assert.Equal(t, cmdNouns[2].Use, "start") + assert.Equal(t, cmdNouns[2].Short, startShort) + assert.Equal(t, cmdNouns[2].Long, startLong) - assert.Equal(t, cmdNouns[3].Use, "teardown") - assert.Equal(t, cmdNouns[3].Short, teardownShort) - assert.Equal(t, cmdNouns[3].Long, teardownLong) + assert.Equal(t, cmdNouns[3].Use, "status") + assert.Equal(t, cmdNouns[3].Short, statusShort) + assert.Equal(t, cmdNouns[3].Long, statusLong) + assert.Equal(t, cmdNouns[4].Use, "teardown") + assert.Equal(t, cmdNouns[4].Short, teardownShort) + assert.Equal(t, cmdNouns[4].Long, teardownLong) } diff --git a/flytectl/cmd/demo/reload.go b/flytectl/cmd/demo/reload.go new file mode 100644 index 0000000000..f7441cf7c6 --- /dev/null +++ b/flytectl/cmd/demo/reload.go @@ -0,0 +1,58 @@ +package demo + +import ( + "context" + "fmt" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/k8s" + "github.com/flyteorg/flytestdlib/logger" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + labelSelector = "app=flyte" +) +const ( + reloadShort = "Power cycle the Flyte executable pod, effectively picking up an updated config." + reloadLong = ` +If you've changed the ~/.flyte/state/flyte.yaml file, run this command to restart the Flyte binary pod, effectively +picking up the new settings: + +Usage +:: + + flytectl demo reload + +` +) + +// reloadDemoCluster will kill the flyte binary pod so the new one can pick up a new config file +func reloadDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + k8sClient, err := k8s.GetK8sClient(docker.Kubeconfig, K8sEndpoint) + if err != nil { + fmt.Println("Could not get K8s client") + return err + } + pi := k8sClient.CoreV1().Pods(flyteNs) + podList, err := pi.List(ctx, v1.ListOptions{LabelSelector: labelSelector}) + if err != nil { + fmt.Println("could not list pods") + return err + } + if len(podList.Items) != 1 { + return fmt.Errorf("should only have one pod running, %d found, %v", len(podList.Items), podList.Items) + } + logger.Debugf(ctx, "Found %d pods\n", len(podList.Items)) + var grace = int64(0) + err = pi.Delete(ctx, podList.Items[0].Name, v1.DeleteOptions{ + GracePeriodSeconds: &grace, + }) + if err != nil { + fmt.Printf("Could not delete Flyte pod, old configuration may still be in effect. Err: %s\n", err) + return err + } + + return nil +} diff --git a/flytectl/cmd/demo/reload_test.go b/flytectl/cmd/demo/reload_test.go new file mode 100644 index 0000000000..35ceea040a --- /dev/null +++ b/flytectl/cmd/demo/reload_test.go @@ -0,0 +1,51 @@ +package demo + +import ( + "context" + "testing" + + cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/k8s" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + testclient "k8s.io/client-go/kubernetes/fake" +) + +var fakePod = corev1.Pod{ + Status: corev1.PodStatus{ + Phase: corev1.PodRunning, + Conditions: []corev1.PodCondition{}, + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "dummyflytepod", + Labels: map[string]string{"app": "flyte"}, + }, +} + +func TestDemoReload(t *testing.T) { + ctx := context.Background() + commandCtx := cmdCore.CommandContext{} + + t.Run("No errors", func(t *testing.T) { + client := testclient.NewSimpleClientset() + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + assert.NoError(t, err) + k8s.Client = client + err = reloadDemoCluster(ctx, []string{}, commandCtx) + assert.NoError(t, err) + }) + + t.Run("Multiple pods will error", func(t *testing.T) { + client := testclient.NewSimpleClientset() + _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + assert.NoError(t, err) + fakePod.SetName("othername") + _, err = client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) + assert.NoError(t, err) + k8s.Client = client + err = reloadDemoCluster(ctx, []string{}, commandCtx) + assert.Errorf(t, err, "should only have one pod") + }) +} diff --git a/flytectl/cmd/demo/start.go b/flytectl/cmd/demo/start.go index a800ed1795..c542d615ae 100644 --- a/flytectl/cmd/demo/start.go +++ b/flytectl/cmd/demo/start.go @@ -3,6 +3,8 @@ package demo import ( "context" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/sandbox" sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" @@ -75,18 +77,21 @@ eg : for passing multiple environment variables flytectl demo start --env USER=foo --env PASSWORD=bar -For just printing the docker commands for bringingup the demo container +For just printing the docker commands for bringing up the demo container :: flytectl demo start --dryRun - Usage ` ) func startDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - sandboxDefaultConfig := sandboxCmdConfig.DefaultConfig - return sandbox.StartDemoCluster(ctx, args, sandboxDefaultConfig) + cfg := sandboxCmdConfig.DefaultConfig + err := cfg.ImagePullPolicy.Set(docker.ImagePullPolicyIfNotPresent.String()) + if err != nil { + return err + } + return sandbox.StartDemoCluster(ctx, args, cfg) } diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index f87f353efc..e866743183 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -151,7 +151,7 @@ func Register(ctx context.Context, args []string, cfg *config.Config, cmdCtx cmd return fmt.Errorf("failed to upload source code from [%v]. Error: %w", sourceCodePath, err) } - logger.Infof(ctx, "Source code successfully uploaded to [%v]", uploadLocation) + logger.Infof(ctx, "DeprecatedSource code successfully uploaded to [%v]", uploadLocation) } var registerResults []Result diff --git a/flytectl/go.mod b/flytectl/go.mod index cc7402ff3f..b1f6e1bcba 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -3,7 +3,6 @@ module github.com/flyteorg/flytectl go 1.18 require ( - github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible @@ -44,6 +43,7 @@ require ( ) require ( + github.com/avast/retry-go v3.0.0+incompatible github.com/flyteorg/flytepropeller v1.1.1 golang.org/x/text v0.3.7 ) diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index 84f9fb3365..46ea3ea141 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -25,6 +25,8 @@ type Docker interface { ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) ImageList(ctx context.Context, listOption types.ImageListOptions) ([]types.ImageSummary, error) + ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) + CopyFromContainer(ctx context.Context, containerID, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) } type FlyteDocker struct { diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index bca12b1953..da7ce9bcab 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -24,11 +24,14 @@ import ( ) var ( - Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") + FlyteStateDir = f.FilePathJoin(f.UserHomeDir(), ".flyte", "state") + Kubeconfig = f.FilePathJoin(FlyteStateDir, "kubeconfig") + SandboxKubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") SuccessMessage = "Deploying Flyte..." FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} Source = "/root" + StateDirMountDest = "/srv/flyte" K3sDir = "/etc/rancher/" Client Docker Volumes = []mount.Mount{ @@ -126,20 +129,18 @@ func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, e // GetDemoPorts will return demo ports func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error) { return nat.ParsePortSpecs([]string{ - "0.0.0.0:30080:30080", // Flyteconsole Port - "0.0.0.0:30081:30081", // Flyteadmin Port - "0.0.0.0:30082:30082", // K8s Dashboard Port - "0.0.0.0:30084:30084", // Minio API Port - "0.0.0.0:30086:30086", // K8s cluster - "0.0.0.0:30088:30088", // Minio Console Port - "0.0.0.0:30089:30089", // Postgres Port - "0.0.0.0:30090:30090", // Webhook service + "0.0.0.0:6443:6443", // K3s API Port + "0.0.0.0:30080:30080", // HTTP Port + "0.0.0.0:30000:30000", // Registry Port + "0.0.0.0:30001:30001", // Postgres Port + "0.0.0.0:30002:30002", // Minio API Port (use HTTP port for minio console) }) } // PullDockerImage will Pull docker image func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy ImagePullPolicy, imagePullOptions ImagePullOptions, dryRun bool) error { + if dryRun { PrintPullImage(image, imagePullOptions) return nil @@ -222,6 +223,7 @@ func PrintCreateContainer(volumes []mount.Mount, portBindings map[nat.Port][]nat // StartContainer will create and start docker container func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, name, image string, additionalEnvVars []string, dryRun bool) (string, error) { + // Append the additional env variables to the default list of env Environment = append(Environment, additionalEnvVars...) if dryRun { @@ -252,6 +254,45 @@ func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, expo return resp.ID, nil } +// CopyContainerFile try to create the container, see if the source file is there, copy it to the destination +func CopyContainerFile(ctx context.Context, cli Docker, source, destination, name, image string) error { + resp, err := cli.ContainerCreate(ctx, &container.Config{Image: image}, &container.HostConfig{}, nil, nil, name) + if err != nil { + return err + } + var removeErr error + defer func() { + removeErr = cli.ContainerRemove(context.Background(), resp.ID, types.ContainerRemoveOptions{ + Force: true, + }) + }() + _, err = cli.ContainerStatPath(ctx, resp.ID, source) + if err != nil { + return err + } + reader, _, err := cli.CopyFromContainer(ctx, resp.ID, source) + if err != nil { + return err + } + tarFile := destination + ".tar" + outFile, err := os.Create(tarFile) + if err != nil { + return err + } + defer outFile.Close() + defer reader.Close() + _, err = io.Copy(outFile, reader) + if err != nil { + return err + } + r, _ := os.Open(tarFile) + err = f.ExtractTar(r, destination) + if err != nil { + return err + } + return removeErr +} + // ReadLogs will return io scanner for reading the logs of a container func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error) { reader, err := cli.ContainerLogs(ctx, id, types.ContainerLogsOptions{ diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index de1d6b09d2..79e7dae72e 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -1,17 +1,21 @@ package docker import ( + "archive/tar" "bufio" "context" "fmt" "os" + "path/filepath" "strings" "testing" + "time" f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/docker/docker/api/types/container" "github.com/flyteorg/flytectl/pkg/docker/mocks" + "github.com/stretchr/testify/mock" "github.com/docker/docker/api/types" @@ -370,3 +374,78 @@ func TestInspectExecResp(t *testing.T) { }) } + +func TestDemoPorts(t *testing.T) { + _, ports, _ := GetDemoPorts() + assert.Equal(t, 5, len(ports)) +} + +func TestCopyFile(t *testing.T) { + ctx := context.Background() + // Create a fake tar file in tmp. + fo, err := os.CreateTemp("", "sampledata") + assert.NoError(t, err) + tarWriter := tar.NewWriter(fo) + err = tarWriter.WriteHeader(&tar.Header{ + Typeflag: tar.TypeReg, + Name: "flyte.yaml", + Size: 4, + Mode: 0640, + ModTime: time.Unix(1245206587, 0), + }) + assert.NoError(t, err) + cnt, err := tarWriter.Write([]byte("a: b")) + assert.NoError(t, err) + assert.Equal(t, 4, cnt) + tarWriter.Close() + fo.Close() + + image := "some:image" + containerName := "my-container" + + t.Run("No errors", func(t *testing.T) { + // Create reader of the tar file + reader, err := os.Open(fo.Name()) + assert.NoError(t, err) + // Create destination file name + destDir, err := os.MkdirTemp("", "dest") + assert.NoError(t, err) + destination := filepath.Join(destDir, "destfile") + + // Mocks + mockDocker := &mocks.Docker{} + mockDocker.OnContainerCreate( + ctx, &container.Config{Image: image}, &container.HostConfig{}, nil, nil, containerName).Return( + container.ContainerCreateCreatedBody{ID: containerName}, nil) + mockDocker.OnContainerStatPath(ctx, containerName, "some source").Return(types.ContainerPathStat{}, nil) + mockDocker.OnCopyFromContainer(ctx, containerName, "some source").Return(reader, types.ContainerPathStat{}, nil) + mockDocker.OnContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true}).Return(nil) + assert.Nil(t, err) + + // Run + err = CopyContainerFile(ctx, mockDocker, "some source", destination, containerName, image) + assert.NoError(t, err) + + // Read the file and make sure it's correct + strBytes, err := os.ReadFile(destination) + assert.NoError(t, err) + assert.Equal(t, "a: b", string(strBytes)) + }) + + t.Run("Erroring on stat", func(t *testing.T) { + myErr := fmt.Errorf("erroring on stat") + + // Mocks + mockDocker := &mocks.Docker{} + mockDocker.OnContainerCreate( + ctx, &container.Config{Image: image}, &container.HostConfig{}, nil, nil, containerName).Return( + container.ContainerCreateCreatedBody{ID: containerName}, nil) + mockDocker.OnContainerStatPath(ctx, containerName, "some source").Return(types.ContainerPathStat{}, myErr) + mockDocker.OnContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true}).Return(nil) + assert.Nil(t, err) + + // Run + err = CopyContainerFile(ctx, mockDocker, "some source", "", containerName, image) + assert.Equal(t, myErr, err) + }) +} diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index b1f234f97f..a2ddc27cb7 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -325,6 +325,45 @@ func (_m *Docker) ContainerStart(ctx context.Context, containerID string, option return r0 } +type Docker_ContainerStatPath struct { + *mock.Call +} + +func (_m Docker_ContainerStatPath) Return(_a0 types.ContainerPathStat, _a1 error) *Docker_ContainerStatPath { + return &Docker_ContainerStatPath{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnContainerStatPath(ctx context.Context, containerID string, path string) *Docker_ContainerStatPath { + c_call := _m.On("ContainerStatPath", ctx, containerID, path) + return &Docker_ContainerStatPath{Call: c_call} +} + +func (_m *Docker) OnContainerStatPathMatch(matchers ...interface{}) *Docker_ContainerStatPath { + c_call := _m.On("ContainerStatPath", matchers...) + return &Docker_ContainerStatPath{Call: c_call} +} + +// ContainerStatPath provides a mock function with given fields: ctx, containerID, path +func (_m *Docker) ContainerStatPath(ctx context.Context, containerID string, path string) (types.ContainerPathStat, error) { + ret := _m.Called(ctx, containerID, path) + + var r0 types.ContainerPathStat + if rf, ok := ret.Get(0).(func(context.Context, string, string) types.ContainerPathStat); ok { + r0 = rf(ctx, containerID, path) + } else { + r0 = ret.Get(0).(types.ContainerPathStat) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = rf(ctx, containerID, path) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type Docker_ContainerWait struct { *mock.Call } @@ -368,6 +407,54 @@ func (_m *Docker) ContainerWait(ctx context.Context, containerID string, conditi return r0, r1 } +type Docker_CopyFromContainer struct { + *mock.Call +} + +func (_m Docker_CopyFromContainer) Return(_a0 io.ReadCloser, _a1 types.ContainerPathStat, _a2 error) *Docker_CopyFromContainer { + return &Docker_CopyFromContainer{Call: _m.Call.Return(_a0, _a1, _a2)} +} + +func (_m *Docker) OnCopyFromContainer(ctx context.Context, containerID string, srcPath string) *Docker_CopyFromContainer { + c_call := _m.On("CopyFromContainer", ctx, containerID, srcPath) + return &Docker_CopyFromContainer{Call: c_call} +} + +func (_m *Docker) OnCopyFromContainerMatch(matchers ...interface{}) *Docker_CopyFromContainer { + c_call := _m.On("CopyFromContainer", matchers...) + return &Docker_CopyFromContainer{Call: c_call} +} + +// CopyFromContainer provides a mock function with given fields: ctx, containerID, srcPath +func (_m *Docker) CopyFromContainer(ctx context.Context, containerID string, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) { + ret := _m.Called(ctx, containerID, srcPath) + + var r0 io.ReadCloser + if rf, ok := ret.Get(0).(func(context.Context, string, string) io.ReadCloser); ok { + r0 = rf(ctx, containerID, srcPath) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.ReadCloser) + } + } + + var r1 types.ContainerPathStat + if rf, ok := ret.Get(1).(func(context.Context, string, string) types.ContainerPathStat); ok { + r1 = rf(ctx, containerID, srcPath) + } else { + r1 = ret.Get(1).(types.ContainerPathStat) + } + + var r2 error + if rf, ok := ret.Get(2).(func(context.Context, string, string) error); ok { + r2 = rf(ctx, containerID, srcPath) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + type Docker_ImageList struct { *mock.Call } diff --git a/flytectl/pkg/filesystemutils/file_system_utils.go b/flytectl/pkg/filesystemutils/file_system_utils.go index 2f0b756c90..77ac4d8eb0 100644 --- a/flytectl/pkg/filesystemutils/file_system_utils.go +++ b/flytectl/pkg/filesystemutils/file_system_utils.go @@ -1,6 +1,9 @@ package filesystemutils import ( + "archive/tar" + "fmt" + "io" "os" "path/filepath" ) @@ -20,3 +23,48 @@ func UserHomeDir() string { func FilePathJoin(elems ...string) string { return filePathJoinFunc(elems...) } + +func ExtractTar(ss io.Reader, destination string) error { + tarReader := tar.NewReader(ss) + + for { + header, err := tarReader.Next() + + if err == io.EOF { + break + } + + if err != nil { + return err + } + + switch header.Typeflag { + case tar.TypeDir: + if err := os.Mkdir(header.Name, 0755); err != nil { + return err + } + case tar.TypeReg: + fmt.Printf("Creating Flyte configuration file at: %s\n", destination) + outFile, err := os.Create(destination) + if err != nil { + return err + } + for { + // Read one 1MB at a time. + if _, err := io.CopyN(outFile, tarReader, 1024*1024); err != nil { + if err == io.EOF { + break + } + return err + } + } + outFile.Close() + + default: + return fmt.Errorf("ExtractTarGz: unknown type: %v in %s", + header.Typeflag, + header.Name) + } + } + return nil +} diff --git a/flytectl/pkg/filesystemutils/file_system_utils_test.go b/flytectl/pkg/filesystemutils/file_system_utils_test.go new file mode 100644 index 0000000000..2bca38d827 --- /dev/null +++ b/flytectl/pkg/filesystemutils/file_system_utils_test.go @@ -0,0 +1,112 @@ +package filesystemutils + +import ( + "archive/tar" + "fmt" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var ( + homeDirVal = "/home/user" + homeDirErr error +) + +func FakeUserHomeDir() (string, error) { + return homeDirVal, homeDirErr +} + +func TestUserHomeDir(t *testing.T) { + t.Run("User home dir", func(t *testing.T) { + osUserHomDirFunc = FakeUserHomeDir + homeDir := UserHomeDir() + assert.Equal(t, homeDirVal, homeDir) + }) + t.Run("User home dir fail", func(t *testing.T) { + homeDirErr = fmt.Errorf("failed to get users home directory") + homeDirVal = "." + osUserHomDirFunc = FakeUserHomeDir + homeDir := UserHomeDir() + assert.Equal(t, ".", homeDir) + // Reset + homeDirErr = nil + homeDirVal = "/home/user" + }) +} + +func TestFilePathJoin(t *testing.T) { + t.Run("File path join", func(t *testing.T) { + homeDir := FilePathJoin("/", "home", "user") + assert.Equal(t, "/home/user", homeDir) + }) +} + +func TestTaring(t *testing.T) { + // Create a fake tar file in tmp. + text := "a: b" + fo, err := os.CreateTemp("", "sampledata") + assert.NoError(t, err) + tarWriter := tar.NewWriter(fo) + err = tarWriter.WriteHeader(&tar.Header{ + Typeflag: tar.TypeReg, + Name: "flyte.yaml", + Size: 4, + Mode: 0640, + ModTime: time.Unix(1245206587, 0), + }) + assert.NoError(t, err) + cnt, err := tarWriter.Write([]byte(text)) + assert.NoError(t, err) + assert.Equal(t, 4, cnt) + tarWriter.Close() + fo.Close() + + t.Run("Basic testing", func(t *testing.T) { + destFile, err := os.CreateTemp("", "sampledata") + assert.NoError(t, err) + reader, err := os.Open(fo.Name()) + assert.NoError(t, err) + err = ExtractTar(reader, destFile.Name()) + assert.NoError(t, err) + fileBytes, err := os.ReadFile(destFile.Name()) + assert.NoError(t, err) + readString := string(fileBytes) + assert.Equal(t, text, readString) + + // Try to extract the file we just extracted again. It's not a tar file obviously so it should error + reader, err = os.Open(destFile.Name()) + assert.NoError(t, err) + err = ExtractTar(reader, destFile.Name()) + assert.Errorf(t, err, "unexpected EOF") + }) +} + +func TestTarBadHeader(t *testing.T) { + // Create a fake tar file in tmp. + fo, err := os.CreateTemp("", "sampledata") + assert.NoError(t, err) + tarWriter := tar.NewWriter(fo) + // Write a symlink, we should not know how to parse. + err = tarWriter.WriteHeader(&tar.Header{ + Typeflag: tar.TypeLink, + Name: "flyte.yaml", + Size: 4, + Mode: 0640, + ModTime: time.Unix(1245206587, 0), + }) + assert.NoError(t, err) + tarWriter.Close() + fo.Close() + + t.Run("Basic testing", func(t *testing.T) { + destFile, err := os.CreateTemp("", "sampledata") + assert.NoError(t, err) + reader, err := os.Open(fo.Name()) + assert.NoError(t, err) + err = ExtractTar(reader, destFile.Name()) + assert.Errorf(t, err, "ExtractTarGz: unknown type") + }) +} diff --git a/flytectl/pkg/filesystemutils/flile_system_utils_test.go b/flytectl/pkg/filesystemutils/flile_system_utils_test.go deleted file mode 100644 index 9698d1709d..0000000000 --- a/flytectl/pkg/filesystemutils/flile_system_utils_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package filesystemutils - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -var ( - homeDirVal = "/home/user" - homeDirErr error -) - -func FakeUserHomeDir() (string, error) { - return homeDirVal, homeDirErr -} - -func TestUserHomeDir(t *testing.T) { - t.Run("User home dir", func(t *testing.T) { - osUserHomDirFunc = FakeUserHomeDir - homeDir := UserHomeDir() - assert.Equal(t, homeDirVal, homeDir) - }) - t.Run("User home dir fail", func(t *testing.T) { - homeDirErr = fmt.Errorf("failed to get users home directory") - homeDirVal = "." - osUserHomDirFunc = FakeUserHomeDir - homeDir := UserHomeDir() - assert.Equal(t, ".", homeDir) - // Reset - homeDirErr = nil - homeDirVal = "/home/user" - }) -} - -func TestFilePathJoin(t *testing.T) { - t.Run("File path join", func(t *testing.T) { - homeDir := FilePathJoin("/", "home", "user") - assert.Equal(t, "/home/user", homeDir) - }) -} diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index 1a34a93bca..705c6887e6 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -63,7 +63,7 @@ func (k *ContextManager) CheckConfig() error { return err } -// CopyKubeContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess. +// CopyContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess. func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error { err := k.CheckConfig() if err != nil { diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 3a53923ca1..f7ac5ed9e9 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -20,6 +20,7 @@ import ( "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytectl/pkg/k8s" "github.com/flyteorg/flytectl/pkg/util" + "github.com/flyteorg/flytestdlib/logger" "github.com/kataras/tablewriter" corev1api "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -33,9 +34,12 @@ const ( taintEffect = "NoSchedule" sandboxContextName = "flyte-sandbox" sandboxDockerContext = "default" - k8sEndpoint = "https://127.0.0.1:30086" + K8sEndpoint = "https://127.0.0.1:6443" + sandboxK8sEndpoint = "https://127.0.0.1:30086" sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" - demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-lite" + demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-bundled" + DefaultFlyteConfig = "/opt/flyte/defaults.flyte.yaml" + k3sKubeConfigEnvVar = "K3S_KUBECONFIG_OUTPUT=/srv/flyte/kubeconfig" ) func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { @@ -140,9 +144,9 @@ func MountVolume(file, destination string) (*mount.Mount, error) { return nil, nil } -func UpdateLocalKubeContext(k8sCtxMgr k8s.ContextOps, dockerCtx string, contextName string) error { +func UpdateLocalKubeContext(k8sCtxMgr k8s.ContextOps, dockerCtx string, contextName string, kubeConfigPath string) error { srcConfigAccess := &clientcmd.PathOptions{ - GlobalFile: docker.Kubeconfig, + GlobalFile: kubeConfigPath, LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), } return k8sCtxMgr.CopyContext(srcConfigAccess, dockerCtx, contextName) @@ -158,16 +162,13 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService return nil, err } fmt.Printf("Existing details of your sandbox") - util.PrintSandboxMessage(consolePort, sandboxConfig.DryRun) + util.PrintSandboxMessage(consolePort, docker.Kubeconfig, sandboxConfig.DryRun) return nil, nil } } - if err := util.SetupFlyteDir(); err != nil { - return nil, err - } templateValues := configutil.ConfigTemplateSpec{ - Host: "localhost:30081", + Host: "localhost:30080", Insecure: true, Console: fmt.Sprintf("http://localhost:%d", consolePort), } @@ -176,11 +177,25 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService } volumes := docker.Volumes - if vol, err := MountVolume(sandboxConfig.Source, docker.Source); err != nil { + // Mount this even though it should no longer be necessary. This is for user code + if vol, err := MountVolume(sandboxConfig.DeprecatedSource, docker.Source); err != nil { return nil, err } else if vol != nil { volumes = append(volumes, *vol) } + + // This is the state directory mount, flyte will write the kubeconfig here. May hold more in future releases + // To be interoperable with the old sandbox, only mount if the directory exists, should've created by StartCluster + if fileInfo, err := os.Stat(docker.FlyteStateDir); err == nil { + if fileInfo.IsDir() { + if vol, err := MountVolume(docker.FlyteStateDir, docker.StateDirMountDest); err != nil { + return nil, err + } else if vol != nil { + volumes = append(volumes, *vol) + } + } + } + sandboxImage := sandboxConfig.Image if len(sandboxImage) == 0 { image, version, err := github.GetFullyQualifiedImageName(defaultImagePrefix, sandboxConfig.Version, defaultImageName, sandboxConfig.Prerelease, g) @@ -253,6 +268,101 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC } ghRepo := github.GetGHRepoService() + if err := util.CreatePathAndFile(docker.Kubeconfig); err != nil { + return err + } + + reader, err := startSandbox(ctx, cli, ghRepo, os.Stdin, sandboxConfig, defaultImageName, defaultImagePrefix, exposedPorts, portBindings, consolePort) + if err != nil { + return err + } + + if reader != nil { + var k8sClient k8s.K8s + err = retry.Do( + func() error { + // This should wait for the kubeconfig file being there. + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, K8sEndpoint) + return err + }, + retry.Attempts(10), + ) + if err != nil { + return err + } + + // Live-ness check + err = retry.Do( + func() error { + // Have to get a new client every time because you run into x509 errors if not + fmt.Println("Waiting for cluster to come up...") + k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, K8sEndpoint) + if err != nil { + logger.Debugf(ctx, "Error getting K8s client in liveness check %s", err) + return err + } + req := k8sClient.CoreV1().RESTClient().Get() + req = req.RequestURI("livez") + res := req.Do(ctx) + return res.Error() + }, + retry.Attempts(15), + ) + if err != nil { + return err + } + + // Readiness check + err = retry.Do( + func() error { + // No need to refresh client here + req := k8sClient.CoreV1().RESTClient().Get() + req = req.RequestURI("readyz") + res := req.Do(ctx) + return res.Error() + }, + retry.Attempts(10), + ) + if err != nil { + return err + } + + // This will copy the kubeconfig from where k3s writes it () to the main file. + // This code is located after the waits above since it appears that k3s goes through at least a couple versions + // of the config keys/certs. If this copy is done too early, the copied credentials won't work. + if err = UpdateLocalKubeContext(k8sCtxMgr, sandboxDockerContext, sandboxContextName, docker.Kubeconfig); err != nil { + return err + } + + // Watch for Flyte Deployment + if err := WatchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { + return err + } + if primePod { + primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) + } + } + return nil +} + +// StartClusterForSandbox is the code for the original multi deploy version of sandbox, should be removed once we +// document the new development experience for plugins. +func StartClusterForSandbox(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, primePod bool, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { + k8sCtxMgr := k8s.NewK8sContextManager() + err := k8sCtxMgr.CheckConfig() + if err != nil { + return err + } + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + + ghRepo := github.GetGHRepoService() + + if err := util.CreatePathAndFile(docker.SandboxKubeconfig); err != nil { + return err + } reader, err := startSandbox(ctx, cli, ghRepo, os.Stdin, sandboxConfig, defaultImageName, defaultImagePrefix, exposedPorts, portBindings, consolePort) if err != nil { @@ -266,7 +376,7 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC var k8sClient k8s.K8s err = retry.Do( func() error { - k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, k8sEndpoint) + k8sClient, err = k8s.GetK8sClient(docker.SandboxKubeconfig, sandboxK8sEndpoint) return err }, retry.Attempts(10), @@ -274,10 +384,11 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC if err != nil { return err } - if err = UpdateLocalKubeContext(k8sCtxMgr, sandboxDockerContext, sandboxContextName); err != nil { + if err = UpdateLocalKubeContext(k8sCtxMgr, sandboxDockerContext, sandboxContextName, docker.SandboxKubeconfig); err != nil { return err } + // TODO: This doesn't appear to correctly watch for the Flyte deployment but doesn't do so on master either. if err := WatchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } @@ -293,17 +404,16 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox primePod := true sandboxImagePrefix := "sha" exposedPorts, portBindings, err := docker.GetDemoPorts() - if sandboxConfig.Dev { - exposedPorts, portBindings, err = docker.GetDevPorts() - } if err != nil { return err } + // K3s will automatically write the file specified by this var, which is mounted from user's local state dir. + sandboxConfig.Env = append(sandboxConfig.Env, k3sKubeConfigEnvVar) err = StartCluster(ctx, args, sandboxConfig, primePod, demoImageName, sandboxImagePrefix, exposedPorts, portBindings, util.DemoConsolePort) if err != nil { return err } - util.PrintSandboxMessage(util.DemoConsolePort, sandboxConfig.DryRun) + util.PrintDemoMessage(util.DemoConsolePort, docker.Kubeconfig, sandboxConfig.DryRun) return nil } @@ -314,10 +424,10 @@ func StartSandboxCluster(ctx context.Context, args []string, sandboxConfig *sand if err != nil { return err } - err = StartCluster(ctx, args, sandboxConfig, primePod, sandboxImageName, demoImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + err = StartClusterForSandbox(ctx, args, sandboxConfig, primePod, sandboxImageName, demoImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) if err != nil { return err } - util.PrintSandboxMessage(util.SandBoxConsolePort, sandboxConfig.DryRun) + util.PrintSandboxMessage(util.SandBoxConsolePort, docker.SandboxKubeconfig, sandboxConfig.DryRun) return nil } diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index c3b22c6be4..7bc204ac34 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -103,7 +103,7 @@ func TestStartFunc(t *testing.T) { Platform: "", } assert.Nil(t, util.SetupFlyteDir()) - assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm)) + assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "state"), os.ModePerm)) assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) fakePod.SetName("flyte") @@ -146,7 +146,7 @@ func TestStartFunc(t *testing.T) { assert.Nil(t, reader) }) t.Run("Successfully run demo cluster with source code", func(t *testing.T) { - sandboxCmdConfig.DefaultConfig.Source = f.UserHomeDir() + sandboxCmdConfig.DefaultConfig.DeprecatedSource = f.UserHomeDir() sandboxCmdConfig.DefaultConfig.Version = "" sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) @@ -162,7 +162,7 @@ func TestStartFunc(t *testing.T) { assert.Nil(t, err) }) t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { - sandboxCmdConfig.DefaultConfig.Source = "../" + sandboxCmdConfig.DefaultConfig.DeprecatedSource = "../" sandboxCmdConfig.DefaultConfig.Version = "" sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) @@ -279,7 +279,7 @@ func TestStartFunc(t *testing.T) { }) t.Run("Successfully run demo cluster command", func(t *testing.T) { // mockOutStream := new(io.Writer) - //cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + // cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) client := testclient.NewSimpleClientset() k8s.Client = client _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) @@ -306,7 +306,7 @@ func TestStartFunc(t *testing.T) { }).Return(reader, nil) mockK8sContextMgr := &k8sMocks.ContextOps{} docker.Client = mockDocker - sandboxCmdConfig.DefaultConfig.Source = "" + sandboxCmdConfig.DefaultConfig.DeprecatedSource = "" sandboxCmdConfig.DefaultConfig.Version = "" k8s.ContextMgr = mockK8sContextMgr ghutil.Client = githubMock @@ -314,12 +314,10 @@ func TestStartFunc(t *testing.T) { mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) err = StartSandboxCluster(context.Background(), []string{}, config) assert.Nil(t, err) - err = StartDemoCluster(context.Background(), []string{}, config) - assert.Nil(t, err) }) t.Run("Error in running demo cluster command", func(t *testing.T) { - //mockOutStream := new(io.Writer) - //cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) + // mockOutStream := new(io.Writer) + // cmdCtx := cmdCore.NewCommandContext(admin.InitializeMockClientset(), *mockOutStream) sandboxSetup() docker.Client = mockDocker mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) @@ -362,7 +360,6 @@ func TestMonitorFlyteDeployment(t *testing.T) { err = WatchFlyteDeployment(ctx, client.CoreV1()) assert.NotNil(t, err) - }) t.Run("Monitor k8s deployment success", func(t *testing.T) { @@ -385,13 +382,10 @@ func TestMonitorFlyteDeployment(t *testing.T) { err = WatchFlyteDeployment(ctx, client.CoreV1()) assert.Nil(t, err) - }) - } func TestGetFlyteDeploymentCount(t *testing.T) { - ctx := context.Background() client := testclient.NewSimpleClientset() c, err := getFlyteDeployment(ctx, client.CoreV1()) diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index afdb35967b..ece882279a 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net/http" "os" + "path/filepath" "strings" "github.com/flyteorg/flytectl/pkg/configutil" @@ -34,16 +35,36 @@ func WriteIntoFile(data []byte, file string) error { return nil } +func CreatePathAndFile(pathToConfig string) error { + p, err := filepath.Abs(pathToConfig) + if err != nil { + return err + } + if err := os.MkdirAll(filepath.Dir(p), os.ModePerm); err != nil { + return err + } + + // Created a empty file with right permission + if _, err := os.Stat(p); err != nil { + if os.IsNotExist(err) { + if err := os.WriteFile(p, []byte(""), os.ModePerm); err != nil { + return err + } + } + } + return nil +} + // SetupFlyteDir will create .flyte dir if not exist func SetupFlyteDir() error { - if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s"), os.ModePerm); err != nil { + if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "state"), os.ModePerm); err != nil { return err } // Created a empty file with right permission if _, err := os.Stat(docker.Kubeconfig); err != nil { if os.IsNotExist(err) { - if err := ioutil.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { + if err := os.WriteFile(docker.Kubeconfig, []byte(""), os.ModePerm); err != nil { return err } } @@ -52,12 +73,36 @@ func SetupFlyteDir() error { return nil } +// PrintDemoMessage will print sandbox success message +func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { + kubeconfig := strings.Join([]string{ + "$KUBECONFIG", + kubeconfigLocation, + }, ":") + + var successMsg string + if dryRun { + successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) + } else { + successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) + + } + fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) + fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) + fmt.Printf(" export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) + if dryRun { + fmt.Printf("%v Run the following command to export kubeconfig variables for accessing flyte pods locally\n", emoji.Sparkle) + fmt.Printf(" export KUBECONFIG=%v \n", kubeconfig) + } + fmt.Printf("%s Flyte sandbox ships with a Docker registry. Tag and push custom workflow images to localhost:30000\n", emoji.Whale) + fmt.Printf("%s The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console\n", emoji.OpenFileFolder) +} + // PrintSandboxMessage will print sandbox success message -func PrintSandboxMessage(flyteConsolePort int, dryRun bool) { +func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { kubeconfig := strings.Join([]string{ "$KUBECONFIG", - f.FilePathJoin(f.UserHomeDir(), ".kube", "config"), - docker.Kubeconfig, + kubeconfigLocation, }, ":") var successMsg string diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 9bbb89964f..492dc2623f 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -1,8 +1,12 @@ package util import ( + "os" + "path/filepath" "testing" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/stretchr/testify/assert" ) @@ -25,7 +29,7 @@ func TestSetupFlyteDir(t *testing.T) { func TestPrintSandboxMessage(t *testing.T) { t.Run("Print Sandbox Message", func(t *testing.T) { - PrintSandboxMessage(SandBoxConsolePort, false) + PrintSandboxMessage(SandBoxConsolePort, docker.SandboxKubeconfig, false) }) } @@ -80,3 +84,15 @@ func TestIsVersionGreaterThan(t *testing.T) { assert.NotNil(t, err) }) } + +func TestCreatePathAndFile(t *testing.T) { + dir, err := os.MkdirTemp("", "flytectl") + assert.NoError(t, err) + defer os.RemoveAll(dir) + + testFile := filepath.Join(dir, "testfile.yaml") + err = CreatePathAndFile(testFile) + assert.NoError(t, err) + _, err = os.Stat(testFile) + assert.NoError(t, err) +} From 8b5696e24daedcaca2f2a520c23c9bf05830c7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20M=C3=BCller?= Date: Wed, 16 Nov 2022 20:07:12 +0100 Subject: [PATCH 292/356] OverwriteCache flag for creating/relaunching executions (#358) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added direnv .envrc to gitignore Signed-off-by: Nick Müller * Implemented skipCache flag for creating executions Signed-off-by: Nick Müller * Renamed skipCache flag to overwriteCache Updated to latest released version of flyteidl Signed-off-by: Nick Müller * Updated to latest released versions of flyteidl and flytestdlib Signed-off-by: Nick Müller * Removed unneeded overwriteCache parameter in favor of global executionConfig Signed-off-by: Nick Müller Signed-off-by: Nick Müller --- flytectl/.gitignore | 2 + flytectl/cmd/create/execution.go | 11 +- flytectl/cmd/create/execution_util.go | 4 +- flytectl/cmd/create/execution_util_test.go | 10 + flytectl/cmd/create/executionconfig_flags.go | 7 +- .../cmd/create/executionconfig_flags_test.go | 14 + flytectl/go.mod | 107 +++--- flytectl/go.sum | 345 ++++++++++++++---- 8 files changed, 373 insertions(+), 127 deletions(-) diff --git a/flytectl/.gitignore b/flytectl/.gitignore index 0cfb4d69b2..3e69f20c81 100644 --- a/flytectl/.gitignore +++ b/flytectl/.gitignore @@ -8,3 +8,5 @@ _test docs/build/* cmd/upgrade/flyte.ext .vscode +# direnv +.envrc diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 0d0c8786fc..5c6c01b327 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -138,9 +138,7 @@ The generated file would look similar to this. Here, empty values have been dump :: - flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d development --clusterPool my-gpu-cluster - -Usage + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d development --clusterPool my-gpu-cluster ` ) @@ -149,9 +147,9 @@ Usage // ExecutionConfig hold configuration for create execution flags and configuration of the actual task or workflow to be launched. type ExecutionConfig struct { // pflag section - ExecFile string `json:"execFile,omitempty" pflag:",file for the execution params.If not specified defaults to <_name>.execution_spec.yaml"` - TargetDomain string `json:"targetDomain" pflag:",project where execution needs to be created.If not specified configured domain would be used."` - TargetProject string `json:"targetProject" pflag:",project where execution needs to be created.If not specified configured project would be used."` + ExecFile string `json:"execFile,omitempty" pflag:",file for the execution params. If not specified defaults to <_name>.execution_spec.yaml"` + TargetDomain string `json:"targetDomain" pflag:",project where execution needs to be created. If not specified configured domain would be used."` + TargetProject string `json:"targetProject" pflag:",project where execution needs to be created. If not specified configured project would be used."` KubeServiceAcct string `json:"kubeServiceAcct" pflag:",kubernetes service account AuthRole for launching execution."` IamRoleARN string `json:"iamRoleARN" pflag:",iam role ARN AuthRole for launching execution."` Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."` @@ -159,6 +157,7 @@ type ExecutionConfig struct { DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` Version string `json:"version" pflag:",specify version of execution workflow/task."` ClusterPool string `json:"clusterPool" pflag:",specify which cluster pool to assign execution to."` + OverwriteCache bool `json:"overwriteCache" pflag:",skip cached results when performing execution,causing all outputs to be re-calculated and stored data to be overwritten. Does not work for recovered executions."` // Non plfag section is read from the execution config generated by get task/launch plan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 2fdf247688..0f81b80636 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -113,7 +113,8 @@ func relaunchExecution(ctx context.Context, executionName string, project string Project: project, Domain: domain, }, - Name: targetExecutionName, + Name: targetExecutionName, + OverwriteCache: executionConfig.OverwriteCache, }) if err != nil { return err @@ -167,6 +168,7 @@ func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securi AuthRole: authRole, SecurityContext: securityContext, ClusterAssignment: clusterAssignment, + OverwriteCache: executionConfig.OverwriteCache, }, Inputs: inputs, } diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index 4ce9befcd5..87eb39bd38 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -212,3 +212,13 @@ func Test_resolveOverrides(t *testing.T) { assert.Equal(t, "v1", cfg.Version) assert.Equal(t, "gpu", cfg.ClusterPool) } + +func TestCreateExecutionForRelaunchOverwritingCache(t *testing.T) { + s := setup() + createExecutionUtilSetup() + executionConfig.OverwriteCache = true + relaunchRequest.OverwriteCache = true // ensure request has overwriteCache param set + s.MockAdminClient.OnRelaunchExecutionMatch(s.Ctx, relaunchRequest).Return(executionCreateResponse, nil) + err := relaunchExecution(s.Ctx, "execName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfig, "") + assert.Nil(t, err) +} diff --git a/flytectl/cmd/create/executionconfig_flags.go b/flytectl/cmd/create/executionconfig_flags.go index 052d0a74d5..9908df93b1 100755 --- a/flytectl/cmd/create/executionconfig_flags.go +++ b/flytectl/cmd/create/executionconfig_flags.go @@ -50,9 +50,9 @@ func (ExecutionConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("ExecutionConfig", pflag.ExitOnError) - cmdFlags.StringVar(&executionConfig.ExecFile, fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params.If not specified defaults to <_name>.execution_spec.yaml") - cmdFlags.StringVar(&executionConfig.TargetDomain, fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created.If not specified configured domain would be used.") - cmdFlags.StringVar(&executionConfig.TargetProject, fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created.If not specified configured project would be used.") + cmdFlags.StringVar(&executionConfig.ExecFile, fmt.Sprintf("%v%v", prefix, "execFile"), executionConfig.ExecFile, "file for the execution params. If not specified defaults to <_name>.execution_spec.yaml") + cmdFlags.StringVar(&executionConfig.TargetDomain, fmt.Sprintf("%v%v", prefix, "targetDomain"), executionConfig.TargetDomain, "project where execution needs to be created. If not specified configured domain would be used.") + cmdFlags.StringVar(&executionConfig.TargetProject, fmt.Sprintf("%v%v", prefix, "targetProject"), executionConfig.TargetProject, "project where execution needs to be created. If not specified configured project would be used.") cmdFlags.StringVar(&executionConfig.KubeServiceAcct, fmt.Sprintf("%v%v", prefix, "kubeServiceAcct"), executionConfig.KubeServiceAcct, "kubernetes service account AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.IamRoleARN, fmt.Sprintf("%v%v", prefix, "iamRoleARN"), executionConfig.IamRoleARN, "iam role ARN AuthRole for launching execution.") cmdFlags.StringVar(&executionConfig.Relaunch, fmt.Sprintf("%v%v", prefix, "relaunch"), executionConfig.Relaunch, "execution id to be relaunched.") @@ -60,6 +60,7 @@ func (cfg ExecutionConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&executionConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), executionConfig.DryRun, "execute command without making any modifications.") cmdFlags.StringVar(&executionConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), executionConfig.Version, "specify version of execution workflow/task.") cmdFlags.StringVar(&executionConfig.ClusterPool, fmt.Sprintf("%v%v", prefix, "clusterPool"), executionConfig.ClusterPool, "specify which cluster pool to assign execution to.") + cmdFlags.BoolVar(&executionConfig.OverwriteCache, fmt.Sprintf("%v%v", prefix, "overwriteCache"), executionConfig.OverwriteCache, "skip cached results when performing execution, causing all outputs to be re-calculated and stored data to be overwritten. Does not work for recovered executions.") cmdFlags.StringVar(&executionConfig.Workflow, fmt.Sprintf("%v%v", prefix, "workflow"), executionConfig.Workflow, "") cmdFlags.StringVar(&executionConfig.Task, fmt.Sprintf("%v%v", prefix, "task"), executionConfig.Task, "") return cmdFlags diff --git a/flytectl/cmd/create/executionconfig_flags_test.go b/flytectl/cmd/create/executionconfig_flags_test.go index ac59b4fe0b..7891b4f9ba 100755 --- a/flytectl/cmd/create/executionconfig_flags_test.go +++ b/flytectl/cmd/create/executionconfig_flags_test.go @@ -239,6 +239,20 @@ func TestExecutionConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_overwriteCache", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("overwriteCache", testValue) + if vBool, err := cmdFlags.GetBool("overwriteCache"); err == nil { + testDecodeJson_ExecutionConfig(t, fmt.Sprintf("%v", vBool), &actual.OverwriteCache) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_workflow", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/go.mod b/flytectl/go.mod index b1f6e1bcba..50360bd287 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,31 +8,30 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.1.19 - github.com/flyteorg/flytestdlib v1.0.0 + github.com/flyteorg/flyteidl v1.2.5 + github.com/flyteorg/flytestdlib v1.0.13 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 - github.com/golang/protobuf v1.5.0 + github.com/golang/protobuf v1.5.2 github.com/google/go-github/v42 v42.0.0 - github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 github.com/hashicorp/go-version v1.3.0 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/mitchellh/mapstructure v1.4.1 + github.com/mitchellh/mapstructure v1.4.3 github.com/mouuff/go-rocket-update v1.5.1 github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 - github.com/spf13/cobra v1.1.3 + github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 - golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 - google.golang.org/grpc v1.36.0 - google.golang.org/protobuf v1.27.1 + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 + google.golang.org/grpc v1.46.0 + google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gotest.tools v2.2.0+incompatible @@ -49,47 +48,51 @@ require ( ) require ( - cloud.google.com/go v0.78.0 // indirect - cloud.google.com/go/storage v1.12.0 // indirect - github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 // indirect + cloud.google.com/go v0.101.0 // indirect + cloud.google.com/go/compute v1.6.1 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/storage v1.22.0 // indirect + github.com/Azure/azure-sdk-for-go v63.4.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.17 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect + github.com/Azure/go-autorest/autorest v0.11.27 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect - github.com/aws/aws-sdk-go v1.37.3 // indirect + github.com/aws/aws-sdk-go v1.44.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/containerd/containerd v1.5.10 // indirect github.com/coocood/freecache v1.1.1 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect github.com/danieljoos/wincred v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/evanphx/json-patch v4.9.0+incompatible // indirect - github.com/fatih/color v1.10.0 // indirect + github.com/fatih/color v1.13.0 // indirect github.com/flyteorg/flyteplugins v1.0.0 // indirect - github.com/flyteorg/stow v0.3.3 // indirect - github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/flyteorg/stow v0.3.6 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v0.4.0 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/golang-jwt/jwt/v4 v4.4.1 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gax-go/v2 v2.3.0 // indirect github.com/googleapis/gnostic v0.5.1 // indirect + github.com/googleapis/go-type-adapters v1.0.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect @@ -100,11 +103,10 @@ require ( github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect - github.com/magiconair/properties v1.8.4 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.13 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect @@ -113,37 +115,34 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/ncw/swift v1.0.53 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.10.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.18.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/russross/blackfriday/v2 v2.0.1 // indirect - github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect - github.com/spf13/afero v1.5.1 // indirect - github.com/spf13/cast v1.3.1 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.7.1 // indirect + github.com/spf13/viper v1.11.0 // indirect github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - golang.org/x/tools v0.1.10 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/api v0.40.0 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect + google.golang.org/api v0.76.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c // indirect + google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect k8s.io/klog/v2 v2.8.0 // indirect k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index eea38f8a99..b489281258 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -4,6 +4,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -19,17 +20,37 @@ cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0K cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0 h1:oKpsiyKMfVpwR3zSAkQixGzlVE5ovitBuO0qSmCf0bI= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.101.0 h1:g+LL+JvpvdyGtcaD2xw2mSByE/6F9s471eJSoaysM84= +cloud.google.com/go v0.101.0/go.mod h1:hEiddgDb77jDQ+I80tURYNJEnuwPzFU8awCFFRLKjW0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,18 +60,25 @@ 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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= +cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= +github.com/Azure/azure-sdk-for-go v63.4.0+incompatible h1:fle3M5Q7vr8auaiPffKyUQmLbvYeqpw30bKU6PrWJFo= +github.com/Azure/azure-sdk-for-go v63.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 h1:3CVsSo4mp8NDWO11tHzN/mdo2zP0CtaSK5IcwBjfqRA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 h1:NVS/4LOQfkBpk+B1VopIzv1ptmYeEskA8w/3K/w7vjo= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 h1:Px2KVERcYEg2Lv25AqC2hVr0xUWaq94wuEObLIkYzmA= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2/go.mod h1:CdSJQNNzZhCkwDaV27XV1w48ZBPtxe7mlrZAsPNxD5g= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 h1:0nJeKDmB7a1a8RDMjTltahlPsaNlWjq/LpkZleSwINk= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0/go.mod h1:mbwxKc/fW+IkF0GG591MuXw0KuEQBDkeRoZ9vmVJPxg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -60,14 +88,16 @@ github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+B github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= @@ -76,16 +106,19 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= @@ -157,8 +190,9 @@ github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZo github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.37.3 h1:1f0groABc4AuapskpHf6EBRaG2tqw0Sx3ebCMwfp1Ys= github.com/aws/aws-sdk-go v1.37.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= +github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= @@ -195,8 +229,9 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= @@ -214,6 +249,12 @@ 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/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= @@ -322,8 +363,9 @@ github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -386,6 +428,10 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m 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/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= @@ -394,28 +440,31 @@ github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.1.19 h1:1CtSbuFhFHwUbKdv66PqbcER01iacAJU+snh0eTsXc4= -github.com/flyteorg/flyteidl v1.1.19/go.mod h1:SLTYz2JgIKvM5MbPVlMP7uILb65fnuuZQZFHHIEYh2U= +github.com/flyteorg/flyteidl v1.2.5 h1:oPs0PX9opR9JtWjP5ZH2YMChkbGGL45PIy+90FlaxYc= +github.com/flyteorg/flyteidl v1.2.5/go.mod h1:OJAq333OpInPnMhvVz93AlEjmlQ+t0FAD4aakIYE4OU= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= github.com/flyteorg/flytepropeller v1.1.1/go.mod h1:x7vIuy9vmOPw9JSd+xAijeiHShmuieFZsTT1yLXhR90= -github.com/flyteorg/flytestdlib v1.0.0 h1:gb99ignMsVcNTUmWzArtcIDdkRjyzQQVBkWNOQakiFg= github.com/flyteorg/flytestdlib v1.0.0/go.mod h1:QSVN5wIM1lM9d60eAEbX7NwweQXW96t5x4jbyftn89c= -github.com/flyteorg/stow v0.3.3 h1:tzeNl8mSZFL3oJDi0ACZj6FAineQAF4qyEp6bXtIdQY= +github.com/flyteorg/flytestdlib v1.0.13 h1:mmU+k0Bc7HB5kWCgxoNJ9lZeD9tV1c7e5oCgyXKgO8c= +github.com/flyteorg/flytestdlib v1.0.13/go.mod h1:nIBmBHtjTJvhZEn3e/EwVC/iMkR2tUX8hEiXjRBpH/s= github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= +github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= +github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -430,6 +479,7 @@ github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -515,13 +565,19 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -529,6 +585,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -544,9 +602,12 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -560,8 +621,10 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -573,8 +636,10 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -587,6 +652,10 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -595,16 +664,22 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -673,6 +748,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -689,12 +766,11 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -726,6 +802,7 @@ github.com/kubeflow/common v0.4.0/go.mod h1:X15/dRQQoB77wrqrPwVn4GqG2ubgk8xR24A8 github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec/go.mod h1:cTBmZKLlrIXBWQ0A9Ik8h0i4zoGhR7ApHwUfrLDbhQc= github.com/kubeflow/pytorch-operator v0.6.0/go.mod h1:zHblV+yTwVG4PCgKTU2wPfOmQ6TJdfT87lDfHrP1a1Y= github.com/kubeflow/tf-operator v0.5.3/go.mod h1:EBtz5LQoKaHUl/5fV5vD1qXVNVNyn3TrFaH6eVoQ8SY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -733,8 +810,9 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -745,14 +823,16 @@ github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +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.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/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.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/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-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -771,8 +851,9 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -877,8 +958,11 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +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= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -893,6 +977,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -907,8 +992,10 @@ github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= -github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -926,8 +1013,10 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0 h1:WCVKW7aL6LEe1uryfI9dnEc2ZqNB1Fn0ok930v0iL1Y= github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -941,8 +1030,9 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -951,8 +1041,9 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -960,7 +1051,6 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -971,10 +1061,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= @@ -982,18 +1070,20 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1 github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1006,8 +1096,9 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1025,8 +1116,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1043,6 +1135,7 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/vektra/mockery v1.1.2/go.mod h1:VcfZjKaFOPO+MpN4ZvwPjs4c48lkq1o3Ym8yHZJu0jU= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1062,6 +1155,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= @@ -1086,8 +1180,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 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.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1126,9 +1222,13 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= 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.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 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= @@ -1153,8 +1253,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1165,7 +1265,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1221,11 +1321,20 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 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= @@ -1236,8 +1345,17 @@ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 h1:alLDrZkL34Y2bnGHfvC1CYBRBXCXgx8AC2vY4MRtYX4= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1332,20 +1450,44 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/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-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/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-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= @@ -1412,6 +1554,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1434,13 +1577,18 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -1466,8 +1614,26 @@ google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.40.0 h1:uWrpz12dpVPn7cojP82mk02XDgTJLDPc2KbVTxrWb4A= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.76.0 h1:UkZl25bR1FHNqtK/EKs3vCdpZtUO6gea3YElTwc8pQg= +google.golang.org/api v0.76.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1522,8 +1688,47 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c h1:7A9LQhrZmuCPI79/sYSbscFqBp4XFYf6oaIQuV1xji4= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 h1:G1IeWbjrqEq9ChWxEuRPJu6laA67+XgTFHVSAvepr38= +google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1549,8 +1754,20 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1563,8 +1780,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1582,8 +1800,9 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From d2ef7daf686f9be83341dac77ea420a0e1bc3bde Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Sat, 19 Nov 2022 23:06:45 +0100 Subject: [PATCH 293/356] fix confusing doc for flytectl delete (#377) --- flytectl/cmd/delete/delete.go | 2 +- flytectl/docs/source/gen/flytectl.rst | 4 ++-- flytectl/docs/source/gen/flytectl_delete.rst | 4 ++-- ...ectl_delete_cluster-resource-attribute.rst | 4 ++-- ...lytectl_delete_execution-cluster-label.rst | 4 ++-- ...tectl_delete_execution-queue-attribute.rst | 4 ++-- .../source/gen/flytectl_delete_execution.rst | 20 +++++++++---------- .../gen/flytectl_delete_plugin-override.rst | 4 ++-- ...lytectl_delete_task-resource-attribute.rst | 4 ++-- ...tectl_delete_workflow-execution-config.rst | 4 ++-- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index fa51fd2fbb..b25c91babd 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -15,7 +15,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - deleteCmdShort = `Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` + deleteCmdShort = `Terminates/deletes various Flyte resources such as executions and resource attributes.` deleteCmdLong = ` Delete a resource; if an execution: :: diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 3ab23acf44..274e087f25 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -24,7 +24,7 @@ Options --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -81,7 +81,7 @@ SEE ALSO * :doc:`flytectl_completion` - Generates completion script. * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. * :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. * :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. * :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. * :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index a9e5109b6b..1be2ff2eff 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -3,7 +3,7 @@ flytectl delete --------------- -Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +Terminates/deletes various Flyte resources such as executions and resource attributes. Synopsis ~~~~~~~~ @@ -36,7 +36,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 08e825a06d..8b85c1038b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -71,7 +71,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -123,5 +123,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index b5536698aa..dc7d898967 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -68,7 +68,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -120,5 +120,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 63ea3a140b..54c7eca54d 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -72,7 +72,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -124,5 +124,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 750ef913e6..b15f4bf245 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -25,11 +25,11 @@ Get an execution to check its state: :: flytectl get execution -d development -p flytesnacks - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- Terminate multiple executions with their names: :: @@ -41,15 +41,15 @@ Get an execution to find the state of previously terminated executions: :: flytectl get execution -d development -p flytesnacks - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- Usage @@ -79,7 +79,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -131,5 +131,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 260a2f6771..7d90fbbe23 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -73,7 +73,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -125,5 +125,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 90f484e560..2a0c41edfd 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -73,7 +73,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -125,5 +125,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 5659c05253..e30e564be7 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -71,7 +71,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.endpoint string For admin types, specify where the uri of the service is located. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' @@ -123,5 +123,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as executions and resource attributes. From fc2ac0a26682b0217044ce833725f096315cb7ab Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Wed, 11 Jan 2023 15:14:14 -0800 Subject: [PATCH 294/356] Change extra host to host-gateway (#380) Signed-off-by: Yee Hing Tong --- flytectl/pkg/docker/docker_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index da7ce9bcab..cf8901e558 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -50,7 +50,7 @@ var ( } StdWriterPrefixLen = 8 StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 - ExtraHosts = []string{"host.docker.internal:127.0.0.1"} + ExtraHosts = []string{"host.docker.internal:host-gateway"} ) // GetDockerClient will returns the docker client From 249cd10166be059155b24d81dbc9b02908202d3e Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 2 Feb 2023 07:08:14 -0800 Subject: [PATCH 295/356] Upgrade IDL version (#382) --- flytectl/go.mod | 2 +- flytectl/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 50360bd287..28b02e0289 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.2.5 + github.com/flyteorg/flyteidl v1.3.5 github.com/flyteorg/flytestdlib v1.0.13 github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index b489281258..ef5c6c7dc3 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -445,8 +445,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.2.5 h1:oPs0PX9opR9JtWjP5ZH2YMChkbGGL45PIy+90FlaxYc= -github.com/flyteorg/flyteidl v1.2.5/go.mod h1:OJAq333OpInPnMhvVz93AlEjmlQ+t0FAD4aakIYE4OU= +github.com/flyteorg/flyteidl v1.3.5 h1:rSaWMndeENr0QxRKj02kp6N/qQdbgDwpFeZsZbvU45A= +github.com/flyteorg/flyteidl v1.3.5/go.mod h1:OJAq333OpInPnMhvVz93AlEjmlQ+t0FAD4aakIYE4OU= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= From 73d9cb7bc83eef578515fac6c06b48b3c1c5f173 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 8 Feb 2023 14:41:47 -0600 Subject: [PATCH 296/356] Bumping go version to 1.19 (#384) * bumping go version to 1.19 Signed-off-by: Daniel Rammer * update flyte deps Signed-off-by: Daniel Rammer * fixed go generate Signed-off-by: Daniel Rammer * removed dependency upgrades Signed-off-by: Daniel Rammer --------- Signed-off-by: Daniel Rammer --- flytectl/.github/workflows/checks.yml | 12 ++++++------ flytectl/go.mod | 2 +- flytectl/pkg/docker/imagepullpolicy_enumer.go | 1 - flytectl/pkg/printer/outputformat_enumer.go | 1 - 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index 2283b69920..f8291164fe 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -20,7 +20,7 @@ jobs: name: Lint uses: flyteorg/flytetools/.github/workflows/lint.yml@master with: - go-version: 1.18 + go-version: 1.19 tests: name: Unit Tests @@ -28,13 +28,13 @@ jobs: secrets: FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} with: - go-version: 1.18 + go-version: 1.19 generate: name: Check Go Gennerate uses: flyteorg/flytetools/.github/workflows/go_generate.yml@master with: - go-version: 1.18 + go-version: 1.19 dry_run_goreleaser: name: Dry Run Goreleaser @@ -52,7 +52,7 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - name: Run GoReleaser dry run uses: goreleaser/goreleaser-action@v2 with: @@ -74,7 +74,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.19 - name: Build Flytectl binary run: make compile - name: Create a sandbox cluster @@ -104,7 +104,7 @@ jobs: lfs: true - uses: actions/setup-go@v1 with: - go-version: '1.18' + go-version: '1.19' - uses: actions/setup-python@v1 with: python-version: 3.8 diff --git a/flytectl/go.mod b/flytectl/go.mod index 28b02e0289..7204ca0e6b 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -1,6 +1,6 @@ module github.com/flyteorg/flytectl -go 1.18 +go 1.19 require ( github.com/awalterschulze/gographviz v2.0.3+incompatible diff --git a/flytectl/pkg/docker/imagepullpolicy_enumer.go b/flytectl/pkg/docker/imagepullpolicy_enumer.go index a5f09b9ee8..9a44dc09ab 100644 --- a/flytectl/pkg/docker/imagepullpolicy_enumer.go +++ b/flytectl/pkg/docker/imagepullpolicy_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer -type=ImagePullPolicy -trimprefix=ImagePullPolicy --json"; DO NOT EDIT. -// package docker import ( diff --git a/flytectl/pkg/printer/outputformat_enumer.go b/flytectl/pkg/printer/outputformat_enumer.go index ab56b2a009..9085e9209d 100644 --- a/flytectl/pkg/printer/outputformat_enumer.go +++ b/flytectl/pkg/printer/outputformat_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer --type=OutputFormat -json -yaml -trimprefix=OutputFormat"; DO NOT EDIT. -// package printer import ( From cbe889de88e59deaa43000f9a8f05e59daa5551c Mon Sep 17 00:00:00 2001 From: Jeev B Date: Thu, 9 Feb 2023 14:01:38 -0800 Subject: [PATCH 297/356] Support new sandbox-bundled features (#381) * Create a docker volume to persist database and object store Signed-off-by: Jeev B * Cleanup sandbox configuration directory and mount Signed-off-by: Jeev B * Add logic for backward-compatible demo reload Signed-off-by: Jeev B * Fix working directory for exec Signed-off-by: Jeev B * Generate mocks Signed-off-by: Jeev B * Get existing tests passing Signed-off-by: Jeev B * Cleanup volume creation and add a dryRun message Signed-off-by: Jeev B * Use fmt.Errorf in place of errors.New Signed-off-by: Jeev B * Fix build Signed-off-by: Jeev B * Add tests for volume creation Signed-off-by: Jeev B * Add test for volume teardown Signed-off-by: Jeev B * Include code path for volume creation in sandbox start test Signed-off-by: Jeev B * Add tests for demo reload with backward compatibility Signed-off-by: Jeev B * Suppress output of `which` when testing for sandbox version during demo reload --------- Signed-off-by: Jeev B --- .../cmd/config/subcommand/sandbox/teardown.go | 21 ++++ flytectl/cmd/demo/demo.go | 6 +- flytectl/cmd/demo/reload.go | 65 +++++++++- flytectl/cmd/demo/reload_test.go | 72 ++++++++++- flytectl/cmd/demo/teardown.go | 6 +- flytectl/cmd/demo/teardown_test.go | 29 ++++- flytectl/cmd/sandbox/teardown.go | 3 +- flytectl/pkg/docker/docker.go | 5 + flytectl/pkg/docker/docker_util.go | 65 ++++++++-- flytectl/pkg/docker/docker_util_test.go | 27 +++++ flytectl/pkg/docker/mocks/docker.go | 114 ++++++++++++++++++ flytectl/pkg/sandbox/start.go | 24 +++- flytectl/pkg/sandbox/start_test.go | 8 +- flytectl/pkg/sandbox/teardown.go | 16 ++- flytectl/pkg/sandbox/teardown_test.go | 7 +- flytectl/pkg/util/util.go | 3 +- 16 files changed, 427 insertions(+), 44 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/sandbox/teardown.go diff --git a/flytectl/cmd/config/subcommand/sandbox/teardown.go b/flytectl/cmd/config/subcommand/sandbox/teardown.go new file mode 100644 index 0000000000..0e315d6bd0 --- /dev/null +++ b/flytectl/cmd/config/subcommand/sandbox/teardown.go @@ -0,0 +1,21 @@ +package sandbox + +import ( + "fmt" + + "github.com/spf13/pflag" +) + +type TeardownFlags struct { + Volume bool +} + +var ( + DefaultTeardownFlags = &TeardownFlags{} +) + +func (f *TeardownFlags) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("TeardownFlags", pflag.ExitOnError) + cmdFlags.BoolVarP(&f.Volume, fmt.Sprintf("%v%v", prefix, "volume"), "v", f.Volume, "Optional. Clean up Docker volume. This will result in a permanent loss of all data within the database and object store. Use with caution!") + return cmdFlags +} diff --git a/flytectl/cmd/demo/demo.go b/flytectl/cmd/demo/demo.go index 23052175bb..a26b06e657 100644 --- a/flytectl/cmd/demo/demo.go +++ b/flytectl/cmd/demo/demo.go @@ -56,8 +56,10 @@ func CreateDemoCommand() *cobra.Command { Short: reloadShort, Long: reloadLong, PFlagProvider: sandboxCmdConfig.DefaultConfig, DisableFlyteClient: true}, "teardown": {CmdFunc: teardownDemoCluster, Aliases: []string{}, ProjectDomainNotRequired: true, - Short: teardownShort, - Long: teardownLong, DisableFlyteClient: true}, + Short: teardownShort, + Long: teardownLong, + PFlagProvider: sandboxCmdConfig.DefaultTeardownFlags, + DisableFlyteClient: true}, "status": {CmdFunc: demoClusterStatus, Aliases: []string{}, ProjectDomainNotRequired: true, Short: statusShort, Long: statusLong}, diff --git a/flytectl/cmd/demo/reload.go b/flytectl/cmd/demo/reload.go index f7441cf7c6..e7100802de 100644 --- a/flytectl/cmd/demo/reload.go +++ b/flytectl/cmd/demo/reload.go @@ -12,7 +12,8 @@ import ( ) const ( - labelSelector = "app=flyte" + internalBootstrapAgent = "flyte-sandbox-bootstrap" + labelSelector = "app.kubernetes.io/name=flyte-binary" ) const ( reloadShort = "Power cycle the Flyte executable pod, effectively picking up an updated config." @@ -28,8 +29,68 @@ Usage ` ) -// reloadDemoCluster will kill the flyte binary pod so the new one can pick up a new config file +func isLegacySandbox(ctx context.Context, cli docker.Docker, containerID string) (bool, error) { + var result bool + + // Check if sandbox is compatible with new bootstrap mechanism + exec, err := docker.ExecCommend( + ctx, + cli, + containerID, + []string{"sh", "-c", fmt.Sprintf("which %s > /dev/null", internalBootstrapAgent)}, + ) + if err != nil { + return result, err + } + if err = docker.InspectExecResp(ctx, cli, exec.ID); err != nil { + return result, err + } + res, err := cli.ContainerExecInspect(ctx, exec.ID) + if err != nil { + return result, err + } + + result = res.ExitCode != 0 + return result, nil +} + func reloadDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + cli, err := docker.GetDockerClient() + if err != nil { + return err + } + c, err := docker.GetSandbox(ctx, cli) + if err != nil { + return err + } + if c == nil { + return fmt.Errorf("reload failed - could not find an active sandbox") + } + + // Working with a legacy sandbox - fallback to legacy reload mechanism + useLegacyMethod, err := isLegacySandbox(ctx, cli, c.ID) + if err != nil { + return err + } + if useLegacyMethod { + return legacyReloadDemoCluster(ctx) + } + + // At this point we know that we are on a modern sandbox, and we can use the + // internal bootstrap agent to reload the cluster + exec, err := docker.ExecCommend(ctx, cli, c.ID, []string{internalBootstrapAgent}) + if err != nil { + return err + } + if err = docker.InspectExecResp(ctx, cli, exec.ID); err != nil { + return err + } + + return nil +} + +// legacyReloadDemoCluster will kill the flyte binary pod so the new one can pick up a new config file +func legacyReloadDemoCluster(ctx context.Context) error { k8sClient, err := k8s.GetK8sClient(docker.Kubeconfig, K8sEndpoint) if err != nil { fmt.Println("Could not get K8s client") diff --git a/flytectl/cmd/demo/reload_test.go b/flytectl/cmd/demo/reload_test.go index 35ceea040a..ef50033dc7 100644 --- a/flytectl/cmd/demo/reload_test.go +++ b/flytectl/cmd/demo/reload_test.go @@ -1,10 +1,16 @@ package demo import ( + "bufio" + "bytes" "context" + "fmt" "testing" + "github.com/docker/docker/api/types" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/docker/mocks" "github.com/flyteorg/flytectl/pkg/k8s" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -20,14 +26,76 @@ var fakePod = corev1.Pod{ }, ObjectMeta: metav1.ObjectMeta{ Name: "dummyflytepod", - Labels: map[string]string{"app": "flyte"}, + Labels: map[string]string{"app.kubernetes.io/name": "flyte-binary"}, }, } -func TestDemoReload(t *testing.T) { +func sandboxSetup(ctx context.Context, legacy bool) { + mockDocker := &mocks.Docker{} + docker.Client = mockDocker + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{ + { + ID: docker.FlyteSandboxClusterName, + Names: []string{ + docker.FlyteSandboxClusterName, + }, + }, + }, nil) + + // This first set of mocks is for the check for the bootstrap agent. This is + // Expected to fail in legacy sandboxes + var checkLegacySandboxExecExitCode int + if legacy { + checkLegacySandboxExecExitCode = 1 + } + mockDocker.OnContainerExecCreateMatch( + ctx, + docker.FlyteSandboxClusterName, + types.ExecConfig{ + AttachStderr: true, + Tty: true, + WorkingDir: "/", + AttachStdout: true, + Cmd: []string{"sh", "-c", fmt.Sprintf("which %s > /dev/null", internalBootstrapAgent)}, + }, + ).Return(types.IDResponse{ID: "0"}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, "0", types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: bufio.NewReader(bytes.NewReader([]byte{})), + }, nil) + mockDocker.OnContainerExecInspectMatch(ctx, "0").Return(types.ContainerExecInspect{ExitCode: checkLegacySandboxExecExitCode}, nil) + + // Register additional mocks for the actual execution of the bootstrap agent + // in non-legacy sandboxes + if !legacy { + mockDocker.OnContainerExecCreateMatch( + ctx, + docker.FlyteSandboxClusterName, + types.ExecConfig{ + AttachStderr: true, + Tty: true, + WorkingDir: "/", + AttachStdout: true, + Cmd: []string{internalBootstrapAgent}, + }, + ).Return(types.IDResponse{ID: "1"}, nil) + mockDocker.OnContainerExecAttachMatch(ctx, "1", types.ExecStartCheck{}).Return(types.HijackedResponse{ + Reader: bufio.NewReader(bytes.NewReader([]byte{})), + }, nil) + } +} + +func TestReloadLegacy(t *testing.T) { ctx := context.Background() commandCtx := cmdCore.CommandContext{} + sandboxSetup(ctx, false) + err := reloadDemoCluster(ctx, []string{}, commandCtx) + assert.Nil(t, err) +} +func TestDemoReloadLegacy(t *testing.T) { + ctx := context.Background() + commandCtx := cmdCore.CommandContext{} + sandboxSetup(ctx, true) t.Run("No errors", func(t *testing.T) { client := testclient.NewSimpleClientset() _, err := client.CoreV1().Pods("flyte").Create(ctx, &fakePod, v1.CreateOptions{}) diff --git a/flytectl/cmd/demo/teardown.go b/flytectl/cmd/demo/teardown.go index 399a904ab7..2fc59769be 100644 --- a/flytectl/cmd/demo/teardown.go +++ b/flytectl/cmd/demo/teardown.go @@ -3,10 +3,10 @@ package demo import ( "context" - "github.com/flyteorg/flytectl/pkg/sandbox" - "github.com/flyteorg/flytectl/pkg/docker" + "github.com/flyteorg/flytectl/pkg/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" ) @@ -28,5 +28,5 @@ func teardownDemoCluster(ctx context.Context, args []string, cmdCtx cmdCore.Comm if err != nil { return err } - return sandbox.Teardown(ctx, cli) + return sandbox.Teardown(ctx, cli, sandboxCmdConfig.DefaultTeardownFlags) } diff --git a/flytectl/cmd/demo/teardown_test.go b/flytectl/cmd/demo/teardown_test.go index 34a25f23f5..cfe8bcfea7 100644 --- a/flytectl/cmd/demo/teardown_test.go +++ b/flytectl/cmd/demo/teardown_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/docker/docker/api/types" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" @@ -29,7 +30,7 @@ func TestTearDownFunc(t *testing.T) { } containers = append(containers, container1) - t.Run("Success", func(t *testing.T) { + t.Run("SuccessKeepVolume", func(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) @@ -37,23 +38,39 @@ func TestTearDownFunc(t *testing.T) { mockK8sContextMgr := &k8sMocks.ContextOps{} k8s.ContextMgr = mockK8sContextMgr mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) - err := sandbox.Teardown(ctx, mockDocker) + err := sandbox.Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.Nil(t, err) }) - t.Run("Error", func(t *testing.T) { + t.Run("SuccessRemoveVolume", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) + mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) + mockDocker.OnVolumeRemove(ctx, docker.FlyteSandboxVolumeName, true).Return(nil) + mockK8sContextMgr := &k8sMocks.ContextOps{} + k8s.ContextMgr = mockK8sContextMgr + mockK8sContextMgr.OnRemoveContextMatch(mock.Anything).Return(nil) + err := sandbox.Teardown( + ctx, + mockDocker, + &sandboxCmdConfig.TeardownFlags{Volume: true}, + ) + assert.Nil(t, err) + }) + t.Run("ErrorOnContainerRemove", func(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) - err := sandbox.Teardown(ctx, mockDocker) + err := sandbox.Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.NotNil(t, err) }) - t.Run("Error", func(t *testing.T) { + t.Run("ErrorOnContainerList", func(t *testing.T) { ctx := context.Background() mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(nil, fmt.Errorf("err")) - err := sandbox.Teardown(ctx, mockDocker) + err := sandbox.Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.NotNil(t, err) }) diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index 4e209a19c1..4b2fcd0469 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -6,6 +6,7 @@ import ( "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/sandbox" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" cmdCore "github.com/flyteorg/flytectl/cmd/core" ) @@ -27,5 +28,5 @@ func teardownSandboxCluster(ctx context.Context, args []string, cmdCtx cmdCore.C if err != nil { return err } - return sandbox.Teardown(ctx, cli) + return sandbox.Teardown(ctx, cli, sandboxCmdConfig.DefaultTeardownFlags) } diff --git a/flytectl/pkg/docker/docker.go b/flytectl/pkg/docker/docker.go index 46ea3ea141..9d3ccb4efe 100644 --- a/flytectl/pkg/docker/docker.go +++ b/flytectl/pkg/docker/docker.go @@ -6,7 +6,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" specs "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -27,6 +29,9 @@ type Docker interface { ImageList(ctx context.Context, listOption types.ImageListOptions) ([]types.ImageSummary, error) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) CopyFromContainer(ctx context.Context, containerID, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) + VolumeCreate(ctx context.Context, options volume.VolumeCreateBody) (types.Volume, error) + VolumeList(ctx context.Context, filter filters.Args) (volume.VolumeListOKBody, error) + VolumeRemove(ctx context.Context, volumeID string, force bool) error } type FlyteDocker struct { diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index cf8901e558..221fb32eab 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -16,7 +16,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/api/types/volume" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" @@ -24,17 +26,20 @@ import ( ) var ( - FlyteStateDir = f.FilePathJoin(f.UserHomeDir(), ".flyte", "state") - Kubeconfig = f.FilePathJoin(FlyteStateDir, "kubeconfig") - SandboxKubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") - SuccessMessage = "Deploying Flyte..." - FlyteSandboxClusterName = "flyte-sandbox" - Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} - Source = "/root" - StateDirMountDest = "/srv/flyte" - K3sDir = "/etc/rancher/" - Client Docker - Volumes = []mount.Mount{ + FlyteSandboxConfigDir = f.FilePathJoin(f.UserHomeDir(), ".flyte", "sandbox") + Kubeconfig = f.FilePathJoin(FlyteSandboxConfigDir, "kubeconfig") + SandboxKubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") + SuccessMessage = "Deploying Flyte..." + FlyteSandboxClusterName = "flyte-sandbox" + FlyteSandboxVolumeName = "flyte-sandbox" + FlyteSandboxInternalDir = "/var/lib/flyte" + FlyteSandboxInternalConfigDir = f.FilePathJoin(FlyteSandboxInternalDir, "config") + FlyteSandboxInternalStorageDir = f.FilePathJoin(FlyteSandboxInternalDir, "storage") + Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} + Source = "/root" + K3sDir = "/etc/rancher/" + Client Docker + Volumes = []mount.Mount{ { Type: mount.TypeBind, Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), @@ -44,7 +49,7 @@ var ( ExecConfig = types.ExecConfig{ AttachStderr: true, Tty: true, - WorkingDir: Source, + WorkingDir: "/", AttachStdout: true, Cmd: []string{}, } @@ -75,7 +80,7 @@ func GetSandbox(ctx context.Context, cli Docker) (*types.Container, error) { return nil, err } for _, v := range containers { - if strings.Contains(v.Names[0], FlyteSandboxClusterName) { + if strings.TrimLeft(v.Names[0], "/") == FlyteSandboxClusterName { return &v, nil } } @@ -339,3 +344,37 @@ func InspectExecResp(ctx context.Context, cli Docker, containerID string) error } return nil } + +func PrintCreateVolume(name string) { + fmt.Printf("%v Run the following command to create a volume\n", emoji.Sparkle) + fmt.Printf(" docker volume create %v\n", name) +} + +func GetOrCreateVolume( + ctx context.Context, cli Docker, volumeName string, dryRun bool, +) (*types.Volume, error) { + if dryRun { + PrintCreateVolume(volumeName) + return nil, nil + } + + resp, err := cli.VolumeList(ctx, filters.NewArgs( + filters.KeyValuePair{Key: "name", Value: fmt.Sprintf("^%s$", volumeName)}, + )) + if err != nil { + return nil, err + } + switch len(resp.Volumes) { + case 0: + v, err := cli.VolumeCreate(ctx, volume.VolumeCreateBody{Name: volumeName}) + if err != nil { + return nil, err + } + return &v, nil + case 1: + return resp.Volumes[0], nil + default: + // We don't expect to ever arrive at this point + return nil, fmt.Errorf("unexpected error - found multiple volumes with name: %s", volumeName) + } +} diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 79e7dae72e..f1b8f7b33a 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -14,6 +14,8 @@ import ( f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/volume" "github.com/flyteorg/flytectl/pkg/docker/mocks" "github.com/stretchr/testify/mock" @@ -375,6 +377,31 @@ func TestInspectExecResp(t *testing.T) { } +func TestGetOrCreateVolume(t *testing.T) { + t.Run("VolumeExists", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + expected := &types.Volume{Name: "test"} + + mockDocker.OnVolumeList(ctx, filters.NewArgs(filters.KeyValuePair{Key: "name", Value: "^test$"})).Return(volume.VolumeListOKBody{Volumes: []*types.Volume{expected}}, nil) + actual, err := GetOrCreateVolume(ctx, mockDocker, "test", false) + assert.Equal(t, expected, actual, "volumes should match") + assert.Nil(t, err) + }) + t.Run("VolumeDoesNotExist", func(t *testing.T) { + ctx := context.Background() + mockDocker := &mocks.Docker{} + expected := types.Volume{Name: "test"} + + mockDocker.OnVolumeList(ctx, filters.NewArgs(filters.KeyValuePair{Key: "name", Value: "^test$"})).Return(volume.VolumeListOKBody{Volumes: []*types.Volume{}}, nil) + mockDocker.OnVolumeCreate(ctx, volume.VolumeCreateBody{Name: "test"}).Return(expected, nil) + actual, err := GetOrCreateVolume(ctx, mockDocker, "test", false) + assert.Equal(t, expected, *actual, "volumes should match") + assert.Nil(t, err) + }) + +} + func TestDemoPorts(t *testing.T) { _, ports, _ := GetDemoPorts() assert.Equal(t, 5, len(ports)) diff --git a/flytectl/pkg/docker/mocks/docker.go b/flytectl/pkg/docker/mocks/docker.go index a2ddc27cb7..b5361fc957 100644 --- a/flytectl/pkg/docker/mocks/docker.go +++ b/flytectl/pkg/docker/mocks/docker.go @@ -7,6 +7,8 @@ import ( container "github.com/docker/docker/api/types/container" + filters "github.com/docker/docker/api/types/filters" + io "io" mock "github.com/stretchr/testify/mock" @@ -16,6 +18,8 @@ import ( types "github.com/docker/docker/api/types" v1 "github.com/opencontainers/image-spec/specs-go/v1" + + volume "github.com/docker/docker/api/types/volume" ) // Docker is an autogenerated mock type for the Docker type @@ -536,3 +540,113 @@ func (_m *Docker) ImagePull(ctx context.Context, refStr string, options types.Im return r0, r1 } + +type Docker_VolumeCreate struct { + *mock.Call +} + +func (_m Docker_VolumeCreate) Return(_a0 types.Volume, _a1 error) *Docker_VolumeCreate { + return &Docker_VolumeCreate{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnVolumeCreate(ctx context.Context, options volume.VolumeCreateBody) *Docker_VolumeCreate { + c_call := _m.On("VolumeCreate", ctx, options) + return &Docker_VolumeCreate{Call: c_call} +} + +func (_m *Docker) OnVolumeCreateMatch(matchers ...interface{}) *Docker_VolumeCreate { + c_call := _m.On("VolumeCreate", matchers...) + return &Docker_VolumeCreate{Call: c_call} +} + +// VolumeCreate provides a mock function with given fields: ctx, options +func (_m *Docker) VolumeCreate(ctx context.Context, options volume.VolumeCreateBody) (types.Volume, error) { + ret := _m.Called(ctx, options) + + var r0 types.Volume + if rf, ok := ret.Get(0).(func(context.Context, volume.VolumeCreateBody) types.Volume); ok { + r0 = rf(ctx, options) + } else { + r0 = ret.Get(0).(types.Volume) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, volume.VolumeCreateBody) error); ok { + r1 = rf(ctx, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_VolumeList struct { + *mock.Call +} + +func (_m Docker_VolumeList) Return(_a0 volume.VolumeListOKBody, _a1 error) *Docker_VolumeList { + return &Docker_VolumeList{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Docker) OnVolumeList(ctx context.Context, filter filters.Args) *Docker_VolumeList { + c_call := _m.On("VolumeList", ctx, filter) + return &Docker_VolumeList{Call: c_call} +} + +func (_m *Docker) OnVolumeListMatch(matchers ...interface{}) *Docker_VolumeList { + c_call := _m.On("VolumeList", matchers...) + return &Docker_VolumeList{Call: c_call} +} + +// VolumeList provides a mock function with given fields: ctx, filter +func (_m *Docker) VolumeList(ctx context.Context, filter filters.Args) (volume.VolumeListOKBody, error) { + ret := _m.Called(ctx, filter) + + var r0 volume.VolumeListOKBody + if rf, ok := ret.Get(0).(func(context.Context, filters.Args) volume.VolumeListOKBody); ok { + r0 = rf(ctx, filter) + } else { + r0 = ret.Get(0).(volume.VolumeListOKBody) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, filters.Args) error); ok { + r1 = rf(ctx, filter) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type Docker_VolumeRemove struct { + *mock.Call +} + +func (_m Docker_VolumeRemove) Return(_a0 error) *Docker_VolumeRemove { + return &Docker_VolumeRemove{Call: _m.Call.Return(_a0)} +} + +func (_m *Docker) OnVolumeRemove(ctx context.Context, volumeID string, force bool) *Docker_VolumeRemove { + c_call := _m.On("VolumeRemove", ctx, volumeID, force) + return &Docker_VolumeRemove{Call: c_call} +} + +func (_m *Docker) OnVolumeRemoveMatch(matchers ...interface{}) *Docker_VolumeRemove { + c_call := _m.On("VolumeRemove", matchers...) + return &Docker_VolumeRemove{Call: c_call} +} + +// VolumeRemove provides a mock function with given fields: ctx, volumeID, force +func (_m *Docker) VolumeRemove(ctx context.Context, volumeID string, force bool) error { + ret := _m.Called(ctx, volumeID, force) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) error); ok { + r0 = rf(ctx, volumeID, force) + } else { + r0 = ret.Error(0) + } + + return r0 +} diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index f7ac5ed9e9..744bc0a923 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -39,7 +39,7 @@ const ( sandboxImageName = "cr.flyte.org/flyteorg/flyte-sandbox" demoImageName = "cr.flyte.org/flyteorg/flyte-sandbox-bundled" DefaultFlyteConfig = "/opt/flyte/defaults.flyte.yaml" - k3sKubeConfigEnvVar = "K3S_KUBECONFIG_OUTPUT=/srv/flyte/kubeconfig" + k3sKubeConfigEnvVar = "K3S_KUBECONFIG_OUTPUT=/var/lib/flyte/config/kubeconfig" ) func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, error) { @@ -184,11 +184,11 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService volumes = append(volumes, *vol) } - // This is the state directory mount, flyte will write the kubeconfig here. May hold more in future releases + // This is the sandbox configuration directory mount, flyte will write the kubeconfig here. May hold more in future releases // To be interoperable with the old sandbox, only mount if the directory exists, should've created by StartCluster - if fileInfo, err := os.Stat(docker.FlyteStateDir); err == nil { + if fileInfo, err := os.Stat(docker.FlyteSandboxConfigDir); err == nil { if fileInfo.IsDir() { - if vol, err := MountVolume(docker.FlyteStateDir, docker.StateDirMountDest); err != nil { + if vol, err := MountVolume(docker.FlyteSandboxConfigDir, docker.FlyteSandboxInternalConfigDir); err != nil { return nil, err } else if vol != nil { volumes = append(volumes, *vol) @@ -196,6 +196,22 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService } } + // Create and mount a docker volume that will be used to persist data + // across sandbox clusters + if _, err := docker.GetOrCreateVolume( + ctx, + cli, + docker.FlyteSandboxVolumeName, + sandboxConfig.DryRun, + ); err != nil { + return nil, err + } + volumes = append(volumes, mount.Mount{ + Type: mount.TypeVolume, + Source: docker.FlyteSandboxVolumeName, + Target: docker.FlyteSandboxInternalStorageDir, + }) + sandboxImage := sandboxConfig.Image if len(sandboxImage) == 0 { image, version, err := github.GetFullyQualifiedImageName(defaultImagePrefix, sandboxConfig.Version, defaultImageName, sandboxConfig.Prerelease, g) diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index 7bc204ac34..a09797d363 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -19,6 +19,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/volume" sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" @@ -86,6 +88,8 @@ func sandboxSetup() { bodyStatus := make(chan container.ContainerWaitOKBody) githubMock = &ghMocks.GHRepoService{} sandboxCmdConfig.DefaultConfig.Image = "dummyimage" + mockDocker.OnVolumeList(ctx, filters.NewArgs(filters.KeyValuePair{Key: "name", Value: fmt.Sprintf("^%s$", docker.FlyteSandboxVolumeName)})).Return(volume.VolumeListOKBody{Volumes: []*types.Volume{}}, nil) + mockDocker.OnVolumeCreate(ctx, volume.VolumeCreateBody{Name: docker.FlyteSandboxVolumeName}).Return(types.Volume{Name: docker.FlyteSandboxVolumeName}, nil) mockDocker.OnContainerCreateMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(container.ContainerCreateCreatedBody{ ID: "Hello", }, nil) @@ -119,7 +123,8 @@ func TestStartFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - + mockDocker.OnVolumeList(ctx, filters.NewArgs(filters.KeyValuePair{Key: mock.Anything, Value: mock.Anything})).Return(volume.VolumeListOKBody{Volumes: []*types.Volume{}}, nil) + mockDocker.OnVolumeCreate(ctx, volume.VolumeCreateBody{Name: mock.Anything}).Return(types.Volume{}, nil) _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.Nil(t, err) }) @@ -295,7 +300,6 @@ func TestStartFunc(t *testing.T) { mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - stringReader := strings.NewReader(docker.SuccessMessage) reader := ioutil.NopCloser(stringReader) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ diff --git a/flytectl/pkg/sandbox/teardown.go b/flytectl/pkg/sandbox/teardown.go index 633d026833..3881617db6 100644 --- a/flytectl/pkg/sandbox/teardown.go +++ b/flytectl/pkg/sandbox/teardown.go @@ -6,12 +6,13 @@ import ( "github.com/docker/docker/api/types" "github.com/enescakir/emoji" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/k8s" ) -func Teardown(ctx context.Context, cli docker.Docker) error { +func Teardown(ctx context.Context, cli docker.Docker, teardownFlags *sandboxCmdConfig.TeardownFlags) error { c, err := docker.GetSandbox(ctx, cli) if err != nil { return err @@ -24,12 +25,19 @@ func Teardown(ctx context.Context, cli docker.Docker) error { } } if err := configutil.ConfigCleanup(); err != nil { - fmt.Printf("Config cleanup failed. Which Failed due to %v \n ", err) + fmt.Printf("Config cleanup failed. Which Failed due to %v\n", err) } if err := removeSandboxKubeContext(); err != nil { - fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v \n ", err) + fmt.Printf("Kubecontext cleanup failed. Which Failed due to %v\n", err) } - fmt.Printf("%v %v Sandbox cluster is removed successfully. \n", emoji.Broom, emoji.Broom) + // Teardown volume if option is specified + if teardownFlags.Volume { + if err := cli.VolumeRemove(ctx, docker.FlyteSandboxVolumeName, true); err != nil { + fmt.Printf("Volume cleanup failed. Which Failed due to %v\n", err) + } + } + + fmt.Printf("%v %v Sandbox cluster is removed successfully.\n", emoji.Broom, emoji.Broom) return nil } diff --git a/flytectl/pkg/sandbox/teardown_test.go b/flytectl/pkg/sandbox/teardown_test.go index 9047ee7614..3f3702c9ad 100644 --- a/flytectl/pkg/sandbox/teardown_test.go +++ b/flytectl/pkg/sandbox/teardown_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/docker/docker/api/types" + sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/docker/mocks" "github.com/flyteorg/flytectl/pkg/k8s" @@ -28,12 +29,12 @@ func TestTearDownFunc(t *testing.T) { mockDocker := &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(containers, nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("err")) - err := Teardown(ctx, mockDocker) + err := Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.NotNil(t, err) mockDocker = &mocks.Docker{} mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return(nil, fmt.Errorf("err")) - err = Teardown(ctx, mockDocker) + err = Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.NotNil(t, err) mockDocker = &mocks.Docker{} @@ -42,7 +43,7 @@ func TestTearDownFunc(t *testing.T) { mockK8sContextMgr := &k8sMocks.ContextOps{} mockK8sContextMgr.OnRemoveContext(mock.Anything).Return(nil) k8s.ContextMgr = mockK8sContextMgr - err = Teardown(ctx, mockDocker) + err = Teardown(ctx, mockDocker, sandboxCmdConfig.DefaultTeardownFlags) assert.Nil(t, err) } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index ece882279a..a851ac4e9d 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -11,7 +11,6 @@ import ( "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" - f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/enescakir/emoji" hversion "github.com/hashicorp/go-version" @@ -57,7 +56,7 @@ func CreatePathAndFile(pathToConfig string) error { // SetupFlyteDir will create .flyte dir if not exist func SetupFlyteDir() error { - if err := os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "state"), os.ModePerm); err != nil { + if err := os.MkdirAll(docker.FlyteSandboxConfigDir, os.ModePerm); err != nil { return err } From 9e3af15dd3924732a0331490e0cc88a33e5dc683 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:59:48 -0800 Subject: [PATCH 298/356] Recognize windows arm as a valid OS+arch combination (#386) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/install.sh b/flytectl/install.sh index 57860ba297..1110e4e737 100755 --- a/flytectl/install.sh +++ b/flytectl/install.sh @@ -68,6 +68,7 @@ get_binaries() { linux/arm64) BINARIES="flytectl" ;; windows/386) BINARIES="flytectl" ;; windows/amd64) BINARIES="flytectl" ;; + windows/arm64) BINARIES="flytectl" ;; *) log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new" exit 1 From ce18a96e5111d27d67257d76b7c94c33eb2bd779 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Tue, 14 Feb 2023 09:13:59 +0800 Subject: [PATCH 299/356] refactor: remove redundant YAML packages (#387) At the time of making this commit, the package `github.com/ghodss/yaml` is no longer actively maintained. `sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively maintained by Kubernetes SIG. Signed-off-by: Eng Zer Jun --- .../config/subcommand/project/project_config.go | 4 ++-- flytectl/go.mod | 17 +++++++---------- flytectl/go.sum | 6 ++++-- flytectl/pkg/printer/printer.go | 5 ++--- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 0cf927f67a..8fa34ff6a5 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -5,10 +5,10 @@ import ( "io/ioutil" "github.com/flyteorg/flytectl/clierrors" - "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "gopkg.in/yaml.v2" + + "gopkg.in/yaml.v3" ) //go:generate pflags Config --default-var DefaultConfig --bind-default-var diff --git a/flytectl/go.mod b/flytectl/go.mod index 7204ca0e6b..4c82429e98 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -3,14 +3,15 @@ module github.com/flyteorg/flytectl go 1.19 require ( + github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/disiqueira/gotree v1.0.0 github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 github.com/flyteorg/flyteidl v1.3.5 + github.com/flyteorg/flytepropeller v1.1.1 github.com/flyteorg/flytestdlib v1.0.13 - github.com/ghodss/yaml v1.0.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.2 github.com/google/go-github/v42 v42.0.0 @@ -30,21 +31,15 @@ require ( github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 + golang.org/x/text v0.3.7 google.golang.org/grpc v1.46.0 google.golang.org/protobuf v1.28.0 - gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + gopkg.in/yaml.v3 v3.0.1 gotest.tools v2.2.0+incompatible k8s.io/api v0.21.3 k8s.io/apimachinery v0.21.3 k8s.io/client-go v0.21.3 - sigs.k8s.io/yaml v1.2.0 -) - -require ( - github.com/avast/retry-go v3.0.0+incompatible - github.com/flyteorg/flytepropeller v1.1.1 - golang.org/x/text v0.3.7 + sigs.k8s.io/yaml v1.3.0 ) require ( @@ -81,6 +76,7 @@ require ( github.com/flyteorg/flyteplugins v1.0.0 // indirect github.com/flyteorg/stow v0.3.6 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logr/logr v0.4.0 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect @@ -143,6 +139,7 @@ require ( google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.8.0 // indirect k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index ef5c6c7dc3..196a6544a0 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1825,8 +1825,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -1960,7 +1961,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= volcano.sh/apis v1.2.0-k8s1.19.6/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index f231c32baf..f1b23d92a8 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -9,19 +9,18 @@ import ( "sort" "strings" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytectl/pkg/visualize" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytestdlib/errors" - "github.com/ghodss/yaml" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/kataras/tablewriter" "github.com/landoop/tableprinter" "github.com/pkg/browser" "github.com/yalp/jsonpath" + "sigs.k8s.io/yaml" ) //go:generate enumer --type=OutputFormat -json -yaml -trimprefix=OutputFormat From 5f9a2fb16ba848692c6f7c337fa0954a49258388 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 22 Feb 2023 11:45:14 -0800 Subject: [PATCH 300/356] Adding support for structured dataset and also for node outputs in details flag (#390) * Adding support for structured dataset and also for node outputs in details flag Signed-off-by: pmahindrakar-oss * using released idl Signed-off-by: pmahindrakar-oss --------- Signed-off-by: pmahindrakar-oss --- flytectl/cmd/get/node_execution.go | 8 ++++++++ flytectl/go.mod | 2 +- flytectl/go.sum | 7 ++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 8700272c0f..61695ece53 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -3,6 +3,7 @@ package get import ( "bytes" "context" + "fmt" "sort" "strconv" @@ -37,6 +38,7 @@ const ( taskExtResourceTokenPrefix = "Ext Resource Token : " //nolint taskResourcePrefix = "Resource Pool Info" taskLogsPrefix = "Logs :" + outputsPrefix = "Outputs :" taskLogsNamePrefix = "Name :" taskLogURIPrefix = "URI :" hyphenPrefix = " - " @@ -249,6 +251,12 @@ func createNodeDetailsTreeView(rootView gotree.Tree, nodeExecutionClosures []*No createNodeDetailsTreeView(nExecView, nodeExecWrapper.ChildNodes) } createNodeTaskExecTreeView(nExecView, nodeExecWrapper.TaskExecutions) + if len(nodeExecWrapper.Outputs) > 0 { + outputsView := nExecView.Add(outputsPrefix) + for outputKey, outputVal := range nodeExecWrapper.Outputs { + outputsView.Add(fmt.Sprintf("%s: %v", outputKey, outputVal)) + } + } } return rootView } diff --git a/flytectl/go.mod b/flytectl/go.mod index 4c82429e98..a6c1a397ec 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.3.5 + github.com/flyteorg/flyteidl v1.3.8 github.com/flyteorg/flytepropeller v1.1.1 github.com/flyteorg/flytestdlib v1.0.13 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 196a6544a0..3c52c3091f 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -445,8 +445,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.3.5 h1:rSaWMndeENr0QxRKj02kp6N/qQdbgDwpFeZsZbvU45A= -github.com/flyteorg/flyteidl v1.3.5/go.mod h1:OJAq333OpInPnMhvVz93AlEjmlQ+t0FAD4aakIYE4OU= +github.com/flyteorg/flyteidl v1.3.8 h1:3/7P/I2VpNNrLTw95kLge1IEyPGXPIgenw2itiuSPh0= +github.com/flyteorg/flyteidl v1.3.8/go.mod h1:Pkt2skI1LiHs/2ZoekBnyPhuGOFMiuul6HHcKGZBsbM= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= @@ -749,7 +749,6 @@ github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -1135,7 +1134,6 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vektra/mockery v1.1.2/go.mod h1:VcfZjKaFOPO+MpN4ZvwPjs4c48lkq1o3Ym8yHZJu0jU= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1554,7 +1552,6 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= From a0a2fc2788006ed58e7f4bab07ce334e47abcd3c Mon Sep 17 00:00:00 2001 From: Honnix Date: Tue, 7 Mar 2023 01:32:19 +0100 Subject: [PATCH 301/356] Remove go as dependency of brew formula (#395) Signed-off-by: Honnix --- flytectl/.goreleaser.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 17e2499506..cb93a7fb2f 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -84,6 +84,3 @@ brews: # Default is false. skip_upload: auto - - dependencies: - - name: go From 083cdbd84309b5313e195c67cfb7c56d8be8c7a4 Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Wed, 8 Mar 2023 04:13:52 +0530 Subject: [PATCH 302/356] Doc updates (#398) Signed-off-by: pmahindrakar-oss --- flytectl/docs/source/demo.rst | 1 + flytectl/docs/source/gen/flytectl.rst | 120 +++++++------- flytectl/docs/source/gen/flytectl_compile.rst | 118 +++++++------- .../docs/source/gen/flytectl_completion.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_config.rst | 118 +++++++------- .../source/gen/flytectl_config_discover.rst | 122 +++++++------- .../docs/source/gen/flytectl_config_docs.rst | 122 +++++++------- .../docs/source/gen/flytectl_config_init.rst | 136 ++++++++-------- .../source/gen/flytectl_config_validate.rst | 122 +++++++------- flytectl/docs/source/gen/flytectl_create.rst | 118 +++++++------- .../source/gen/flytectl_create_execution.rst | 149 ++++++++++-------- .../source/gen/flytectl_create_project.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_delete.rst | 118 +++++++------- ...ectl_delete_cluster-resource-attribute.rst | 118 +++++++------- ...lytectl_delete_execution-cluster-label.rst | 118 +++++++------- ...tectl_delete_execution-queue-attribute.rst | 118 +++++++------- .../source/gen/flytectl_delete_execution.rst | 134 ++++++++-------- .../gen/flytectl_delete_plugin-override.rst | 118 +++++++------- ...lytectl_delete_task-resource-attribute.rst | 118 +++++++------- ...tectl_delete_workflow-execution-config.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_demo.rst | 119 +++++++------- .../docs/source/gen/flytectl_demo_exec.rst | 118 +++++++------- .../docs/source/gen/flytectl_demo_reload.rst | 116 ++++++++++++++ .../docs/source/gen/flytectl_demo_start.rst | 134 +++++++++------- .../docs/source/gen/flytectl_demo_status.rst | 118 +++++++------- .../source/gen/flytectl_demo_teardown.rst | 121 +++++++------- flytectl/docs/source/gen/flytectl_get.rst | 118 +++++++------- ...lytectl_get_cluster-resource-attribute.rst | 118 +++++++------- .../flytectl_get_execution-cluster-label.rst | 118 +++++++------- ...flytectl_get_execution-queue-attribute.rst | 118 +++++++------- .../source/gen/flytectl_get_execution.rst | 118 +++++++------- .../source/gen/flytectl_get_launchplan.rst | 123 ++++++++------- .../gen/flytectl_get_plugin-override.rst | 118 +++++++------- .../docs/source/gen/flytectl_get_project.rst | 118 +++++++------- .../flytectl_get_task-resource-attribute.rst | 118 +++++++------- .../docs/source/gen/flytectl_get_task.rst | 118 +++++++------- ...flytectl_get_workflow-execution-config.rst | 118 +++++++------- .../docs/source/gen/flytectl_get_workflow.rst | 118 +++++++------- .../docs/source/gen/flytectl_register.rst | 118 +++++++------- .../source/gen/flytectl_register_examples.rst | 118 +++++++------- .../source/gen/flytectl_register_files.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_sandbox.rst | 124 ++++++++------- .../docs/source/gen/flytectl_sandbox_exec.rst | 118 +++++++------- .../source/gen/flytectl_sandbox_start.rst | 122 +++++++------- .../source/gen/flytectl_sandbox_status.rst | 118 +++++++------- .../source/gen/flytectl_sandbox_teardown.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_update.rst | 118 +++++++------- ...ectl_update_cluster-resource-attribute.rst | 118 +++++++------- ...lytectl_update_execution-cluster-label.rst | 118 +++++++------- ...tectl_update_execution-queue-attribute.rst | 118 +++++++------- .../source/gen/flytectl_update_execution.rst | 118 +++++++------- .../gen/flytectl_update_launchplan-meta.rst | 118 +++++++------- .../source/gen/flytectl_update_launchplan.rst | 123 ++++++++------- .../gen/flytectl_update_plugin-override.rst | 118 +++++++------- .../source/gen/flytectl_update_project.rst | 118 +++++++------- .../source/gen/flytectl_update_task-meta.rst | 118 +++++++------- ...lytectl_update_task-resource-attribute.rst | 118 +++++++------- ...tectl_update_workflow-execution-config.rst | 118 +++++++------- .../gen/flytectl_update_workflow-meta.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_upgrade.rst | 118 +++++++------- flytectl/docs/source/gen/flytectl_version.rst | 118 +++++++------- 61 files changed, 3855 insertions(+), 3343 deletions(-) create mode 100644 flytectl/docs/source/gen/flytectl_demo_reload.rst diff --git a/flytectl/docs/source/demo.rst b/flytectl/docs/source/demo.rst index b103d98ff5..ce9a3b00e1 100644 --- a/flytectl/docs/source/demo.rst +++ b/flytectl/docs/source/demo.rst @@ -10,3 +10,4 @@ These are the actions which can be performed on the 'demo' resource. gen/flytectl_demo_status gen/flytectl_demo_teardown gen/flytectl_demo_exec + gen/flytectl_demo_reload diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 274e087f25..c30c126970 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -16,63 +16,69 @@ Options :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - -h, --help help for flytectl - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + -h, --help help for flytectl + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_compile.rst b/flytectl/docs/source/gen/flytectl_compile.rst index ad2fc9b207..0e1785242f 100644 --- a/flytectl/docs/source/gen/flytectl_compile.rst +++ b/flytectl/docs/source/gen/flytectl_compile.rst @@ -42,62 +42,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 197129d77a..aedf9442c5 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -89,62 +89,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 7a21b2b490..98b30282d7 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -25,62 +25,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 6937304aa5..092093e469 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -27,64 +27,70 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index 390891fc17..b6c9cb869e 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -27,64 +27,70 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 46b00cbda4..07cd65bd1c 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -20,7 +20,6 @@ Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about the Sandbox deployment :ref:`here `. Generate remote cluster config: - :: flytectl config init --host=flyte.myexample.com @@ -29,11 +28,15 @@ By default, the connection is secure. Read more about remote deployment :ref:`here `. Generate remote cluster config with insecure connection: - :: flytectl config init --host=flyte.myexample.com --insecure + Generate remote cluster config with separate console endpoint: + :: + + flytectl config init --host=flyte.myexample.com --console=console.myexample.com + Generate Flytectl config with a storage provider: :: @@ -49,73 +52,80 @@ Options :: - -h, --help help for init - --host string Endpoint of flyte admin - --insecure Enable insecure mode + --console string Endpoint of console, if different than flyte admin + -h, --help help for init + --host string Endpoint of flyte admin + --insecure Enable insecure mode Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index fef71a32aa..9d9491da9b 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -29,64 +29,70 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --file stringArray Passes the config file to load. - If empty, it'll first search for the config file path then, if found, will load config from there. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --file stringArray Passes the config file to load. + If empty, it'll first search for the config file path then, if found, will load config from there. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index cf6d658bd8..7a28ca97aa 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -28,62 +28,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index c4982a939d..4fdbf89b93 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -63,13 +63,13 @@ It is worth noting that the source's and target's project and domain can be diff flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -To relaunch an execution, pass the current execution ID as follows: +4. To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development -To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: +5. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: @@ -77,7 +77,15 @@ To recover an execution, i.e., recreate it from the last known failure point for See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. -Generic data types are supported for execution in a similar manner. +6. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, +an execution id has to be unique within a project domain. So if the *name* matches an existing execution an already exists exceptioj +will be raised. + +:: + + flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development custom_name + +7. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. The following is an example of how generic data can be specified while creating the execution. :: @@ -97,7 +105,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": +8. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -121,7 +129,12 @@ Modified file with struct data populated for 'x' and 'y' parameters for the task task: core.type_system.custom_objects.add version: v3 -Usage +9. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor + that supports cluster pools, then when creating a new execution, you can assign it to a specific cluster pool: + +:: + + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d development --clusterPool my-gpu-cluster :: @@ -133,15 +146,17 @@ Options :: + --clusterPool string specify which cluster pool to assign execution to. --dryRun execute command without making any modifications. - --execFile string file for the execution params.If not specified defaults to <_name>.execution_spec.yaml + --execFile string file for the execution params. If not specified defaults to <_name>.execution_spec.yaml -h, --help help for execution --iamRoleARN string iam role ARN AuthRole for launching execution. --kubeServiceAcct string kubernetes service account AuthRole for launching execution. + --overwriteCache skip cached results when performing execution, causing all outputs to be re-calculated and stored data to be overwritten. Does not work for recovered executions. --recover string execution id to be recreated from the last known failure point. --relaunch string execution id to be relaunched. - --targetDomain string project where execution needs to be created.If not specified configured domain would be used. - --targetProject string project where execution needs to be created.If not specified configured project would be used. + --targetDomain string project where execution needs to be created. If not specified configured domain would be used. + --targetProject string project where execution needs to be created. If not specified configured project would be used. --task string --version string specify version of execution workflow/task. --workflow string @@ -151,62 +166,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index 68cd30b40e..a8e6b370aa 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -64,62 +64,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 1be2ff2eff..d338a8618b 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -28,62 +28,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index 8b85c1038b..a8ae5e39ac 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -63,62 +63,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index dc7d898967..92ac7a3b5b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -60,62 +60,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 54c7eca54d..74c8504ed8 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -64,62 +64,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index b15f4bf245..71577b850b 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -25,11 +25,11 @@ Get an execution to check its state: :: flytectl get execution -d development -p flytesnacks - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- Terminate multiple executions with their names: :: @@ -41,15 +41,15 @@ Get an execution to find the state of previously terminated executions: :: flytectl get execution -d development -p flytesnacks - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | - ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- Usage @@ -71,62 +71,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index 7d90fbbe23..e2e2d6f426 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -65,62 +65,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 2a0c41edfd..8e3c540585 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -65,62 +65,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index e30e564be7..7678e17fd6 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -63,62 +63,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index 1ff897a135..904d048264 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -46,68 +46,75 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ * :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_demo_exec` - Executes non-interactive command inside the demo container +* :doc:`flytectl_demo_reload` - Power cycle the Flyte executable pod, effectively picking up an updated config. * :doc:`flytectl_demo_start` - Starts the Flyte demo cluster. * :doc:`flytectl_demo_status` - Gets the status of the demo environment. * :doc:`flytectl_demo_teardown` - Cleans up the demo environment diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index 5f85653189..6b360fbe38 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -35,62 +35,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_demo_reload.rst b/flytectl/docs/source/gen/flytectl_demo_reload.rst new file mode 100644 index 0000000000..09bd874661 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_demo_reload.rst @@ -0,0 +1,116 @@ +.. _flytectl_demo_reload: + +flytectl demo reload +-------------------- + +Power cycle the Flyte executable pod, effectively picking up an updated config. + +Synopsis +~~~~~~~~ + + + +If you've changed the ~/.flyte/state/flyte.yaml file, run this command to restart the Flyte binary pod, effectively +picking up the new settings: + +Usage +:: + + flytectl demo reload + + + +:: + + flytectl demo reload [flags] + +Options +~~~~~~~ + +:: + + --dev Optional. Only start minio and postgres in the sandbox. + --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' + --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + -h, --help help for reload + --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. + --imagePullOptions.platform string Forces a specific platform's image to be pulled.' + --imagePullOptions.registryAuth string The base64 encoded credentials for the registry. + --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) + --pre Optional. Pre release Version of flyte will be used for sandbox. + --source string deprecated, path of your source code, please build images with local daemon + --version string Version of flyte. Only supports flyte releases greater than v0.10.0 + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_demo` - Helps with demo interactions like start, teardown, status, and exec. + diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index 4c4d62f210..ef1ae5ad90 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -18,6 +18,11 @@ Starts the demo cluster without any source code: flytectl demo start +Runs a dev cluster, which only has minio and postgres pod. +:: + + flytectl demo start --dev + Mounts your source code repository inside the demo cluster: :: @@ -43,7 +48,7 @@ Runs a specific version of Flyte. Flytectl demo only supports Flyte version avai .. note:: Flytectl demo is only supported for Flyte versions >= v1.0.0 -Runs the latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl demo start --pre @@ -68,6 +73,11 @@ eg : for passing multiple environment variables flytectl demo start --env USER=foo --env PASSWORD=bar +For just printing the docker commands for bringing up the demo container +:: + + flytectl demo start --dryRun + Usage @@ -80,6 +90,8 @@ Options :: + --dev Optional. Only start minio and postgres in the sandbox. + --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. @@ -87,7 +99,7 @@ Options --imagePullOptions.registryAuth string The base64 encoded credentials for the registry. --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) --pre Optional. Pre release Version of flyte will be used for sandbox. - --source string Path of your source code + --source string deprecated, path of your source code, please build images with local daemon --version string Version of flyte. Only supports flyte releases greater than v0.10.0 Options inherited from parent commands @@ -95,62 +107,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index 1d44f1de5a..296de34f75 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -35,62 +35,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index f7d9608965..544f9179bc 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -28,69 +28,76 @@ Options :: - -h, --help help for teardown + -h, --help help for teardown + -v, --volume Optional. Clean up Docker volume. This will result in a permanent loss of all data within the database and object store. Use with caution! Options inherited from parent commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index e80e57b43e..1710535505 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -28,62 +28,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index 03ba02c382..e047a87002 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -71,62 +71,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 74b6acb350..ed79e39e96 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -70,62 +70,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index ef8d50e124..3be1a9b9a7 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -73,62 +73,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 8c735a726f..e460dbecde 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -103,62 +103,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 8e8bcdb4f1..12df2747f5 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -16,9 +16,10 @@ Retrieve all launch plans within the project and domain: flytectl get launchplan -p flytesnacks -d development .. note:: - The terms launchplan/launchplans are interchangeable in these commands. + + The terms launchplan/launchplans are interchangeable in these commands. - Retrieve a launch plan by name within the project and domain: +Retrieve a launch plan by name within the project and domain: :: @@ -137,62 +138,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index bc9267aaa8..21d69b8bc6 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -92,62 +92,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 91d3b2e5c4..b3136ffe85 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -75,62 +75,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index c9077ea1a3..095c0c5983 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -75,62 +75,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 3502df9aa2..8f54e8f280 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -119,62 +119,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 1b505cd60a..9850f7bf6f 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -132,62 +132,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 1d356e1028..7584c765c4 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -103,62 +103,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index ab165d19c9..234c1210da 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -28,62 +28,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 91d8ade049..438b6feff4 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -54,62 +54,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index a70618de81..633984e3ba 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -131,62 +131,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 21084366a4..87f1cda5ee 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -33,6 +33,12 @@ To execute commands inside the sandbox container, use exec: flytectl sandbox exec -- pwd +For just printing the docker commands for bringingup the demo container +:: + + flytectl demo start --dryRun + + Options ~~~~~~~ @@ -46,62 +52,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 51dac4ef61..1bfbb38742 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -35,62 +35,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index fc1c0ca112..13d0af086a 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -85,6 +85,8 @@ Options :: + --dev Optional. Only start minio and postgres in the sandbox. + --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. @@ -92,7 +94,7 @@ Options --imagePullOptions.registryAuth string The base64 encoded credentials for the registry. --imagePullPolicy ImagePullPolicy Optional. Defines the image pull behavior [Always/IfNotPresent/Never] (default Always) --pre Optional. Pre release Version of flyte will be used for sandbox. - --source string Path of your source code + --source string deprecated, path of your source code, please build images with local daemon --version string Version of flyte. Only supports flyte releases greater than v0.10.0 Options inherited from parent commands @@ -100,62 +102,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 497eeed6ef..0eb7f19c07 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -35,62 +35,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 89adadd478..7a52bc5dff 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -35,62 +35,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index a82adf140e..0dfd304ab4 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -30,62 +30,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index d9c40d97fd..21f631bb28 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -70,62 +70,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 867cc54e9c..67cfd6f911 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -63,62 +63,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 73ac2f84c0..5b6f11e623 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -74,62 +74,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 5df845f7ab..3dd6920c9d 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -43,62 +43,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 33633ec6e4..a6fc2310c6 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -48,62 +48,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 01bc49a6a4..a3292dc8a0 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -10,17 +10,16 @@ Synopsis -Activates a launch plan which activates the scheduled job associated with it: +Activates a `launch plan `__ which activates the scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate -Archives a launch plan which deschedules any scheduled job associated with it: +Archives `(deactivates) `__ a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive - Usage @@ -44,62 +43,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 570d234da8..ebfb2fb165 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -76,62 +76,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index ffcef7e10a..051de3238b 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -103,62 +103,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 7e7256abfc..6470e908fd 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -48,62 +48,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 33f5ca64b4..91512cacd4 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -76,62 +76,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 79cc25e306..0049564cd7 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -72,62 +72,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index d1f4079d0d..0e8fa19a82 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -48,62 +48,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index 9c1141fe7a..b44645a51d 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -43,62 +43,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 406996f5bd..ce0ea2e057 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -32,62 +32,68 @@ Options inherited from parent commands :: - --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") - --admin.authorizationHeader string Custom metadata header to pass JWT - --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint - --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. - --admin.clientId string Client ID (default "flytepropeller") - --admin.clientSecretEnvVar string Environment variable containing the client secret - --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") - --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string - --admin.endpoint string For admin types, specify where the uri of the service is located. - --admin.insecure Use insecure connection. - --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' - --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") - --admin.maxRetries int Max number of gRPC retries (default 4) - --admin.perRetryTimeout string gRPC per retry timeout (default "15s") - --admin.pkceConfig.refreshTime string (default "5m0s") - --admin.pkceConfig.timeout string (default "15s") - --admin.scopes strings List of scopes to request - --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") - --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. - --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. - -c, --config string config file (default is $HOME/.flyte/config.yaml) - -d, --domain string Specifies the Flyte project's domain. - --files.archive Pass in archive file either an http link or local path. - --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. - --files.continueOnError Continue on error when registering files. - --files.destinationDirectory string Location of source code in container. - --files.dryRun Execute command without making any modifications. - --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. - --files.force Force use of version number on entities registered with flyte. - --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount - --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. - --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). - --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. - --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. - --logger.formatter.type string Sets logging format type. (default "json") - --logger.level int Sets the minimum logging level. (default 3) - --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. - --logger.show-source Includes source code location in logs. - -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") - -p, --project string Specifies the Flyte project. - --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used - --storage.cache.target_gc_percent int Sets the garbage collection target percentage. - --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. - --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") - --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. - --storage.connection.endpoint string URL for storage client to connect to. - --storage.connection.region string Region to connect to. (default "us-east-1") - --storage.connection.secret-key string Secret to use when accesskey is set. - --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' - --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") - --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered - --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) - --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) - --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow - --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + --admin.audience string Audience to use when initiating OAuth2 authorization requests. + --admin.authType string Type of OAuth2 flow used for communicating with admin.ClientSecret, Pkce, ExternalCommand are valid values (default "ClientSecret") + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IdP's authorization server. It'll default to Endpoint + --admin.caCertFilePath string Use specified certificate file to verify the admin server peer. + --admin.clientId string Client ID (default "flytepropeller") + --admin.clientSecretEnvVar string Environment variable containing the client secret + --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") + --admin.command strings Command for external authentication token generation + --admin.defaultServiceConfig string + --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") + --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.pkceConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") + --admin.pkceConfig.timeout string Amount of time the browser session would be active for authentication from client app. (default "2m0s") + --admin.scopes strings List of scopes to request + --admin.tokenRefreshWindow string Max duration between token refresh attempt and token expiry. (default "0s") + --admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided. + --admin.useAudienceFromAdmin Use Audience configured from admins public endpoint config. + --admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information. + -c, --config string config file (default is $HOME/.flyte/config.yaml) + --console.endpoint string Endpoint of console, if different than flyte admin + -d, --domain string Specifies the Flyte project's domain. + --files.archive Pass in archive file either an http link or local path. + --files.assumableIamRole string Custom assumable iam auth role to register launch plans with. + --files.continueOnError Continue on error when registering files. + --files.destinationDirectory string Location of source code in container. + --files.dryRun Execute command without making any modifications. + --files.enableSchedule Enable the schedule if the files contain schedulable launchplan. + --files.force Force use of version number on entities registered with flyte. + --files.k8ServiceAccount string Deprecated. Please use --K8sServiceAccount + --files.k8sServiceAccount string Custom kubernetes service account auth role to register launch plans with. + --files.outputLocationPrefix string Custom output location prefix for offloaded types (files/schemas). + --files.sourceUploadPath string Deprecated: Update flyte admin to avoid having to configure storage access from flytectl. + --files.version string Version of the entity to be registered with flyte which are un-versioned after serialization. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 3) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE") + -p, --project string Specifies the Flyte project. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container (in s3 a bucket) to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.stow.config stringToString Configuration for stow backend. Refer to github/flyteorg/stow (default []) + --storage.stow.kind string Kind of Stow backend to use. Refer to github/flyteorg/stow + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") SEE ALSO ~~~~~~~~ From b8770eec77024300586bf4e8d897c5f0af50389b Mon Sep 17 00:00:00 2001 From: Ankit Goyal Date: Wed, 8 Mar 2023 01:32:20 -0800 Subject: [PATCH 303/356] Fix docs for updating description using workflow-meta subcommand (#394) * Fix docs Signed-off-by: Ankit Goyal * add generated docs Signed-off-by: Ankit Goyal --------- Signed-off-by: Ankit Goyal Signed-off-by: Ankit Goyal --- flytectl/cmd/update/workflow_meta.go | 6 +++--- flytectl/docs/source/gen/flytectl_update_workflow-meta.rst | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index 6da5c6bff0..b30743b67f 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the workflow: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" Archiving workflow named entity would cause this to disappear from flyteconsole UI: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive Activate workflow named entity: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate Usage ` diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 0e8fa19a82..6765578ab8 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the workflow: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --description "Mergesort workflow example" Archiving workflow named entity would cause this to disappear from flyteconsole UI: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --archive Activate workflow named entity: :: - flytectl update workflow -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate + flytectl update workflow-meta -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --activate Usage From d69f4b754fcfda948a6a1424aae2b1e927764749 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Tue, 14 Mar 2023 13:53:47 -0700 Subject: [PATCH 304/356] Add support for gate nodes (#399) * Add support for gate nodes Signed-off-by: eduardo apolinario * Linting Signed-off-by: eduardo apolinario --------- Signed-off-by: eduardo apolinario Co-authored-by: eduardo apolinario --- flytectl/cmd/register/register_util.go | 2 + flytectl/cmd/register/register_util_test.go | 59 +++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 0f646c89b5..714e30c76b 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -245,6 +245,8 @@ func hydrateNode(node *core.Node, version string, force bool) error { default: return fmt.Errorf("unknown type %T", branchNodeWrapper.BranchNode.IfElse.Default) } + case *core.Node_GateNode: + // Do nothing. default: return fmt.Errorf("unknown type %T", v) } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 6e31565cec..97a39082d2 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -35,6 +35,7 @@ import ( "github.com/stretchr/testify/mock" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/durationpb" ) type MockHTTPClient struct { @@ -501,6 +502,64 @@ func TestHydrateNode(t *testing.T) { }) } +func TestHydrateGateNode(t *testing.T) { + t.Run("Hydrate Sleep", func(t *testing.T) { + registerFilesSetup() + // Write a node that contains a GateNode + node := &core.Node{ + Target: &core.Node_GateNode{ + GateNode: &core.GateNode{ + Condition: &core.GateNode_Sleep{ + Sleep: &core.SleepCondition{ + Duration: &durationpb.Duration{ + Seconds: 10, + }, + }, + }, + }, + }, + } + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) + assert.Nil(t, err) + }) + + t.Run("Hydrate Signal", func(t *testing.T) { + registerFilesSetup() + // Write a node that contains a GateNode + node := &core.Node{ + Target: &core.Node_GateNode{ + GateNode: &core.GateNode{ + Condition: &core.GateNode_Signal{ + Signal: &core.SignalCondition{ + SignalId: "abc", + }, + }, + }, + }, + } + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) + assert.Nil(t, err) + }) + + t.Run("Hydrate Approve", func(t *testing.T) { + registerFilesSetup() + // Write a node that contains a GateNode + node := &core.Node{ + Target: &core.Node_GateNode{ + GateNode: &core.GateNode{ + Condition: &core.GateNode_Approve{ + Approve: &core.ApproveCondition{ + SignalId: "abc", + }, + }, + }, + }, + } + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) + assert.Nil(t, err) + }) +} + func TestHydrateTaskSpec(t *testing.T) { testScope := promutils.NewTestScope() labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) From e292dd98b536c65453eace9d20f6752b6d069fb8 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 14 Apr 2023 00:21:42 +0800 Subject: [PATCH 305/356] Update workflow_execution_config (#401) * update workflow_execution_config Signed-off-by: Kevin Su * update workflow_execution_config Signed-off-by: Kevin Su --------- Signed-off-by: Kevin Su --- .../delete/matchable_workflow_execution_config.go | 6 +++--- .../update/matchable_workflow_execution_config.go | 12 ++++++------ .../flytectl_delete_workflow-execution-config.rst | 6 +++--- .../flytectl_update_workflow-execution-config.rst | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index d0a40c15c4..ad387d4ccd 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -34,9 +34,9 @@ For example, here's the config file wec.yaml: domain: development project: flytesnacks max_parallelism: 5 - security_context: - run_as: - k8s_service_account: demo + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index d6bf2a2ad5..b9489d67ff 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -27,9 +27,9 @@ Example: content of wec.yaml: domain: development project: flytesnacks max_parallelism: 5 - security_context: - run_as: - k8s_service_account: demo + security_context: + run_as: + k8s_service_account: demo :: @@ -45,9 +45,9 @@ For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, d project: flytesnacks workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 - security_context: - run_as: - k8s_service_account: mergesortsa + security_context: + run_as: + k8s_service_account: mergesortsa :: diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 7678e17fd6..6376d8d73c 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -30,9 +30,9 @@ For example, here's the config file wec.yaml: domain: development project: flytesnacks max_parallelism: 5 - security_context: - run_as: - k8s_service_account: demo + security_context: + run_as: + k8s_service_account: demo Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 0049564cd7..9d8bc3188a 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -24,9 +24,9 @@ Example: content of wec.yaml: domain: development project: flytesnacks max_parallelism: 5 - security_context: - run_as: - k8s_service_account: demo + security_context: + run_as: + k8s_service_account: demo :: @@ -42,9 +42,9 @@ For workflow 'core.control_flow.merge_sort.merge_sort' in flytesnacks project, d project: flytesnacks workflow: core.control_flow.merge_sort.merge_sort max_parallelism: 5 - security_context: - run_as: - k8s_service_account: mergesortsa + security_context: + run_as: + k8s_service_account: mergesortsa :: From 3ae90aa6f77022427e80bb40950319978ed728f9 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 17 Apr 2023 15:17:10 -0700 Subject: [PATCH 306/356] Respect project state in project.yaml file (#402) --- .../subcommand/project/project_config.go | 5 +++++ flytectl/cmd/update/project.go | 5 ----- flytectl/cmd/update/project_test.go | 20 ++++++++++--------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 8fa34ff6a5..a6e8fcebd6 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -68,6 +68,11 @@ func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { projectSpec.Labels = &admin.Labels{ Values: c.Labels, } + projectState, err := c.MapToAdminState() + if err != nil { + return nil, err + } + projectSpec.State = projectState return &projectSpec, nil } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 0da542b763..7f8b2589e9 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -92,11 +92,6 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma return fmt.Errorf(clierrors.ErrProjectNotPassed) } - state, err := project.DefaultProjectConfig.MapToAdminState() - if err != nil { - return err - } - projectSpec.State = state if project.DefaultProjectConfig.DryRun { logger.Infof(ctx, "skipping UpdateProject request (dryRun)") } else { diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index d33ce6e374..b3838b59ac 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -27,9 +27,11 @@ func updateProjectSetup() { } } -func modifyProjectFlags(archiveProject *bool, newArchiveVal bool, activateProject *bool, newActivateVal bool) { - *archiveProject = newArchiveVal - *activateProject = newActivateVal +func modifyProjectFlags(newArchiveVal bool, newActivateVal bool) { + project.DefaultProjectConfig.ArchiveProject = newArchiveVal + project.DefaultProjectConfig.Archive = newArchiveVal + project.DefaultProjectConfig.ActivateProject = newActivateVal + project.DefaultProjectConfig.Activate = newActivateVal } func TestActivateProjectFunc(t *testing.T) { @@ -37,7 +39,7 @@ func TestActivateProjectFunc(t *testing.T) { updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) + modifyProjectFlags(false, true) projectUpdateRequest = &admin.Project{ Id: projectValue, Name: projectValue, @@ -58,7 +60,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) + modifyProjectFlags(false, true) projectUpdateRequest = &admin.Project{ Id: projectValue, Name: projectValue, @@ -80,7 +82,7 @@ func TestArchiveProjectFunc(t *testing.T) { config.GetConfig().Project = projectValue project.DefaultProjectConfig = &project.ConfigProject{} project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), false) + modifyProjectFlags(true, false) projectUpdateRequest = &admin.Project{ Id: projectValue, Name: projectValue, @@ -101,7 +103,7 @@ func TestArchiveProjectFuncWithError(t *testing.T) { updateProjectSetup() project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), false) + modifyProjectFlags(true, false) projectUpdateRequest = &admin.Project{ Id: projectValue, Name: projectValue, @@ -122,7 +124,7 @@ func TestEmptyProjectInput(t *testing.T) { s := setup() updateProjectSetup() config.GetConfig().Project = "" - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), false, &(project.DefaultProjectConfig.ActivateProject), true) + modifyProjectFlags(false, true) err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrProjectNotPassed), err) @@ -133,7 +135,7 @@ func TestInvalidInput(t *testing.T) { updateProjectSetup() config.GetConfig().Project = projectValue project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(&(project.DefaultProjectConfig.ArchiveProject), true, &(project.DefaultProjectConfig.ActivateProject), true) + modifyProjectFlags(true, true) err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) From b8ee84f0d76c96e5a672262b1d285dd0d99c7e58 Mon Sep 17 00:00:00 2001 From: Honnix Date: Thu, 18 May 2023 01:35:33 +0200 Subject: [PATCH 307/356] Print instruction after teardown (#403) * Print instruction after teardown Signed-off-by: Hongxin Liang * Add unit test Signed-off-by: Hongxin Liang * Fix import Signed-off-by: Hongxin Liang * Delete unused functions Signed-off-by: Hongxin Liang * Try fixing doc build Signed-off-by: Hongxin Liang * Name Signed-off-by: Hongxin Liang --------- Signed-off-by: Hongxin Liang --- flytectl/doc-requirements.in | 2 +- flytectl/doc-requirements.txt | 2 +- flytectl/docs/source/conf.py | 2 +- flytectl/pkg/sandbox/start.go | 6 +++--- flytectl/pkg/sandbox/teardown.go | 2 ++ flytectl/pkg/util/util.go | 18 +++++++++++------- flytectl/pkg/util/util_test.go | 10 ++++++++-- 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 1bcf77f9be..0bdd65dd01 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -5,5 +5,5 @@ sphinx-material sphinx-code-include sphinx-copybutton sphinx_fontawesome -sphinxcontrib-yt +sphinxcontrib-youtube sphinx-panels diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 070d7493af..65b0f20ea3 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -90,7 +90,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sphinxcontrib-yt==0.2.2 +sphinxcontrib-youtube==1.2.0 # via -r doc-requirements.in text-unidecode==1.3 # via python-slugify diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 419e02fd71..9d28a8f1d3 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -43,7 +43,7 @@ "sphinx-prompt", "sphinx_copybutton", "sphinx_fontawesome", - "sphinxcontrib.yt", + "sphinxcontrib.youtube", "sphinx_panels", ] diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 744bc0a923..344003ca94 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -162,7 +162,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService return nil, err } fmt.Printf("Existing details of your sandbox") - util.PrintSandboxMessage(consolePort, docker.Kubeconfig, sandboxConfig.DryRun) + util.PrintSandboxStartMessage(consolePort, docker.Kubeconfig, sandboxConfig.DryRun) return nil, nil } } @@ -429,7 +429,7 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox if err != nil { return err } - util.PrintDemoMessage(util.DemoConsolePort, docker.Kubeconfig, sandboxConfig.DryRun) + util.PrintDemoStartMessage(util.DemoConsolePort, docker.Kubeconfig, sandboxConfig.DryRun) return nil } @@ -444,6 +444,6 @@ func StartSandboxCluster(ctx context.Context, args []string, sandboxConfig *sand if err != nil { return err } - util.PrintSandboxMessage(util.SandBoxConsolePort, docker.SandboxKubeconfig, sandboxConfig.DryRun) + util.PrintSandboxStartMessage(util.SandBoxConsolePort, docker.SandboxKubeconfig, sandboxConfig.DryRun) return nil } diff --git a/flytectl/pkg/sandbox/teardown.go b/flytectl/pkg/sandbox/teardown.go index 3881617db6..231a4eb309 100644 --- a/flytectl/pkg/sandbox/teardown.go +++ b/flytectl/pkg/sandbox/teardown.go @@ -10,6 +10,7 @@ import ( "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/k8s" + "github.com/flyteorg/flytectl/pkg/util" ) func Teardown(ctx context.Context, cli docker.Docker, teardownFlags *sandboxCmdConfig.TeardownFlags) error { @@ -38,6 +39,7 @@ func Teardown(ctx context.Context, cli docker.Docker, teardownFlags *sandboxCmdC } fmt.Printf("%v %v Sandbox cluster is removed successfully.\n", emoji.Broom, emoji.Broom) + util.PrintSandboxTeardownMessage(util.SandBoxConsolePort, docker.SandboxKubeconfig) return nil } diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index a851ac4e9d..146ba6ec50 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -72,8 +72,8 @@ func SetupFlyteDir() error { return nil } -// PrintDemoMessage will print sandbox success message -func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { +// PrintDemoStartMessage will print demo start success message +func PrintDemoStartMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { kubeconfig := strings.Join([]string{ "$KUBECONFIG", kubeconfigLocation, @@ -84,10 +84,9 @@ func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bo successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) } else { successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) - } fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) - fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) + fmt.Printf("%v Run the following command to export demo environment variables for accessing flytectl\n", emoji.Sparkle) fmt.Printf(" export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) if dryRun { fmt.Printf("%v Run the following command to export kubeconfig variables for accessing flyte pods locally\n", emoji.Sparkle) @@ -97,8 +96,8 @@ func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bo fmt.Printf("%s The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console\n", emoji.OpenFileFolder) } -// PrintSandboxMessage will print sandbox success message -func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { +// PrintSandboxStartMessage will print sandbox start success message +func PrintSandboxStartMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { kubeconfig := strings.Join([]string{ "$KUBECONFIG", kubeconfigLocation, @@ -109,7 +108,6 @@ func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) } else { successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) - } fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) @@ -120,6 +118,12 @@ func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun } } +// PrintSandboxTeardownMessage will print sandbox teardown success message +func PrintSandboxTeardownMessage(flyteConsolePort int, kubeconfigLocation string) { + fmt.Printf("%v Run the following command to unset sandbox environment variables for accessing flytectl\n", emoji.Sparkle) + fmt.Printf(" unset FLYTECTL_CONFIG \n") +} + // SendRequest will create request and return the response func SendRequest(method, url string, option io.Reader) (*http.Response, error) { client := &http.Client{} diff --git a/flytectl/pkg/util/util_test.go b/flytectl/pkg/util/util_test.go index 492dc2623f..dd9de2a1c1 100644 --- a/flytectl/pkg/util/util_test.go +++ b/flytectl/pkg/util/util_test.go @@ -27,9 +27,15 @@ func TestSetupFlyteDir(t *testing.T) { assert.Nil(t, SetupFlyteDir()) } -func TestPrintSandboxMessage(t *testing.T) { +func TestPrintSandboxStartMessage(t *testing.T) { t.Run("Print Sandbox Message", func(t *testing.T) { - PrintSandboxMessage(SandBoxConsolePort, docker.SandboxKubeconfig, false) + PrintSandboxStartMessage(SandBoxConsolePort, docker.SandboxKubeconfig, false) + }) +} + +func TestPrintSandboxTeardownMessage(t *testing.T) { + t.Run("Print Sandbox Message", func(t *testing.T) { + PrintSandboxTeardownMessage(SandBoxConsolePort, docker.SandboxKubeconfig) }) } From d7f247b13c0ceab851e462a11dce8c3075b81adb Mon Sep 17 00:00:00 2001 From: Jeev B Date: Sat, 27 May 2023 21:20:06 -0700 Subject: [PATCH 308/356] When preleases are allowed for demo sandbox, simply choose the latest release (#407) Signed-off-by: Jeev B --- flytectl/pkg/github/githubutil.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index 486e75845e..f76d7f7580 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -123,10 +123,11 @@ func GetSandboxImageSha(tag string, pre bool, g GHRepoService) (string, string, return "", release.GetTagName(), err } for _, v := range releases { - if *v.Prerelease && pre { + // When pre-releases are allowed, simply choose the latest release + if pre { release = v break - } else if !*v.Prerelease && !pre { + } else if !*v.Prerelease { release = v break } From 2c3ffc2963f7e63b053785356f63bd3db82d0948 Mon Sep 17 00:00:00 2001 From: Honnix Date: Mon, 5 Jun 2023 20:26:14 +0200 Subject: [PATCH 309/356] Support envs when creating execution (#408) * Support envs when creating execution Signed-off-by: Hongxin Liang * Update doc Signed-off-by: Hongxin Liang --------- Signed-off-by: Hongxin Liang --- flytectl/cmd/create/execution.go | 34 +- flytectl/cmd/create/execution_test.go | 1 + flytectl/cmd/create/execution_util.go | 20 +- flytectl/cmd/create/execution_util_test.go | 56 ++++ flytectl/cmd/get/execution_util.go | 1 + flytectl/go.mod | 2 +- flytectl/go.sum | 366 ++++++++++++++++++++- 7 files changed, 466 insertions(+), 14 deletions(-) diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 5c6c01b327..839fa6e34e 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -60,20 +60,39 @@ The generated spec file can be modified to change the input values, as shown bel task: core.control_flow.merge_sort.merge version: "v2" -3. Run the execution by passing the generated YAML file. +3. [Optional] Update the envs for the execution, if needed. +The generated spec file can be modified to change the envs values, as shown below: + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + envs: + foo: bar + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.control_flow.merge_sort.merge + version: "v2" + +4. Run the execution by passing the generated YAML file. The file can then be passed through the command line. It is worth noting that the source's and target's project and domain can be different. :: flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -4. To relaunch an execution, pass the current execution ID as follows: +5. To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development -5. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: +6. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: @@ -81,7 +100,7 @@ It is worth noting that the source's and target's project and domain can be diff See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. -6. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, +7. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, an execution id has to be unique within a project domain. So if the *name* matches an existing execution an already exists exceptioj will be raised. @@ -89,7 +108,7 @@ will be raised. flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development custom_name -7. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. +8. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. The following is an example of how generic data can be specified while creating the execution. :: @@ -109,7 +128,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -8. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": +9. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -133,7 +152,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -9. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor +10. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor that supports cluster pools, then when creating a new execution, you can assign it to a specific cluster pool: :: @@ -162,6 +181,7 @@ type ExecutionConfig struct { Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` Inputs map[string]interface{} `json:"inputs" pflag:"-"` + Envs map[string]string `json:"envs" pflag:"-"` } type ExecutionType int diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 7aabf5897d..399f97abb2 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -184,6 +184,7 @@ func (s *createSuite) Test_CreateTaskExecution() { }, }, ClusterAssignment: &admin.ClusterAssignment{ClusterPoolName: "gpu"}, + Envs: &admin.Envs{}, }, } s.MockAdminClient. diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index 0f81b80636..ea67980004 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -35,6 +35,8 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName, projec Literals: paramLiterals, } + envs := makeEnvs(executionConfig) + // Set both deprecated field and new field for security identity passing var securityContext *core.SecurityContext var authRole *admin.AuthRole @@ -52,7 +54,7 @@ func createExecutionRequestForWorkflow(ctx context.Context, workflowName, projec } } - return createExecutionRequest(lp.Id, inputs, securityContext, authRole, targetExecName), nil + return createExecutionRequest(lp.Id, inputs, envs, securityContext, authRole, targetExecName), nil } func createExecutionRequestForTask(ctx context.Context, taskName string, project string, domain string, @@ -73,6 +75,8 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project Literals: variableLiterals, } + envs := makeEnvs(executionConfig) + // Set both deprecated field and new field for security identity passing var securityContext *core.SecurityContext var authRole *admin.AuthRole @@ -98,7 +102,7 @@ func createExecutionRequestForTask(ctx context.Context, taskName string, project Version: task.Id.Version, } - return createExecutionRequest(id, inputs, securityContext, authRole, targetExecName), nil + return createExecutionRequest(id, inputs, envs, securityContext, authRole, targetExecName), nil } func relaunchExecution(ctx context.Context, executionName string, project string, domain string, @@ -144,8 +148,7 @@ func recoverExecution(ctx context.Context, executionName string, project string, return nil } -func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securityContext *core.SecurityContext, - authRole *admin.AuthRole, targetExecName string) *admin.ExecutionCreateRequest { +func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, envs *admin.Envs, securityContext *core.SecurityContext, authRole *admin.AuthRole, targetExecName string) *admin.ExecutionCreateRequest { if len(targetExecName) == 0 { targetExecName = "f" + strings.ReplaceAll(uuid.New().String(), "-", "")[:19] @@ -169,6 +172,7 @@ func createExecutionRequest(ID *core.Identifier, inputs *core.LiteralMap, securi SecurityContext: securityContext, ClusterAssignment: clusterAssignment, OverwriteCache: executionConfig.OverwriteCache, + Envs: envs, }, Inputs: inputs, } @@ -251,3 +255,11 @@ func readConfigAndValidate(project string, domain string) (ExecutionParams, erro } return ExecutionParams{name: name, execType: execType}, nil } + +func makeEnvs(executionConfig *ExecutionConfig) *admin.Envs { + var values []*core.KeyValuePair + for key, value := range executionConfig.Envs { + values = append(values, &core.KeyValuePair{Key: key, Value: value}) + } + return &admin.Envs{Values: values} +} diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index 87eb39bd38..bbfeccdc56 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -91,6 +91,30 @@ func TestCreateExecutionRequestForWorkflow(t *testing.T) { assert.Nil(t, err) assert.NotNil(t, execCreateRequest) }) + t.Run("successful with envs", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + launchPlan := &admin.LaunchPlan{} + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) + var executionConfigWithEnvs = &ExecutionConfig{ + Envs: map[string]string{"foo": "bar"}, + } + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfigWithEnvs, "") + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) + t.Run("successful with empty envs", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + launchPlan := &admin.LaunchPlan{} + s.FetcherExt.OnFetchLPVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(launchPlan, nil) + var executionConfigWithEnvs = &ExecutionConfig{ + Envs: map[string]string{}, + } + execCreateRequest, err := createExecutionRequestForWorkflow(s.Ctx, "wfName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfigWithEnvs, "") + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) t.Run("failed literal conversion", func(t *testing.T) { s := setup() createExecutionUtilSetup() @@ -144,6 +168,38 @@ func TestCreateExecutionRequestForTask(t *testing.T) { assert.Nil(t, err) assert.NotNil(t, execCreateRequest) }) + t.Run("successful with envs", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + task := &admin.Task{ + Id: &core.Identifier{ + Name: "taskName", + }, + } + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) + var executionConfigWithEnvs = &ExecutionConfig{ + Envs: map[string]string{"foo": "bar"}, + } + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfigWithEnvs, "") + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) + t.Run("successful with empty envs", func(t *testing.T) { + s := setup() + createExecutionUtilSetup() + task := &admin.Task{ + Id: &core.Identifier{ + Name: "taskName", + }, + } + s.FetcherExt.OnFetchTaskVersionMatch(s.Ctx, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(task, nil) + var executionConfigWithEnvs = &ExecutionConfig{ + Envs: map[string]string{}, + } + execCreateRequest, err := createExecutionRequestForTask(s.Ctx, "taskName", config.GetConfig().Project, config.GetConfig().Domain, s.CmdCtx, executionConfigWithEnvs, "") + assert.Nil(t, err) + assert.NotNil(t, execCreateRequest) + }) t.Run("failed literal conversion", func(t *testing.T) { s := setup() createExecutionUtilSetup() diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 65b72175a5..2397ee2ff8 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -19,6 +19,7 @@ import ( type ExecutionConfig struct { IamRoleARN string `yaml:"iamRoleARN"` Inputs map[string]yaml.Node `yaml:"inputs"` + Envs map[string]string `yaml:"envs"` KubeServiceAcct string `yaml:"kubeServiceAcct"` TargetDomain string `yaml:"targetDomain"` TargetProject string `yaml:"targetProject"` diff --git a/flytectl/go.mod b/flytectl/go.mod index a6c1a397ec..7a58eb186b 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.3.8 + github.com/flyteorg/flyteidl v1.5.10 github.com/flyteorg/flytepropeller v1.1.1 github.com/flyteorg/flytestdlib v1.0.13 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 3c52c3091f..53f29a7edd 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -39,6 +40,7 @@ cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNF cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= @@ -47,13 +49,16 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= @@ -64,6 +69,7 @@ cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7ni cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -119,11 +125,18 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295 h1:xJ0dAkuxJXfwdH7IaSzBEbSQxEDz36YUmt7+CB4zoNA= +github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625 h1:cQyO5JQ2iuHnEcF3v24kdDMsgh04RjyFPDtuvD6PCE0= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= +github.com/Jeffail/gabs/v2 v2.5.1 h1:ANfZYjpMlfTTKebycu4X1AgkVWumFVDYQl7JwOr4mDk= github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -142,39 +155,62 @@ github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg3 github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M= github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3 h1:4FA+QBaydEHlwxg0lMN3rhwoDaQy6LKhVWR4qvq4BuA= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= +github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c h1:RoL0r3mR3JSkLur8q8AD59cByJ+kRwJHODNimZBd7GI= github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -184,7 +220,9 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= +github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d h1:O+ayl/Vp3bDEXReXItmYHzCnsz/LKusXdRNiJKVxjPs= github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d/go.mod h1:mZUP7GJmjiWtf8v3FD1X/QdK08BqyeH/1Ejt0qhNzCs= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -195,74 +233,113 @@ github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= +github.com/aws/aws-sdk-go-v2 v1.2.0 h1:BS+UYpbsElC82gB+2E2jiCBg36i8HlubTB/dO/moQ9c= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.0.0 h1:x6vSFAwqAvhYPeSu60f0ZUlGHo3PKKmwDOTL8aMXtv4= github.com/aws/aws-sdk-go-v2/config v1.0.0/go.mod h1:WysE/OpUgE37tjtmtJd8GXgT8s1euilE5XtUkRNUQ1w= +github.com/aws/aws-sdk-go-v2/credentials v1.0.0 h1:0M7netgZ8gCV4v7z1km+Fbl7j6KQYyZL7SS0/l5Jn/4= github.com/aws/aws-sdk-go-v2/credentials v1.0.0/go.mod h1:/SvsiqBf509hG4Bddigr3NB12MIpfHhZapyBurJe8aY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0 h1:lO7fH5n7Q1dKcDBpuTmwJylD1bOQiRig8LI6TD9yVQk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0/go.mod h1:wpMHDCXvOXZxGCRSidyepa8uJHY4vaBGfY2/+oKU/Bc= +github.com/aws/aws-sdk-go-v2/service/athena v1.0.0 h1:UfrZP3NMTTKpOsf/P8uCaOxz3U2CNGEizdQKcObY7Ds= github.com/aws/aws-sdk-go-v2/service/athena v1.0.0/go.mod h1:qY8QFbemf2ceqweXcS6hQqiiIe1z42WqTvHsK2Lb0rE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0 h1:IAutMPSrynpvKOpHG6HyWHmh1xmxWAmYOK84NrQVqVQ= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0/go.mod h1:3jExOmpbjgPnz2FJaMOfbSk1heTkZ66aD3yNtVhnjvI= +github.com/aws/aws-sdk-go-v2/service/sts v1.0.0 h1:6XCgxNfE4L/Fnq+InhVNd16DKc6Ue1f3dJl3IwwJRUQ= github.com/aws/aws-sdk-go-v2/service/sts v1.0.0/go.mod h1:5f+cELGATgill5Pu3/vK3Ebuigstc+qYEHW5MvGWZO4= github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/aws/smithy-go v1.1.0 h1:D6CSsM3gdxaGaqXnPgOBCeL6Mophqzu7KJOu7zW78sU= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bradleyfalzon/ghinstallation/v2 v2.0.3 h1:ywF/8q+GVpvlsEuvRb1SGSDQDUxntW1d4kFu/9q/YAE= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44 h1:y853v6rXx+zefEcjET3JuKAqvhj+FKflQijjeaSv2iA= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0 h1:TW8f/UvntYoVDMN1K2HlT82qH1rb0sOjpGw3m6Ym+i4= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY= github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA= github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= @@ -270,11 +347,13 @@ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1 github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -297,70 +376,92 @@ github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2 h1:YbJAhpTevL2v6u8JC1NhCYRwf+3Vzxcc5vGnYoJ7VeE= github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1 h1:LBwiTfoUsdiEGAR1TpvxE+Gzt7469oVu87iR3mv3Byc= github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0 h1:cXLJbx+4Jj7rNsTiqVfm6i+RNLx6FFA2fMmDlEf+Wm8= github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1 h1:prL8l9w3ntVqXvNH1CiNn5ENjcCnr38JqpSyvKKB4GI= github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0 h1:mw6SAibtHKZcNzAsOxjoHIG0gy5YFHhypWSSNc6EjbQ= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -368,20 +469,29 @@ github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKY github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c h1:Xo2rK1pzOm0jO6abTPIQwbAmqBIOj132otexc1mmzFc= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0 h1:suYBsYZIkSlUMEz4TAYCczKf62IA2UWC+O8+KtdOhCo= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5 h1:+CpLbZIeUn94m02LdEKPcgErLJ347NUwxPKs5u8ieiY= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4 h1:itqmmf1PFpC4n5JW+j4BU7X4MTfVurhYRTjODoPb2Y8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/disiqueira/gotree v1.0.0 h1:en5wk87n7/Jyk6gVME3cx3xN9KmUCstJ1IjHr4Se4To= github.com/disiqueira/gotree v1.0.0/go.mod h1:7CwL+VWsWAU95DovkdRZAtA7YbtHwGk+tLV/kNi8niU= @@ -400,25 +510,36 @@ github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= @@ -431,8 +552,11 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +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 v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -443,10 +567,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.3.8 h1:3/7P/I2VpNNrLTw95kLge1IEyPGXPIgenw2itiuSPh0= -github.com/flyteorg/flyteidl v1.3.8/go.mod h1:Pkt2skI1LiHs/2ZoekBnyPhuGOFMiuul6HHcKGZBsbM= +github.com/flyteorg/flyteidl v1.5.10 h1:SHeiaWRt8EAVuFsat+BJswtc07HTZ4DqhfTEYSm621k= +github.com/flyteorg/flyteidl v1.5.10/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= @@ -457,31 +582,44 @@ github.com/flyteorg/flytestdlib v1.0.13/go.mod h1:nIBmBHtjTJvhZEn3e/EwVC/iMkR2tU github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= 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 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -491,63 +629,79 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= +github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U= +github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= @@ -556,6 +710,7 @@ github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZg github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -571,6 +726,7 @@ github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -586,6 +742,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -607,8 +764,10 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -625,6 +784,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github/v39 v39.0.0 h1:pygGA5ySwxEez1N39GnDauD0PaWWuGgayudyZAc941s= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -655,8 +815,11 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/readahead v0.0.0-20161222183148-eaceba169032 h1:6Be3nkuJFyRfCgr6qTIzmRp8y9QwDIbqy/nYr9WDPos= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -678,10 +841,15 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -690,7 +858,9 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -704,23 +874,36 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.12.0 h1:k3y1FYv6nuKyNTqj6w9gXOx5r5CfLj/k/euUeBXj1OY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= @@ -728,13 +911,20 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -745,11 +935,16 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56 h1:742eGXur0715JMq73aD95/FU0XpVKXqNuTnEfXsLOYQ= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -758,8 +953,11 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -769,9 +967,12 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= @@ -779,33 +980,47 @@ github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWc github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13 h1:eSvu8Tmq6j2psUJqJrLcWH6K3w5Dwc+qipbaA6eVEN4= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= 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/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kubeflow/common v0.4.0 h1:7NQzVoN9fvFP6npj4pG6iii/IC+K6NHy3OJPew96Eyw= github.com/kubeflow/common v0.4.0/go.mod h1:X15/dRQQoB77wrqrPwVn4GqG2ubgk8xR24A80i61d/4= +github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec h1:TQEPmrkz2xJH6nR8BJxGBIoZlJ1UTp6yYbIz/PiY9ts= github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec/go.mod h1:cTBmZKLlrIXBWQ0A9Ik8h0i4zoGhR7ApHwUfrLDbhQc= +github.com/kubeflow/pytorch-operator v0.6.0 h1:y9Vzk7Jd5H/s610Y+ucURypCHgJugB25UL8GEz4DRL4= github.com/kubeflow/pytorch-operator v0.6.0/go.mod h1:zHblV+yTwVG4PCgKTU2wPfOmQ6TJdfT87lDfHrP1a1Y= +github.com/kubeflow/tf-operator v0.5.3 h1:Ejn5vEAwHBKHU2sJTlUIRpezqIX3WeqXZ2dZx6zn6vY= github.com/kubeflow/tf-operator v0.5.3/go.mod h1:EBtz5LQoKaHUl/5fV5vD1qXVNVNyn3TrFaH6eVoQ8SY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -818,7 +1033,9 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -835,29 +1052,43 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/pkcs11 v1.0.3 h1:iMwmD7I5225wv84WxIG/bmxz9AXjWvTWIbM/TYHvWtw= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/symlink v0.1.0 h1:MTFZ74KtNI6qQQpuBxU+uKCim4WtOMokr03hCfJcazE= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= @@ -869,34 +1100,49 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mouuff/go-rocket-update v1.5.1 h1:qGgUu/MP+aVQ63laEguRNimmNTPKs29xz0lZW6QRFaQ= github.com/mouuff/go-rocket-update v1.5.1/go.mod h1:CnOyUYCxAJyC1g1mebSGC7gJysLTlX+RpxKgD1B0zLs= +github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -918,6 +1164,7 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -934,27 +1181,39 @@ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59P github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= @@ -962,9 +1221,12 @@ github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhEC 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= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= @@ -973,15 +1235,20 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/sftp v1.13.4 h1:Lb0RYJCmgUcBgZosfoi9Y9sbl6+LJgOIgk/2Y4YjMFg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 h1:xoIK0ctDddBMnc74udxJYBqlo9Ylnsp1waqjLsnef20= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1032,24 +1299,38 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 h1:2c1EFnZHIPCW8qKWgHMH/fX2PkSabFc5mrVzfUNdg5U= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/sagikazarmark/crypt v0.5.0 h1:K6qABjdpr5rjHCw6q4rSdeM+8kNmdIHvEPDvEMkoai4= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -1060,10 +1341,14 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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= @@ -1098,10 +1383,14 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1122,30 +1411,46 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0NllBLdjWoD1nDfaqu98YMv+OneaKc8sPOA= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f h1:mvXjJIHRZyhNuGassLTcXTwjiWq7NmjdavZsUnmFybQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= @@ -1154,21 +1459,32 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= +go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= +go.etcd.io/etcd/client/v2 v2.305.2 h1:ymrVwTkefuqA/rPkSW7/B4ApijbPVefRumkY+stNfS0= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1181,22 +1497,28 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1240,6 +1562,7 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1252,8 +1575,10 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -1265,6 +1590,7 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -1364,6 +1690,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1580,6 +1907,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= 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= @@ -1587,6 +1915,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1640,6 +1969,7 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8 h1:Cpp2P6TPjujNoC5M2KHY6g7wfyLYfIWRZaSdIKfDasA= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1764,6 +2094,7 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1780,7 +2111,9 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1789,10 +2122,15 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1801,13 +2139,18 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= +gopkg.in/kothar/go-backblaze.v0 v0.0.0-20210124194846-35409b867216 h1:2TSTkQ8PMvGOD5eeqqRVv6Z9+BYI+bowK97RCr3W+9M= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1825,6 +2168,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -1838,6 +2182,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= @@ -1877,6 +2222,7 @@ k8s.io/apiserver v0.19.6/go.mod h1:05XquZxCDzQ27ebk7uV2LrFIK4lm5Yt47XkkUvLAoAM= k8s.io/apiserver v0.19.9/go.mod h1:g6zpD+kcZFlO73pktPWRvL0tUGqj7/KaOowmRk8EpGg= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6 h1:NnVriMMOpqQX+dshbDoZixqmBhfgrPk2uOh2fzp9vHE= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= @@ -1896,6 +2242,7 @@ k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8 k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.19.6/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/code-generator v0.19.9/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= +k8s.io/code-generator v0.20.1 h1:kre3GNich5gbO3d1FyTT8fHI4ZJezZV217yFdWlQaRQ= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= @@ -1905,18 +2252,22 @@ k8s.io/component-base v0.19.9/go.mod h1:x9UmpImvXgVry1s9/hINgLz6iGBYUGvy3Xm7KZh1 k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6 h1:G0inASS5vAqCpzs7M4Sp9dv9d0aElpz39zDHbSB4f4g= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6 h1:iXX0K2pRrbR8yXbZtDK/bSnmg/uSqIFiVJK1x4LUOMc= k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded h1:JApXBKYyB7l9xx+DK7/+mFjC7A9Bt5A93FPvFD0HIFE= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -1930,7 +2281,9 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/sample-controller v0.19.9 h1:t1d9lOiVbxHs77/XljqtvdQkqWI1G0olWZZo6RUBnPA= k8s.io/sample-controller v0.19.9/go.mod h1:pzC7f1rPpf0+o9rg45Ju8GY83nGARzWABmPblej9v/M= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1939,18 +2292,25 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15 h1:4uqm9Mv+w2MmBYD+F4qf/v6tDFUdPOk29C095RbU5mY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/controller-runtime v0.8.2 h1:SBWmI0b3uzMIUD/BIXWNegrCeZmPJ503pOtwxY0LPHM= sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= +sigs.k8s.io/controller-tools v0.3.0 h1:y3YD99XOyWaXkiF1kd41uRvfp/64teWcrEZFuHxPhJ4= sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= @@ -1961,5 +2321,7 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +volcano.sh/apis v1.2.0-k8s1.19.6 h1:ddSHBrxHOVpGVSYQC/e696tDmCQ2dPm/Adg7aTQdOPI= volcano.sh/apis v1.2.0-k8s1.19.6/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= From d9cdd21cb22fb9fc9d7a3235e1fc85e723277cdd Mon Sep 17 00:00:00 2001 From: Jeev B Date: Wed, 5 Jul 2023 16:41:35 -0700 Subject: [PATCH 310/356] Remove flytekit image priming (#412) * Remove flytekit image priming Signed-off-by: Jeev B * Fix goreleaser Signed-off-by: Jeev B --------- Signed-off-by: Jeev B --- flytectl/.goreleaser.yml | 17 +++++++++------ flytectl/pkg/sandbox/start.go | 40 ++++------------------------------- 2 files changed, 14 insertions(+), 43 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index cb93a7fb2f..732586b758 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -36,13 +36,16 @@ builds: ldflags: - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - name_template: |- + {{ .ProjectName }}_ + {{- if eq .Os "darwin" }}Darwin + {{- else if eq .Os "linux" }}Linux + {{- else if eq .Os "windows" }}Windows + {{- else }}{{ .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} format_overrides: - goos: windows format: zip diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 344003ca94..e79ec0162f 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -248,30 +248,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService return logReader, nil } -func primeFlytekitPod(ctx context.Context, podService corev1.PodInterface) { - _, err := podService.Create(ctx, &corev1api.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "py39-cacher", - }, - Spec: corev1api.PodSpec{ - RestartPolicy: corev1api.RestartPolicyNever, - Containers: []corev1api.Container{ - { - - Name: "flytekit", - Image: "ghcr.io/flyteorg/flytekit:py3.9-latest", - Command: []string{"echo"}, - Args: []string{"Flyte"}, - }, - }, - }, - }, v1.CreateOptions{}) - if err != nil { - fmt.Printf("Failed to create primer pod - %s", err) - } -} - -func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, primePod bool, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { +func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { k8sCtxMgr := k8s.NewK8sContextManager() err := k8sCtxMgr.CheckConfig() if err != nil { @@ -354,16 +331,13 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC if err := WatchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } - if primePod { - primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) - } } return nil } // StartClusterForSandbox is the code for the original multi deploy version of sandbox, should be removed once we // document the new development experience for plugins. -func StartClusterForSandbox(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, primePod bool, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { +func StartClusterForSandbox(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) error { k8sCtxMgr := k8s.NewK8sContextManager() err := k8sCtxMgr.CheckConfig() if err != nil { @@ -408,16 +382,11 @@ func StartClusterForSandbox(ctx context.Context, args []string, sandboxConfig *s if err := WatchFlyteDeployment(ctx, k8sClient.CoreV1()); err != nil { return err } - if primePod { - primeFlytekitPod(ctx, k8sClient.CoreV1().Pods("default")) - } - } return nil } func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config) error { - primePod := true sandboxImagePrefix := "sha" exposedPorts, portBindings, err := docker.GetDemoPorts() if err != nil { @@ -425,7 +394,7 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox } // K3s will automatically write the file specified by this var, which is mounted from user's local state dir. sandboxConfig.Env = append(sandboxConfig.Env, k3sKubeConfigEnvVar) - err = StartCluster(ctx, args, sandboxConfig, primePod, demoImageName, sandboxImagePrefix, exposedPorts, portBindings, util.DemoConsolePort) + err = StartCluster(ctx, args, sandboxConfig, demoImageName, sandboxImagePrefix, exposedPorts, portBindings, util.DemoConsolePort) if err != nil { return err } @@ -434,13 +403,12 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox } func StartSandboxCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdConfig.Config) error { - primePod := false demoImagePrefix := "dind" exposedPorts, portBindings, err := docker.GetSandboxPorts() if err != nil { return err } - err = StartClusterForSandbox(ctx, args, sandboxConfig, primePod, sandboxImageName, demoImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + err = StartClusterForSandbox(ctx, args, sandboxConfig, sandboxImageName, demoImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) if err != nil { return err } From 95fcceaee8e258ac52e21a139165c94b1c26789b Mon Sep 17 00:00:00 2001 From: Keqiu Hu Date: Thu, 6 Jul 2023 14:12:34 -0700 Subject: [PATCH 311/356] Fix the error message for the update cmd (#411) --- flytectl/clierrors/errors.go | 1 + .../subcommand/project/project_config.go | 38 +++++++++++++------ .../subcommand/project/project_config_test.go | 20 ++++++++-- flytectl/cmd/create/project.go | 3 +- flytectl/cmd/create/project_test.go | 2 + flytectl/cmd/update/project.go | 8 ++-- 6 files changed, 52 insertions(+), 20 deletions(-) diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index a8ff701cb3..3ced52fee7 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -4,6 +4,7 @@ var ( ErrInvalidStateUpdate = "invalid state passed. Specify either activate or archive\n" ErrProjectNotPassed = "project id wasn't passed\n" // #nosec + ErrProjectIDBothPassed = "both project and id are passed\n" ErrProjectNameNotPassed = "project name is a required flag" ErrFailedProjectUpdate = "Project %v failed to update due to %v\n" diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index a6e8fcebd6..96b9c643dd 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -45,8 +46,9 @@ var DefaultProjectConfig = &ConfigProject{ } // GetProjectSpec return project spec from a file/flags -func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { +func (c *ConfigProject) GetProjectSpec(cf *config.Config) (*admin.Project, error) { projectSpec := admin.Project{} + if len(c.File) > 0 { yamlFile, err := ioutil.ReadFile(c.File) if err != nil { @@ -56,23 +58,35 @@ func (c *ConfigProject) GetProjectSpec(id string) (*admin.Project, error) { if err != nil { return nil, err } - if len(id) > 0 { - projectSpec.Id = id + } else { + projectSpec.Id = c.ID + projectSpec.Name = c.Name + projectSpec.Description = c.Description + projectSpec.Labels = &admin.Labels{ + Values: c.Labels, + } + projectState, err := c.MapToAdminState() + if err != nil { + return nil, err } - return &projectSpec, nil + projectSpec.State = projectState } - projectSpec.Id = id - projectSpec.Name = c.Name - projectSpec.Description = c.Description - projectSpec.Labels = &admin.Labels{ - Values: c.Labels, + project := cf.Project + if len(projectSpec.Id) == 0 && len(project) == 0 { + err := fmt.Errorf(clierrors.ErrProjectNotPassed) + return nil, err } - projectState, err := c.MapToAdminState() - if err != nil { + + if len(projectSpec.Id) > 0 && len(project) > 0 { + err := fmt.Errorf(clierrors.ErrProjectIDBothPassed) return nil, err } - projectSpec.State = projectState + + // Get projectId from file, if not provided, fall back to project + if len(projectSpec.Id) == 0 { + projectSpec.Id = project + } return &projectSpec, nil } diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go index a44cd0b423..b02daa4972 100644 --- a/flytectl/cmd/config/subcommand/project/project_config_test.go +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -5,25 +5,39 @@ import ( "testing" "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) func TestGetProjectSpec(t *testing.T) { + cf := &config.Config{ + Project: "flytesnacks1", + } t.Run("Successful get project spec", func(t *testing.T) { c := &ConfigProject{ Name: "flytesnacks", } - response, err := c.GetProjectSpec("flytesnacks") + response, err := c.GetProjectSpec(cf) assert.Nil(t, err) - assert.NotNil(t, response) + assert.Equal(t, "flytesnacks1", response.Id) }) + + t.Run("Error if project and ID both exist", func(t *testing.T) { + c := &ConfigProject{ + ID: "flytesnacks", + Name: "flytesnacks", + } + _, err := c.GetProjectSpec(cf) + assert.NotNil(t, err) + }) + t.Run("Successful get request spec from file", func(t *testing.T) { c := &ConfigProject{ File: "testdata/project.yaml", } - response, err := c.GetProjectSpec("flytesnacks") + response, err := c.GetProjectSpec(&config.Config{}) assert.Nil(t, err) assert.Equal(t, "flytesnacks", response.Name) assert.Equal(t, "flytesnacks test", response.Description) diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index b0bb4eba73..c6db389d05 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -45,7 +46,7 @@ Create a project by definition file. ) func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(project.DefaultProjectConfig.ID) + projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig()) if err != nil { return err } diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 2de7ee24e1..e0c166db5c 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -7,6 +7,7 @@ import ( "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" @@ -36,6 +37,7 @@ func createProjectSetup() { project.DefaultProjectConfig.Name = "" project.DefaultProjectConfig.Labels = map[string]string{} project.DefaultProjectConfig.Description = "" + config.GetConfig().Project = "" } func TestCreateProjectFunc(t *testing.T) { s := setup() diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 7f8b2589e9..bec3d36b96 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -4,9 +4,8 @@ import ( "context" "fmt" - "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytestdlib/logger" @@ -54,7 +53,7 @@ Update projects.(project/projects can be used interchangeably in these commands) Update a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project --file project.yaml + flytectl update project --file project.yaml .. code-block:: yaml @@ -84,10 +83,11 @@ Usage ) func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig().Project) + projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig()) if err != nil { return err } + if projectSpec.Id == "" { return fmt.Errorf(clierrors.ErrProjectNotPassed) } From 9bcf5cc91441830abe141ac82d1a00f7a5bdcca5 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Mon, 10 Jul 2023 14:32:24 -0500 Subject: [PATCH 312/356] Adding support for ArrayNode (#406) * hydrating arraynode subnode Signed-off-by: Daniel Rammer * updating flyteidl Signed-off-by: Daniel Rammer * added unit tests Signed-off-by: Daniel Rammer --------- Signed-off-by: Daniel Rammer --- flytectl/cmd/register/register_util.go | 4 + flytectl/cmd/register/register_util_test.go | 27 ++ flytectl/go.mod | 2 +- flytectl/go.sum | 366 +------------------- 4 files changed, 34 insertions(+), 365 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 714e30c76b..87d8be43db 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -247,6 +247,10 @@ func hydrateNode(node *core.Node, version string, force bool) error { } case *core.Node_GateNode: // Do nothing. + case *core.Node_ArrayNode: + if err := hydrateNode(v.ArrayNode.Node, version, force); err != nil { + return fmt.Errorf("failed to hydrateNode") + } default: return fmt.Errorf("unknown type %T", v) } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 97a39082d2..9c9877ab6e 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -502,6 +502,33 @@ func TestHydrateNode(t *testing.T) { }) } +func TestHydrateArrayNode(t *testing.T) { + registerFilesSetup() + node := &core.Node{ + Target: &core.Node_ArrayNode{ + ArrayNode: &core.ArrayNode{ + Node: &core.Node{ + Target: &core.Node_TaskNode{ + TaskNode: &core.TaskNode{ + Reference: &core.TaskNode_ReferenceId{ + ReferenceId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: "flytesnacks", + Domain: "development", + Name: "n1", + Version: "v1", + }, + }, + }, + }, + }, + }, + }, + } + err := hydrateNode(node, rconfig.DefaultFilesConfig.Version, true) + assert.Nil(t, err) +} + func TestHydrateGateNode(t *testing.T) { t.Run("Hydrate Sleep", func(t *testing.T) { registerFilesSetup() diff --git a/flytectl/go.mod b/flytectl/go.mod index 7a58eb186b..a3587885f0 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,7 +9,7 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.5.10 + github.com/flyteorg/flyteidl v1.5.12 github.com/flyteorg/flytepropeller v1.1.1 github.com/flyteorg/flytestdlib v1.0.13 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 diff --git a/flytectl/go.sum b/flytectl/go.sum index 53f29a7edd..95855b56ca 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898 h1:SC+c6A1qTFstO9qmB86mPV2IpYme/2ZoEQ0hrP+wo+Q= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -40,7 +39,6 @@ cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNF cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= @@ -49,16 +47,13 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= @@ -69,7 +64,6 @@ cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7ni cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -125,18 +119,11 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295 h1:xJ0dAkuxJXfwdH7IaSzBEbSQxEDz36YUmt7+CB4zoNA= -github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625 h1:cQyO5JQ2iuHnEcF3v24kdDMsgh04RjyFPDtuvD6PCE0= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= -github.com/Jeffail/gabs/v2 v2.5.1 h1:ANfZYjpMlfTTKebycu4X1AgkVWumFVDYQl7JwOr4mDk= github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -155,62 +142,39 @@ github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg3 github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M= github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3 h1:4FA+QBaydEHlwxg0lMN3rhwoDaQy6LKhVWR4qvq4BuA= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= -github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c h1:RoL0r3mR3JSkLur8q8AD59cByJ+kRwJHODNimZBd7GI= github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -220,9 +184,7 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d h1:O+ayl/Vp3bDEXReXItmYHzCnsz/LKusXdRNiJKVxjPs= github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d/go.mod h1:mZUP7GJmjiWtf8v3FD1X/QdK08BqyeH/1Ejt0qhNzCs= -github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -233,113 +195,74 @@ github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= -github.com/aws/aws-sdk-go-v2 v1.2.0 h1:BS+UYpbsElC82gB+2E2jiCBg36i8HlubTB/dO/moQ9c= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.0.0 h1:x6vSFAwqAvhYPeSu60f0ZUlGHo3PKKmwDOTL8aMXtv4= github.com/aws/aws-sdk-go-v2/config v1.0.0/go.mod h1:WysE/OpUgE37tjtmtJd8GXgT8s1euilE5XtUkRNUQ1w= -github.com/aws/aws-sdk-go-v2/credentials v1.0.0 h1:0M7netgZ8gCV4v7z1km+Fbl7j6KQYyZL7SS0/l5Jn/4= github.com/aws/aws-sdk-go-v2/credentials v1.0.0/go.mod h1:/SvsiqBf509hG4Bddigr3NB12MIpfHhZapyBurJe8aY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0 h1:lO7fH5n7Q1dKcDBpuTmwJylD1bOQiRig8LI6TD9yVQk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0/go.mod h1:wpMHDCXvOXZxGCRSidyepa8uJHY4vaBGfY2/+oKU/Bc= -github.com/aws/aws-sdk-go-v2/service/athena v1.0.0 h1:UfrZP3NMTTKpOsf/P8uCaOxz3U2CNGEizdQKcObY7Ds= github.com/aws/aws-sdk-go-v2/service/athena v1.0.0/go.mod h1:qY8QFbemf2ceqweXcS6hQqiiIe1z42WqTvHsK2Lb0rE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0 h1:IAutMPSrynpvKOpHG6HyWHmh1xmxWAmYOK84NrQVqVQ= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0/go.mod h1:3jExOmpbjgPnz2FJaMOfbSk1heTkZ66aD3yNtVhnjvI= -github.com/aws/aws-sdk-go-v2/service/sts v1.0.0 h1:6XCgxNfE4L/Fnq+InhVNd16DKc6Ue1f3dJl3IwwJRUQ= github.com/aws/aws-sdk-go-v2/service/sts v1.0.0/go.mod h1:5f+cELGATgill5Pu3/vK3Ebuigstc+qYEHW5MvGWZO4= github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aws/smithy-go v1.1.0 h1:D6CSsM3gdxaGaqXnPgOBCeL6Mophqzu7KJOu7zW78sU= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 h1:VRtJdDi2lqc3MFwmouppm2jlm6icF+7H3WYKpLENMTo= github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bradleyfalzon/ghinstallation/v2 v2.0.3 h1:ywF/8q+GVpvlsEuvRb1SGSDQDUxntW1d4kFu/9q/YAE= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44 h1:y853v6rXx+zefEcjET3JuKAqvhj+FKflQijjeaSv2iA= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0 h1:TW8f/UvntYoVDMN1K2HlT82qH1rb0sOjpGw3m6Ym+i4= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY= github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA= github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= @@ -347,13 +270,11 @@ github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1 github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -376,92 +297,70 @@ github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2 h1:YbJAhpTevL2v6u8JC1NhCYRwf+3Vzxcc5vGnYoJ7VeE= github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1 h1:LBwiTfoUsdiEGAR1TpvxE+Gzt7469oVu87iR3mv3Byc= github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0 h1:cXLJbx+4Jj7rNsTiqVfm6i+RNLx6FFA2fMmDlEf+Wm8= github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1 h1:prL8l9w3ntVqXvNH1CiNn5ENjcCnr38JqpSyvKKB4GI= github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= -github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0 h1:mw6SAibtHKZcNzAsOxjoHIG0gy5YFHhypWSSNc6EjbQ= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -469,29 +368,20 @@ github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKY github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c h1:Xo2rK1pzOm0jO6abTPIQwbAmqBIOj132otexc1mmzFc= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0 h1:suYBsYZIkSlUMEz4TAYCczKf62IA2UWC+O8+KtdOhCo= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5 h1:+CpLbZIeUn94m02LdEKPcgErLJ347NUwxPKs5u8ieiY= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4 h1:itqmmf1PFpC4n5JW+j4BU7X4MTfVurhYRTjODoPb2Y8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/disiqueira/gotree v1.0.0 h1:en5wk87n7/Jyk6gVME3cx3xN9KmUCstJ1IjHr4Se4To= github.com/disiqueira/gotree v1.0.0/go.mod h1:7CwL+VWsWAU95DovkdRZAtA7YbtHwGk+tLV/kNi8niU= @@ -510,36 +400,25 @@ github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= @@ -552,11 +431,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -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 v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -567,11 +443,10 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.5.10 h1:SHeiaWRt8EAVuFsat+BJswtc07HTZ4DqhfTEYSm621k= -github.com/flyteorg/flyteidl v1.5.10/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og= +github.com/flyteorg/flyteidl v1.5.12 h1:bCSSie8Yru1e9yLHWPO3ORksHHskK+bmkxln/jV3bXM= +github.com/flyteorg/flyteidl v1.5.12/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og= github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= @@ -582,44 +457,31 @@ github.com/flyteorg/flytestdlib v1.0.13/go.mod h1:nIBmBHtjTJvhZEn3e/EwVC/iMkR2tU github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= 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 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -629,79 +491,63 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= -github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U= -github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/gobuffalo/flect v0.2.0 h1:EWCvMGGxOjsgwlWaP+f4+Hh6yrrte7JeFL2S6b+0hdM= github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= @@ -710,7 +556,6 @@ github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZg github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -726,7 +571,6 @@ github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -742,7 +586,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -764,10 +607,8 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -784,7 +625,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v39 v39.0.0 h1:pygGA5ySwxEez1N39GnDauD0PaWWuGgayudyZAc941s= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -815,11 +655,8 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032 h1:6Be3nkuJFyRfCgr6qTIzmRp8y9QwDIbqy/nYr9WDPos= github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -841,15 +678,10 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -858,9 +690,7 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -874,36 +704,23 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.12.0 h1:k3y1FYv6nuKyNTqj6w9gXOx5r5CfLj/k/euUeBXj1OY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= @@ -911,20 +728,13 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -935,16 +745,11 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56 h1:742eGXur0715JMq73aD95/FU0XpVKXqNuTnEfXsLOYQ= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -953,11 +758,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -967,12 +769,9 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= @@ -980,47 +779,33 @@ github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 h1:M8exrBzuhWc github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23/go.mod h1:kBSna6b0/RzsOcOZf515vAXwSsXYusl2U7SA0XP09yI= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13 h1:eSvu8Tmq6j2psUJqJrLcWH6K3w5Dwc+qipbaA6eVEN4= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= 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/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubeflow/common v0.4.0 h1:7NQzVoN9fvFP6npj4pG6iii/IC+K6NHy3OJPew96Eyw= github.com/kubeflow/common v0.4.0/go.mod h1:X15/dRQQoB77wrqrPwVn4GqG2ubgk8xR24A80i61d/4= -github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec h1:TQEPmrkz2xJH6nR8BJxGBIoZlJ1UTp6yYbIz/PiY9ts= github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec/go.mod h1:cTBmZKLlrIXBWQ0A9Ik8h0i4zoGhR7ApHwUfrLDbhQc= -github.com/kubeflow/pytorch-operator v0.6.0 h1:y9Vzk7Jd5H/s610Y+ucURypCHgJugB25UL8GEz4DRL4= github.com/kubeflow/pytorch-operator v0.6.0/go.mod h1:zHblV+yTwVG4PCgKTU2wPfOmQ6TJdfT87lDfHrP1a1Y= -github.com/kubeflow/tf-operator v0.5.3 h1:Ejn5vEAwHBKHU2sJTlUIRpezqIX3WeqXZ2dZx6zn6vY= github.com/kubeflow/tf-operator v0.5.3/go.mod h1:EBtz5LQoKaHUl/5fV5vD1qXVNVNyn3TrFaH6eVoQ8SY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -1033,9 +818,7 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1052,43 +835,29 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/pkcs11 v1.0.3 h1:iMwmD7I5225wv84WxIG/bmxz9AXjWvTWIbM/TYHvWtw= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/symlink v0.1.0 h1:MTFZ74KtNI6qQQpuBxU+uKCim4WtOMokr03hCfJcazE= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= @@ -1100,49 +869,34 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mouuff/go-rocket-update v1.5.1 h1:qGgUu/MP+aVQ63laEguRNimmNTPKs29xz0lZW6QRFaQ= github.com/mouuff/go-rocket-update v1.5.1/go.mod h1:CnOyUYCxAJyC1g1mebSGC7gJysLTlX+RpxKgD1B0zLs= -github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1164,7 +918,6 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1181,39 +934,27 @@ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59P github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= @@ -1221,12 +962,9 @@ github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhEC 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= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= @@ -1235,20 +973,15 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/sftp v1.13.4 h1:Lb0RYJCmgUcBgZosfoi9Y9sbl6+LJgOIgk/2Y4YjMFg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 h1:xoIK0ctDddBMnc74udxJYBqlo9Ylnsp1waqjLsnef20= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1299,38 +1032,24 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 h1:2c1EFnZHIPCW8qKWgHMH/fX2PkSabFc5mrVzfUNdg5U= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/sagikazarmark/crypt v0.5.0 h1:K6qABjdpr5rjHCw6q4rSdeM+8kNmdIHvEPDvEMkoai4= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -1341,14 +1060,10 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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= @@ -1383,14 +1098,10 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1411,46 +1122,30 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0NllBLdjWoD1nDfaqu98YMv+OneaKc8sPOA= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f h1:mvXjJIHRZyhNuGassLTcXTwjiWq7NmjdavZsUnmFybQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= @@ -1459,32 +1154,21 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjTcYE= github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= -go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= -go.etcd.io/etcd/client/v2 v2.305.2 h1:ymrVwTkefuqA/rPkSW7/B4ApijbPVefRumkY+stNfS0= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1497,28 +1181,22 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1562,7 +1240,6 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= 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= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1575,10 +1252,8 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -1590,7 +1265,6 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -1690,7 +1364,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1907,7 +1580,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= 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= @@ -1915,7 +1587,6 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1969,7 +1640,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8 h1:Cpp2P6TPjujNoC5M2KHY6g7wfyLYfIWRZaSdIKfDasA= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2094,7 +1764,6 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2111,9 +1780,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2122,15 +1789,10 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -2139,18 +1801,13 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20210124194846-35409b867216 h1:2TSTkQ8PMvGOD5eeqqRVv6Z9+BYI+bowK97RCr3W+9M= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2168,7 +1825,6 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= @@ -2182,7 +1838,6 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= @@ -2222,7 +1877,6 @@ k8s.io/apiserver v0.19.6/go.mod h1:05XquZxCDzQ27ebk7uV2LrFIK4lm5Yt47XkkUvLAoAM= k8s.io/apiserver v0.19.9/go.mod h1:g6zpD+kcZFlO73pktPWRvL0tUGqj7/KaOowmRk8EpGg= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6 h1:NnVriMMOpqQX+dshbDoZixqmBhfgrPk2uOh2fzp9vHE= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= @@ -2242,7 +1896,6 @@ k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8 k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.19.6/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/code-generator v0.19.9/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/code-generator v0.20.1 h1:kre3GNich5gbO3d1FyTT8fHI4ZJezZV217yFdWlQaRQ= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= @@ -2252,22 +1905,18 @@ k8s.io/component-base v0.19.9/go.mod h1:x9UmpImvXgVry1s9/hINgLz6iGBYUGvy3Xm7KZh1 k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6 h1:G0inASS5vAqCpzs7M4Sp9dv9d0aElpz39zDHbSB4f4g= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6 h1:iXX0K2pRrbR8yXbZtDK/bSnmg/uSqIFiVJK1x4LUOMc= k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded h1:JApXBKYyB7l9xx+DK7/+mFjC7A9Bt5A93FPvFD0HIFE= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -2281,9 +1930,7 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/sample-controller v0.19.9 h1:t1d9lOiVbxHs77/XljqtvdQkqWI1G0olWZZo6RUBnPA= k8s.io/sample-controller v0.19.9/go.mod h1:pzC7f1rPpf0+o9rg45Ju8GY83nGARzWABmPblej9v/M= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -2292,25 +1939,18 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15 h1:4uqm9Mv+w2MmBYD+F4qf/v6tDFUdPOk29C095RbU5mY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= -sigs.k8s.io/controller-runtime v0.8.2 h1:SBWmI0b3uzMIUD/BIXWNegrCeZmPJ503pOtwxY0LPHM= sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= -sigs.k8s.io/controller-tools v0.3.0 h1:y3YD99XOyWaXkiF1kd41uRvfp/64teWcrEZFuHxPhJ4= sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= @@ -2321,7 +1961,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -volcano.sh/apis v1.2.0-k8s1.19.6 h1:ddSHBrxHOVpGVSYQC/e696tDmCQ2dPm/Adg7aTQdOPI= volcano.sh/apis v1.2.0-k8s1.19.6/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= From e2adac497a08d16f5dbd7aa7a86cbcefefadcedd Mon Sep 17 00:00:00 2001 From: Jeev B Date: Fri, 21 Jul 2023 16:27:31 -0700 Subject: [PATCH 313/356] Expose buildkit port (#413) * Expose buildkit port Signed-off-by: Jeev B * fix test Signed-off-by: Jeev B --------- Signed-off-by: Jeev B --- flytectl/pkg/docker/docker_util.go | 1 + flytectl/pkg/docker/docker_util_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 221fb32eab..a4e768bb9b 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -139,6 +139,7 @@ func GetDemoPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, erro "0.0.0.0:30000:30000", // Registry Port "0.0.0.0:30001:30001", // Postgres Port "0.0.0.0:30002:30002", // Minio API Port (use HTTP port for minio console) + "0.0.0.0:30003:30003", // Buildkit Port }) } diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index f1b8f7b33a..83e5bc9703 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -404,7 +404,7 @@ func TestGetOrCreateVolume(t *testing.T) { func TestDemoPorts(t *testing.T) { _, ports, _ := GetDemoPorts() - assert.Equal(t, 5, len(ports)) + assert.Equal(t, 6, len(ports)) } func TestCopyFile(t *testing.T) { From ee25d67b71f43ac4329d18e5f7d063e2fc0782c9 Mon Sep 17 00:00:00 2001 From: David Q Mertz Date: Tue, 25 Jul 2023 01:17:19 -0400 Subject: [PATCH 314/356] Consistent language about 'git revision SHA1' (#414) Signed-off-by: David Mertz --- flytectl/cmd/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 89e3c9eb80..b5ff9cfe6f 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -33,7 +33,7 @@ Fetch Flytectl version. type versionOutput struct { // Specifies the Name of app App string `json:"App,omitempty"` - // Specifies the GIT sha of the build + // Specifies the git revision SHA1 of the build Build string `json:"Build,omitempty"` // Version for the build, should follow a semver Version string `json:"Version,omitempty"` From 69232033df1a835509d1ce7e65160afd2cb17d38 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Tue, 25 Jul 2023 05:23:05 -0700 Subject: [PATCH 315/356] Force go 1.19.10 in goreleaser (#415) --- flytectl/.github/workflows/checks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index f8291164fe..2a66200dac 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -152,6 +152,10 @@ jobs: name: Goreleaser needs: [ bump_version ] # Only to ensure it can successfully build uses: flyteorg/flytetools/.github/workflows/goreleaser.yml@master + with: + # https://github.com/docker/cli/issues/4437 describes an issue that affects the latest + # version of go 1.19 and 1.20, so pinning to latest known good version for now. + go-version: "1.19.10" secrets: FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} From 0e3f2a8626912db44577144fb21c64e244bdad7c Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Sun, 17 Sep 2023 15:17:50 +0800 Subject: [PATCH 316/356] Fix case for No string to no (#419) Signed-off-by: Future Outlier Co-authored-by: Future Outlier --- flytectl/pkg/commandutils/command_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/pkg/commandutils/command_utils.go b/flytectl/pkg/commandutils/command_utils.go index 1593abf880..2d9dfbf81c 100644 --- a/flytectl/pkg/commandutils/command_utils.go +++ b/flytectl/pkg/commandutils/command_utils.go @@ -14,7 +14,7 @@ func AskForConfirmation(s string, reader io.Reader) bool { response := strings.ToLower(strings.TrimSpace(r.Text())) if response == "y" || response == "yes" { return true - } else if response == "n" || response == "No" { + } else if response == "n" || response == "no" { return false } } From b708356b8fc79cf4899b4d27645503b9c4144dd6 Mon Sep 17 00:00:00 2001 From: kamaleybov <54046807+kamaleybov@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:17:05 -0700 Subject: [PATCH 317/356] Manually pull latest boilerplate (#427) Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --- .../flyte/golang_support_tools/go.mod | 289 +++-- .../flyte/golang_support_tools/go.sum | 1037 ++++++++--------- .../golang_test_targets/download_tooling.sh | 2 +- 3 files changed, 646 insertions(+), 682 deletions(-) diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.mod b/flytectl/boilerplate/flyte/golang_support_tools/go.mod index dbf94f4113..2cfeb8aa3a 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.mod +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.mod @@ -1,19 +1,27 @@ module github.com/flyteorg/boilerplate -go 1.17 +go 1.19 require ( github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf github.com/alvaroloes/enumer v1.1.2 github.com/flyteorg/flytestdlib v0.4.16 - github.com/golangci/golangci-lint v1.38.0 + github.com/golangci/golangci-lint v1.53.3 github.com/pseudomuto/protoc-gen-doc v1.4.1 ) require ( - 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a // indirect - cloud.google.com/go v0.75.0 // indirect - cloud.google.com/go/storage v1.12.0 // indirect + 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect + 4d63.com/gochecknoglobals v0.2.1 // indirect + cloud.google.com/go v0.110.2 // indirect + cloud.google.com/go/compute v1.19.3 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.2 // indirect + cloud.google.com/go/storage v1.29.0 // indirect + github.com/4meepo/tagalign v1.2.2 // indirect + github.com/Abirdcfly/dupword v0.0.11 // indirect + github.com/Antonboom/errname v0.1.10 // indirect + github.com/Antonboom/nilnil v0.1.5 // indirect github.com/Azure/azure-sdk-for-go v62.3.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect @@ -24,171 +32,216 @@ require ( github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.0 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v0.3.1 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig v2.15.0+incompatible // indirect - github.com/OpenPeeDeeP/depguard v1.0.1 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect github.com/aokoli/goutils v1.0.1 // indirect - github.com/ashanbrown/forbidigo v1.1.0 // indirect - github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a // indirect + github.com/ashanbrown/forbidigo v1.5.3 // indirect + github.com/ashanbrown/makezero v1.1.1 // indirect github.com/aws/aws-sdk-go v1.37.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.0 // indirect - github.com/bombsimon/wsl/v3 v3.2.0 // indirect + github.com/bkielbasa/cyclop v1.2.1 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v3 v3.4.0 // indirect + github.com/breml/bidichk v0.2.4 // indirect + github.com/breml/errchkjson v0.3.1 // indirect + github.com/butuzov/ireturn v0.2.0 // indirect + github.com/butuzov/mirror v1.1.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/charithe/durationcheck v0.0.6 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/charithe/durationcheck v0.0.10 // indirect + github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/coocood/freecache v1.1.1 // indirect - github.com/daixiang0/gci v0.2.8 // indirect + github.com/curioswitch/go-reassign v0.2.0 // indirect + github.com/daixiang0/gci v0.10.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingajkin/go-header v0.4.2 // indirect - github.com/envoyproxy/protoc-gen-validate v0.3.0-java // indirect + github.com/denis-tingaikin/go-header v0.4.3 // indirect + github.com/envoyproxy/protoc-gen-validate v0.10.0 // indirect github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 // indirect - github.com/esimonov/ifshort v1.0.1 // indirect - github.com/fatih/color v1.10.0 // indirect + github.com/esimonov/ifshort v1.0.4 // indirect + github.com/ettle/strcase v0.1.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fatih/structtag v1.2.0 // indirect + github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/flyteorg/stow v0.3.1 // indirect github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/fzipp/gocyclo v0.3.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-critic/go-critic v0.5.4 // indirect - github.com/go-logr/logr v0.4.0 // indirect - github.com/go-toolsmith/astcast v1.0.0 // indirect - github.com/go-toolsmith/astcopy v1.0.0 // indirect - github.com/go-toolsmith/astequal v1.0.0 // indirect - github.com/go-toolsmith/astfmt v1.0.0 // indirect - github.com/go-toolsmith/astp v1.0.0 // indirect - github.com/go-toolsmith/strparse v1.0.0 // indirect - github.com/go-toolsmith/typep v1.0.2 // indirect - github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect + github.com/go-critic/go-critic v0.8.1 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.1.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.0 // indirect + github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.4.3 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect - github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect + github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect + github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.3.5 // indirect - github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 // indirect + github.com/golangci/misspell v0.4.0 // indirect + github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/google/go-cmp v0.5.4 // indirect - github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 // indirect - github.com/gostaticanalysis/analysisutil v0.4.1 // indirect - github.com/gostaticanalysis/comment v1.4.1 // indirect - github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.4.2 // indirect + github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huandu/xstrings v1.0.0 // indirect github.com/imdario/mergo v0.3.5 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jgautheron/goconst v1.4.0 // indirect - github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jgautheron/goconst v1.5.1 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 // indirect - github.com/kisielk/errcheck v1.6.0 // indirect + github.com/julz/importas v0.1.0 // indirect + github.com/kisielk/errcheck v1.6.3 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/kulti/thelper v0.4.0 // indirect - github.com/kunwardeep/paralleltest v1.0.2 // indirect - github.com/kyoh86/exportloopref v0.1.8 // indirect - github.com/magefile/mage v1.10.0 // indirect - github.com/magiconair/properties v1.8.4 // indirect - github.com/maratori/testpackage v1.0.1 // indirect - github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/kkHAIKE/contextcheck v1.1.4 // indirect + github.com/kulti/thelper v0.6.3 // indirect + github.com/kunwardeep/paralleltest v1.0.7 // indirect + github.com/kyoh86/exportloopref v0.1.11 // indirect + github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/tagliatelle v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.1 // indirect + github.com/lufeee/execinquery v1.2.1 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/maratori/testableexamples v1.0.0 // indirect + github.com/maratori/testpackage v1.1.1 // indirect + github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 // indirect - github.com/mgechev/revive v1.0.3 // indirect + github.com/mgechev/revive v1.3.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect - github.com/moricho/tparallel v0.2.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/moricho/tparallel v0.3.1 // indirect github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect - github.com/nakabonne/nestif v0.3.0 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect github.com/ncw/swift v1.0.53 // indirect - github.com/nishanths/exhaustive v0.1.0 // indirect - github.com/nishanths/predeclared v0.2.1 // indirect - github.com/olekukonko/tablewriter v0.0.4 // indirect + github.com/nishanths/exhaustive v0.11.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.12.1 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect - github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f // indirect - github.com/prometheus/client_golang v1.9.0 // indirect + github.com/polyfloyd/go-errorlint v1.4.2 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.15.0 // indirect - github.com/prometheus/procfs v0.3.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/pseudomuto/protokit v0.2.0 // indirect - github.com/quasilyte/go-ruleguard v0.3.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect - github.com/ryancurrah/gomodguard v1.2.0 // indirect - github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect - github.com/sanposhiho/wastedassign v0.1.3 // indirect - github.com/securego/gosec/v2 v2.6.1 // indirect + github.com/quasilyte/go-ruleguard v0.3.19 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/ryancurrah/gomodguard v1.3.0 // indirect + github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect + github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect + github.com/securego/gosec/v2 v2.16.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.8.0 // indirect - github.com/sonatard/noctx v0.0.1 // indirect - github.com/sourcegraph/go-diff v0.6.1 // indirect - github.com/spf13/afero v1.5.1 // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.1.3 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sivchari/nosnakecase v1.7.0 // indirect + github.com/sivchari/tenv v1.7.1 // indirect + github.com/sonatard/noctx v0.0.2 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.7.1 // indirect - github.com/ssgreg/nlreturn/v2 v2.1.0 // indirect - github.com/stretchr/objx v0.3.0 // indirect - github.com/stretchr/testify v1.7.1 // indirect - github.com/subosito/gotenv v1.2.0 // indirect - github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect - github.com/tetafro/godot v1.4.4 // indirect - github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect - github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.3.1 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect + github.com/tdakkota/asciicheck v0.2.0 // indirect + github.com/tetafro/godot v1.4.11 // indirect + github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect + github.com/timonwong/loggercheck v0.9.4 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.0.3 // indirect - github.com/ultraware/whitespace v0.0.4 // indirect - github.com/uudashr/gocognit v1.0.1 // indirect - go.opencensus.io v0.22.6 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect - golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 // indirect - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect - golang.org/x/text v0.3.7 // indirect + github.com/ultraware/whitespace v0.0.5 // indirect + github.com/uudashr/gocognit v1.0.6 // indirect + github.com/xen0n/gosmopolitan v1.2.1 // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.2.0 // indirect + github.com/ykadowak/zerologlint v0.1.2 // indirect + gitlab.com/bosi/decorder v0.2.3 // indirect + go.opencensus.io v0.24.0 // indirect + go.tmz.dev/musttag v0.7.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect + golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect - golang.org/x/tools v0.1.10 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/api v0.38.0 // indirect + golang.org/x/tools v0.11.1 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect - google.golang.org/grpc v1.35.0 // indirect - google.golang.org/protobuf v1.25.0 // indirect - gopkg.in/ini.v1 v1.62.0 // indirect + google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - honnef.co/go/tools v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.4.3 // indirect k8s.io/apimachinery v0.20.2 // indirect k8s.io/client-go v0.0.0-20210217172142-7279fc64d847 // indirect k8s.io/klog/v2 v2.5.0 // indirect - mvdan.cc/gofumpt v0.1.0 // indirect + mvdan.cc/gofumpt v0.5.0 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 // indirect + mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect ) replace github.com/pseudomuto/protoc-gen-doc => github.com/flyteorg/protoc-gen-doc v1.4.2 diff --git a/flytectl/boilerplate/flyte/golang_support_tools/go.sum b/flytectl/boilerplate/flyte/golang_support_tools/go.sum index 02895fb574..4cc434803e 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/go.sum +++ b/flytectl/boilerplate/flyte/golang_support_tools/go.sum @@ -1,10 +1,13 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw= -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= +4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= +4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= +4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,20 +18,25 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v1.19.3 h1:DcTwsFgGev/wV5+q8o2fzgcHOaac+DKGC91ZlvpsQds= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -38,9 +46,18 @@ 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.12.0 h1:4y3gHptW1EHVtcPAVE0eBBlFuGqEejTTG3KdIE0lUX4= -cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +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/4meepo/tagalign v1.2.2 h1:kQeUTkFTaBRtd/7jm8OKJl9iHk0gAO+TDFPHGSna0aw= +github.com/4meepo/tagalign v1.2.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= +github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= +github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= +github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= +github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= +github.com/Antonboom/nilnil v0.1.5/go.mod h1:I24toVuBKhfP5teihGWctrRiPbRKHwZIFOvc6v3HZXk= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible h1:Ctfsn9UoA/BB4HMYQlbPPgNXdX0tZ4tmb85+KFb2+RE= github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= @@ -51,37 +68,31 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17 h1:2zCdHwNgRH+St1J+ZMf66xI8aLr/5KMy+wWLH97zwYM= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.10 h1:r6fZHMaHD8B6LDCn0o5vyBFHIHrM6Ywwx7mb49lPItI= github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf h1:M7A2Tn3R8rVgsoJHHKkmkpiNOItys4GxJj6JytRjdDg= github.com/EngHabu/mockery v0.0.0-20220405200825-3f76291311cf/go.mod h1:Kya4Y46gyq/3TEyAzeNe5UkCk+W9apy5KbuX+5KnZ6M= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= @@ -90,132 +101,118 @@ github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= +github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= +github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/ashanbrown/forbidigo v1.1.0 h1:SJOPJyqsrVL3CvR0veFZFmIM0fXS/Kvyikqvfphd0Z4= -github.com/ashanbrown/forbidigo v1.1.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a h1:/U9tbJzDRof4fOR51vwzWdIBsIH6R2yU0KG1MBRM2Js= -github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/ashanbrown/forbidigo v1.5.3 h1:jfg+fkm/snMx+V9FBwsl1d340BV/99kZGv5jN9hBoXk= +github.com/ashanbrown/forbidigo v1.5.3/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= +github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-sdk-go v1.37.1 h1:BTHmuN+gzhxkvU9sac2tZvaY0gV9ihbHw+KxZOecYvY= github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/bombsimon/wsl/v3 v3.2.0 h1:x3QUbwW7tPGcCNridvqmhSRthZMTALnkg5/1J+vaUas= -github.com/bombsimon/wsl/v3 v3.2.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= +github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= +github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= +github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= +github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= +github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= +github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= +github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= +github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.6 h1:Tsy7EppNow2pDC0jN7Hsmcb6mHd71ZbI1vFissRBtc0= -github.com/charithe/durationcheck v0.0.6/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= +github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= +github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= -github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= +github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= +github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= +github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= 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/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.3.0-java h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0= github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.10.0 h1:oIfnZFdC0YhpNNEX+SuIqko4cqqVZeN9IGTrhZje83Y= +github.com/envoyproxy/protoc-gen-validate v0.10.0/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/esimonov/ifshort v1.0.1 h1:p7hlWD15c9XwvwxYg3W7f7UZHmwg7l9hC0hBiF95gd0= -github.com/esimonov/ifshort v1.0.1/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= +github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= +github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/flyteorg/flytestdlib v0.4.16 h1:r4dCPUOqoE9xCAhOw9KDB7O6cBoCxyEtepIWYcj93H0= github.com/flyteorg/flytestdlib v0.4.16/go.mod h1:WA5Y4hrcgD0ybGOKJVOQ4sP8q7NLRV+S5SWOlH0axgM= github.com/flyteorg/protoc-gen-doc v1.4.2 h1:Otw0F+RHaPQ8XlpzhLLgjsCMcrAIcMO01Zh+ALe3rrE= @@ -224,32 +221,32 @@ github.com/flyteorg/stow v0.3.1 h1:cBMbWl03Gsy5KoA5mutUYTuYpqtT7Pb8+ANGCLnmFEs= github.com/flyteorg/stow v0.3.1/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fzipp/gocyclo v0.3.1 h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.5.4 h1:fPNMqImVjELN6Du7NVVuvKA4cgASNmc7e4zSYQCOnv8= -github.com/go-critic/go-critic v0.5.4/go.mod h1:cjB4YGw+n/+X8gREApej7150Uyy1Tg8If6F2XOAUXNE= +github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= +github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= 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.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= @@ -257,49 +254,43 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= +github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -320,27 +311,29 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.38.0 h1:hgZsLRzZrjhpp44Ak+fhXNzgrbDF39ETf22a+Jd3fJQ= -github.com/golangci/golangci-lint v1.38.0/go.mod h1:Knp/sd5ATrVp7EOzWzwIIFH+c8hUfpW+oOQb8NvdZDo= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= +github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= +github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= +github.com/golangci/golangci-lint v1.53.3 h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo= +github.com/golangci/golangci-lint v1.53.3/go.mod h1:W4Gg3ONq6p3Jl+0s/h9Gr0j7yEgHJWWZO2bHl2tBUXM= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/misspell v0.4.0 h1:KtVB/hTK4bbL/S6bs64rYyk8adjmh1BygbBiaAiX+a0= +github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -354,15 +347,19 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -370,402 +367,303 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gookit/color v1.3.6/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= +github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1 h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0 h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= 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.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jgautheron/goconst v1.4.0 h1:hp9XKUpe/MPyDamUbfsrGpe+3dnY2whNK4EtB86dvLM= -github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d h1:BYDZtm80MLJpTWalkwHxNnIbO/2akQHERcfLq4TbIWE= -github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d/go.mod h1:/EZlaYCnEX24i7qdVhT9du5JrtFWYRQr67bVgR7JJC8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0 h1:exZBMUS/kB/AhxSj/9lIIxhqkCpXXdKScjFWQUTbi3M= -github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= +github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= +github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= 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.3/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.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0 h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= -github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= -github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.7 h1:2uCk94js0+nVNQoHZNLBkAR1DQJrVzw6T0RMzJn55dQ= +github.com/kunwardeep/paralleltest v1.0.7/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= +github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= +github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= +github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= +github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= +github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= +github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= +github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= +github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.0.3 h1:z3FL6IFFN3JKzHYHD8O1ExH9g/4lAGJ5x1+9rPZgsFg= -github.com/mgechev/revive v1.0.3/go.mod h1:POGGZagSo/0frdr7VeAifzS5Uka0d0GPiM35MsTO8nE= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= +github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/tls-observatory v0.0.0-20201209171846-0547674fceff/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= +github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA= github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88 h1:o+O3Cd1HO9CTgxE3/C8p5I5Y4C0yYWbF8d4IkfOLtcQ= -github.com/nbutton23/zxcvbn-go v0.0.0-20201221231540-e56b841a3c88/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= -github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= -github.com/nishanths/predeclared v0.2.1 h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= +github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.12.1 h1:vwOqb5Nu05OikTXqhvLdHCGcx5uthIYIl0t79UVrERQ= +github.com/nunnatsa/ginkgolinter v0.12.1/go.mod h1:AK8Ab1PypVrcGUusuKD8RDcl2KgsIwvNaaxAlyHSzso= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= -github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.4 h1:NiTx7EEvBzu9sFOD1zORteLSt3o8gnlvZZwSE9TnY9U= -github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYLho3/FUB7iD/oc2cEFgVmbHzV+O0PtU= github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f h1:xAw10KgJqG5NJDfmRqJ05Z0IFblKumjtMeyiOLxj3+4= -github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/polyfloyd/go-errorlint v1.4.2 h1:CU+O4181IxFDdPH6t/HT7IiDj1I7zxNi1RIUxYwn8d0= +github.com/polyfloyd/go-errorlint v1.4.2/go.mod h1:k6fU/+fQe38ednoZS51T7gSIGQW1y94d6TkSr35OzH8= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0 h1:Uehi/mxLK0eiUc0H0++5tpMGTexB8wZ598MIgU8VpDM= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.0 h1:A3OfpsK2ynOTbz/KMi62qWzignjGCOZVChATSf4P+A0= -github.com/quasilyte/go-ruleguard v0.3.0/go.mod h1:p2miAhLp6fERzFNbcuQ4bevXs8rgK//uCHsUDkumITg= -github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210106184943-e47d54850b18/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.0.0-20210115110123-c73ee1cbff1f/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= +github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.0 h1:YWfhGOrXwLGiqcC/u5EqG6YeS8nh+1fw0HEc85CVZro= -github.com/ryancurrah/gomodguard v1.2.0/go.mod h1:rNqbC4TOIdUDcVMSIpNNAzTbzXAZa6W5lnUepvuMMgQ= -github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign v0.1.3 h1:qIMpTh4NGZYRbFJ+DSpLoVn8F4SLciX2afRvXPefC7w= -github.com/sanposhiho/wastedassign v0.1.3/go.mod h1:LGpq5Hsv74QaqM47WtIsRSF/ik9kqk07kchgv66tLVE= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.6.1 h1:+KCw+uz16FYfFyJ/A5aU6uP7mnrL+j1TbDnk1yN+8R0= -github.com/securego/gosec/v2 v2.6.1/go.mod h1:I76p3NTHBXsGhybUW+cEQ692q2Vp+A0Z6ZLzDIZy+Ao= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= +github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= +github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= +github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= +github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= +github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= +github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= +github.com/securego/gosec/v2 v2.16.0 h1:Pi0JKoasQQ3NnoRao/ww/N/XdynIB9NRYYZT5CyOs5U= +github.com/securego/gosec/v2 v2.16.0/go.mod h1:xvLcVZqUfo4aAQu56TNv7/Ltz6emAOQAEsrZrt7uGlI= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil/v3 v3.21.1/go.mod h1:igHnfak0qnw1biGeI2qKQvu0ZkwvEkUcCLlYhZzdr/4= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= -github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= +github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= +github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= +github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= +github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= 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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.5.1 h1:VHu76Lk0LSP1x254maIu2bplkWpfBWI+B+6fdoZprcg= -github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= -github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -774,76 +672,90 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tetafro/godot v1.4.4 h1:VAtLEoAMmopIzHVWVBrztjVWDeYm1OD/DKqhqXR4828= -github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJjGeaz4= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756 h1:zV5mu0ESwb+WnzqVaW2z1DdbAP0S46UtjY8DHQupQP4= -github.com/tomarrell/wrapcheck v0.0.0-20201130113247-1683564d9756/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0= -github.com/tommy-muehle/go-mnd/v2 v2.3.1 h1:a1S4+4HSXDJMgeODJH/t0EEKxcVla6Tasw+Zx9JJMog= -github.com/tommy-muehle/go-mnd/v2 v2.3.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= +github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= +github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= +github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= +github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= +github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= +github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/ykadowak/zerologlint v0.1.2 h1:Um4P5RMmelfjQqQJKtE8ZW+dLZrXrENeIzWWKw800U4= +github.com/ykadowak/zerologlint v0.1.2/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= +gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= +go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 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.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= -go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.tmz.dev/musttag v0.7.0 h1:QfytzjTWGXZmChoX0L++7uQN+yRCPfyFm+whsM+lfGc= +go.tmz.dev/musttag v0.7.0/go.mod h1:oTFPvgOkJmp5kYL02S8+jrH0eLrBIl57rzWeA26zDEM= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/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.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= 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= @@ -854,6 +766,12 @@ 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-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= +golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= 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= @@ -866,7 +784,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -878,17 +795,20 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -899,7 +819,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -911,25 +830,30 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= 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= @@ -938,8 +862,10 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013 h1:55H5j7lotzuFCEOKDsMch+fRNUQ9DgtyHOUP31FNqKc= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -952,16 +878,15 @@ 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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -971,18 +896,12 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -993,28 +912,46 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/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-20220702020025-31831981b65f/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.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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= @@ -1022,31 +959,27 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1058,12 +991,8 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1071,9 +1000,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1086,53 +1013,46 @@ golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210102185154-773b96fafca2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= +golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= 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= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1149,14 +1069,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= -google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.38.0 h1:vDyWk6eup8eQAidaZ31sNWIn8tZEL8qpbtGkBD4ytQo= -google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1170,7 +1088,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1189,32 +1106,30 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/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= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 h1:uLBY0yHDCj2PMQ98KWDSIDFwn9zK2zh+tgWtbvPPBjI= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1224,11 +1139,14 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1238,31 +1156,26 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1270,9 +1183,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1280,10 +1193,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.2 h1:SMdYLJl312RXuxXziCCHhRsp/tvct9cGKey0yv95tZM= -honnef.co/go/tools v0.1.2/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= +honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= -k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= @@ -1296,14 +1208,14 @@ k8s.io/klog/v2 v2.5.0 h1:8mOnjf1RmUPW6KRqQCfYSZq/K20Unmp3IhuZUhxl8KI= k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= -mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= +mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= +mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= +mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1311,4 +1223,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh index 003220ea70..c7e5577ef3 100755 --- a/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh +++ b/flytectl/boilerplate/flyte/golang_test_targets/download_tooling.sh @@ -18,7 +18,7 @@ set -e tools=( "github.com/EngHabu/mockery/cmd/mockery" "github.com/flyteorg/flytestdlib/cli/pflags@latest" - "github.com/golangci/golangci-lint/cmd/golangci-lint@latest" + "github.com/golangci/golangci-lint/cmd/golangci-lint" "github.com/alvaroloes/enumer" "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) From 58037023574f69663e5ff7a61c4dcc28683e81fe Mon Sep 17 00:00:00 2001 From: kamaleybov <54046807+kamaleybov@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:38:33 -0700 Subject: [PATCH 318/356] Updated readthedocs configuration - moved to build.os (#425) Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --- flytectl/.readthedocs.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flytectl/.readthedocs.yml b/flytectl/.readthedocs.yml index 1c0f039d3a..c24f894fd1 100644 --- a/flytectl/.readthedocs.yml +++ b/flytectl/.readthedocs.yml @@ -9,8 +9,11 @@ version: 2 sphinx: configuration: docs/source/conf.py -# Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 install: - requirements: doc-requirements.txt + +build: + os: "ubuntu-22.04" + tools: + python: "3.8" From c5165962e502ab416c97dc148c64e6905d4f26a2 Mon Sep 17 00:00:00 2001 From: kamaleybov <54046807+kamaleybov@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:59:40 -0700 Subject: [PATCH 319/356] Fix testutils.TearDownAndVerify #none (#424) * Stopped swallowing errors in testutils.TearDownAndVerify Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Fixed tests. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --------- Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --- flytectl/cmd/create/create_test.go | 4 +-- flytectl/cmd/create/execution_test.go | 13 ++++---- flytectl/cmd/create/project_test.go | 6 ++-- flytectl/cmd/delete/delete_test.go | 4 +-- flytectl/cmd/delete/execution_test.go | 6 ++-- flytectl/cmd/get/get_test.go | 4 +-- flytectl/cmd/get/launch_plan_test.go | 19 ++++++------ ...tchable_cluster_resource_attribute_test.go | 12 ++++---- .../matchable_execution_cluster_label_test.go | 12 ++++---- ...atchable_execution_queue_attribute_test.go | 12 ++++---- .../cmd/get/matchable_plugin_override_test.go | 12 ++++---- .../matchable_task_resource_attribute_test.go | 12 ++++---- ...atchable_workflow_execution_config_test.go | 12 ++++---- flytectl/cmd/get/task_test.go | 27 +++++++++++------ flytectl/cmd/get/workflow_test.go | 9 +++--- flytectl/cmd/testutils/test_utils.go | 30 +++++++++++++++---- ...tchable_cluster_resource_attribute_test.go | 17 ++++++----- .../matchable_execution_cluster_label_test.go | 17 ++++++----- ...atchable_execution_queue_attribute_test.go | 17 ++++++----- .../update/matchable_plugin_override_test.go | 17 ++++++----- .../matchable_task_resource_attribute_test.go | 17 ++++++----- ...atchable_workflow_execution_config_test.go | 14 ++++----- flytectl/cmd/update/project_test.go | 10 +++---- flytectl/cmd/update/update_test.go | 4 +-- 24 files changed, 170 insertions(+), 137 deletions(-) diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index dafd803a03..bfa6816e91 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -4,14 +4,14 @@ import ( "sort" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/stretchr/testify/assert" + + "github.com/flyteorg/flytectl/cmd/testutils" ) const testDataFolder = "../testdata/" var setup = testutils.Setup -var tearDownAndVerify = testutils.TearDownAndVerify func TestCreateCommand(t *testing.T) { createCommand := RemoteCreateCommand() diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 399f97abb2..6f25bab3cc 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -4,13 +4,14 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" @@ -202,7 +203,7 @@ func (s *createSuite) Test_CreateTaskExecution() { err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) s.NoError(err) - tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) + s.TearDownAndVerify(s.T(), `execution identifier project:"flytesnacks" domain:"development" name:"ff513c0e44b5b4a35aa5" `) } func (s *createSuite) Test_CreateTaskExecution_GetTaskError() { @@ -243,7 +244,7 @@ func (s *createSuite) Test_CreateLaunchPlanExecution() { err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) s.NoError(err) - tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) + s.TearDownAndVerify(s.T(), `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) } func (s *createSuite) Test_CreateLaunchPlan_GetLaunchPlanError() { @@ -277,7 +278,7 @@ func (s *createSuite) Test_CreateRelaunchExecution() { err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) s.NoError(err) - tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + s.TearDownAndVerify(s.T(), `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e" `) } func (s *createSuite) Test_CreateRecoverExecution() { @@ -302,7 +303,7 @@ func (s *createSuite) Test_CreateRecoverExecution() { err := createExecutionCommand(s.Ctx, nil, s.CmdCtx) s.NoError(err) - tearDownAndVerify(s.T(), s.Writer, `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) + s.TearDownAndVerify(s.T(), `execution identifier project:"flytesnacks" domain:"development" name:"f652ea3596e7f4d80a0e"`) } func (s *createSuite) TestCreateExecutionFuncInvalid() { diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index e0c166db5c..f0263bc461 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -42,7 +42,7 @@ func createProjectSetup() { func TestCreateProjectFunc(t *testing.T) { s := setup() createProjectSetup() - defer tearDownAndVerify(t, s.Writer, "project created successfully.") + defer s.TearDownAndVerify(t, "project created successfully.") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} @@ -56,7 +56,7 @@ func TestCreateProjectFunc(t *testing.T) { func TestEmptyProjectID(t *testing.T) { s := setup() createProjectSetup() - defer tearDownAndVerify(t, s.Writer, "") + defer s.TearDownAndVerify(t, "") project.DefaultProjectConfig = &project.ConfigProject{} s.MockAdminClient.OnRegisterProjectMatch(s.Ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(s.Ctx, []string{}, s.CmdCtx) @@ -67,7 +67,7 @@ func TestEmptyProjectID(t *testing.T) { func TestEmptyProjectName(t *testing.T) { s := setup() createProjectSetup() - defer tearDownAndVerify(t, s.Writer, "") + defer s.TearDownAndVerify(t, "") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Labels = map[string]string{} project.DefaultProjectConfig.Description = "" diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go index 88119c37cd..4692e0e6dd 100644 --- a/flytectl/cmd/delete/delete_test.go +++ b/flytectl/cmd/delete/delete_test.go @@ -4,8 +4,9 @@ import ( "sort" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/stretchr/testify/assert" + + "github.com/flyteorg/flytectl/cmd/testutils" ) const ( @@ -14,7 +15,6 @@ const ( ) var setup = testutils.Setup -var tearDownAndVerify = testutils.TearDownAndVerify func TestDeleteCommand(t *testing.T) { deleteCommand := RemoteDeleteCommand() diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index 1d74a9d524..09d8a0e05d 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -42,7 +42,7 @@ func TestTerminateExecutionFunc(t *testing.T) { assert.Nil(t, err) s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) - tearDownAndVerify(t, s.Writer, "") + s.TearDownAndVerify(t, "") } func TestTerminateExecutionFuncWithError(t *testing.T) { @@ -55,7 +55,7 @@ func TestTerminateExecutionFuncWithError(t *testing.T) { assert.Equal(t, errors.New("failed to terminate"), err) s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) s.MockAdminClient.AssertNotCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) - tearDownAndVerify(t, s.Writer, "") + s.TearDownAndVerify(t, "") } func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { @@ -68,5 +68,5 @@ func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { assert.Equal(t, errors.New("failed to terminate"), err) s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[0]) s.MockAdminClient.AssertCalled(t, "TerminateExecution", s.Ctx, terminateExecRequests[1]) - tearDownAndVerify(t, s.Writer, "") + s.TearDownAndVerify(t, "") } diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index e4a1aec40d..76452c0b01 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -5,8 +5,9 @@ import ( "sort" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/stretchr/testify/assert" + + "github.com/flyteorg/flytectl/cmd/testutils" ) const projectValue = "dummyProject" @@ -20,7 +21,6 @@ const workflowVersionValue = "wf_version" const testDataFolder = "../testdata/" var setup = testutils.Setup -var tearDownAndVerify = testutils.TearDownAndVerify const ( testDataTempFile = "temp-output-file" diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index d04698d8b0..4055b72376 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -11,12 +11,13 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" + "github.com/stretchr/testify/mock" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/mock" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" @@ -257,7 +258,7 @@ func TestGetLaunchPlanFunc(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchAllVerOfLP", s.Ctx, "launchplan1", "dummyProject", "dummyDomain", launchplan.DefaultConfig.Filter) - tearDownAndVerify(t, s.Writer, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlanFuncLatest(t *testing.T) { @@ -269,7 +270,7 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchLPLatestVersion", s.Ctx, "launchplan1", projectValue, domainValue, launchplan.DefaultConfig.Filter) - tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanWithVersion(t *testing.T) { @@ -280,7 +281,7 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") - tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlans(t *testing.T) { @@ -291,13 +292,11 @@ func TestGetLaunchPlans(t *testing.T) { argsLp = []string{} err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) }) t.Run("workflow filter", func(t *testing.T) { s := setup() getLaunchPlanSetup() - resourceListRequest.Filters = "eq(workflow.name,workflow2)" - s.MockAdminClient.OnListLaunchPlansMatch(s.Ctx, resourceListRequest).Return(filteredLaunchPlanListResponse, nil) s.FetcherExt.OnFetchAllVerOfLP(s.Ctx, "", "dummyProject", "dummyDomain", filters.Filters{ FieldSelector: "workflow.name=workflow2", }).Return(launchPlanListResponse.LaunchPlans, nil) @@ -305,7 +304,7 @@ func TestGetLaunchPlans(t *testing.T) { launchplan.DefaultConfig.Workflow = "workflow2" err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) }) t.Run("workflow filter error", func(t *testing.T) { s := setup() @@ -332,7 +331,7 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { os.Remove(launchplan.DefaultConfig.ExecFile) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") - tearDownAndVerify(t, s.Writer, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanTableFunc(t *testing.T) { @@ -346,7 +345,7 @@ func TestGetLaunchPlanTableFunc(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchAllVerOfLP", s.Ctx, "launchplan1", "dummyProject", "dummyDomain", filters.Filters{}) - tearDownAndVerify(t, s.Writer, ` + s.TearDownAndVerify(t, ` --------- ------------- ------ ------- ---------- --------------------------- --------- | VERSION | NAME | TYPE | STATE | SCHEDULE | INPUTS | OUTPUTS | --------- ------------- ------ ------- ---------- --------------------------- --------- diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index 82fba0a6c8..5bf48ad809 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -58,7 +58,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","attributes":{"foo":"bar"}}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","attributes":{"foo":"bar"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -71,7 +71,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -85,7 +85,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -98,7 +98,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -111,7 +111,7 @@ func TestGetClusterResourceAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","attributes":{"foo":"bar"}}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","attributes":{"foo":"bar"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -125,6 +125,6 @@ func TestGetClusterResourceAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_CLUSTER_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index d3aff8d6a5..590fa1b53c 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -58,7 +58,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","value":"foo"}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","value":"foo"}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -71,7 +71,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -85,7 +85,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed to get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -98,7 +98,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -111,7 +111,7 @@ func TestGetExecutionClusterLabel(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","value":"foo"}`) }) t.Run("failed to get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -125,6 +125,6 @@ func TestGetExecutionClusterLabel(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_CLUSTER_LABEL) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go index 521ee8e522..e4e33e7ec8 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -58,7 +58,7 @@ func TestGetExecutionQueueAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","tags":["foo","bar"]}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","tags":["foo","bar"]}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -71,7 +71,7 @@ func TestGetExecutionQueueAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -85,7 +85,7 @@ func TestGetExecutionQueueAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -98,7 +98,7 @@ func TestGetExecutionQueueAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -111,7 +111,7 @@ func TestGetExecutionQueueAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","tags":["foo","bar"]}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","tags":["foo","bar"]}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -125,6 +125,6 @@ func TestGetExecutionQueueAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_EXECUTION_QUEUE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go index 16ec913754..24363966d3 100644 --- a/flytectl/cmd/get/matchable_plugin_override_test.go +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -70,7 +70,7 @@ func TestGetPluginOverride(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -83,7 +83,7 @@ func TestGetPluginOverride(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -97,7 +97,7 @@ func TestGetPluginOverride(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -110,7 +110,7 @@ func TestGetPluginOverride(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -122,7 +122,7 @@ func TestGetPluginOverride(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","overrides":[{"task_type":"python_task","plugin_id":["plugin-override1","plugin-override2"]},{"task_type":"java_task","plugin_id":["plugin-override3","plugin-override3"],"missing_plugin_behavior":1}]}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -135,6 +135,6 @@ func TestGetPluginOverride(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_PLUGIN_OVERRIDE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index 021f02ea7f..f9faba6eb9 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -65,7 +65,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -78,7 +78,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -92,7 +92,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -105,7 +105,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -118,7 +118,7 @@ func TestGetTaskResourceAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"350Mi"}}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -132,6 +132,6 @@ func TestGetTaskResourceAttributes(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_TASK_RESOURCE) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go index e477bb3158..1206e5b7f4 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -58,7 +58,7 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","max_parallelism":5}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","max_parallelism":5}`) }) t.Run("successful get project domain attribute and write to file", func(t *testing.T) { s := testutils.SetupWithExt() @@ -71,7 +71,7 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, `wrote the config to file temp-output-file`) + s.TearDownAndVerify(t, `wrote the config to file temp-output-file`) }) t.Run("successful get project domain attribute and write to file failure", func(t *testing.T) { s := testutils.SetupWithExt() @@ -85,7 +85,7 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { assert.Equal(t, fmt.Errorf("error dumping in file due to open non-existent-dir/temp-output-file: no such file or directory"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("failed get project domain attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -98,7 +98,7 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to fetch response"), err) s.FetcherExt.AssertCalled(t, "FetchProjectDomainAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -111,7 +111,7 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","max_parallelism":5}`) + s.TearDownAndVerify(t, `{"project":"dummyProject","domain":"dummyDomain","workflow":"workflow","max_parallelism":5}`) }) t.Run("failed get workflow attribute", func(t *testing.T) { s := testutils.SetupWithExt() @@ -125,6 +125,6 @@ func TestGetWorkflowExecutionConfig(t *testing.T) { s.FetcherExt.AssertCalled(t, "FetchWorkflowAttributes", s.Ctx, config.GetConfig().Project, config.GetConfig().Domain, "workflow", admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index 28816e8a1c..aea8e41cc1 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -13,10 +13,11 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" + "github.com/stretchr/testify/mock" + "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/mock" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" @@ -247,7 +248,7 @@ func TestGetTaskFunc(t *testing.T) { err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchAllVerOfTask", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) - tearDownAndVerify(t, s.Writer, `[ + s.TearDownAndVerify(t, `[ { "id": { "name": "task1", @@ -332,7 +333,7 @@ func TestGetTaskFuncWithTable(t *testing.T) { err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchAllVerOfTask", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) - tearDownAndVerify(t, s.Writer, ` + s.TearDownAndVerify(t, ` --------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- | VERSION | NAME | TYPE | INPUTS | OUTPUTS | DISCOVERABLE | DISCOVERY VERSION | CREATED AT | --------- ------- ------ --------------------------- --------- -------------- ------------------- ---------------------- @@ -357,7 +358,7 @@ func TestGetTaskFuncLatest(t *testing.T) { err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchTaskLatestVersion", s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{}) - tearDownAndVerify(t, s.Writer, `{ + s.TearDownAndVerify(t, `{ "id": { "name": "task1", "version": "v2" @@ -407,7 +408,7 @@ func TestGetTaskWithVersion(t *testing.T) { err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchTaskVersion", s.Ctx, "task1", "v2", "dummyProject", "dummyDomain") - tearDownAndVerify(t, s.Writer, `{ + s.TearDownAndVerify(t, `{ "id": { "name": "task1", "version": "v2" @@ -454,7 +455,7 @@ func TestGetTasks(t *testing.T) { err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "task1","version": "v2"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetTasksFilters(t *testing.T) { @@ -464,12 +465,20 @@ func TestGetTasksFilters(t *testing.T) { FieldSelector: "task.name=task1,task.version=v1", } s.MockAdminClient.OnListTasksMatch(s.Ctx, resourceListFilterRequestTask).Return(taskListFilterResponse, nil) + filteredTasks := []*admin.Task{} + for _, task := range taskListResponse.Tasks { + if task.Id.Name == "task1" && task.Id.Version == "v1" { + filteredTasks = append(filteredTasks, task) + } + } s.FetcherExt.OnFetchAllVerOfTask(s.Ctx, "task1", "dummyProject", "dummyDomain", filters.Filters{ FieldSelector: "task.name=task1,task.version=v1", - }).Return(taskListResponse.Tasks, nil) + }).Return(filteredTasks, nil) + err := getTaskFunc(s.Ctx, argsTask, s.CmdCtx) + assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "task1","version": "v1"},"closure": {"compiledTask": {"template": {"interface": {"inputs": {"variables": {"sorted_list1": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"},"sorted_list2": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "var description"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}`) } func TestGetTaskWithExecFile(t *testing.T) { @@ -485,7 +494,7 @@ func TestGetTaskWithExecFile(t *testing.T) { os.Remove(taskConfig.DefaultConfig.ExecFile) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchTaskVersion", s.Ctx, "task1", "v2", "dummyProject", "dummyDomain") - tearDownAndVerify(t, s.Writer, `{ + s.TearDownAndVerify(t, `{ "id": { "name": "task1", "version": "v2" diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index c622d8e3fc..ec8da17653 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -12,11 +12,12 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/flyteorg/flytectl/pkg/ext/mocks" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" ) @@ -169,7 +170,7 @@ func TestGetWorkflowFuncLatestWithTable(t *testing.T) { s.FetcherExt.OnFetchWorkflowLatestVersionMatch(s.Ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflow1, nil) err := getWorkflowFunc(s.Ctx, argsWf, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, ` + s.TearDownAndVerify(t, ` --------- ----------- --------------------------- --------- ---------------------- | VERSION | NAME | INPUTS | OUTPUTS | CREATED AT | --------- ----------- --------------------------- --------- ---------------------- @@ -187,7 +188,7 @@ func TestListWorkflowFuncWithTable(t *testing.T) { s.FetcherExt.OnFetchAllVerOfWorkflowMatch(s.Ctx, "workflow1", projectValue, domainValue, filters.Filters{}).Return(workflows, nil) err := getWorkflowFunc(s.Ctx, argsWf, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, ` + s.TearDownAndVerify(t, ` --------- ----------- ---------------------- | VERSION | NAME | CREATED AT | --------- ----------- ---------------------- diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index b94b7d3671..067720c8ad 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -3,6 +3,7 @@ package testutils import ( "bytes" "context" + "fmt" "io" "log" "os" @@ -14,10 +15,11 @@ import ( "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/stretchr/testify/assert" + "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" extMocks "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/stretchr/testify/assert" ) const projectValue = "dummyProject" @@ -97,15 +99,31 @@ func SetupWithExt() (s TestStruct) { } // TearDownAndVerify TODO: Change this to verify log lines from context -func TearDownAndVerify(t *testing.T, reader io.Reader, expectedLog string) { +func (s *TestStruct) TearDownAndVerify(t *testing.T, expectedLog string) { + if err := s.Writer.Close(); err != nil { + panic(fmt.Errorf("could not close test context writer: %w", err)) + } + var buf bytes.Buffer - if _, err := io.Copy(&buf, reader); err == nil { - assert.Equal(t, sanitizeString(expectedLog), sanitizeString(buf.String())) + if _, err := io.Copy(&buf, s.Reader); err != nil { + panic(fmt.Errorf("could not read from test context reader: %w", err)) } + + assert.Equal(t, sanitizeString(expectedLog), sanitizeString(buf.String())) } func sanitizeString(str string) string { - // Not the most comprehensive ANSI pattern, but this should capture common color operations such as \x1b[107;0m and \x1b[0m. Expand if needed (insert regex 2 problems joke here). + // Not the most comprehensive ANSI pattern, but this should capture common color operations + // such as \x1b[107;0m and \x1b[0m. Expand if needed (insert regex 2 problems joke here). ansiRegex := regexp.MustCompile("\u001B\\[[\\d+\\;]*\\d+m") - return ansiRegex.ReplaceAllString(strings.Trim(strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(str, "\n", ""), "\t", ""), "", ""), " \t"), "") + replacer := strings.NewReplacer( + "\n", "", + "\t", "", + ) + + str = replacer.Replace(str) + str = ansiRegex.ReplaceAllString(str, "") + str = strings.Trim(str, " ") + + return str } diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index c9261393a8..8b6f8b2faf 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" ) func updateClusterResourceAttributeSetup() { @@ -20,7 +21,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successfully updated project domain attribute", func(t *testing.T) { s := setup() @@ -31,7 +32,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed to update project domain attribute", func(t *testing.T) { s := setup() @@ -43,7 +44,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successfully updated workflow attribute", func(t *testing.T) { s := setup() @@ -54,7 +55,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed to update workflow attribute", func(t *testing.T) { s := setup() @@ -66,7 +67,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -75,7 +76,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -84,6 +85,6 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index 2a4e7d500c..fffbd0f250 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" ) func updateExecutionClusterLabelSetup() { @@ -20,7 +21,7 @@ func TestExecutionClusterLabel(t *testing.T) { err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution cluster label"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { s := setup() @@ -31,7 +32,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything).Return(nil) err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -43,7 +44,7 @@ func TestExecutionClusterLabel(t *testing.T) { err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { s := setup() @@ -54,7 +55,7 @@ func TestExecutionClusterLabel(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() @@ -66,7 +67,7 @@ func TestExecutionClusterLabel(t *testing.T) { err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -75,7 +76,7 @@ func TestExecutionClusterLabel(t *testing.T) { err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -84,6 +85,6 @@ func TestExecutionClusterLabel(t *testing.T) { err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index f789c0d8cc..cffad3da3d 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" ) func updateExecutionQueueAttributeSetup() { @@ -20,7 +21,7 @@ func TestExecutionQueueAttributes(t *testing.T) { err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution queue attribute"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { s := setup() @@ -31,7 +32,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -43,7 +44,7 @@ func TestExecutionQueueAttributes(t *testing.T) { err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { s := setup() @@ -54,7 +55,7 @@ func TestExecutionQueueAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() @@ -66,7 +67,7 @@ func TestExecutionQueueAttributes(t *testing.T) { err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -75,7 +76,7 @@ func TestExecutionQueueAttributes(t *testing.T) { err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -84,6 +85,6 @@ func TestExecutionQueueAttributes(t *testing.T) { err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index f8fcef96a7..5165b0091e 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" ) func updatePluginOverrideSetup() { @@ -20,7 +21,7 @@ func TestPluginOverride(t *testing.T) { err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for plugin override"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { s := setup() @@ -31,7 +32,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything).Return(nil) err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -43,7 +44,7 @@ func TestPluginOverride(t *testing.T) { err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { s := setup() @@ -54,7 +55,7 @@ func TestPluginOverride(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() @@ -66,7 +67,7 @@ func TestPluginOverride(t *testing.T) { err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -75,7 +76,7 @@ func TestPluginOverride(t *testing.T) { err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -84,6 +85,6 @@ func TestPluginOverride(t *testing.T) { err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index 079fee9dce..e9135f1355 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" ) func updateTaskResourceAttributeSetup() { @@ -20,7 +21,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for task resource attribute"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { s := setup() @@ -31,7 +32,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything).Return(nil) err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -43,7 +44,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { s := setup() @@ -54,7 +55,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() @@ -66,7 +67,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -75,7 +76,7 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -84,6 +85,6 @@ func TestUpdateTaskResourceAttributes(t *testing.T) { err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index f4f1834c83..9f5ef81baf 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -21,7 +21,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for workflow execution config"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update project domain attribute", func(t *testing.T) { s := setup() @@ -32,7 +32,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything).Return(nil) err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) }) t.Run("failed update project domain attribute", func(t *testing.T) { s := setup() @@ -44,7 +44,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("successful update workflow attribute", func(t *testing.T) { s := setup() @@ -55,7 +55,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { mock.Anything, mock.Anything).Return(nil) err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) - tearDownAndVerify(t, s.Writer, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) + s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) }) t.Run("failed update workflow attribute", func(t *testing.T) { s := setup() @@ -67,7 +67,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("non existent file", func(t *testing.T) { s := setup() @@ -76,7 +76,7 @@ func TestWorkflowExecutionConfigs(t *testing.T) { err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) t.Run("invalid update file", func(t *testing.T) { s := setup() @@ -85,6 +85,6 @@ func TestWorkflowExecutionConfigs(t *testing.T) { err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - tearDownAndVerify(t, s.Writer, ``) + s.TearDownAndVerify(t, ``) }) } diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index b3838b59ac..25fb768f47 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -52,7 +52,7 @@ func TestActivateProjectFunc(t *testing.T) { err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - tearDownAndVerify(t, s.Writer, "Project dummyProject updated\n") + s.TearDownAndVerify(t, "Project dummyProject updated\n") } func TestActivateProjectFuncWithError(t *testing.T) { @@ -73,7 +73,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - tearDownAndVerify(t, s.Writer, "Project dummyProject failed to update due to Error Updating Project\n") + s.TearDownAndVerify(t, "Project dummyProject failed to update due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { @@ -95,7 +95,7 @@ func TestArchiveProjectFunc(t *testing.T) { err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.Nil(t, err) s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - tearDownAndVerify(t, s.Writer, "Project dummyProject updated\n") + s.TearDownAndVerify(t, "Project dummyProject updated\n") } func TestArchiveProjectFuncWithError(t *testing.T) { @@ -116,7 +116,7 @@ func TestArchiveProjectFuncWithError(t *testing.T) { err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - tearDownAndVerify(t, s.Writer, "Project dummyProject failed to update"+ + s.TearDownAndVerify(t, "Project dummyProject failed to update"+ " due to Error Updating Project\n") } @@ -139,5 +139,5 @@ func TestInvalidInput(t *testing.T) { err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) assert.NotNil(t, err) assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) - tearDownAndVerify(t, s.Writer, "") + s.TearDownAndVerify(t, "") } diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index b17bae11e8..d4a256e06c 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -4,8 +4,9 @@ import ( "sort" "testing" - "github.com/flyteorg/flytectl/cmd/testutils" "github.com/stretchr/testify/assert" + + "github.com/flyteorg/flytectl/cmd/testutils" ) const ( @@ -14,7 +15,6 @@ const ( ) var setup = testutils.Setup -var tearDownAndVerify = testutils.TearDownAndVerify func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() From ec7c344c966efe82f0eecf63f5d07f1656130f74 Mon Sep 17 00:00:00 2001 From: Chao-Heng Lee Date: Mon, 9 Oct 2023 05:15:48 -0500 Subject: [PATCH 320/356] Hide global flags by overriding usage template of cobra. (#430) Signed-off-by: Chao-Heng Lee --- flytectl/cmd/root.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 760cf3bafc..e682eb63d7 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -78,6 +78,29 @@ func newRootCmd() *cobra.Command { config.GetConfig() + // hide global flags + rootCmd.SetUsageTemplate(`Usage:{{if .Runnable}} + {{.UseLine}}{{end}}{{if .HasAvailableSubCommands}} + {{.CommandPath}} [command]{{end}}{{if gt (len .Aliases) 0}} + +Aliases: + {{.NameAndAliases}}{{end}}{{if .HasExample}} + +Examples: +{{.Example}}{{end}}{{if .HasAvailableSubCommands}} + +Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}} + {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}} + +Flags: +{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}} + +Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}} + {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}} + +Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}} +`) + return rootCmd } From 49714a3cbebf8d5eb0c6c99d907376409eab4e7f Mon Sep 17 00:00:00 2001 From: kamaleybov <54046807+kamaleybov@users.noreply.github.com> Date: Thu, 12 Oct 2023 13:58:38 -0700 Subject: [PATCH 321/356] Require a user ACK or --force flag for update commands #minor (#423) * WIP. Marked places where an acknowledgement before an update is needed. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * (1) Added error handling for methods fetching matchable attributes when attributes do not exist. (2) Added fetching data that is needed for diffing during updates. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Diff and ask for ack. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Fixed some of the TODOs. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Cleaned up error handling. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Updated tests. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * More tests. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Fix case for No string to no (#419) Signed-off-by: Future Outlier Co-authored-by: Future Outlier Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Replaced diffing implementation. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Addressed pull request comments. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * Fixed linter errors. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --------- Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> Signed-off-by: Future Outlier Co-authored-by: Future-Outlier Co-authored-by: Future Outlier --- flytectl/clierrors/errors.go | 4 +- .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../clusterresourceattribute/update_config.go | 1 + .../subcommand/execution/update_config.go | 1 + .../execution/updateconfig_flags.go | 1 + .../execution/updateconfig_flags_test.go | 14 + .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../executionclusterlabel/update_config.go | 1 + .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../executionqueueattribute/update_config.go | 1 + .../subcommand/launchplan/updateconfig.go | 1 + .../launchplan/updateconfig_flags.go | 1 + .../launchplan/updateconfig_flags_test.go | 14 + .../plugin_override/attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../plugin_override/update_config.go | 1 + .../subcommand/project/configproject_flags.go | 1 + .../project/configproject_flags_test.go | 14 + .../subcommand/project/project_config.go | 1 + .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../taskresourceattribute/update_config.go | 1 + .../attrupdateconfig_flags.go | 1 + .../attrupdateconfig_flags_test.go | 14 + .../workflowexecutionconfig/update_config.go | 1 + flytectl/cmd/testutils/test_utils.go | 35 +- flytectl/cmd/update/diff.go | 68 ++ flytectl/cmd/update/diff_test.go | 62 ++ flytectl/cmd/update/execution.go | 75 +- flytectl/cmd/update/execution_test.go | 262 +++++-- flytectl/cmd/update/launch_plan.go | 81 ++- flytectl/cmd/update/launch_plan_meta.go | 3 +- flytectl/cmd/update/launch_plan_meta_test.go | 193 +++++- flytectl/cmd/update/launch_plan_test.go | 269 +++++++- .../cmd/update/matchable_attribute_util.go | 191 +++++- .../matchable_cluster_resource_attribute.go | 7 +- ...tchable_cluster_resource_attribute_test.go | 629 +++++++++++++++-- .../matchable_execution_cluster_label.go | 7 +- .../matchable_execution_cluster_label_test.go | 617 +++++++++++++++-- .../matchable_execution_queue_attribute.go | 7 +- ...atchable_execution_queue_attribute_test.go | 629 +++++++++++++++-- .../cmd/update/matchable_plugin_override.go | 7 +- .../update/matchable_plugin_override_test.go | 647 ++++++++++++++++-- .../matchable_task_resource_attribute.go | 7 +- .../matchable_task_resource_attribute_test.go | 626 +++++++++++++++-- .../matchable_workflow_execution_config.go | 7 +- ...atchable_workflow_execution_config_test.go | 642 +++++++++++++++-- flytectl/cmd/update/named_entity.go | 95 ++- flytectl/cmd/update/named_entity_test.go | 104 ++- .../cmd/update/namedentityconfig_flags.go | 1 + .../update/namedentityconfig_flags_test.go | 14 + flytectl/cmd/update/project.go | 74 +- flytectl/cmd/update/project_test.go | 329 ++++++--- flytectl/cmd/update/task_meta_test.go | 189 ++++- .../valid_project_cluster_attribute.yaml | 4 + ...valid_project_execution_cluster_label.yaml | 2 + ...lid_project_execution_queue_attribute.yaml | 6 + .../valid_project_plugin_override.yaml | 7 + .../valid_project_task_attribute.yaml | 7 + ...lid_project_workflow_execution_config.yaml | 2 + flytectl/cmd/update/update.go | 7 +- flytectl/cmd/update/update_test.go | 4 - flytectl/cmd/update/workflow_meta_test.go | 189 ++++- flytectl/go.mod | 3 +- flytectl/go.sum | 2 + flytectl/pkg/ext/attribute_match_fetcher.go | 40 +- .../pkg/ext/attribute_match_fetcher_test.go | 9 +- flytectl/pkg/ext/errors.go | 24 + flytectl/pkg/ext/fetcher.go | 3 + .../ext/mocks/admin_fetcher_ext_interface.go | 41 ++ flytectl/pkg/ext/project_fetcher.go | 25 + flytectl/pkg/filters/filters.go | 10 + flytectl/pkg/filters/filters_test.go | 11 + 76 files changed, 5576 insertions(+), 845 deletions(-) create mode 100644 flytectl/cmd/update/diff.go create mode 100644 flytectl/cmd/update/diff_test.go create mode 100644 flytectl/cmd/update/testdata/valid_project_cluster_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_execution_cluster_label.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_execution_queue_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_plugin_override.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_task_attribute.yaml create mode 100644 flytectl/cmd/update/testdata/valid_project_workflow_execution_config.yaml create mode 100644 flytectl/pkg/ext/errors.go diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index 3ced52fee7..05ab96cb00 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -6,11 +6,11 @@ var ( ErrProjectNotPassed = "project id wasn't passed\n" // #nosec ErrProjectIDBothPassed = "both project and id are passed\n" ErrProjectNameNotPassed = "project name is a required flag" - ErrFailedProjectUpdate = "Project %v failed to update due to %v\n" + ErrFailedProjectUpdate = "Project %v failed to update due to %w\n" ErrLPNotPassed = "launch plan name wasn't passed\n" ErrLPVersionNotPassed = "launch plan version wasn't passed\n" //nolint - ErrFailedLPUpdate = "launch plan %v failed to update due to %v\n" + ErrFailedLPUpdate = "launch plan %v failed to update due to %w\n" ErrExecutionNotPassed = "execution name wasn't passed\n" ErrFailedExecutionUpdate = "execution %v failed to update due to %v\n" diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go index 4f05b3a8a8..f0f8103f12 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go index 29c9328801..9396a2e9e4 100755 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go index 3727fbdb2a..9b4534eed7 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/update_config.go @@ -6,6 +6,7 @@ package clusterresourceattribute type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/execution/update_config.go b/flytectl/cmd/config/subcommand/execution/update_config.go index 8623435784..7d55a5e9b0 100644 --- a/flytectl/cmd/config/subcommand/execution/update_config.go +++ b/flytectl/cmd/config/subcommand/execution/update_config.go @@ -10,4 +10,5 @@ type UpdateConfig struct { Archive bool `json:"archive" pflag:",archive execution."` Activate bool `json:"activate" pflag:",activate execution."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } diff --git a/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go b/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go index 03c9d0f90b..a1b251c18d 100755 --- a/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/execution/updateconfig_flags.go @@ -53,5 +53,6 @@ func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "archive execution.") cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate execution.") cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&UConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), UConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go b/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go index 6c65c2d14b..2e6c693ea8 100755 --- a/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/execution/updateconfig_flags_test.go @@ -141,4 +141,18 @@ func TestUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go index 8b1beee0bf..979e08ea50 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go index 4712ba314e..e2a8fe2a2e 100755 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go index 62d853a7cc..be0de45cef 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/update_config.go @@ -6,6 +6,7 @@ package executionclusterlabel type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go index cff8301fb7..7643a98017 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go index ff19cfa42f..82c697d17a 100755 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go index 7826602ab6..65dd680d5a 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/update_config.go @@ -6,6 +6,7 @@ package executionqueueattribute type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go index b7bd87bbc7..36e353c2e1 100644 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go @@ -10,5 +10,6 @@ type UpdateConfig struct { Archive bool `json:"archive" pflag:",disable the launch plan schedule (if it has an active schedule associated with it)."` Activate bool `json:"activate" pflag:",activate launchplan."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` Version string `json:"version" pflag:",version of the launchplan to be fetched."` } diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go index 14570a00ca..4a9cad23ba 100755 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go @@ -53,6 +53,7 @@ func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "disable the launch plan schedule (if it has an active schedule associated with it).") cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate launchplan.") cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&UConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), UConfig.Force, "do not ask for an acknowledgement during updates.") cmdFlags.StringVar(&UConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), UConfig.Version, "version of the launchplan to be fetched.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go index a0d1c1adf6..e9acca7bbe 100755 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go @@ -141,6 +141,20 @@ func TestUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_version", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go index 8642031b92..82e5cb6661 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go index 84628be5e7..309c31746a 100755 --- a/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/plugin_override/update_config.go b/flytectl/cmd/config/subcommand/plugin_override/update_config.go index 8e99970d4b..dc3c260074 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/update_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/update_config.go @@ -6,6 +6,7 @@ package pluginoverride type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/project/configproject_flags.go b/flytectl/cmd/config/subcommand/project/configproject_flags.go index e0e1c75f08..6de8107e76 100755 --- a/flytectl/cmd/config/subcommand/project/configproject_flags.go +++ b/flytectl/cmd/config/subcommand/project/configproject_flags.go @@ -55,6 +55,7 @@ func (cfg ConfigProject) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&DefaultProjectConfig.ArchiveProject, fmt.Sprintf("%v%v", prefix, "archiveProject"), DefaultProjectConfig.ArchiveProject, "(Deprecated) Archives the project specified as argument. Only used in update") cmdFlags.BoolVar(&DefaultProjectConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), DefaultProjectConfig.Activate, "Activates the project specified as argument. Only used in update") cmdFlags.BoolVar(&DefaultProjectConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), DefaultProjectConfig.Archive, "Archives the project specified as argument. Only used in update") + cmdFlags.BoolVar(&DefaultProjectConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultProjectConfig.Force, "Skips asking for an acknowledgement during an update operation. Only used in update") cmdFlags.StringVar(&DefaultProjectConfig.Name, fmt.Sprintf("%v%v", prefix, "name"), DefaultProjectConfig.Name, "name for the project specified as argument.") cmdFlags.BoolVar(&DefaultProjectConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultProjectConfig.DryRun, "execute command without making any modifications.") cmdFlags.StringVar(&DefaultProjectConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), DefaultProjectConfig.Description, "description for the project specified as argument.") diff --git a/flytectl/cmd/config/subcommand/project/configproject_flags_test.go b/flytectl/cmd/config/subcommand/project/configproject_flags_test.go index abe5e1e627..98847d779a 100755 --- a/flytectl/cmd/config/subcommand/project/configproject_flags_test.go +++ b/flytectl/cmd/config/subcommand/project/configproject_flags_test.go @@ -169,6 +169,20 @@ func TestConfigProject_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_ConfigProject(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_name", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index 96b9c643dd..c278443f16 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -33,6 +33,7 @@ type ConfigProject struct { ArchiveProject bool `json:"archiveProject" pflag:",(Deprecated) Archives the project specified as argument. Only used in update"` Activate bool `json:"activate" pflag:",Activates the project specified as argument. Only used in update"` Archive bool `json:"archive" pflag:",Archives the project specified as argument. Only used in update"` + Force bool `json:"force" pflag:",Skips asking for an acknowledgement during an update operation. Only used in update"` Name string `json:"name" pflag:",name for the project specified as argument."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` Description string `json:"description" pflag:",description for the project specified as argument."` diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go index 1a0e3e3a86..402add1c0d 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go index 2a141e049b..aaf429a732 100755 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go index 084c65d6d4..4ee836e433 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/update_config.go @@ -6,6 +6,7 @@ package taskresourceattribute type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go index 571daa90d5..a8423cdb86 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags.go @@ -52,5 +52,6 @@ func (cfg AttrUpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("AttrUpdateConfig", pflag.ExitOnError) cmdFlags.StringVar(&DefaultUpdateConfig.AttrFile, fmt.Sprintf("%v%v", prefix, "attrFile"), DefaultUpdateConfig.AttrFile, "attribute file name to be used for updating attribute for the resource type.") cmdFlags.BoolVar(&DefaultUpdateConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultUpdateConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&DefaultUpdateConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultUpdateConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go index 5707cccbc8..5c470ca066 100755 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/attrupdateconfig_flags_test.go @@ -127,4 +127,18 @@ func TestAttrUpdateConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_AttrUpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go index 7fd6a1de64..2b244000e2 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/update_config.go @@ -6,6 +6,7 @@ package workflowexecutionconfig type AttrUpdateConfig struct { AttrFile string `json:"attrFile" pflag:",attribute file name to be used for updating attribute for the resource type."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } var DefaultUpdateConfig = &AttrUpdateConfig{} diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 067720c8ad..37f71af493 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -6,20 +6,19 @@ import ( "fmt" "io" "log" + "math/rand" "os" "regexp" "strings" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - - "github.com/flyteorg/flyteidl/clients/go/admin" - "github.com/stretchr/testify/assert" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" extMocks "github.com/flyteorg/flytectl/pkg/ext/mocks" + "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flyteidl/clients/go/admin/mocks" ) const projectValue = "dummyProject" @@ -112,6 +111,34 @@ func (s *TestStruct) TearDownAndVerify(t *testing.T, expectedLog string) { assert.Equal(t, sanitizeString(expectedLog), sanitizeString(buf.String())) } +func (s *TestStruct) TearDownAndVerifyContains(t *testing.T, expectedLog string) { + if err := s.Writer.Close(); err != nil { + panic(fmt.Errorf("could not close test context writer: %w", err)) + } + + var buf bytes.Buffer + if _, err := io.Copy(&buf, s.Reader); err != nil { + panic(fmt.Errorf("could not read from test context reader: %w", err)) + } + + assert.Contains(t, sanitizeString(buf.String()), sanitizeString(expectedLog)) +} + +// RandomName returns a string composed of random lowercase English letters of specified length. +func RandomName(length int) string { + if length < 0 { + panic("length should be a non-negative number") + } + + var b strings.Builder + for i := 0; i < length; i++ { + c := rune('a' + rand.Intn('z'-'a')) // #nosec G404 - we use this function for testing only, do not need a cryptographically secure random number generator + b.WriteRune(c) + } + + return b.String() +} + func sanitizeString(str string) string { // Not the most comprehensive ANSI pattern, but this should capture common color operations // such as \x1b[107;0m and \x1b[0m. Expand if needed (insert regex 2 problems joke here). diff --git a/flytectl/cmd/update/diff.go b/flytectl/cmd/update/diff.go new file mode 100644 index 0000000000..b0f9190f93 --- /dev/null +++ b/flytectl/cmd/update/diff.go @@ -0,0 +1,68 @@ +package update + +import ( + "encoding/json" + "fmt" + + "github.com/hexops/gotextdiff" + "github.com/hexops/gotextdiff/myers" + "gopkg.in/yaml.v3" +) + +const ( + diffPathBefore = "before" + diffPathAfter = "after" +) + +// DiffAsYaml marshals both objects as YAML and returns differences +// between marshalled values in unified format. Marshalling respects +// JSON field annotations. +func DiffAsYaml(path1, path2 string, object1, object2 any) (string, error) { + yaml1, err := marshalToYamlString(object1) + if err != nil { + return "", fmt.Errorf("diff as yaml: %w", err) + } + + yaml2, err := marshalToYamlString(object2) + if err != nil { + return "", fmt.Errorf("diff as yaml: %w", err) + } + + patch := diffStrings(path1, path2, yaml1, yaml2) + return patch, nil +} + +// marshalToYamlString marshals value to a YAML string, while respecting +// JSON field annotations. +func marshalToYamlString(value any) (string, error) { + jsonText, err := json.Marshal(value) + if err != nil { + return "", fmt.Errorf("marshalling object to json: %w", err) + } + + var jsonObject interface{} + if err := yaml.Unmarshal(jsonText, &jsonObject); err != nil { + return "", fmt.Errorf("unmarshalling yaml to object: %w", err) + } + + data, err := yaml.Marshal(jsonObject) + if err != nil { + return "", fmt.Errorf("marshalling object to yaml: %w", err) + } + + return string(data), nil +} + +// diffStrings returns differences between two strings in unified format. +// An empty string will be returned if both strings are equal. +func diffStrings(path1, path2, s1, s2 string) string { + // We add new lines at the end of each string to avoid + // "\ No newline at end of file" appended to each diff. + s1 += "\n" + s2 += "\n" + + edits := myers.ComputeEdits("", s1, s2) + diff := fmt.Sprint(gotextdiff.ToUnified(path1, path2, s1, edits)) + + return diff +} diff --git a/flytectl/cmd/update/diff_test.go b/flytectl/cmd/update/diff_test.go new file mode 100644 index 0000000000..0bb3df74c2 --- /dev/null +++ b/flytectl/cmd/update/diff_test.go @@ -0,0 +1,62 @@ +package update + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMarshalToYamlStringRespectsJsonFieldAnnotations(t *testing.T) { + type T struct { + FieldIncluded1 int `json:"fieldIncluded1"` + FieldIncluded2 string `json:"fieldIncluded2"` + FieldOmitted string `json:"fieldOmitted,omitempty"` + } + value := T{} + + result, err := marshalToYamlString(value) + + assert.Nil(t, err) + assert.Equal(t, `fieldIncluded1: 0 +fieldIncluded2: "" +`, result) +} + +func TestDiffStringsReturnsAUnifiedDiff(t *testing.T) { + s1 := "abc\ndef\nghi" + s2 := "aaa\ndef\nghi" + + patch := diffStrings("before", "after", s1, s2) + + assert.Equal(t, `--- before ++++ after +@@ -1,3 +1,3 @@ +-abc ++aaa + def + ghi +`, patch) +} + +func TestDiffAsYamlReturnsAUnifiedDiffOfObjectsMarshalledAsYAML(t *testing.T) { + type T struct { + F1 int `json:"f1"` + F2 string `json:"f2"` + F3 string `json:"f3,omitempty"` + } + object1 := T{F1: 5, F2: "apple"} + object2 := T{F1: 10, F2: "apple", F3: "banana"} + + patch, err := DiffAsYaml("before", "after", object1, object2) + + assert.Nil(t, err) + assert.Equal(t, `--- before ++++ after +@@ -1,3 +1,4 @@ +-f1: 5 ++f1: 10 + f2: apple ++f3: banana + +`, patch) +} diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index 517a28a352..d3f1fccdd5 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -3,14 +3,15 @@ package update import ( "context" "fmt" + "os" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" ) const ( @@ -38,36 +39,62 @@ func updateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comm return fmt.Errorf(clierrors.ErrExecutionNotPassed) } executionName := args[0] - activateExec := execution.UConfig.Activate - archiveExec := execution.UConfig.Archive - if activateExec && archiveExec { + activate := execution.UConfig.Activate + archive := execution.UConfig.Archive + if activate && archive { return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } - var executionState admin.ExecutionState - if activateExec { - executionState = admin.ExecutionState_EXECUTION_ACTIVE - } else if archiveExec { - executionState = admin.ExecutionState_EXECUTION_ARCHIVED + var newState admin.ExecutionState + if activate { + newState = admin.ExecutionState_EXECUTION_ACTIVE + } else if archive { + newState = admin.ExecutionState_EXECUTION_ARCHIVED } + exec, err := cmdCtx.AdminFetcherExt().FetchExecution(ctx, executionName, project, domain) + if err != nil { + return fmt.Errorf("update execution: could not fetch execution %s: %w", executionName, err) + } + oldState := exec.GetClosure().GetStateChangeDetails().GetState() + + type Execution struct { + State admin.ExecutionState `json:"state"` + } + patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, Execution{oldState}, Execution{newState}) + if err != nil { + panic(err) + } + + if patch == "" { + fmt.Printf("No changes detected. Skipping the update.\n") + return nil + } + + fmt.Printf("The following changes are to be applied.\n%s\n", patch) + if execution.UConfig.DryRun { - logger.Debugf(ctx, "skipping UpdateExecution request (DryRun)") - } else { - _, err := cmdCtx.AdminClient().UpdateExecution(ctx, &admin.ExecutionUpdateRequest{ - Id: &core.WorkflowExecutionIdentifier{ - Project: project, - Domain: domain, - Name: executionName, - }, - State: executionState, - }) - if err != nil { - fmt.Printf(clierrors.ErrFailedExecutionUpdate, executionName, err) - return err - } + fmt.Printf("skipping UpdateExecution request (DryRun)\n") + return nil + } + + if !execution.UConfig.Force && !cmdUtil.AskForConfirmation("Continue?", os.Stdin) { + return fmt.Errorf("update aborted by user") + } + + _, err = cmdCtx.AdminClient().UpdateExecution(ctx, &admin.ExecutionUpdateRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: project, + Domain: domain, + Name: executionName, + }, + State: newState, + }) + if err != nil { + fmt.Printf(clierrors.ErrFailedExecutionUpdate, executionName, err) + return err } - fmt.Printf("updated execution %s successfully to state %s\n", executionName, executionState.String()) + fmt.Printf("updated execution %s successfully to state %s\n", executionName, newState) return nil } diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go index 35ab591212..44a790e415 100644 --- a/flytectl/cmd/update/execution_test.go +++ b/flytectl/cmd/update/execution_test.go @@ -4,58 +4,240 @@ import ( "fmt" "testing" + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) -func TestExecutionUpdate(t *testing.T) { - s := testutils.Setup() - args := []string{"execution1"} - // Activate - execution.UConfig.Activate = true - s.MockAdminClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(&admin.ExecutionUpdateResponse{}, nil) - assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) - // Archive - execution.UConfig.Activate = false - execution.UConfig.Archive = true - assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) - // Reset - execution.UConfig.Activate = false - execution.UConfig.Archive = false - - // Dry run - execution.UConfig.DryRun = true - assert.Nil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) - s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything) - - // Reset - execution.UConfig.DryRun = false -} - -func TestExecutionUpdateValidationFailure(t *testing.T) { - s := testutils.Setup() - args := []string{"execution1"} - execution.UConfig.Activate = true - execution.UConfig.Archive = true - assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) - // Reset - execution.UConfig.Activate = false - execution.UConfig.Archive = false +func TestExecutionCanBeActivated(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateExecution", s.Ctx, + mock.MatchedBy( + func(r *admin.ExecutionUpdateRequest) bool { + return r.State == admin.ExecutionState_EXECUTION_ACTIVE + })) + }) +} + +func TestExecutionCanBeArchived(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateExecution", s.Ctx, + mock.MatchedBy( + func(r *admin.ExecutionUpdateRequest) bool { + return r.State == admin.ExecutionState_EXECUTION_ARCHIVED + })) + }) +} + +func TestExecutionCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) +} + +func TestExecutionUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) } -func TestExecutionUpdateFail(t *testing.T) { +func TestExecutionUpdateWithoutForceFlagFails(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) +} + +func TestExecutionUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) +} + +func TestForceFlagIsIgnoredWithDryRunDuringExecutionUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testExecutionUpdate( + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }) + }) +} + +func TestExecutionUpdateFailsWhenExecutionDoesNotExist(t *testing.T) { + testExecutionUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, execution *admin.Execution) { + s.FetcherExt. + OnFetchExecution(s.Ctx, execution.Id.Name, execution.Id.Project, execution.Id.Domain). + Return(nil, ext.NewNotFoundError("execution not found")) + s.MockAdminClient. + OnUpdateExecutionMatch(s.Ctx, mock.Anything). + Return(&admin.ExecutionUpdateResponse{}, nil) + }, + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }, + ) +} + +func TestExecutionUpdateFailsWhenAdminClientFails(t *testing.T) { + testExecutionUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, execution *admin.Execution) { + s.FetcherExt. + OnFetchExecution(s.Ctx, execution.Id.Name, execution.Id.Project, execution.Id.Domain). + Return(execution, nil) + s.MockAdminClient. + OnUpdateExecutionMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution) { + execution.Closure.StateChangeDetails.State = admin.ExecutionState_EXECUTION_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateExecution", mock.Anything, mock.Anything) + }, + ) +} + +func TestExecutionUpdateRequiresExecutionName(t *testing.T) { s := testutils.Setup() - args := []string{"execution1"} - s.MockAdminClient.OnUpdateExecutionMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) + err := updateExecutionFunc(s.Ctx, nil, s.CmdCtx) + + assert.ErrorContains(t, err, "execution name wasn't passed") +} + +func testExecutionUpdate( + setup func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution), + asserter func(s *testutils.TestStruct, err error), +) { + testExecutionUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, execution *admin.Execution) { + s.FetcherExt. + OnFetchExecution(s.Ctx, execution.Id.Name, execution.Id.Project, execution.Id.Domain). + Return(execution, nil) + s.MockAdminClient. + OnUpdateExecutionMatch(s.Ctx, mock.Anything). + Return(&admin.ExecutionUpdateResponse{}, nil) + }, + setup, + asserter, + ) } -func TestExecutionUpdateInvalidArgs(t *testing.T) { +func testExecutionUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, execution *admin.Execution), + setup func(s *testutils.TestStruct, config *execution.UpdateConfig, execution *admin.Execution), + asserter func(s *testutils.TestStruct, err error), +) { s := testutils.Setup() - args := []string{} - assert.NotNil(t, updateExecutionFunc(s.Ctx, args, s.CmdCtx)) + target := newTestExecution() + + if mockSetup != nil { + mockSetup(&s, target) + } + + execution.UConfig = &execution.UpdateConfig{} + if setup != nil { + setup(&s, execution.UConfig, target) + } + + args := []string{target.Id.Name} + err := updateExecutionFunc(s.Ctx, args, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + execution.UConfig = &execution.UpdateConfig{} +} + +func newTestExecution() *admin.Execution { + return &admin.Execution{ + Id: &core.WorkflowExecutionIdentifier{ + Name: testutils.RandomName(12), + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + Closure: &admin.ExecutionClosure{ + StateChangeDetails: &admin.ExecutionStateChangeDetails{ + State: admin.ExecutionState_EXECUTION_ACTIVE, + }, + }, + } } diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 369f756cd7..f1a9474e7c 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -3,14 +3,15 @@ package update import ( "context" "fmt" + "os" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" ) const ( @@ -41,37 +42,67 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont if len(version) == 0 { return fmt.Errorf(clierrors.ErrLPVersionNotPassed) } - activateLP := launchplan.UConfig.Activate - archiveLP := launchplan.UConfig.Archive - if activateLP == archiveLP && archiveLP { + + activate := launchplan.UConfig.Activate + archive := launchplan.UConfig.Archive + if activate == archive && archive { return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } - var lpState admin.LaunchPlanState - if activateLP { - lpState = admin.LaunchPlanState_ACTIVE - } else if archiveLP { - lpState = admin.LaunchPlanState_INACTIVE + var newState admin.LaunchPlanState + if activate { + newState = admin.LaunchPlanState_ACTIVE + } else if archive { + newState = admin.LaunchPlanState_INACTIVE + } + + id := &core.Identifier{ + Project: project, + Domain: domain, + Name: name, + Version: version, + ResourceType: core.ResourceType_LAUNCH_PLAN, + } + + launchPlan, err := cmdCtx.AdminClient().GetLaunchPlan(ctx, &admin.ObjectGetRequest{Id: id}) + if err != nil { + return fmt.Errorf("update launch plan %s: could not fetch launch plan: %w", name, err) + } + oldState := launchPlan.GetClosure().GetState() + + type LaunchPlan struct { + State admin.LaunchPlanState `json:"state"` + } + patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, LaunchPlan{oldState}, LaunchPlan{newState}) + if err != nil { + panic(err) + } + + if patch == "" { + fmt.Printf("No changes detected. Skipping the update.\n") + return nil } + fmt.Printf("The following changes are to be applied.\n%s\n", patch) + if launchplan.UConfig.DryRun { - logger.Debugf(ctx, "skipping CreateExecution request (DryRun)") - } else { - _, err := cmdCtx.AdminClient().UpdateLaunchPlan(ctx, &admin.LaunchPlanUpdateRequest{ - Id: &core.Identifier{ - Project: project, - Domain: domain, - Name: name, - Version: version, - }, - State: lpState, - }) - if err != nil { - fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) - return err - } + fmt.Printf("skipping LaunchPlanUpdate request (DryRun)") + return nil + } + + if !launchplan.UConfig.Force && !cmdUtil.AskForConfirmation("Continue?", os.Stdin) { + return fmt.Errorf("update aborted by user") + } + + _, err = cmdCtx.AdminClient().UpdateLaunchPlan(ctx, &admin.LaunchPlanUpdateRequest{ + Id: id, + State: newState, + }) + if err != nil { + return fmt.Errorf(clierrors.ErrFailedLPUpdate, name, err) } - fmt.Printf("updated launchplan successfully on %v", name) + + fmt.Printf("updated launch plan successfully on %s", name) return nil } diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index e9aa1ae9a1..123413d6bf 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -42,8 +42,7 @@ func getUpdateLPMetaFunc(namedEntityConfig *NamedEntityConfig) func(ctx context. name := args[0] err := namedEntityConfig.UpdateNamedEntity(ctx, name, project, domain, core.ResourceType_LAUNCH_PLAN, cmdCtx) if err != nil { - fmt.Printf(clierrors.ErrFailedLPUpdate, name, err) - return err + return fmt.Errorf(clierrors.ErrFailedLPUpdate, name, err) } fmt.Printf("updated metadata successfully on %v", name) return nil diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go index f0119b9eb1..84187be99d 100644 --- a/flytectl/cmd/update/launch_plan_meta_test.go +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -4,32 +4,193 @@ import ( "fmt" "testing" + "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) -func TestLPMetaUpdate(t *testing.T) { - s := testutils.Setup() - namedEntityConfig := &NamedEntityConfig{} - args := []string{"task1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, getUpdateLPMetaFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) +func TestLaunchPlanMetadataCanBeActivated(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ACTIVE + })) + }) } -func TestLPMetaUpdateFail(t *testing.T) { - s := testutils.Setup() - namedEntityConfig := &NamedEntityConfig{} - args := []string{"task1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, getUpdateTaskFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) +func TestLaunchPlanMetadataCanBeArchived(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + })) + }) +} + +func TestLaunchPlanMetadataCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanMetadataUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanMetadataUpdateWithoutForceFlagFails(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanMetadataUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) } -func TestLPMetaUpdateInvalidArgs(t *testing.T) { +func TestForceFlagIsIgnoredWithDryRunDuringLaunchPlanMetadataUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_LAUNCH_PLAN, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) +} + +func TestLaunchPlanMetadataUpdateFailsWhenLaunchPlanDoesNotExist(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_LAUNCH_PLAN, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(nil, ext.NewNotFoundError("named entity not found")) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(&admin.NamedEntityUpdateResponse{}, nil) + }, + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestLaunchPlanMetadataUpdateFailsWhenAdminClientFails(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_LAUNCH_PLAN, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(namedEntity, nil) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestLaunchPlanMetadataUpdateRequiresLaunchPlanName(t *testing.T) { s := testutils.Setup() - namedEntityConfig := &NamedEntityConfig{} - args := []string{} - assert.NotNil(t, getUpdateTaskFunc(namedEntityConfig)(s.Ctx, args, s.CmdCtx)) + config := &NamedEntityConfig{} + + err := getUpdateLPMetaFunc(config)(s.Ctx, nil, s.CmdCtx) + + assert.ErrorContains(t, err, "launch plan name wasn't passed") } diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index 0e5010c5cf..11eb15f8f0 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -4,33 +4,274 @@ import ( "fmt" "testing" + "github.com/google/go-cmp/cmp" + + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) -func TestLPUpdate(t *testing.T) { +func TestLaunchPlanCanBeActivated(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateLaunchPlan", s.Ctx, + mock.MatchedBy( + func(r *admin.LaunchPlanUpdateRequest) bool { + return r.State == admin.LaunchPlanState_ACTIVE + })) + }) +} + +func TestLaunchPlanCanBeArchived(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateLaunchPlan", s.Ctx, + mock.MatchedBy( + func(r *admin.LaunchPlanUpdateRequest) bool { + return r.State == admin.LaunchPlanState_INACTIVE + })) + }) +} + +func TestLaunchPlanCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanUpdateWithoutForceFlagFails(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) +} + +func TestLaunchPlanUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) +} + +func TestForceFlagIsIgnoredWithDryRunDuringLaunchPlanUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }) + }) +} + +func TestLaunchPlanUpdateFailsWhenLaunchPlanDoesNotExist(t *testing.T) { + testLaunchPlanUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, launchplan *admin.LaunchPlan) { + s.MockAdminClient. + OnGetLaunchPlanMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.ObjectGetRequest) bool { + return cmp.Equal(r.Id, launchplan.Id) + })). + Return(nil, ext.NewNotFoundError("launch plan not found")) + s.MockAdminClient. + OnUpdateLaunchPlanMatch(s.Ctx, mock.Anything). + Return(&admin.LaunchPlanUpdateResponse{}, nil) + }, + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }, + ) +} + +func TestLaunchPlanUpdateFailsWhenAdminClientFails(t *testing.T) { + testLaunchPlanUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, launchplan *admin.LaunchPlan) { + s.MockAdminClient. + OnGetLaunchPlanMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.ObjectGetRequest) bool { + return cmp.Equal(r.Id, launchplan.Id) + })). + Return(launchplan, nil) + s.MockAdminClient. + OnUpdateLaunchPlanMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_INACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) + }, + ) +} + +func TestLaunchPlanUpdateRequiresLaunchPlanName(t *testing.T) { s := testutils.Setup() - launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} - args := []string{"lp1"} - s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(&admin.LaunchPlanUpdateResponse{}, nil) - assert.Nil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) + launchplan.UConfig = &launchplan.UpdateConfig{} + + launchplan.UConfig.Version = testutils.RandomName(2) + err := updateLPFunc(s.Ctx, nil, s.CmdCtx) + + assert.ErrorContains(t, err, "launch plan name wasn't passed") + + // cleanup + launchplan.UConfig = &launchplan.UpdateConfig{} } -func TestLPUpdateFail(t *testing.T) { +func TestLaunchPlanUpdateRequiresLaunchPlanVersion(t *testing.T) { s := testutils.Setup() - launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true} - args := []string{"task1"} - s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) + launchplan.UConfig = &launchplan.UpdateConfig{} + + name := testutils.RandomName(12) + err := updateLPFunc(s.Ctx, []string{name}, s.CmdCtx) + + assert.ErrorContains(t, err, "launch plan version wasn't passed") + + // cleanup + launchplan.UConfig = &launchplan.UpdateConfig{} } -func TestLPUpdateInvalidArgs(t *testing.T) { +func testLaunchPlanUpdate( + setup func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan), + asserter func(s *testutils.TestStruct, err error), +) { + testLaunchPlanUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, launchplan *admin.LaunchPlan) { + s.MockAdminClient. + OnGetLaunchPlanMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.ObjectGetRequest) bool { + return cmp.Equal(r.Id, launchplan.Id) + })). + Return(launchplan, nil) + s.MockAdminClient. + OnUpdateLaunchPlanMatch(s.Ctx, mock.Anything). + Return(&admin.LaunchPlanUpdateResponse{}, nil) + }, + setup, + asserter, + ) +} + +func testLaunchPlanUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, launchplan *admin.LaunchPlan), + setup func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan), + asserter func(s *testutils.TestStruct, err error), +) { s := testutils.Setup() - launchplan.UConfig = &launchplan.UpdateConfig{Version: "v1", Archive: true, Activate: true} - args := []string{} - assert.NotNil(t, updateLPFunc(s.Ctx, args, s.CmdCtx)) + target := newTestLaunchPlan() + + if mockSetup != nil { + mockSetup(&s, target) + } + + launchplan.UConfig = &launchplan.UpdateConfig{} + if setup != nil { + setup(&s, launchplan.UConfig, target) + } + + args := []string{target.Id.Name} + launchplan.UConfig.Version = target.Id.Version + err := updateLPFunc(s.Ctx, args, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + launchplan.UConfig = &launchplan.UpdateConfig{} +} + +func newTestLaunchPlan() *admin.LaunchPlan { + return &admin.LaunchPlan{ + Id: &core.Identifier{ + Name: testutils.RandomName(12), + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + ResourceType: core.ResourceType_LAUNCH_PLAN, + Version: testutils.RandomName(2), + }, + Closure: &admin.LaunchPlanClosure{ + State: admin.LaunchPlanState_ACTIVE, + }, + } } diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go index 23efa16912..c978d9dd97 100644 --- a/flytectl/cmd/update/matchable_attribute_util.go +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -3,45 +3,170 @@ package update import ( "context" "fmt" + "os" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" + cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func DecorateAndUpdateMatchableAttr(ctx context.Context, project, domain, workflowName string, - updater ext.AdminUpdaterExtInterface, mcDecorator sconfig.MatchableAttributeDecorator, dryRun bool) error { - matchingAttr := mcDecorator.Decorate() - if len(workflowName) > 0 { - // Update the workflow attribute using the admin. - if dryRun { - fmt.Printf("skipping UpdateWorkflowAttributes request (dryRun)\n") - } else { - err := updater.UpdateWorkflowAttributes(ctx, project, domain, workflowName, matchingAttr) - if err != nil { - return err - } - } - fmt.Printf("Updated attributes from %v project and domain %v and workflow %v\n", project, domain, workflowName) - } else { - // Update the project domain attribute using the admin. - if dryRun { - fmt.Printf("skipping UpdateProjectDomainAttributes request (dryRun)\n") - } else { - if len(domain) == 0 { - err := updater.UpdateProjectAttributes(ctx, project, matchingAttr) - if err != nil { - return err - } - fmt.Printf("Updated attributes from %v project\n", project) - } else { - err := updater.UpdateProjectDomainAttributes(ctx, project, domain, matchingAttr) - if err != nil { - return err - } - fmt.Printf("Updated attributes from %v project and domain %v\n", project, domain) - } - } +func DecorateAndUpdateMatchableAttr( + ctx context.Context, + cmdCtx cmdCore.CommandContext, + project, domain, workflow string, + resourceType admin.MatchableResource, + attributeDecorator sconfig.MatchableAttributeDecorator, + dryRun bool, + force bool, +) error { + if project == "" { + return fmt.Errorf("project is required") + } + if domain == "" && workflow != "" { + return fmt.Errorf("domain is required") + } + + switch { + case workflow != "": + return updateWorkflowMatchableAttributes(ctx, cmdCtx, project, domain, workflow, resourceType, attributeDecorator, dryRun, force) + case domain != "": + return updateProjectDomainMatchableAttributes(ctx, cmdCtx, project, domain, resourceType, attributeDecorator, dryRun, force) + default: + return updateProjectMatchableAttributes(ctx, cmdCtx, project, resourceType, attributeDecorator, dryRun, force) + } +} + +func updateProjectMatchableAttributes( + ctx context.Context, + cmdCtx cmdCore.CommandContext, + project string, + resourceType admin.MatchableResource, + attributeDecorator sconfig.MatchableAttributeDecorator, + dryRun bool, + force bool, +) error { + if project == "" { + panic("project is empty") + } + + response, err := cmdCtx.AdminFetcherExt().FetchProjectAttributes(ctx, project, resourceType) + if err != nil && !ext.IsNotFoundError(err) { + return fmt.Errorf("update project %s matchable attributes: could not fetch attributes: %w", project, err) + } + + oldMatchingAttributes := response.GetAttributes().GetMatchingAttributes() + newMatchingAttributes := attributeDecorator.Decorate() + + if confirmed, err := confirmMatchableAttributeUpdate(oldMatchingAttributes, newMatchingAttributes, dryRun, force); err != nil || !confirmed { + return err + } + + if err := cmdCtx.AdminUpdaterExt().UpdateProjectAttributes(ctx, project, newMatchingAttributes); err != nil { + return fmt.Errorf("update project %s matchable attributes: update failed: %w", project, err) + } + + fmt.Printf("Updated attributes from %s project\n", project) + return nil +} + +func updateProjectDomainMatchableAttributes( + ctx context.Context, + cmdCtx cmdCore.CommandContext, + project, domain string, + resourceType admin.MatchableResource, + attributeDecorator sconfig.MatchableAttributeDecorator, + dryRun bool, + force bool, +) error { + if project == "" { + panic("project is empty") + } + if domain == "" { + panic("domain is empty") + } + response, err := cmdCtx.AdminFetcherExt().FetchProjectDomainAttributes(ctx, project, domain, resourceType) + if err != nil && !ext.IsNotFoundError(err) { + return fmt.Errorf("update project %s domain %s matchable attributes: could not fetch attributes: %w", project, domain, err) } + + oldMatchingAttributes := response.GetAttributes().GetMatchingAttributes() + newMatchingAttributes := attributeDecorator.Decorate() + + if confirmed, err := confirmMatchableAttributeUpdate(oldMatchingAttributes, newMatchingAttributes, dryRun, force); err != nil || !confirmed { + return err + } + + if err := cmdCtx.AdminUpdaterExt().UpdateProjectDomainAttributes(ctx, project, domain, newMatchingAttributes); err != nil { + return fmt.Errorf("update project %s domain %s matchable attributes: update failed: %w", project, domain, err) + } + + fmt.Printf("Updated attributes from %s project and domain %s\n", project, domain) return nil } + +func updateWorkflowMatchableAttributes( + ctx context.Context, + cmdCtx cmdCore.CommandContext, + project, domain, workflow string, + resourceType admin.MatchableResource, + attributeDecorator sconfig.MatchableAttributeDecorator, + dryRun bool, + force bool, +) error { + if project == "" { + panic("project is empty") + } + if domain == "" { + panic("domain is empty") + } + if workflow == "" { + panic("workflow is empty") + } + + response, err := cmdCtx.AdminFetcherExt().FetchWorkflowAttributes(ctx, project, domain, workflow, resourceType) + if err != nil && !ext.IsNotFoundError(err) { + return fmt.Errorf("update project %s domain %s workflow %s matchable attributes: could not fetch attributes: %w", project, domain, workflow, err) + } + + oldMatchingAttributes := response.GetAttributes().GetMatchingAttributes() + newMatchingAttributes := attributeDecorator.Decorate() + + if confirmed, err := confirmMatchableAttributeUpdate(oldMatchingAttributes, newMatchingAttributes, dryRun, force); err != nil || !confirmed { + return err + } + + if err := cmdCtx.AdminUpdaterExt().UpdateWorkflowAttributes(ctx, project, domain, workflow, newMatchingAttributes); err != nil { + return fmt.Errorf("update project %s domain %s workflow %s matchable attributes: update failed: %w", project, domain, workflow, err) + } + + fmt.Printf("Updated attributes from %s project and domain %s and workflow %s\n", project, domain, workflow) + return nil +} + +func confirmMatchableAttributeUpdate(old, new *admin.MatchingAttributes, dryRun, force bool) (bool, error) { + patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, old.GetTarget(), new.GetTarget()) + if err != nil { + return false, fmt.Errorf("update matchable attributes: %w", err) + } + + if patch == "" { + fmt.Printf("No changes detected. Skipping the update.\n") + return false, nil + } + + fmt.Printf("The following changes are to be applied.\n%s\n", patch) + + if dryRun { + fmt.Printf("Skipping update request (dryRun)\n") + return false, nil + } + + if !force && !cmdUtil.AskForConfirmation("Continue?", os.Stdin) { + return false, fmt.Errorf("update aborted by user") + } + + return true, nil +} diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 79c03480ba..d18896cac5 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -7,6 +7,7 @@ import ( sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -71,9 +72,9 @@ func updateClusterResourceAttributesFunc(ctx context.Context, args []string, cmd domain := clustrResourceAttrFileConfig.Domain workflowName := clustrResourceAttrFileConfig.Workflow - // Updates the admin matchable attribute from taskResourceAttrFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - clustrResourceAttrFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_CLUSTER_RESOURCE, clustrResourceAttrFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 8b6f8b2faf..f355a53656 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -8,83 +8,564 @@ import ( "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updateClusterResourceAttributeSetup() { - clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} +const ( + validWorkflowClusterResourceAttributesFilePath = "testdata/valid_workflow_cluster_attribute.yaml" + validProjectDomainClusterResourceAttributesFilePath = "testdata/valid_project_domain_cluster_attribute.yaml" + validProjectClusterResourceAttributesFilePath = "testdata/valid_project_cluster_attribute.yaml" +) + +func TestClusterResourceAttributeUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestClusterResourceAttributeUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestClusterResourceAttributeUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestClusterResourceAttributeUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestClusterResourceAttributeUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestClusterResourceAttributeUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestUpdateClusterResourceAttributes(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successfully updated project domain attribute", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed to update project domain attribute", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateClusterResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successfully updated workflow attribute", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed to update workflow attribute", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updateClusterResourceAttributeSetup() - clusterresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestClusterResourceAttributeUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectClusterResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestClusterResourceAttributeUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_CLUSTER_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_CLUSTER_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_CLUSTER_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestClusterResourceAttributeUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectClusterResourceAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowClusterResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowClusterResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} + target := newTestWorkflowClusterResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, clusterresourceattribute.DefaultUpdateConfig, target) + } + + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} +} + +func newTestWorkflowClusterResourceAttribute() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: &admin.ClusterResourceAttributes{ + Attributes: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + } +} + +func testProjectClusterResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectClusterResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} + target := newTestProjectClusterResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, clusterresourceattribute.DefaultUpdateConfig, target) + } + + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} +} + +func newTestProjectClusterResourceAttribute() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: &admin.ClusterResourceAttributes{ + Attributes: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + } +} + +func testProjectDomainClusterResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainClusterResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_CLUSTER_RESOURCE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainClusterResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *clusterresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} + target := newTestProjectDomainClusterResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, clusterresourceattribute.DefaultUpdateConfig, target) + } + + err := updateClusterResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + clusterresourceattribute.DefaultUpdateConfig = &clusterresourceattribute.AttrUpdateConfig{} +} + +func newTestProjectDomainClusterResourceAttribute() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ClusterResourceAttributes{ + ClusterResourceAttributes: &admin.ClusterResourceAttributes{ + Attributes: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + } } diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index e3c41e1015..dee80cb459 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -7,6 +7,7 @@ import ( sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -64,9 +65,9 @@ func updateExecutionClusterLabelFunc(ctx context.Context, args []string, cmdCtx domain := executionClusterLabelFileConfig.Domain workflowName := executionClusterLabelFileConfig.Workflow - // Updates the admin matchable attribute from executionClusterLabelFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - executionClusterLabelFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_EXECUTION_CLUSTER_LABEL, executionClusterLabelFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index fffbd0f250..3b234c4a22 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -8,83 +8,552 @@ import ( "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updateExecutionClusterLabelSetup() { - executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} +const ( + validProjectExecutionClusterLabelFilePath = "testdata/valid_project_execution_cluster_label.yaml" + validProjectDomainExecutionClusterLabelFilePath = "testdata/valid_project_domain_execution_cluster_label.yaml" + validWorkflowExecutionClusterLabelFilePath = "testdata/valid_workflow_execution_cluster_label.yaml" +) + +func TestExecutionClusterLabelUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionClusterLabelUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionClusterLabelUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionClusterLabelUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestExecutionClusterLabelUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestExecutionClusterLabelUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestExecutionClusterLabel(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution cluster label"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update project domain attribute", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed update project domain attribute", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_cluster_label.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateExecutionClusterLabelFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update workflow attribute", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed update workflow attribute", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_cluster_label.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updateExecutionClusterLabelSetup() - executionclusterlabel.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestExecutionClusterLabelUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectExecutionClusterLabelUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestExecutionClusterLabelUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestExecutionClusterLabelUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionClusterLabelFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowExecutionClusterLabelUpdate( + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowExecutionClusterLabelUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} + target := newTestWorkflowExecutionClusterLabel() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionclusterlabel.DefaultUpdateConfig, target) + } + + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} +} + +func newTestWorkflowExecutionClusterLabel() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: &admin.ExecutionClusterLabel{ + Value: testutils.RandomName(12), + }, + }, + }, + } +} + +func testProjectExecutionClusterLabelUpdate( + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectExecutionClusterLabelUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} + target := newTestProjectExecutionClusterLabel() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionclusterlabel.DefaultUpdateConfig, target) + } + + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} +} + +func newTestProjectExecutionClusterLabel() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: &admin.ExecutionClusterLabel{ + Value: testutils.RandomName(12), + }, + }, + }, + } +} + +func testProjectDomainExecutionClusterLabelUpdate( + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainExecutionClusterLabelUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_CLUSTER_LABEL). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainExecutionClusterLabelUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *executionclusterlabel.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} + target := newTestProjectDomainExecutionClusterLabel() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionclusterlabel.DefaultUpdateConfig, target) + } + + err := updateExecutionClusterLabelFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionclusterlabel.DefaultUpdateConfig = &executionclusterlabel.AttrUpdateConfig{} +} + +func newTestProjectDomainExecutionClusterLabel() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionClusterLabel{ + ExecutionClusterLabel: &admin.ExecutionClusterLabel{ + Value: testutils.RandomName(12), + }, + }, + }, + } } diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index feb8d5224b..966972e771 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -7,6 +7,7 @@ import ( sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -75,9 +76,9 @@ func updateExecutionQueueAttributesFunc(ctx context.Context, args []string, cmdC domain := executionQueueAttrFileConfig.Domain workflowName := executionQueueAttrFileConfig.Workflow - // Updates the admin matchable attribute from executionQueueAttrFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - executionQueueAttrFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_EXECUTION_QUEUE, executionQueueAttrFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index cffad3da3d..8a14997660 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -8,83 +8,564 @@ import ( "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updateExecutionQueueAttributeSetup() { - executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} +const ( + validWorkflowExecutionQueueMatchableAttributesFilePath = "testdata/valid_workflow_execution_queue_attribute.yaml" + validProjectDomainExecutionQueueMatchableAttributeFilePath = "testdata/valid_project_domain_execution_queue_attribute.yaml" + validProjectExecutionQueueMatchableAttributeFilePath = "testdata/valid_project_execution_queue_attribute.yaml" +) + +func TestExecutionQueueAttributeUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionQueueAttributeUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionQueueAttributeUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestExecutionQueueAttributeUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestExecutionQueueAttributeUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestExecutionQueueAttributeUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestExecutionQueueAttributes(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for execution queue attribute"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update project domain attribute", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed update project domain attribute", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_execution_queue_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateExecutionQueueAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update workflow attribute", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed update workflow attribute", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_execution_queue_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updateExecutionQueueAttributeSetup() - executionqueueattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestExecutionQueueAttributeUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestExecutionQueueAttributeUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_QUEUE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_QUEUE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_QUEUE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestExecutionQueueAttributeUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionQueueMatchableAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectExecutionQueueMatchableAttributeFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowExecutionQueueAttributeUpdate( + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowExecutionQueueAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} + target := newTestWorkflowExecutionQueueAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionqueueattribute.DefaultUpdateConfig, target) + } + + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} +} + +func newTestWorkflowExecutionQueueAttribute() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: &admin.ExecutionQueueAttributes{ + Tags: []string{ + testutils.RandomName(5), + testutils.RandomName(5), + testutils.RandomName(5), + }, + }, + }, + }, + } +} + +func testProjectExecutionQueueAttributeUpdate( + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectExecutionQueueAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} + target := newTestProjectExecutionQueueAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionqueueattribute.DefaultUpdateConfig, target) + } + + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} +} + +func newTestProjectExecutionQueueAttribute() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: &admin.ExecutionQueueAttributes{ + Tags: []string{ + testutils.RandomName(5), + testutils.RandomName(5), + testutils.RandomName(5), + }, + }, + }, + }, + } +} + +func testProjectDomainExecutionQueueAttributeUpdate( + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainExecutionQueueAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_EXECUTION_QUEUE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainExecutionQueueAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *executionqueueattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} + target := newTestProjectDomainExecutionQueueAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, executionqueueattribute.DefaultUpdateConfig, target) + } + + err := updateExecutionQueueAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + executionqueueattribute.DefaultUpdateConfig = &executionqueueattribute.AttrUpdateConfig{} +} + +func newTestProjectDomainExecutionQueueAttribute() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_ExecutionQueueAttributes{ + ExecutionQueueAttributes: &admin.ExecutionQueueAttributes{ + Tags: []string{ + testutils.RandomName(5), + testutils.RandomName(5), + testutils.RandomName(5), + }, + }, + }, + }, + } } diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 981a124b50..4b6d1358f1 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -7,6 +7,7 @@ import ( sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -77,9 +78,9 @@ func updatePluginOverridesFunc(ctx context.Context, args []string, cmdCtx cmdCor domain := pluginOverrideFileConfig.Domain workflowName := pluginOverrideFileConfig.Workflow - // Updates the admin matchable attribute from pluginOverrideFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - pluginOverrideFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_PLUGIN_OVERRIDE, pluginOverrideFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index 5165b0091e..7089df984f 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -8,83 +8,582 @@ import ( "github.com/stretchr/testify/mock" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updatePluginOverrideSetup() { - pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} +const ( + validProjectPluginOverrideFilePath = "testdata/valid_project_plugin_override.yaml" + validProjectDomainPluginOverrideFilePath = "testdata/valid_project_domain_plugin_override.yaml" + validWorkflowPluginOverrideFilePath = "testdata/valid_workflow_plugin_override.yaml" +) + +func TestPluginOverrideUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestPluginOverrideUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestPluginOverrideUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestPluginOverrideUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestPluginOverrideUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestPluginOverrideUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestPluginOverride(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for plugin override"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update project domain attribute", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed update project domain attribute", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_plugin_override.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update workflow attribute", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed update workflow attribute", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_plugin_override.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updatePluginOverrideSetup() - pluginoverride.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updatePluginOverridesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestPluginOverrideUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectPluginOverrideUpdate( + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestPluginOverrideUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestPluginOverrideUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectPluginOverrideFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowPluginOverrideUpdate( + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowPluginOverrideUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} + target := newTestWorkflowPluginOverride() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, pluginoverride.DefaultUpdateConfig, target) + } + + err := updatePluginOverridesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} +} + +func newTestWorkflowPluginOverride() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: &admin.PluginOverrides{ + Overrides: []*admin.PluginOverride{ + { + TaskType: testutils.RandomName(15), + PluginId: []string{ + testutils.RandomName(12), + testutils.RandomName(12), + testutils.RandomName(12), + }, + MissingPluginBehavior: admin.PluginOverride_FAIL, + }, + }, + }, + }, + }, + } +} + +func testProjectPluginOverrideUpdate( + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectPluginOverrideUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} + target := newTestProjectPluginOverride() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, pluginoverride.DefaultUpdateConfig, target) + } + + err := updatePluginOverridesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} +} + +func newTestProjectPluginOverride() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: &admin.PluginOverrides{ + Overrides: []*admin.PluginOverride{ + { + TaskType: testutils.RandomName(15), + PluginId: []string{ + testutils.RandomName(12), + testutils.RandomName(12), + testutils.RandomName(12), + }, + MissingPluginBehavior: admin.PluginOverride_FAIL, + }, + }, + }, + }, + }, + } +} + +func testProjectDomainPluginOverrideUpdate( + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainPluginOverrideUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_PLUGIN_OVERRIDE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainPluginOverrideUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *pluginoverride.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} + target := newTestProjectDomainPluginOverride() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, pluginoverride.DefaultUpdateConfig, target) + } + + err := updatePluginOverridesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + pluginoverride.DefaultUpdateConfig = &pluginoverride.AttrUpdateConfig{} +} + +func newTestProjectDomainPluginOverride() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_PluginOverrides{ + PluginOverrides: &admin.PluginOverrides{ + Overrides: []*admin.PluginOverride{ + { + TaskType: testutils.RandomName(15), + PluginId: []string{ + testutils.RandomName(12), + testutils.RandomName(12), + testutils.RandomName(12), + }, + MissingPluginBehavior: admin.PluginOverride_FAIL, + }, + }, + }, + }, + }, + } } diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index e18825c069..a296a4bd51 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -7,6 +7,7 @@ import ( sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -77,9 +78,9 @@ func updateTaskResourceAttributesFunc(ctx context.Context, args []string, cmdCtx domain := taskResourceAttrFileConfig.Domain workflowName := taskResourceAttrFileConfig.Workflow - // Updates the admin matchable attribute from taskResourceAttrFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - taskResourceAttrFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_TASK_RESOURCE, taskResourceAttrFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index e9135f1355..fd485f910c 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -8,83 +8,561 @@ import ( "github.com/stretchr/testify/mock" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updateTaskResourceAttributeSetup() { - taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} +const ( + validProjectTaskAttributesFilePath = "testdata/valid_project_task_attribute.yaml" + validProjectDomainTaskAttributesFilePath = "testdata/valid_project_domain_task_attribute.yaml" + validWorkflowTaskAttributesFilePath = "testdata/valid_workflow_task_attribute.yaml" +) + +func TestTaskResourceAttributeUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestTaskResourceAttributeUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestTaskResourceAttributeUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestTaskResourceAttributeUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestTaskResourceAttributeUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestTaskResourceAttributeUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestUpdateTaskResourceAttributes(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for task resource attribute"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update project domain attribute", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed update project domain attribute", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_task_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update workflow attribute", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed update workflow attribute", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_task_attribute.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updateTaskResourceAttributeSetup() - taskresourceattribute.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updateTaskResourceAttributesFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestTaskResourceAttributeUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectTaskResourceAttributeUpdate( + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestTaskResourceAttributeUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_TASK_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_TASK_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_TASK_RESOURCE). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestTaskResourceAttributeUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectTaskAttributesFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowTaskResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowTaskResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} + target := newTestWorkflowTaskResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, taskresourceattribute.DefaultUpdateConfig, target) + } + + err := updateTaskResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} +} + +func newTestWorkflowTaskResourceAttribute() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: &admin.TaskResourceAttributes{ + Defaults: &admin.TaskResourceSpec{ + Cpu: testutils.RandomName(2), + Memory: testutils.RandomName(5), + }, + }, + }, + }, + } +} + +func testProjectTaskResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectTaskResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} + target := newTestProjectTaskResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, taskresourceattribute.DefaultUpdateConfig, target) + } + + err := updateTaskResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} +} + +func newTestProjectTaskResourceAttribute() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: &admin.TaskResourceAttributes{ + Defaults: &admin.TaskResourceSpec{ + Cpu: testutils.RandomName(2), + Memory: testutils.RandomName(5), + }, + }, + }, + }, + } +} + +func testProjectDomainTaskResourceAttributeUpdate( + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainTaskResourceAttributeUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_TASK_RESOURCE). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainTaskResourceAttributeUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *taskresourceattribute.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} + target := newTestProjectDomainTaskResourceAttribute() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, taskresourceattribute.DefaultUpdateConfig, target) + } + + err := updateTaskResourceAttributesFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + taskresourceattribute.DefaultUpdateConfig = &taskresourceattribute.AttrUpdateConfig{} +} + +func newTestProjectDomainTaskResourceAttribute() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_TaskResourceAttributes{ + TaskResourceAttributes: &admin.TaskResourceAttributes{ + Defaults: &admin.TaskResourceSpec{ + Cpu: testutils.RandomName(2), + Memory: testutils.RandomName(5), + }, + }, + }, + }, + } } diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index b9489d67ff..100ee7e77a 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdCore "github.com/flyteorg/flytectl/cmd/core" @@ -74,9 +75,9 @@ func updateWorkflowExecutionConfigFunc(ctx context.Context, args []string, cmdCt domain := workflowExecutionConfigFileConfig.Domain workflowName := workflowExecutionConfigFileConfig.Workflow - // Updates the admin matchable attribute from workflowExecutionConfigFileConfig - if err := DecorateAndUpdateMatchableAttr(ctx, project, domain, workflowName, cmdCtx.AdminUpdaterExt(), - workflowExecutionConfigFileConfig, updateConfig.DryRun); err != nil { + if err := DecorateAndUpdateMatchableAttr(ctx, cmdCtx, project, domain, workflowName, + admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG, workflowExecutionConfigFileConfig, + updateConfig.DryRun, updateConfig.Force); err != nil { return err } return nil diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index 9f5ef81baf..f81f92a883 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -4,87 +4,577 @@ import ( "fmt" "testing" - "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) -func updateWorkflowExecutionConfigSetup() { - workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} +const ( + validProjectWorkflowExecutionConfigFilePath = "testdata/valid_project_workflow_execution_config.yaml" + validProjectDomainWorkflowExecutionConfigFilePath = "testdata/valid_project_domain_workflow_execution_config.yaml" + validWorkflowExecutionConfigFilePath = "testdata/valid_workflow_workflow_execution_config.yaml" +) + +func TestWorkflowExecutionConfigUpdateRequiresAttributeFile(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "attrFile is mandatory") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestWorkflowExecutionConfigUpdateFailsWhenAttributeFileDoesNotExist(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataNonExistentFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "unable to read from testdata/non-existent-file yaml file") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestWorkflowExecutionConfigUpdateFailsWhenAttributeFileIsMalformed(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = testDataInvalidAttrFile + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\"") + s.UpdaterExt.AssertNotCalled(t, "FetchWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) +} + +func TestWorkflowExecutionConfigUpdateHappyPath(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestWorkflowExecutionConfigUpdateFailsWithoutForceFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestWorkflowExecutionConfigUpdateDoesNothingWithDryRunFlag(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func TestWorkflowExecutionConfigUpdateIgnoresForceFlagWithDryRun(t *testing.T) { + t.Run("workflow without --force", func(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("workflow with --force", func(t *testing.T) { + testWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain without --force", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain with --force", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project without --force", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project with --force", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdate( + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertNotCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) } -func TestWorkflowExecutionConfigs(t *testing.T) { - t.Run("no input file for update", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for workflow execution config"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update project domain attribute", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(nil) - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development`) - }) - t.Run("failed update project domain attribute", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_workflow_execution_config.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateProjectDomainAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("successful update workflow attribute", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(nil) - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.TearDownAndVerify(t, `Updated attributes from flytesnacks project and domain development and workflow core.control_flow.merge_sort.merge_sort`) - }) - t.Run("failed update workflow attribute", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_workflow_execution_config.yaml" - // No args implying project domain attribute deletion - s.UpdaterExt.OnUpdateWorkflowAttributesMatch(mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything).Return(fmt.Errorf("failed to update attributes")) - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("failed to update attributes"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("non existent file", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataNonExistentFile - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("unable to read from testdata/non-existent-file yaml file"), err) - s.TearDownAndVerify(t, ``) - }) - t.Run("invalid update file", func(t *testing.T) { - s := setup() - updateWorkflowExecutionConfigSetup() - workflowexecutionconfig.DefaultUpdateConfig.AttrFile = testDataInvalidAttrFile - err := updateWorkflowExecutionConfigFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""), err) - s.TearDownAndVerify(t, ``) +func TestWorkflowExecutionConfigUpdateSucceedsWhenAttributesDoNotExist(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project and domain development`) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(nil, ext.NewNotFoundError("attribute")) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + s.TearDownAndVerifyContains(t, `Updated attributes from flytesnacks project`) + }) + }) +} + +func TestWorkflowExecutionConfigUpdateFailsWhenAdminClientFails(t *testing.T) { + t.Run("workflow", func(t *testing.T) { + testWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes) { + config.AttrFile = validWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateWorkflowAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("domain", func(t *testing.T) { + testProjectDomainWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes) { + config.AttrFile = validProjectDomainWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectDomainAttributes", mock.Anything, mock.Anything, mock.Anything, mock.Anything) + }) + }) + + t.Run("project", func(t *testing.T) { + testProjectWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes) { + config.AttrFile = validProjectWorkflowExecutionConfigFilePath + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.UpdaterExt.AssertCalled(t, "UpdateProjectAttributes", mock.Anything, mock.Anything, mock.Anything) + }) + }) +} + +func testWorkflowExecutionConfigUpdate( + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.WorkflowAttributes) { + s.FetcherExt. + OnFetchWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.WorkflowAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateWorkflowAttributesMatch(s.Ctx, target.Project, target.Domain, target.Workflow, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testWorkflowExecutionConfigUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.WorkflowAttributes), + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.WorkflowAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} + target := newTestWorkflowExecutionConfig() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, workflowexecutionconfig.DefaultUpdateConfig, target) + } + + err := updateWorkflowExecutionConfigFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} +} + +func newTestWorkflowExecutionConfig() *admin.WorkflowAttributes { + return &admin.WorkflowAttributes{ + // project, domain, and workflow names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + Workflow: "core.control_flow.merge_sort.merge_sort", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ + MaxParallelism: 1337, + Annotations: &admin.Annotations{ + Values: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + }, + } +} + +func testProjectWorkflowExecutionConfigUpdate( + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectAttributes) { + s.FetcherExt. + OnFetchProjectAttributesMatch(s.Ctx, target.Project, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.ProjectAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectAttributesMatch(s.Ctx, target.Project, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectWorkflowExecutionConfigUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectAttributes), + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} + target := newTestProjectWorkflowExecutionConfig() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, workflowexecutionconfig.DefaultUpdateConfig, target) + } + + err := updateWorkflowExecutionConfigFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} +} + +func newTestProjectWorkflowExecutionConfig() *admin.ProjectAttributes { + return &admin.ProjectAttributes{ + // project name needs to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ + MaxParallelism: 1337, + Annotations: &admin.Annotations{ + Values: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + }, + } +} + +func testProjectDomainWorkflowExecutionConfigUpdate( + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectDomainWorkflowExecutionConfigUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes) { + s.FetcherExt. + OnFetchProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, admin.MatchableResource_WORKFLOW_EXECUTION_CONFIG). + Return(&admin.ProjectDomainAttributesGetResponse{Attributes: target}, nil) + s.UpdaterExt. + OnUpdateProjectDomainAttributesMatch(s.Ctx, target.Project, target.Domain, mock.Anything). + Return(nil) + }, + setup, + asserter, + ) +} + +func testProjectDomainWorkflowExecutionConfigUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, target *admin.ProjectDomainAttributes), + setup func(s *testutils.TestStruct, config *workflowexecutionconfig.AttrUpdateConfig, target *admin.ProjectDomainAttributes), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} + target := newTestProjectDomainWorkflowExecutionConfig() + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, workflowexecutionconfig.DefaultUpdateConfig, target) + } + + err := updateWorkflowExecutionConfigFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + workflowexecutionconfig.DefaultUpdateConfig = &workflowexecutionconfig.AttrUpdateConfig{} +} + +func newTestProjectDomainWorkflowExecutionConfig() *admin.ProjectDomainAttributes { + return &admin.ProjectDomainAttributes{ + // project and domain names need to be same as in the tests spec files in testdata folder + Project: "flytesnacks", + Domain: "development", + MatchingAttributes: &admin.MatchingAttributes{ + Target: &admin.MatchingAttributes_WorkflowExecutionConfig{ + WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ + MaxParallelism: 1337, + Annotations: &admin.Annotations{ + Values: map[string]string{ + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + testutils.RandomName(5): testutils.RandomName(10), + }, + }, + }, + }, + }, + } } diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go index c7644f4907..3101e29ba2 100644 --- a/flytectl/cmd/update/named_entity.go +++ b/flytectl/cmd/update/named_entity.go @@ -3,12 +3,13 @@ package update import ( "context" "fmt" + "os" "github.com/flyteorg/flytectl/clierrors" cmdCore "github.com/flyteorg/flytectl/cmd/core" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" ) //go:generate pflags NamedEntityConfig --default-var namedEntityConfig --bind-default-var @@ -22,38 +23,80 @@ type NamedEntityConfig struct { Activate bool `json:"activate" pflag:",activate the named entity."` Description string `json:"description" pflag:",description of the named entity."` DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` } func (cfg NamedEntityConfig) UpdateNamedEntity(ctx context.Context, name string, project string, domain string, rsType core.ResourceType, cmdCtx cmdCore.CommandContext) error { - archiveProject := cfg.Archive - activateProject := cfg.Activate - if activateProject == archiveProject && activateProject { + if cfg.Activate && cfg.Archive { return fmt.Errorf(clierrors.ErrInvalidStateUpdate) } - var nameEntityState admin.NamedEntityState - if activateProject { - nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ACTIVE - } else if archiveProject { - nameEntityState = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + + id := &admin.NamedEntityIdentifier{ + Project: project, + Domain: domain, + Name: name, + } + + namedEntity, err := cmdCtx.AdminClient().GetNamedEntity(ctx, &admin.NamedEntityGetRequest{ + ResourceType: rsType, + Id: id, + }) + if err != nil { + return fmt.Errorf("update metadata for %s: could not fetch metadata: %w", name, err) + } + + oldMetadata, newMetadata := composeNamedMetadataEdits(cfg, namedEntity.Metadata) + patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, oldMetadata, newMetadata) + if err != nil { + panic(err) } + if patch == "" { + fmt.Printf("No changes detected. Skipping the update.\n") + return nil + } + + fmt.Printf("The following changes are to be applied.\n%s\n", patch) + if cfg.DryRun { - logger.Infof(ctx, "skipping UpdateNamedEntity request (dryRun)") - } else { - _, err := cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ - ResourceType: rsType, - Id: &admin.NamedEntityIdentifier{ - Project: project, - Domain: domain, - Name: name, - }, - Metadata: &admin.NamedEntityMetadata{ - Description: cfg.Description, - State: nameEntityState, - }, - }) - if err != nil { - return err - } + fmt.Printf("skipping UpdateNamedEntity request (dryRun)\n") + return nil + } + + if !cfg.Force && !cmdUtil.AskForConfirmation("Continue?", os.Stdin) { + return fmt.Errorf("update aborted by user") } + + _, err = cmdCtx.AdminClient().UpdateNamedEntity(ctx, &admin.NamedEntityUpdateRequest{ + ResourceType: rsType, + Id: id, + Metadata: newMetadata, + }) + if err != nil { + return fmt.Errorf("update metadata for %s: update failed: %w", name, err) + } + return nil } + +func composeNamedMetadataEdits(config NamedEntityConfig, current *admin.NamedEntityMetadata) (old *admin.NamedEntityMetadata, new *admin.NamedEntityMetadata) { + old = &admin.NamedEntityMetadata{} + new = &admin.NamedEntityMetadata{} + + switch { + case config.Activate && config.Archive: + panic("cannot both activate and archive") + case config.Activate: + old.State = current.State + new.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + case config.Archive: + old.State = current.State + new.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + } + + if config.Description != "" { + old.Description = current.Description + new.Description = config.Description + } + + return old, new +} diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go index 4e0086d7c6..732bc9d249 100644 --- a/flytectl/cmd/update/named_entity_test.go +++ b/flytectl/cmd/update/named_entity_test.go @@ -1,39 +1,97 @@ package update import ( + "context" "fmt" - "testing" + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config" + cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/stretchr/testify/mock" - - "github.com/stretchr/testify/assert" ) -func TestNamedEntity(t *testing.T) { - s := testutils.Setup() - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - namedEntityConfig = &NamedEntityConfig{Archive: false, Activate: true, Description: "named entity description"} - assert.Nil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, s.CmdCtx)) - namedEntityConfig = &NamedEntityConfig{Archive: true, Activate: false, Description: "named entity description"} - assert.Nil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, s.CmdCtx)) +func testNamedEntityUpdate( + resourceType core.ResourceType, + setup func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity), + asserter func(s *testutils.TestStruct, err error), +) { + testNamedEntityUpdateWithMockSetup( + resourceType, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(namedEntity, nil) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(&admin.NamedEntityUpdateResponse{}, nil) + }, + setup, + asserter, + ) } -func TestNamedEntityValidationFailure(t *testing.T) { +func testNamedEntityUpdateWithMockSetup( + resourceType core.ResourceType, + mockSetup func(s *testutils.TestStruct, namedEntity *admin.NamedEntity), + setup func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity), + asserter func(s *testutils.TestStruct, err error), +) { s := testutils.Setup() - namedEntityConfig := &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} - assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, s.CmdCtx)) + config := &NamedEntityConfig{} + target := newTestNamedEntity(resourceType) + + if mockSetup != nil { + mockSetup(&s, target) + } + + if setup != nil { + setup(&s, config, target) + } + + updateMetadataFactory := getUpdateMetadataFactory(resourceType) + + args := []string{target.Id.Name} + err := updateMetadataFactory(config)(s.Ctx, args, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } } -func TestNamedEntityFailure(t *testing.T) { - s := testutils.Setup() - namedEntityConfig := &NamedEntityConfig{Archive: true, Activate: true, Description: "named entity description"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, namedEntityConfig.UpdateNamedEntity(s.Ctx, "namedEntity", "project", "domain", - core.ResourceType_WORKFLOW, s.CmdCtx)) +func newTestNamedEntity(resourceType core.ResourceType) *admin.NamedEntity { + return &admin.NamedEntity{ + Id: &admin.NamedEntityIdentifier{ + Name: testutils.RandomName(12), + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + }, + ResourceType: resourceType, + Metadata: &admin.NamedEntityMetadata{ + State: admin.NamedEntityState_NAMED_ENTITY_ACTIVE, + Description: testutils.RandomName(50), + }, + } +} + +func getUpdateMetadataFactory(resourceType core.ResourceType) func(namedEntityConfig *NamedEntityConfig) func(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + switch resourceType { + case core.ResourceType_LAUNCH_PLAN: + return getUpdateLPMetaFunc + case core.ResourceType_TASK: + return getUpdateTaskFunc + case core.ResourceType_WORKFLOW: + return getUpdateWorkflowFunc + } + + panic(fmt.Sprintf("no known mapping exists between resource type %s and "+ + "corresponding update metadata factory function", resourceType)) } diff --git a/flytectl/cmd/update/namedentityconfig_flags.go b/flytectl/cmd/update/namedentityconfig_flags.go index 8d3b7a96b8..2f1345bc98 100755 --- a/flytectl/cmd/update/namedentityconfig_flags.go +++ b/flytectl/cmd/update/namedentityconfig_flags.go @@ -54,5 +54,6 @@ func (cfg NamedEntityConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.BoolVar(&namedEntityConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), namedEntityConfig.Activate, "activate the named entity.") cmdFlags.StringVar(&namedEntityConfig.Description, fmt.Sprintf("%v%v", prefix, "description"), namedEntityConfig.Description, "description of the named entity.") cmdFlags.BoolVar(&namedEntityConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), namedEntityConfig.DryRun, "execute command without making any modifications.") + cmdFlags.BoolVar(&namedEntityConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), namedEntityConfig.Force, "do not ask for an acknowledgement during updates.") return cmdFlags } diff --git a/flytectl/cmd/update/namedentityconfig_flags_test.go b/flytectl/cmd/update/namedentityconfig_flags_test.go index 9c85b8be20..43cf00ec2a 100755 --- a/flytectl/cmd/update/namedentityconfig_flags_test.go +++ b/flytectl/cmd/update/namedentityconfig_flags_test.go @@ -155,4 +155,18 @@ func TestNamedEntityConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_NamedEntityConfig(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index bec3d36b96..881f61fec8 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -3,12 +3,14 @@ package update import ( "context" "fmt" + "os" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytestdlib/logger" + cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( @@ -30,7 +32,7 @@ Incorrect usage when passing both archive and activate: :: - flytectl update project -p flytesnacks --archiveProject --activate + flytectl update project -p flytesnacks --archive --activate Incorrect usage when passing unknown-project: @@ -42,7 +44,7 @@ project ID is required flag :: - flytectl update project unknown-project --archiveProject + flytectl update project unknown-project --archive Update projects.(project/projects can be used interchangeably in these commands) @@ -83,24 +85,70 @@ Usage ) func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - projectSpec, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig()) + edits, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig()) if err != nil { return err } - if projectSpec.Id == "" { + if edits.Id == "" { return fmt.Errorf(clierrors.ErrProjectNotPassed) } + currentProject, err := cmdCtx.AdminFetcherExt().GetProjectByID(ctx, edits.Id) + if err != nil { + return fmt.Errorf("update project %s: could not fetch project: %w", edits.Id, err) + } + + // We do not compare currentProject against edits directly, because edits does not + // have a complete set of project's fields - it will only contain fields that + // the update command allows updating. (For example, it won't have Domains field + // initialized.) + currentProjectWithEdits := copyProjectWithEdits(currentProject, edits) + patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, currentProject, currentProjectWithEdits) + if err != nil { + panic(err) + } + if patch == "" { + fmt.Printf("No changes detected. Skipping the update.\n") + return nil + } + + fmt.Printf("The following changes are to be applied.\n%s\n", patch) + if project.DefaultProjectConfig.DryRun { - logger.Infof(ctx, "skipping UpdateProject request (dryRun)") - } else { - _, err := cmdCtx.AdminClient().UpdateProject(ctx, projectSpec) - if err != nil { - fmt.Printf(clierrors.ErrFailedProjectUpdate, projectSpec.Id, err) - return err - } + fmt.Printf("skipping UpdateProject request (dryRun)\n") + return nil + } + + if !project.DefaultProjectConfig.Force && !cmdUtil.AskForConfirmation("Continue?", os.Stdin) { + return fmt.Errorf("update aborted by user") } - fmt.Printf("Project %v updated\n", projectSpec.Id) + + _, err = cmdCtx.AdminClient().UpdateProject(ctx, edits) + if err != nil { + return fmt.Errorf(clierrors.ErrFailedProjectUpdate, edits.Id, err) + } + + fmt.Printf("project %s updated\n", edits.Id) return nil } + +// Makes a shallow copy of target and applies certain properties from edited to it. +// The properties applied are only the ones supported by update command: state, name, +// description, labels, etc. +func copyProjectWithEdits(target *admin.Project, edited *admin.Project) *admin.Project { + copy := *target + + copy.State = edited.State + if edited.Name != "" { + copy.Name = edited.Name + } + if edited.Description != "" { + copy.Description = edited.Description + } + if len(edited.GetLabels().GetValues()) != 0 { + copy.Labels = edited.Labels + } + + return © +} diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 25fb768f47..a3152127d4 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -1,143 +1,258 @@ package update import ( - "errors" "fmt" "testing" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) -const projectValue = "dummyProject" +func TestProjectCanBeActivated(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateProject", s.Ctx, + mock.MatchedBy( + func(r *admin.Project) bool { + return r.State == admin.Project_ACTIVE + })) + }) +} -var ( - projectUpdateRequest *admin.Project -) +func TestProjectCanBeArchived(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateProject", s.Ctx, + mock.MatchedBy( + func(r *admin.Project) bool { + return r.State == admin.Project_ARCHIVED + })) + }) +} -func updateProjectSetup() { - projectUpdateRequest = &admin.Project{ - Id: projectValue, - State: admin.Project_ACTIVE, - } +func TestProjectCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) } -func modifyProjectFlags(newArchiveVal bool, newActivateVal bool) { - project.DefaultProjectConfig.ArchiveProject = newArchiveVal - project.DefaultProjectConfig.Archive = newArchiveVal - project.DefaultProjectConfig.ActivateProject = newActivateVal - project.DefaultProjectConfig.Activate = newActivateVal +func TestProjectUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) } -func TestActivateProjectFunc(t *testing.T) { - s := setup() - updateProjectSetup() - config.GetConfig().Project = projectValue - project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(false, true) - projectUpdateRequest = &admin.Project{ - Id: projectValue, - Name: projectValue, - Labels: &admin.Labels{ - Values: map[string]string{}, +func TestProjectUpdateWithoutForceFlagFails(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + config.Force = false }, - State: admin.Project_ACTIVE, - } - s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - s.TearDownAndVerify(t, "Project dummyProject updated\n") + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) } -func TestActivateProjectFuncWithError(t *testing.T) { - s := setup() - updateProjectSetup() - config.GetConfig().Project = projectValue - project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(false, true) - projectUpdateRequest = &admin.Project{ - Id: projectValue, - Name: projectValue, - Labels: &admin.Labels{ - Values: map[string]string{}, +func TestProjectUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + config.DryRun = true }, - State: admin.Project_ACTIVE, - } - s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - s.TearDownAndVerify(t, "Project dummyProject failed to update due to Error Updating Project\n") + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) } -func TestArchiveProjectFunc(t *testing.T) { - s := setup() - updateProjectSetup() - config.GetConfig().Project = projectValue - project.DefaultProjectConfig = &project.ConfigProject{} - project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(true, false) - projectUpdateRequest = &admin.Project{ - Id: projectValue, - Name: projectValue, - Labels: &admin.Labels{ - Values: nil, +func TestForceFlagIsIgnoredWithDryRunDuringProjectUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }) + }) +} + +func TestProjectUpdateFailsWhenProjectDoesNotExist(t *testing.T) { + testProjectUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, project *admin.Project) { + s.FetcherExt. + OnGetProjectByID(s.Ctx, project.Id). + Return(nil, ext.NewNotFoundError("project not found")) + s.MockAdminClient. + OnUpdateProjectMatch(s.Ctx, mock.Anything). + Return(&admin.ProjectUpdateResponse{}, nil) }, - State: admin.Project_ARCHIVED, - } - s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, nil) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.Nil(t, err) - s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - s.TearDownAndVerify(t, "Project dummyProject updated\n") + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }, + ) } -func TestArchiveProjectFuncWithError(t *testing.T) { - s := setup() - updateProjectSetup() - project.DefaultProjectConfig.Name = projectValue - project.DefaultProjectConfig.Labels = map[string]string{} - modifyProjectFlags(true, false) - projectUpdateRequest = &admin.Project{ - Id: projectValue, - Name: projectValue, - Labels: &admin.Labels{ - Values: map[string]string{}, +func TestProjectUpdateFailsWhenAdminClientFails(t *testing.T) { + testProjectUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, project *admin.Project) { + s.FetcherExt. + OnGetProjectByID(s.Ctx, project.Id). + Return(project, nil) + s.MockAdminClient. + OnUpdateProjectMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) }, - State: admin.Project_ARCHIVED, - } - s.MockAdminClient.OnUpdateProjectMatch(s.Ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - s.MockAdminClient.AssertCalled(t, "UpdateProject", s.Ctx, projectUpdateRequest) - s.TearDownAndVerify(t, "Project dummyProject failed to update"+ - " due to Error Updating Project\n") + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateProject", mock.Anything, mock.Anything) + }, + ) } -func TestEmptyProjectInput(t *testing.T) { - s := setup() - updateProjectSetup() +func TestProjectUpdateRequiresProjectId(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + config.ID = "" + }, + func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "project id wasn't passed") + }) +} + +func testProjectUpdate( + setup func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project), + asserter func(s *testutils.TestStruct, err error), +) { + testProjectUpdateWithMockSetup( + /* mockSetup */ func(s *testutils.TestStruct, project *admin.Project) { + s.FetcherExt. + OnGetProjectByID(s.Ctx, project.Id). + Return(project, nil) + s.MockAdminClient. + OnUpdateProjectMatch(s.Ctx, mock.Anything). + Return(&admin.ProjectUpdateResponse{}, nil) + }, + setup, + asserter, + ) +} + +func testProjectUpdateWithMockSetup( + mockSetup func(s *testutils.TestStruct, project *admin.Project), + setup func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project), + asserter func(s *testutils.TestStruct, err error), +) { + s := testutils.Setup() + target := newTestProject() + + if mockSetup != nil { + mockSetup(&s, target) + } + + project.DefaultProjectConfig = &project.ConfigProject{ + ID: target.Id, + } config.GetConfig().Project = "" - modifyProjectFlags(false, true) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf(clierrors.ErrProjectNotPassed), err) + config.GetConfig().Domain = "" + if setup != nil { + setup(&s, project.DefaultProjectConfig, target) + } + + err := updateProjectsFunc(s.Ctx, nil, s.CmdCtx) + + if asserter != nil { + asserter(&s, err) + } + + // cleanup + project.DefaultProjectConfig = &project.ConfigProject{} + config.GetConfig().Project = "" + config.GetConfig().Domain = "" } -func TestInvalidInput(t *testing.T) { - s := setup() - updateProjectSetup() - config.GetConfig().Project = projectValue - project.DefaultProjectConfig.Name = projectValue - modifyProjectFlags(true, true) - err := updateProjectsFunc(s.Ctx, []string{}, s.CmdCtx) - assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf(clierrors.ErrInvalidStateUpdate), err) - s.TearDownAndVerify(t, "") +func newTestProject() *admin.Project { + return &admin.Project{ + Id: testutils.RandomName(12), + Name: testutils.RandomName(12), + State: admin.Project_ACTIVE, + Domains: []*admin.Domain{ + { + Id: testutils.RandomName(12), + Name: testutils.RandomName(12), + }, + }, + Description: testutils.RandomName(12), + Labels: &admin.Labels{ + Values: map[string]string{ + testutils.RandomName(5): testutils.RandomName(12), + testutils.RandomName(5): testutils.RandomName(12), + testutils.RandomName(5): testutils.RandomName(12), + }, + }, + } } diff --git a/flytectl/cmd/update/task_meta_test.go b/flytectl/cmd/update/task_meta_test.go index e121cbe8bd..e1ffc9a13a 100644 --- a/flytectl/cmd/update/task_meta_test.go +++ b/flytectl/cmd/update/task_meta_test.go @@ -4,28 +4,193 @@ import ( "fmt" "testing" + "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) -func TestTaskUpdate(t *testing.T) { - s := testutils.Setup() - args := []string{"task1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) +func TestTaskMetadataCanBeActivated(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ACTIVE + })) + }) } -func TestTaskUpdateFail(t *testing.T) { - s := testutils.Setup() - args := []string{"workflow1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) +func TestTaskMetadataCanBeArchived(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + })) + }) +} + +func TestTaskMetadataCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestTaskMetadataUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestTaskMetadataUpdateWithoutForceFlagFails(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestTaskMetadataUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) } -func TestTaskUpdateInvalidArgs(t *testing.T) { +func TestForceFlagIsIgnoredWithDryRunDuringTaskMetadataUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_TASK, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) +} + +func TestTaskMetadataUpdateFailsWhenTaskDoesNotExist(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_TASK, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(nil, ext.NewNotFoundError("named entity not found")) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(&admin.NamedEntityUpdateResponse{}, nil) + }, + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestTaskMetadataUpdateFailsWhenAdminClientFails(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_TASK, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(namedEntity, nil) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestTaskMetadataUpdateRequiresTaskName(t *testing.T) { s := testutils.Setup() - assert.NotNil(t, getUpdateTaskFunc(&NamedEntityConfig{})(s.Ctx, []string{}, s.CmdCtx)) + config := &NamedEntityConfig{} + + err := getUpdateTaskFunc(config)(s.Ctx, nil, s.CmdCtx) + + assert.ErrorContains(t, err, "task name wasn't passed") } diff --git a/flytectl/cmd/update/testdata/valid_project_cluster_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_cluster_attribute.yaml new file mode 100644 index 0000000000..27dc7e2f3c --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_cluster_attribute.yaml @@ -0,0 +1,4 @@ +project: flytesnacks +attributes: + "foo": "bar" + "buzz": "lightyear" \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_execution_cluster_label.yaml b/flytectl/cmd/update/testdata/valid_project_execution_cluster_label.yaml new file mode 100644 index 0000000000..7d9e207ba7 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_execution_cluster_label.yaml @@ -0,0 +1,2 @@ +project: flytesnacks +value: foo \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_execution_queue_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_execution_queue_attribute.yaml new file mode 100644 index 0000000000..7ddb5f135d --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_execution_queue_attribute.yaml @@ -0,0 +1,6 @@ +project: flytesnacks +tags: + - foo + - bar + - buzz + - lightyear \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_plugin_override.yaml b/flytectl/cmd/update/testdata/valid_project_plugin_override.yaml new file mode 100644 index 0000000000..1ad8e5cd01 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_plugin_override.yaml @@ -0,0 +1,7 @@ +project: flytesnacks +overrides: + - task_type: python_task + plugin_id: + - plugin_override1 + - plugin_override2 + missing_plugin_behavior: 1 # 0 : FAIL , 1: DEFAULT diff --git a/flytectl/cmd/update/testdata/valid_project_task_attribute.yaml b/flytectl/cmd/update/testdata/valid_project_task_attribute.yaml new file mode 100644 index 0000000000..77281d5a22 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_task_attribute.yaml @@ -0,0 +1,7 @@ +project: flytesnacks +defaults: + cpu: "1" + memory: 150Mi +limits: + cpu: "2" + memory: 450Mi \ No newline at end of file diff --git a/flytectl/cmd/update/testdata/valid_project_workflow_execution_config.yaml b/flytectl/cmd/update/testdata/valid_project_workflow_execution_config.yaml new file mode 100644 index 0000000000..414e3ecbb4 --- /dev/null +++ b/flytectl/cmd/update/testdata/valid_project_workflow_execution_config.yaml @@ -0,0 +1,2 @@ +project: flytesnacks +max_parallelism: 5 \ No newline at end of file diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index 23c69ac608..9677ee897e 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -20,12 +20,11 @@ const ( updateUse = "update" updateShort = `Update Flyte resources e.g., project.` updatecmdLong = ` -Currently, this command only provides subcommands to update project. -Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -Update Flyte resources; if a project: +Provides subcommands to update Flyte resources, such as tasks, workflows, launch plans, executions, and projects. +Update Flyte resource; e.g., to activate a project: :: - flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activate ` ) diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index d4a256e06c..23ec7d3495 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -5,8 +5,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - - "github.com/flyteorg/flytectl/cmd/testutils" ) const ( @@ -14,8 +12,6 @@ const ( testDataInvalidAttrFile = "testdata/invalid_attribute.yaml" ) -var setup = testutils.Setup - func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() assert.Equal(t, updateCommand.Use, updateUse) diff --git a/flytectl/cmd/update/workflow_meta_test.go b/flytectl/cmd/update/workflow_meta_test.go index 7c7a1fc78e..2d49de2b25 100644 --- a/flytectl/cmd/update/workflow_meta_test.go +++ b/flytectl/cmd/update/workflow_meta_test.go @@ -4,28 +4,193 @@ import ( "fmt" "testing" + "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) -func TestWorkflowUpdate(t *testing.T) { - s := testutils.Setup() - args := []string{"workflow1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(&admin.NamedEntityUpdateResponse{}, nil) - assert.Nil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) +func TestWorkflowMetadataCanBeActivated(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ACTIVE + })) + }) } -func TestWorkflowUpdateFail(t *testing.T) { - s := testutils.Setup() - args := []string{"workflow1"} - s.MockAdminClient.OnUpdateNamedEntityMatch(mock.Anything, mock.Anything).Return(nil, fmt.Errorf("failed to update")) - assert.NotNil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, args, s.CmdCtx)) +func TestWorkflowMetadataCanBeArchived(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Archive = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateNamedEntity", s.Ctx, + mock.MatchedBy( + func(r *admin.NamedEntityUpdateRequest) bool { + return r.GetMetadata().GetState() == admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + })) + }) +} + +func TestWorkflowMetadataCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + config.Activate = true + config.Archive = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "Specify either activate or archive") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestWorkflowMetadataUpdateDoesNothingWhenThereAreNoChanges(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ACTIVE + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestWorkflowMetadataUpdateWithoutForceFlagFails(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = false + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.ErrorContains(t, err, "update aborted by user") + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) +} + +func TestWorkflowMetadataUpdateDoesNothingWithDryRunFlag(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) } -func TestWorkflowUpdateInvalidArgs(t *testing.T) { +func TestForceFlagIsIgnoredWithDryRunDuringWorkflowMetadataUpdate(t *testing.T) { + t.Run("without --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = false + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) + + t.Run("with --force", func(t *testing.T) { + testNamedEntityUpdate(core.ResourceType_WORKFLOW, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + + config.Force = true + config.DryRun = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }) + }) +} + +func TestWorkflowMetadataUpdateFailsWhenWorkflowDoesNotExist(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_WORKFLOW, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(nil, ext.NewNotFoundError("named entity not found")) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(&admin.NamedEntityUpdateResponse{}, nil) + }, + /* setup */ nil, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertNotCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestWorkflowMetadataUpdateFailsWhenAdminClientFails(t *testing.T) { + testNamedEntityUpdateWithMockSetup( + core.ResourceType_WORKFLOW, + /* mockSetup */ func(s *testutils.TestStruct, namedEntity *admin.NamedEntity) { + s.MockAdminClient. + OnGetNamedEntityMatch( + s.Ctx, + mock.MatchedBy(func(r *admin.NamedEntityGetRequest) bool { + return r.ResourceType == namedEntity.ResourceType && + cmp.Equal(r.Id, namedEntity.Id) + })). + Return(namedEntity, nil) + s.MockAdminClient. + OnUpdateNamedEntityMatch(s.Ctx, mock.Anything). + Return(nil, fmt.Errorf("network error")) + }, + /* setup */ func(s *testutils.TestStruct, config *NamedEntityConfig, namedEntity *admin.NamedEntity) { + namedEntity.Metadata.State = admin.NamedEntityState_NAMED_ENTITY_ARCHIVED + config.Activate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Error(t, err) + s.MockAdminClient.AssertCalled(t, "UpdateNamedEntity", mock.Anything, mock.Anything) + }, + ) +} + +func TestWorkflowMetadataUpdateRequiresWorkflowName(t *testing.T) { s := testutils.Setup() - assert.NotNil(t, getUpdateWorkflowFunc(&NamedEntityConfig{})(s.Ctx, []string{}, s.CmdCtx)) + config := &NamedEntityConfig{} + + err := getUpdateWorkflowFunc(config)(s.Ctx, nil, s.CmdCtx) + + assert.ErrorContains(t, err, "workflow name wasn't passed") } diff --git a/flytectl/go.mod b/flytectl/go.mod index a3587885f0..534c99baaa 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -14,9 +14,11 @@ require ( github.com/flyteorg/flytestdlib v1.0.13 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang/protobuf v1.5.2 + github.com/google/go-cmp v0.5.8 github.com/google/go-github/v42 v42.0.0 github.com/google/uuid v1.2.0 github.com/hashicorp/go-version v1.3.0 + github.com/hexops/gotextdiff v1.0.3 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/mitchellh/mapstructure v1.4.3 @@ -83,7 +85,6 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/googleapis/gax-go/v2 v2.3.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 95855b56ca..38be461844 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -732,6 +732,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index 3e33609b3b..5106a170a1 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -2,57 +2,65 @@ package ext import ( "context" - "fmt" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) (*admin.WorkflowAttributesGetResponse, error) { - workflowAttr, err := a.AdminServiceClient().GetWorkflowAttributes(ctx, &admin.WorkflowAttributesGetRequest{ + response, err := a.AdminServiceClient().GetWorkflowAttributes(ctx, &admin.WorkflowAttributesGetRequest{ Project: project, Domain: domain, Workflow: name, ResourceType: rsType, }) - if err != nil { + if err != nil && status.Code(err) != codes.NotFound { return nil, err } - if workflowAttr.GetAttributes() == nil || workflowAttr.GetAttributes().GetMatchingAttributes() == nil { - return nil, fmt.Errorf("attribute doesn't exist") + if status.Code(err) == codes.NotFound || + response.GetAttributes() == nil || + response.GetAttributes().GetMatchingAttributes() == nil { + return nil, NewNotFoundError("attribute") } - return workflowAttr, nil + return response, nil } func (a *AdminFetcherExtClient) FetchProjectDomainAttributes(ctx context.Context, project, domain string, rsType admin.MatchableResource) (*admin.ProjectDomainAttributesGetResponse, error) { - projectDomainAttr, err := a.AdminServiceClient().GetProjectDomainAttributes(ctx, + response, err := a.AdminServiceClient().GetProjectDomainAttributes(ctx, &admin.ProjectDomainAttributesGetRequest{ Project: project, Domain: domain, ResourceType: rsType, }) - if err != nil { + if err != nil && status.Code(err) != codes.NotFound { return nil, err } - if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { - return nil, fmt.Errorf("attribute doesn't exist") + if status.Code(err) == codes.NotFound || + response.GetAttributes() == nil || + response.GetAttributes().GetMatchingAttributes() == nil { + return nil, NewNotFoundError("attribute") } - return projectDomainAttr, nil + return response, nil } func (a *AdminFetcherExtClient) FetchProjectAttributes(ctx context.Context, project string, rsType admin.MatchableResource) (*admin.ProjectAttributesGetResponse, error) { - projectDomainAttr, err := a.AdminServiceClient().GetProjectAttributes(ctx, + response, err := a.AdminServiceClient().GetProjectAttributes(ctx, &admin.ProjectAttributesGetRequest{ Project: project, ResourceType: rsType, }) - if err != nil { + if err != nil && status.Code(err) != codes.NotFound { return nil, err } - if projectDomainAttr.GetAttributes() == nil || projectDomainAttr.GetAttributes().GetMatchingAttributes() == nil { - return nil, fmt.Errorf("attribute doesn't exist") + if status.Code(err) == codes.NotFound || + response.GetAttributes() == nil || + response.GetAttributes().GetMatchingAttributes() == nil { + return nil, NewNotFoundError("attribute") } - return projectDomainAttr, nil + return response, nil } diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index 81352d6bc2..663e6e620b 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -52,7 +52,8 @@ func TestFetchWorkflowAttributesError(t *testing.T) { adminClient.OnGetWorkflowAttributesMatch(mock.Anything, mock.Anything).Return(wResp, nil) _, err := adminFetcherExt.FetchWorkflowAttributes(ctx, "dummyProject", "domainValue", "workflowName", admin.MatchableResource_TASK_RESOURCE) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + assert.True(t, IsNotFoundError(err)) + assert.EqualError(t, err, "attribute not found") }) } @@ -76,7 +77,8 @@ func TestFetchProjectDomainAttributesError(t *testing.T) { adminClient.OnGetProjectDomainAttributesMatch(mock.Anything, mock.Anything).Return(pResp, nil) _, err := adminFetcherExt.FetchProjectDomainAttributes(ctx, "dummyProject", "domainValue", admin.MatchableResource_TASK_RESOURCE) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + assert.True(t, IsNotFoundError(err)) + assert.EqualError(t, err, "attribute not found") }) } @@ -93,6 +95,7 @@ func TestFetchProjectAttributesError(t *testing.T) { adminClient.OnGetProjectAttributesMatch(mock.Anything, mock.Anything).Return(pResp, nil) _, err := adminFetcherExt.FetchProjectAttributes(ctx, "dummyProject", admin.MatchableResource_TASK_RESOURCE) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("attribute doesn't exist"), err) + assert.True(t, IsNotFoundError(err)) + assert.EqualError(t, err, "attribute not found") }) } diff --git a/flytectl/pkg/ext/errors.go b/flytectl/pkg/ext/errors.go new file mode 100644 index 0000000000..4f51601a28 --- /dev/null +++ b/flytectl/pkg/ext/errors.go @@ -0,0 +1,24 @@ +package ext + +import ( + "errors" + "fmt" +) + +type NotFoundError struct { + Target string +} + +func (err *NotFoundError) Error() string { + return fmt.Sprintf("%s not found", err.Target) +} + +func NewNotFoundError(targetFormat string, formatArgs ...any) *NotFoundError { + target := fmt.Sprintf(targetFormat, formatArgs...) + return &NotFoundError{target} +} + +func IsNotFoundError(err error) bool { + var notFoundErr *NotFoundError + return errors.As(err, ¬FoundErr) +} diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index b706bf8a53..790eebde0e 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -72,6 +72,9 @@ type AdminFetcherExtInterface interface { // ListProjects fetches all projects ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) + + // GetProjectByID fetches a single project by its identifier. If project does not exist, an error will be returned + GetProjectByID(ctx context.Context, projectID string) (*admin.Project, error) } // AdminFetcherExtClient is used for interacting with extended features used for fetching data from admin service diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 3162a6b278..7d8e1ee284 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -750,6 +750,47 @@ func (_m *AdminFetcherExtInterface) FetchWorkflowVersion(ctx context.Context, na return r0, r1 } +type AdminFetcherExtInterface_GetProjectByID struct { + *mock.Call +} + +func (_m AdminFetcherExtInterface_GetProjectByID) Return(_a0 *admin.Project, _a1 error) *AdminFetcherExtInterface_GetProjectByID { + return &AdminFetcherExtInterface_GetProjectByID{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AdminFetcherExtInterface) OnGetProjectByID(ctx context.Context, projectID string) *AdminFetcherExtInterface_GetProjectByID { + c_call := _m.On("GetProjectByID", ctx, projectID) + return &AdminFetcherExtInterface_GetProjectByID{Call: c_call} +} + +func (_m *AdminFetcherExtInterface) OnGetProjectByIDMatch(matchers ...interface{}) *AdminFetcherExtInterface_GetProjectByID { + c_call := _m.On("GetProjectByID", matchers...) + return &AdminFetcherExtInterface_GetProjectByID{Call: c_call} +} + +// GetProjectByID provides a mock function with given fields: ctx, projectID +func (_m *AdminFetcherExtInterface) GetProjectByID(ctx context.Context, projectID string) (*admin.Project, error) { + ret := _m.Called(ctx, projectID) + + var r0 *admin.Project + if rf, ok := ret.Get(0).(func(context.Context, string) *admin.Project); ok { + r0 = rf(ctx, projectID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.Project) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, projectID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type AdminFetcherExtInterface_ListExecution struct { *mock.Call } diff --git a/flytectl/pkg/ext/project_fetcher.go b/flytectl/pkg/ext/project_fetcher.go index 4367bef9a6..3834952877 100644 --- a/flytectl/pkg/ext/project_fetcher.go +++ b/flytectl/pkg/ext/project_fetcher.go @@ -2,6 +2,7 @@ package ext import ( "context" + "fmt" "github.com/flyteorg/flytectl/pkg/filters" @@ -19,3 +20,27 @@ func (a *AdminFetcherExtClient) ListProjects(ctx context.Context, filter filters } return e, nil } + +func (a *AdminFetcherExtClient) GetProjectByID(ctx context.Context, projectID string) (*admin.Project, error) { + if projectID == "" { + return nil, fmt.Errorf("GetProjectByID: projectId is empty") + } + + response, err := a.AdminServiceClient().ListProjects(ctx, &admin.ProjectListRequest{ + Limit: 1, + Filters: fmt.Sprintf("eq(identifier,%s)", filters.EscapeValue(projectID)), + }) + if err != nil { + return nil, err + } + + if len(response.Projects) == 0 { + return nil, NewNotFoundError("project %s", projectID) + } + + if len(response.Projects) > 1 { + panic(fmt.Sprintf("unexpected number of projects in ListProjects response: %d - 0 or 1 expected", len(response.Projects))) + } + + return response.Projects[0], nil +} diff --git a/flytectl/pkg/filters/filters.go b/flytectl/pkg/filters/filters.go index 629b6a25c8..836dc50eba 100644 --- a/flytectl/pkg/filters/filters.go +++ b/flytectl/pkg/filters/filters.go @@ -65,6 +65,16 @@ func (i InvalidEscapeSequence) Error() string { return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence) } +// EscapeValue escapes strings to be used as values in filter queries. +func EscapeValue(s string) string { + replacer := strings.NewReplacer( + `\`, `\\`, + `,`, `\,`, + `=`, `\=`, + ) + return replacer.Replace(s) +} + // UnescapeValue unescapes a fieldSelector value and returns the original literal value. // May return the original string if it contains no escaped or special characters. func UnescapeValue(s string) (string, error) { diff --git a/flytectl/pkg/filters/filters_test.go b/flytectl/pkg/filters/filters_test.go index cd988f0c58..43cfb52d3b 100644 --- a/flytectl/pkg/filters/filters_test.go +++ b/flytectl/pkg/filters/filters_test.go @@ -71,3 +71,14 @@ func TestParseFailed(t *testing.T) { assert.Equal(t, "", op) } } + +func TestEscapeValue(t *testing.T) { + assert.Equal(t, "", EscapeValue("")) + assert.Equal(t, "abc", EscapeValue("abc")) + assert.Equal(t, `\\`, EscapeValue(`\`)) + assert.Equal(t, `\\\\`, EscapeValue(`\\`)) + assert.Equal(t, `\,`, EscapeValue(`,`)) + assert.Equal(t, `\,\,`, EscapeValue(`,,`)) + assert.Equal(t, `\=`, EscapeValue(`=`)) + assert.Equal(t, `\=\=`, EscapeValue(`==`)) +} From 7f80f02abee82ee4b4afa61f7ebccbd7a19e8323 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Fri, 13 Oct 2023 05:05:12 +0800 Subject: [PATCH 322/356] force flag (#431) Signed-off-by: Future Outlier Co-authored-by: Future Outlier --- .../cmd/config/subcommand/config/config_flags.go | 1 + .../config/subcommand/config/config_flags_test.go | 14 ++++++++++++++ .../cmd/config/subcommand/config/init_flags.go | 2 ++ flytectl/cmd/configuration/configuration.go | 4 +++- flytectl/cmd/configuration/configuration_test.go | 15 ++++++++++++++- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/config/subcommand/config/config_flags.go b/flytectl/cmd/config/subcommand/config/config_flags.go index 35b08563cd..c3d727a3e2 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags.go +++ b/flytectl/cmd/config/subcommand/config/config_flags.go @@ -53,5 +53,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Console, fmt.Sprintf("%v%v", prefix, "console"), DefaultConfig.Console, "Endpoint of console, if different than flyte admin") cmdFlags.StringVar(&DefaultConfig.Host, fmt.Sprintf("%v%v", prefix, "host"), DefaultConfig.Host, "Endpoint of flyte admin") cmdFlags.BoolVar(&DefaultConfig.Insecure, fmt.Sprintf("%v%v", prefix, "insecure"), DefaultConfig.Insecure, "Enable insecure mode") + cmdFlags.BoolVar(&DefaultConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultConfig.Force, "Force to overwrite the default config file without confirmation") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/config/config_flags_test.go b/flytectl/cmd/config/subcommand/config/config_flags_test.go index 142d145bc3..51f52abb86 100755 --- a/flytectl/cmd/config/subcommand/config/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/config/config_flags_test.go @@ -141,4 +141,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/config/init_flags.go b/flytectl/cmd/config/subcommand/config/init_flags.go index 9c31fa998d..cbb8e60be5 100755 --- a/flytectl/cmd/config/subcommand/config/init_flags.go +++ b/flytectl/cmd/config/subcommand/config/init_flags.go @@ -4,6 +4,7 @@ package config var ( DefaultConfig = &Config{ Insecure: false, + Force: false, } ) @@ -12,4 +13,5 @@ type Config struct { Console string `json:"console" pflag:",Endpoint of console, if different than flyte admin"` Host string `json:"host" pflag:",Endpoint of flyte admin"` Insecure bool `json:"insecure" pflag:",Enable insecure mode"` + Force bool `json:"force" pflag:",Force to overwrite the default config file without confirmation"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index e759758164..e6d120b1bb 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -70,6 +70,8 @@ func CreateConfigCommand() *cobra.Command { Long: initCmdLong, PFlagProvider: initConfig.DefaultConfig}, } + configCmd.Flags().BoolVar(&initConfig.DefaultConfig.Force, "force", false, "Force to overwrite the default config file without confirmation") + cmdcore.AddCommands(configCmd, getResourcesFuncs) return configCmd } @@ -109,7 +111,7 @@ func initFlytectlConfig(reader io.Reader) error { if _, err := os.Stat(configutil.ConfigFile); os.IsNotExist(err) { _err = configutil.SetupConfig(configutil.ConfigFile, templateStr, templateValues) } else { - if cmdUtil.AskForConfirmation(fmt.Sprintf("This action will overwrite an existing config file at [%s]. Do you want to continue?", configutil.ConfigFile), reader) { + if initConfig.DefaultConfig.Force || cmdUtil.AskForConfirmation(fmt.Sprintf("This action will overwrite an existing config file at [%s]. Do you want to continue?", configutil.ConfigFile), reader) { if err := os.Remove(configutil.ConfigFile); err != nil { return err } diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 19c90a13f4..2f48d28597 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -41,12 +41,12 @@ func TestCreateInitCommand(t *testing.T) { assert.Equal(t, initCmdShort, cmdNouns[2].Short) assert.Equal(t, "validate", cmdNouns[3].Use) assert.Equal(t, "Validates the loaded config.", cmdNouns[3].Short) - } func TestSetupConfigFunc(t *testing.T) { var yes = strings.NewReader("Yes") var no = strings.NewReader("No") + var empty = strings.NewReader("") mockOutStream := new(io.Writer) ctx := context.Background() _ = os.Remove(configutil.FlytectlConfig) @@ -59,8 +59,13 @@ func TestSetupConfigFunc(t *testing.T) { initConfig.DefaultConfig.Host = "" assert.Nil(t, err) + initConfig.DefaultConfig.Force = false assert.Nil(t, initFlytectlConfig(yes)) assert.Nil(t, initFlytectlConfig(no)) + + initConfig.DefaultConfig.Force = true + assert.Nil(t, initFlytectlConfig(empty)) + initConfig.DefaultConfig.Host = "flyte.org" assert.Nil(t, initFlytectlConfig(no)) initConfig.DefaultConfig.Host = "localhost:30081" @@ -86,3 +91,11 @@ func TestValidateEndpointName(t *testing.T) { assert.Equal(t, false, validateEndpointName("112.11.1.1:8080/console")) assert.Equal(t, false, validateEndpointName("flyte")) } + +func TestForceFlagInCreateConfigCommand(t *testing.T) { + cmd := CreateConfigCommand() + assert.False(t, initConfig.DefaultConfig.Force) + err := cmd.Flags().Parse([]string{"--force"}) + assert.Nil(t, err) + assert.True(t, initConfig.DefaultConfig.Force) +} From 61eb8f2c36b3e4cab94f1834e6a3c0aeb1f9fd79 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Tue, 17 Oct 2023 16:39:12 +0800 Subject: [PATCH 323/356] Flyte Add Enable/Disable Options for Agent Services (#420) --------- Signed-off-by: Future Outlier Signed-off-by: Future-Outlier Co-authored-by: Future Outlier Co-authored-by: Kevin Su --- .../cmd/config/subcommand/sandbox/config_flags.go | 1 + .../config/subcommand/sandbox/config_flags_test.go | 14 ++++++++++++++ .../config/subcommand/sandbox/sandbox_config.go | 3 +++ flytectl/pkg/sandbox/start.go | 5 +++++ flytectl/pkg/sandbox/start_test.go | 2 ++ 5 files changed, 25 insertions(+) diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 7b025f541d..39b9ba1ba1 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -54,6 +54,7 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), DefaultConfig.Version, "Version of flyte. Only supports flyte releases greater than v0.10.0") cmdFlags.StringVar(&DefaultConfig.Image, fmt.Sprintf("%v%v", prefix, "image"), DefaultConfig.Image, "Optional. Provide a fully qualified path to a Flyte compliant docker image.") cmdFlags.BoolVar(&DefaultConfig.Prerelease, fmt.Sprintf("%v%v", prefix, "pre"), DefaultConfig.Prerelease, "Optional. Pre release Version of flyte will be used for sandbox.") + cmdFlags.BoolVar(&DefaultConfig.DisableAgent, fmt.Sprintf("%v%v", prefix, "disable-agent"), DefaultConfig.DisableAgent, "Optional. Disable the agent service.") cmdFlags.StringSliceVar(&DefaultConfig.Env, fmt.Sprintf("%v%v", prefix, "env"), DefaultConfig.Env, "Optional. Provide Env variable in key=value format which can be passed to sandbox container.") cmdFlags.Var(&DefaultConfig.ImagePullPolicy, fmt.Sprintf("%v%v", prefix, "imagePullPolicy"), "Optional. Defines the image pull behavior [Always/IfNotPresent/Never]") cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.RegistryAuth, fmt.Sprintf("%v%v", prefix, "imagePullOptions.registryAuth"), DefaultConfig.ImagePullOptions.RegistryAuth, "The base64 encoded credentials for the registry.") diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 79f6e88f49..37e2fc2ab7 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -155,6 +155,20 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_disable-agent", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("disable-agent", testValue) + if vBool, err := cmdFlags.GetBool("disable-agent"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.DisableAgent) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_env", func(t *testing.T) { t.Run("Override", func(t *testing.T) { diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index 1dfce6430f..b1fa698541 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -19,6 +19,9 @@ type Config struct { // Default value false represents that Flytectl will not use the latest pre-release if it exists. Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."` + // Agent Service + DisableAgent bool `json:"disable-agent" pflag:",Optional. Disable the agent service."` + // Optionally it is possible to pass in environment variables to sandbox container. Env []string `json:"env" pflag:",Optional. Provide Env variable in key=value format which can be passed to sandbox container."` diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index e79ec0162f..7a9551804b 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -229,6 +229,10 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService sandboxEnv = append(sandboxEnv, "FLYTE_DEV=True") } + if sandboxConfig.DisableAgent { + sandboxEnv = append(sandboxEnv, "DISABLE_AGENT=True") + } + ID, err := docker.StartContainer(ctx, cli, volumes, exposedPorts, portBindings, docker.FlyteSandboxClusterName, sandboxImage, sandboxEnv, sandboxConfig.DryRun) @@ -393,6 +397,7 @@ func StartDemoCluster(ctx context.Context, args []string, sandboxConfig *sandbox return err } // K3s will automatically write the file specified by this var, which is mounted from user's local state dir. + sandboxConfig.Env = append(sandboxConfig.Env, k3sKubeConfigEnvVar) err = StartCluster(ctx, args, sandboxConfig, demoImageName, sandboxImagePrefix, exposedPorts, portBindings, util.DemoConsolePort) if err != nil { diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index a09797d363..a99f5b91f5 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -106,6 +106,8 @@ func TestStartFunc(t *testing.T) { RegistryAuth: "", Platform: "", } + config.Dev = true + config.DisableAgent = true assert.Nil(t, util.SetupFlyteDir()) assert.Nil(t, os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte", "state"), os.ModePerm)) assert.Nil(t, ioutil.WriteFile(docker.Kubeconfig, []byte(content), os.ModePerm)) From 6898a8e6418d1b1172e73ad2dc1ec33a0ebdfddd Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Wed, 18 Oct 2023 09:22:46 +0800 Subject: [PATCH 324/356] enable --force flag in flyte demo start (#432) Signed-off-by: Future Outlier Co-authored-by: Future Outlier --- .../config/subcommand/docker/config_flags.go | 55 +++++++++ .../subcommand/docker/config_flags_test.go | 116 ++++++++++++++++++ .../config/subcommand/docker/docker_config.go | 13 ++ .../config/subcommand/sandbox/config_flags.go | 1 + .../subcommand/sandbox/config_flags_test.go | 14 +++ .../subcommand/sandbox/sandbox_config.go | 2 + flytectl/pkg/docker/docker_config.go | 12 ++ flytectl/pkg/docker/docker_util.go | 7 +- flytectl/pkg/docker/docker_util_test.go | 5 + flytectl/pkg/sandbox/start.go | 2 + 10 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 flytectl/cmd/config/subcommand/docker/config_flags.go create mode 100644 flytectl/cmd/config/subcommand/docker/config_flags_test.go create mode 100644 flytectl/cmd/config/subcommand/docker/docker_config.go create mode 100644 flytectl/pkg/docker/docker_config.go diff --git a/flytectl/cmd/config/subcommand/docker/config_flags.go b/flytectl/cmd/config/subcommand/docker/config_flags.go new file mode 100644 index 0000000000..6c2a9bcea5 --- /dev/null +++ b/flytectl/cmd/config/subcommand/docker/config_flags.go @@ -0,0 +1,55 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package docker + +import ( + "encoding/json" + "reflect" + + "fmt" + + "github.com/spf13/pflag" +) + +// If v is a pointer, it will get its element value or the zero value of the element type. +// If v is not a pointer, it will return it as is. +func (Config) elemValueOrNil(v interface{}) interface{} { + if t := reflect.TypeOf(v); t.Kind() == reflect.Ptr { + if reflect.ValueOf(v).IsNil() { + return reflect.Zero(t.Elem()).Interface() + } else { + return reflect.ValueOf(v).Interface() + } + } else if v == nil { + return reflect.Zero(t).Interface() + } + + return v +} + +func (Config) mustJsonMarshal(v interface{}) string { + raw, err := json.Marshal(v) + if err != nil { + panic(err) + } + + return string(raw) +} + +func (Config) mustMarshalJSON(v json.Marshaler) string { + raw, err := v.MarshalJSON() + if err != nil { + panic(err) + } + + return string(raw) +} + +// GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the +// flags is json-name.json-sub-name... etc. +func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { + cmdFlags := pflag.NewFlagSet("Config", pflag.ExitOnError) + cmdFlags.BoolVar(&DefaultConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultConfig.Force, "Optional. Forcefully delete existing sandbox cluster if it exists.") + return cmdFlags +} diff --git a/flytectl/cmd/config/subcommand/docker/config_flags_test.go b/flytectl/cmd/config/subcommand/docker/config_flags_test.go new file mode 100644 index 0000000000..e1efe4a644 --- /dev/null +++ b/flytectl/cmd/config/subcommand/docker/config_flags_test.go @@ -0,0 +1,116 @@ +// Code generated by go generate; DO NOT EDIT. +// This file was generated by robots. + +package docker + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/assert" +) + +var dereferencableKindsConfig = map[reflect.Kind]struct{}{ + reflect.Array: {}, reflect.Chan: {}, reflect.Map: {}, reflect.Ptr: {}, reflect.Slice: {}, +} + +// Checks if t is a kind that can be dereferenced to get its underlying type. +func canGetElementConfig(t reflect.Kind) bool { + _, exists := dereferencableKindsConfig[t] + return exists +} + +// This decoder hook tests types for json unmarshaling capability. If implemented, it uses json unmarshal to build the +// object. Otherwise, it'll just pass on the original data. +func jsonUnmarshalerHookConfig(_, to reflect.Type, data interface{}) (interface{}, error) { + unmarshalerType := reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() + if to.Implements(unmarshalerType) || reflect.PtrTo(to).Implements(unmarshalerType) || + (canGetElementConfig(to.Kind()) && to.Elem().Implements(unmarshalerType)) { + + raw, err := json.Marshal(data) + if err != nil { + fmt.Printf("Failed to marshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + res := reflect.New(to).Interface() + err = json.Unmarshal(raw, &res) + if err != nil { + fmt.Printf("Failed to umarshal Data: %v. Error: %v. Skipping jsonUnmarshalHook", data, err) + return data, nil + } + + return res, nil + } + + return data, nil +} + +func decode_Config(input, result interface{}) error { + config := &mapstructure.DecoderConfig{ + TagName: "json", + WeaklyTypedInput: true, + Result: result, + DecodeHook: mapstructure.ComposeDecodeHookFunc( + mapstructure.StringToTimeDurationHookFunc(), + mapstructure.StringToSliceHookFunc(","), + jsonUnmarshalerHookConfig, + ), + } + + decoder, err := mapstructure.NewDecoder(config) + if err != nil { + return err + } + + return decoder.Decode(input) +} + +func join_Config(arr interface{}, sep string) string { + listValue := reflect.ValueOf(arr) + strs := make([]string, 0, listValue.Len()) + for i := 0; i < listValue.Len(); i++ { + strs = append(strs, fmt.Sprintf("%v", listValue.Index(i))) + } + + return strings.Join(strs, sep) +} + +func testDecodeJson_Config(t *testing.T, val, result interface{}) { + assert.NoError(t, decode_Config(val, result)) +} + +func testDecodeRaw_Config(t *testing.T, vStringSlice, result interface{}) { + assert.NoError(t, decode_Config(vStringSlice, result)) +} + +func TestConfig_GetPFlagSet(t *testing.T) { + val := Config{} + cmdFlags := val.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) +} + +func TestConfig_SetFlags(t *testing.T) { + actual := Config{} + cmdFlags := actual.GetPFlagSet("") + assert.True(t, cmdFlags.HasFlags()) + + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) +} diff --git a/flytectl/cmd/config/subcommand/docker/docker_config.go b/flytectl/cmd/config/subcommand/docker/docker_config.go new file mode 100644 index 0000000000..17d8c78157 --- /dev/null +++ b/flytectl/cmd/config/subcommand/docker/docker_config.go @@ -0,0 +1,13 @@ +package docker + +//go:generate pflags Config --default-var DefaultConfig --bind-default-var +var ( + DefaultConfig = &Config{ + Force: false, + } +) + +// Configs +type Config struct { + Force bool `json:"force" pflag:",Optional. Forcefully delete existing sandbox cluster if it exists."` +} diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags.go b/flytectl/cmd/config/subcommand/sandbox/config_flags.go index 39b9ba1ba1..32e1423057 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags.go @@ -61,5 +61,6 @@ func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.StringVar(&DefaultConfig.ImagePullOptions.Platform, fmt.Sprintf("%v%v", prefix, "imagePullOptions.platform"), DefaultConfig.ImagePullOptions.Platform, "Forces a specific platform's image to be pulled.'") cmdFlags.BoolVar(&DefaultConfig.Dev, fmt.Sprintf("%v%v", prefix, "dev"), DefaultConfig.Dev, "Optional. Only start minio and postgres in the sandbox.") cmdFlags.BoolVar(&DefaultConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), DefaultConfig.DryRun, "Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use'") + cmdFlags.BoolVar(&DefaultConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), DefaultConfig.Force, "Optional. Forcefully delete existing sandbox cluster if it exists.") return cmdFlags } diff --git a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go index 37e2fc2ab7..8519a75583 100755 --- a/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go +++ b/flytectl/cmd/config/subcommand/sandbox/config_flags_test.go @@ -251,4 +251,18 @@ func TestConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_force", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("force", testValue) + if vBool, err := cmdFlags.GetBool("force"); err == nil { + testDecodeJson_Config(t, fmt.Sprintf("%v", vBool), &actual.Force) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index b1fa698541..f566de0118 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -34,6 +34,8 @@ type Config struct { // It's used for development. Users are able to start flyte locally via single binary and save the data to the minio or postgres in the sandbox. Dev bool `json:"dev" pflag:",Optional. Only start minio and postgres in the sandbox."` DryRun bool `json:"dryRun" pflag:",Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use'"` + + Force bool `json:"force" pflag:",Optional. Forcefully delete existing sandbox cluster if it exists."` } //go:generate pflags Config --default-var DefaultConfig --bind-default-var diff --git a/flytectl/pkg/docker/docker_config.go b/flytectl/pkg/docker/docker_config.go new file mode 100644 index 0000000000..a3453d8012 --- /dev/null +++ b/flytectl/pkg/docker/docker_config.go @@ -0,0 +1,12 @@ +package docker + +// Config holds configuration flags for docker command. +var ( + DefaultConfig = &Config{ + Force: false, + } +) + +type Config struct { + Force bool `json:"force" pflag:",Optional. Forcefully delete existing sandbox cluster if it exists."` +} diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index a4e768bb9b..77475f8667 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -12,8 +12,6 @@ import ( "github.com/docker/docker/client" "github.com/enescakir/emoji" - "github.com/flyteorg/flytectl/clierrors" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" @@ -21,6 +19,8 @@ import ( "github.com/docker/docker/api/types/volume" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" + "github.com/flyteorg/flytectl/clierrors" + "github.com/flyteorg/flytectl/cmd/config/subcommand/docker" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" f "github.com/flyteorg/flytectl/pkg/filesystemutils" ) @@ -93,8 +93,9 @@ func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error { if err != nil { return err } + if c != nil { - if cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { + if docker.DefaultConfig.Force || cmdUtil.AskForConfirmation("delete existing sandbox cluster", reader) { err := cli.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{ Force: true, }) diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 83e5bc9703..32ad1cda12 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/docker/docker/api/types" + "github.com/flyteorg/flytectl/cmd/config/subcommand/docker" "github.com/stretchr/testify/assert" ) @@ -88,6 +89,10 @@ func TestRemoveSandboxWithNoReply(t *testing.T) { mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(nil) err := RemoveSandbox(ctx, mockDocker, strings.NewReader("n")) assert.NotNil(t, err) + + docker.DefaultConfig.Force = true + err = RemoveSandbox(ctx, mockDocker, strings.NewReader("")) + assert.Nil(t, err) }) t.Run("Successfully remove sandbox container with zero sandbox containers are running", func(t *testing.T) { diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 7a9551804b..6fb649ab7b 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -14,6 +14,7 @@ import ( "github.com/docker/go-connections/nat" "github.com/enescakir/emoji" "github.com/flyteorg/flytectl/clierrors" + dockerCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/docker" sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" "github.com/flyteorg/flytectl/pkg/configutil" "github.com/flyteorg/flytectl/pkg/docker" @@ -157,6 +158,7 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService if sandboxConfig.DryRun { docker.PrintRemoveContainer(docker.FlyteSandboxClusterName) } else { + dockerCmdConfig.DefaultConfig.Force = sandboxConfig.Force if err := docker.RemoveSandbox(ctx, cli, reader); err != nil { if err.Error() != clierrors.ErrSandboxExists { return nil, err From 2657b262aaf26b7121be21e2b7b277dafdf26969 Mon Sep 17 00:00:00 2001 From: Honnix Date: Thu, 19 Oct 2023 08:03:25 +0200 Subject: [PATCH 325/356] Fix struct generation in execution file (#434) --- flytectl/cmd/get/execution_util.go | 11 ++++- flytectl/cmd/get/launch_plan_test.go | 66 ++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index 2397ee2ff8..bb460180af 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -6,6 +6,8 @@ import ( "io/ioutil" "os" + structpb "github.com/golang/protobuf/ptypes/struct" + "gopkg.in/yaml.v3" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" @@ -152,7 +154,14 @@ func ParamMapForWorkflow(lp *admin.LaunchPlan) (map[string]yaml.Node, error) { func getCommentedYamlNode(input interface{}, comment string) (yaml.Node, error) { var node yaml.Node - err := node.Encode(input) + var err error + + if s, ok := input.(*structpb.Struct); ok { + err = node.Encode(s.AsMap()) + } else { + err = node.Encode(input) + } + node.LineComment = comment return node, err } diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 4055b72376..6e8618987e 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -5,6 +5,8 @@ import ( "os" "testing" + structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/printer" @@ -88,6 +90,31 @@ func getLaunchPlanSetup() { }, }, }, + "generic": { + Var: &core.Variable{ + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_STRUCT, + }, + }, + Description: "generic", + }, + Behavior: &core.Parameter_Default{ + Default: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Generic{ + Generic: &structpb.Struct{ + Fields: map[string]*structpb.Value{ + "foo": {Kind: &structpb.Value_StringValue{StringValue: "foo"}}, + }, + }, + }, + }, + }, + }, + }, + }, } launchPlan1 := &admin.LaunchPlan{ Id: &core.Identifier{ @@ -258,7 +285,7 @@ func TestGetLaunchPlanFunc(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchAllVerOfLP", s.Ctx, "launchplan1", "dummyProject", "dummyDomain", launchplan.DefaultConfig.Filter) - s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) } func TestGetLaunchPlanFuncLatest(t *testing.T) { @@ -270,7 +297,7 @@ func TestGetLaunchPlanFuncLatest(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchLPLatestVersion", s.Ctx, "launchplan1", projectValue, domainValue, launchplan.DefaultConfig.Filter) - s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanWithVersion(t *testing.T) { @@ -281,7 +308,7 @@ func TestGetLaunchPlanWithVersion(t *testing.T) { err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") - s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlans(t *testing.T) { @@ -292,7 +319,7 @@ func TestGetLaunchPlans(t *testing.T) { argsLp = []string{} err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) }) t.Run("workflow filter", func(t *testing.T) { s := setup() @@ -304,7 +331,7 @@ func TestGetLaunchPlans(t *testing.T) { launchplan.DefaultConfig.Workflow = "workflow2" err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) assert.Nil(t, err) - s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) + s.TearDownAndVerify(t, `[{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}},{"id": {"name": "launchplan1","version": "v1"},"spec": {"workflowId": {"name": "workflow1"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:00Z"}}]`) }) t.Run("workflow filter error", func(t *testing.T) { s := setup() @@ -328,10 +355,29 @@ func TestGetLaunchPlansWithExecFile(t *testing.T) { launchplan.DefaultConfig.Version = "v2" launchplan.DefaultConfig.ExecFile = testDataFolder + "exec_file" err := getLaunchPlanFunc(s.Ctx, argsLp, s.CmdCtx) - os.Remove(launchplan.DefaultConfig.ExecFile) assert.Nil(t, err) + + data, err := os.ReadFile(launchplan.DefaultConfig.ExecFile) + assert.Nil(t, err) + assert.Equal(t, `iamRoleARN: "" +inputs: + generic: + foo: foo + numbers: + - 0 + numbers_count: 0 # long description will be truncated in table + run_local_at_count: 10 # short desc +envs: {} +kubeServiceAcct: "" +targetDomain: "" +targetProject: "" +version: v2 +workflow: launchplan1 +`, string(data)) + os.Remove(launchplan.DefaultConfig.ExecFile) + s.FetcherExt.AssertCalled(t, "FetchLPVersion", s.Ctx, "launchplan1", "v2", "dummyProject", "dummyDomain") - s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) + s.TearDownAndVerify(t, `{"id": {"name": "launchplan1","version": "v2"},"spec": {"workflowId": {"name": "workflow2"},"defaultInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}}},"closure": {"expectedInputs": {"parameters": {"generic": {"var": {"type": {"simple": "STRUCT"},"description": "generic"},"default": {"scalar": {"generic": {"foo": "foo"}}}},"numbers": {"var": {"type": {"collectionType": {"simple": "INTEGER"}},"description": "short desc"}},"numbers_count": {"var": {"type": {"simple": "INTEGER"},"description": "long description will be truncated in table"}},"run_local_at_count": {"var": {"type": {"simple": "INTEGER"},"description": "run_local_at_count"},"default": {"scalar": {"primitive": {"integer": "10"}}}}}},"createdAt": "1970-01-01T00:00:01Z"}}`) } func TestGetLaunchPlanTableFunc(t *testing.T) { @@ -349,11 +395,13 @@ func TestGetLaunchPlanTableFunc(t *testing.T) { --------- ------------- ------ ------- ---------- --------------------------- --------- | VERSION | NAME | TYPE | STATE | SCHEDULE | INPUTS | OUTPUTS | --------- ------------- ------ ------- ---------- --------------------------- --------- -| v2 | launchplan1 | | | | numbers: short desc | | +| v2 | launchplan1 | | | | generic | | +| | | | | | numbers: short desc | | | | | | | | numbers_count: long de... | | | | | | | | run_local_at_count | | --------- ------------- ------ ------- ---------- --------------------------- --------- -| v1 | launchplan1 | | | | numbers: short desc | | +| v1 | launchplan1 | | | | generic | | +| | | | | | numbers: short desc | | | | | | | | numbers_count: long de... | | | | | | | | run_local_at_count | | --------- ------------- ------ ------- ---------- --------------------------- --------- From 7c9cf48f9238a1874aac640efe6615e13ea5da49 Mon Sep 17 00:00:00 2001 From: Honnix Date: Mon, 23 Oct 2023 22:25:58 +0200 Subject: [PATCH 326/356] Use proto file name to infer message type (#436) Signed-off-by: Hongxin Liang --- flytectl/cmd/register/register_util.go | 75 +++++++++++++++++++------- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 87d8be43db..18ecede8ba 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -92,37 +92,74 @@ var projectColumns = []printer.Column{ {Header: "Additional Info", JSONPath: "$.Info"}, } +// Regex to match file name like xxx_1.pb, xxx_2.pb, or xxx_3.pb, and the subgroup catches the number 1, 2 or 3 +// This is used to match proto files created by pyflyte, where xxx_1.pb is a task spec, xxx_2.pb is a workflow spec, and xxx_3.pb is launch plan +var fnameRegex = regexp.MustCompile(`^.*_(?P[1-3])\.pb$`) + +type unMarshalFunc = func(ctx context.Context, fileContents []byte, fname string, errCollection errors2.ErrorCollection) (proto.Message, error) + +// Order matters here +var unMarshalFuncs = []unMarshalFunc{ + unMarshalTask, + unMarshalWorkflow, + unMarshalLaunchPlan, +} + func UnMarshalContents(ctx context.Context, fileContents []byte, fname string) (proto.Message, error) { - workflowSpec := &admin.WorkflowSpec{} errCollection := errors2.ErrorCollection{} - err := proto.Unmarshal(fileContents, workflowSpec) - if err == nil { - return workflowSpec, nil + + for _, f := range reorderUnMarshalFuncs(fname) { + if m, err := f(ctx, fileContents, fname, errCollection); err == nil { + return m, nil + } } - errCollection.Append(fmt.Errorf("as a Workflow: %w", err)) + return nil, fmt.Errorf("failed unmarshalling file %v. Errors: %w", fname, errCollection.ErrorOrDefault()) +} - logger.Debugf(ctx, "Failed to unmarshal file %v for workflow type", fname) - taskSpec := &admin.TaskSpec{} - err = proto.Unmarshal(fileContents, taskSpec) - if err == nil { - return taskSpec, nil - } +func unMarshalTask(ctx context.Context, fileContents []byte, fname string, errCollection errors2.ErrorCollection) (proto.Message, error) { + return unMarshal(ctx, fileContents, fname, errCollection, "Task", "task", &admin.TaskSpec{}) +} - errCollection.Append(fmt.Errorf("as a Task: %w", err)) +func unMarshalWorkflow(ctx context.Context, fileContents []byte, fname string, errCollection errors2.ErrorCollection) (proto.Message, error) { + return unMarshal(ctx, fileContents, fname, errCollection, "Workflow", "workflow", &admin.WorkflowSpec{}) +} + +func unMarshalLaunchPlan(ctx context.Context, fileContents []byte, fname string, errCollection errors2.ErrorCollection) (proto.Message, error) { + return unMarshal(ctx, fileContents, fname, errCollection, "Launchplan", "launch plan", &admin.LaunchPlan{}) +} - logger.Debugf(ctx, "Failed to unmarshal file %v for task type", fname) - launchPlan := &admin.LaunchPlan{} - err = proto.Unmarshal(fileContents, launchPlan) +func unMarshal(ctx context.Context, fileContents []byte, fname string, errCollection errors2.ErrorCollection, tpe string, typeAlt string, m proto.Message) (proto.Message, error) { + err := proto.Unmarshal(fileContents, m) if err == nil { - return launchPlan, nil + return m, nil } - errCollection.Append(fmt.Errorf("as a Launchplan: %w", err)) + errCollection.Append(fmt.Errorf("as a %s type: %w", tpe, err)) + logger.Debugf(ctx, "Failed to unmarshal file %s for %v type", fname, typeAlt) + return nil, err +} - logger.Debugf(ctx, "Failed to unmarshal file %v for launch plan type", fname) - return nil, fmt.Errorf("failed unmarshalling file %v. Errors: %w", fname, errCollection.ErrorOrDefault()) +func reorderUnMarshalFuncs(fname string) []unMarshalFunc { + if match := fnameRegex.FindStringSubmatch(fname); match != nil { + indexStr := match[fnameRegex.SubexpIndex("index")] + index, err := strconv.Atoi(indexStr) + if err != nil { + panic(fmt.Sprintf("unexpected error when coverting [%s] to int, file name [%s]", indexStr, fname)) + } + + var reordered []unMarshalFunc + for i, f := range unMarshalFuncs { + if i == index-1 { + reordered = append([]unMarshalFunc{f}, reordered...) + } else { + reordered = append(reordered, f) + } + } + return reordered + } + return unMarshalFuncs } func register(ctx context.Context, message proto.Message, cmdCtx cmdCore.CommandContext, dryRun, enableSchedule bool) error { From 65dd7f1af7945c298220bc5d9d02192444137d81 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 23 Oct 2023 13:36:22 -0700 Subject: [PATCH 327/356] Update dependencies for Flyte monorepo migration (#429) * wowzas Signed-off-by: Katrina Rogan * group Signed-off-by: Katrina Rogan * Merge with master. Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> * merge conflicts Signed-off-by: Katrina Rogan --------- Signed-off-by: Katrina Rogan Signed-off-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> Co-authored-by: Kamal Eybov <54046807+kamaleybov@users.noreply.github.com> --- flytectl/.github/workflows/checks.yml | 3 - .../flyte/golang_support_tools/tools.go | 2 +- flytectl/cmd/compile/compile.go | 8 +- flytectl/cmd/config/config.go | 2 +- .../clusterresourceattribute/file_config.go | 2 +- .../file_config_test.go | 2 +- .../config/subcommand/config/console_flags.go | 2 +- .../executionclusterlabel/file_config.go | 2 +- .../executionclusterlabel/file_config_test.go | 2 +- .../executionqueueattribute/file_config.go | 2 +- .../file_config_test.go | 2 +- .../matchable_attribute_decorator.go | 2 +- .../subcommand/plugin_override/file_config.go | 2 +- .../plugin_override/file_config_test.go | 2 +- .../subcommand/project/project_config.go | 2 +- .../subcommand/project/project_config_test.go | 2 +- .../subcommand/register/files_config.go | 2 +- .../taskresourceattribute/file_config.go | 2 +- .../taskresourceattribute/file_config_test.go | 2 +- .../workflowexecutionconfig/file_config.go | 2 +- .../file_config_test.go | 2 +- flytectl/cmd/configuration/configuration.go | 2 +- .../cmd/configuration/configuration_test.go | 4 +- flytectl/cmd/core/cmd.go | 2 +- flytectl/cmd/core/cmd_ctx.go | 4 +- flytectl/cmd/core/cmd_test.go | 4 +- flytectl/cmd/create/execution.go | 4 +- flytectl/cmd/create/execution_test.go | 4 +- flytectl/cmd/create/execution_util.go | 6 +- flytectl/cmd/create/execution_util_test.go | 4 +- flytectl/cmd/create/project.go | 4 +- flytectl/cmd/create/project_test.go | 2 +- flytectl/cmd/create/serialization_utils.go | 4 +- .../cmd/create/serialization_utils_test.go | 2 +- flytectl/cmd/delete/execution.go | 6 +- flytectl/cmd/delete/execution_test.go | 4 +- .../cmd/delete/matchable_attribute_util.go | 2 +- .../matchable_cluster_resource_attribute.go | 2 +- ...tchable_cluster_resource_attribute_test.go | 2 +- .../matchable_execution_cluster_label.go | 2 +- .../matchable_execution_cluster_label_test.go | 2 +- .../matchable_execution_queue_attribute.go | 2 +- ...atchable_execution_queue_attribute_test.go | 2 +- .../cmd/delete/matchable_plugin_override.go | 2 +- .../delete/matchable_plugin_override_test.go | 2 +- .../matchable_task_resource_attribute.go | 2 +- .../matchable_task_resource_attribute_test.go | 2 +- .../matchable_workflow_execution_config.go | 2 +- ...atchable_workflow_execution_config_test.go | 2 +- flytectl/cmd/demo/exec_test.go | 2 +- flytectl/cmd/demo/reload.go | 2 +- flytectl/cmd/get/execution.go | 4 +- flytectl/cmd/get/execution_test.go | 4 +- flytectl/cmd/get/execution_util.go | 6 +- flytectl/cmd/get/execution_util_test.go | 4 +- flytectl/cmd/get/launch_plan.go | 4 +- flytectl/cmd/get/launch_plan_test.go | 4 +- flytectl/cmd/get/matchable_attribute_util.go | 2 +- .../matchable_cluster_resource_attribute.go | 2 +- ...tchable_cluster_resource_attribute_test.go | 2 +- .../get/matchable_execution_cluster_label.go | 2 +- .../matchable_execution_cluster_label_test.go | 2 +- .../matchable_execution_queue_attribute.go | 2 +- ...atchable_execution_queue_attribute_test.go | 2 +- flytectl/cmd/get/matchable_plugin_override.go | 2 +- .../cmd/get/matchable_plugin_override_test.go | 2 +- .../get/matchable_task_resource_attribute.go | 2 +- .../matchable_task_resource_attribute_test.go | 2 +- .../matchable_workflow_execution_config.go | 4 +- ...atchable_workflow_execution_config_test.go | 2 +- flytectl/cmd/get/node_execution.go | 6 +- flytectl/cmd/get/node_execution_test.go | 6 +- flytectl/cmd/get/project.go | 4 +- flytectl/cmd/get/project_test.go | 2 +- flytectl/cmd/get/task.go | 4 +- flytectl/cmd/get/task_test.go | 4 +- flytectl/cmd/get/workflow.go | 4 +- flytectl/cmd/get/workflow_test.go | 4 +- flytectl/cmd/register/examples.go | 2 +- flytectl/cmd/register/files.go | 4 +- flytectl/cmd/register/files_test.go | 12 +- flytectl/cmd/register/register_util.go | 20 +- flytectl/cmd/register/register_util_test.go | 18 +- flytectl/cmd/root.go | 4 +- flytectl/cmd/sandbox/exec_test.go | 2 +- flytectl/cmd/testutils/test_utils.go | 4 +- flytectl/cmd/update/execution.go | 4 +- flytectl/cmd/update/execution_test.go | 4 +- .../cmd/update/interfaces/mocks/updater.go | 2 +- flytectl/cmd/update/interfaces/updater.go | 2 +- flytectl/cmd/update/launch_plan.go | 4 +- flytectl/cmd/update/launch_plan_meta.go | 2 +- flytectl/cmd/update/launch_plan_meta_test.go | 4 +- flytectl/cmd/update/launch_plan_test.go | 4 +- .../cmd/update/matchable_attribute_util.go | 2 +- .../matchable_cluster_resource_attribute.go | 2 +- ...tchable_cluster_resource_attribute_test.go | 2 +- .../matchable_execution_cluster_label.go | 2 +- .../matchable_execution_cluster_label_test.go | 2 +- .../matchable_execution_queue_attribute.go | 2 +- ...atchable_execution_queue_attribute_test.go | 2 +- .../cmd/update/matchable_plugin_override.go | 2 +- .../update/matchable_plugin_override_test.go | 2 +- .../matchable_task_resource_attribute.go | 2 +- .../matchable_task_resource_attribute_test.go | 2 +- .../matchable_workflow_execution_config.go | 2 +- ...atchable_workflow_execution_config_test.go | 2 +- flytectl/cmd/update/named_entity.go | 4 +- flytectl/cmd/update/named_entity_test.go | 4 +- flytectl/cmd/update/project.go | 2 +- flytectl/cmd/update/project_test.go | 2 +- flytectl/cmd/update/task_meta.go | 2 +- flytectl/cmd/update/task_meta_test.go | 4 +- flytectl/cmd/update/workflow_meta.go | 2 +- flytectl/cmd/update/workflow_meta_test.go | 4 +- flytectl/cmd/upgrade/upgrade.go | 4 +- flytectl/cmd/upgrade/upgrade_test.go | 2 +- flytectl/cmd/version/version.go | 6 +- flytectl/cmd/version/version_test.go | 8 +- flytectl/docs/source/gen/flytectl_config.rst | 2 +- flytectl/go.mod | 108 ++- flytectl/go.sum | 784 +++--------------- flytectl/main.go | 2 +- flytectl/pkg/adminutils/config.go | 2 +- .../pkg/ext/attribute_match_deleter_test.go | 4 +- flytectl/pkg/ext/attribute_match_fetcher.go | 2 +- .../pkg/ext/attribute_match_fetcher_test.go | 4 +- flytectl/pkg/ext/attribute_match_updater.go | 2 +- .../pkg/ext/attribute_match_updater_test.go | 4 +- flytectl/pkg/ext/attribute_matcher_deleter.go | 2 +- flytectl/pkg/ext/deleter.go | 4 +- flytectl/pkg/ext/deleter_test.go | 2 +- flytectl/pkg/ext/execution_fetcher.go | 4 +- flytectl/pkg/ext/execution_fetcher_test.go | 6 +- flytectl/pkg/ext/fetcher.go | 4 +- flytectl/pkg/ext/fetcher_test.go | 2 +- flytectl/pkg/ext/launch_plan_fetcher.go | 4 +- flytectl/pkg/ext/launch_plan_fetcher_test.go | 6 +- .../ext/mocks/admin_deleter_ext_interface.go | 4 +- .../ext/mocks/admin_fetcher_ext_interface.go | 4 +- .../admin_service_fetcher_ext_interface.go | 4 +- .../ext/mocks/admin_updater_ext_interface.go | 4 +- flytectl/pkg/ext/project_fetcher.go | 2 +- flytectl/pkg/ext/project_fetcher_test.go | 4 +- flytectl/pkg/ext/task_fetcher.go | 4 +- flytectl/pkg/ext/task_fetcher_test.go | 6 +- flytectl/pkg/ext/updater.go | 4 +- flytectl/pkg/ext/updater_test.go | 2 +- flytectl/pkg/ext/workflow_fetcher.go | 4 +- flytectl/pkg/ext/workflow_fetcher_test.go | 6 +- flytectl/pkg/filters/util.go | 4 +- flytectl/pkg/filters/util_test.go | 2 +- flytectl/pkg/github/githubutil.go | 4 +- flytectl/pkg/github/githubutil_test.go | 2 +- flytectl/pkg/k8s/k8s_test.go | 2 +- flytectl/pkg/printer/printer.go | 6 +- flytectl/pkg/printer/printer_test.go | 4 +- flytectl/pkg/sandbox/start.go | 2 +- flytectl/pkg/visualize/graphviz.go | 4 +- flytectl/pkg/visualize/graphviz_test.go | 2 +- 160 files changed, 455 insertions(+), 958 deletions(-) diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index 2a66200dac..d7d36c4b18 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -143,9 +143,6 @@ jobs: - Auto-generated by [flyte-bot] labels: | documentation - team-reviewers: | - owners - maintainers draft: false goreleaser: diff --git a/flytectl/boilerplate/flyte/golang_support_tools/tools.go b/flytectl/boilerplate/flyte/golang_support_tools/tools.go index 43de03450c..a78b61162a 100644 --- a/flytectl/boilerplate/flyte/golang_support_tools/tools.go +++ b/flytectl/boilerplate/flyte/golang_support_tools/tools.go @@ -6,7 +6,7 @@ package tools import ( _ "github.com/EngHabu/mockery/cmd/mockery" _ "github.com/alvaroloes/enumer" - _ "github.com/flyteorg/flytestdlib/cli/pflags" + _ "github.com/flyteorg/flyte/flytestdlib/cli/pflags" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" ) diff --git a/flytectl/cmd/compile/compile.go b/flytectl/cmd/compile/compile.go index f8f6957b10..035ea786e5 100644 --- a/flytectl/cmd/compile/compile.go +++ b/flytectl/cmd/compile/compile.go @@ -6,13 +6,13 @@ import ( "io/ioutil" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytepropeller/pkg/compiler" + "github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common" config "github.com/flyteorg/flytectl/cmd/config/subcommand/compile" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/register" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytepropeller/pkg/compiler" - "github.com/flyteorg/flytepropeller/pkg/compiler/common" ) // Utility function for compiling a list of Tasks diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 0283313f24..8bf5cc986b 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flytectl/pkg/printer" ) diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go index 5bfece378d..1e9543981d 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config.go @@ -1,7 +1,7 @@ package clusterresourceattribute import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // AttrFileConfig shadow Config for ClusterResourceAttributes. diff --git a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go index f9510c7d07..92b791cf0a 100644 --- a/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/clusterresourceattribute/file_config_test.go @@ -3,7 +3,7 @@ package clusterresourceattribute import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/config/console_flags.go b/flytectl/cmd/config/subcommand/config/console_flags.go index f980b3ce2f..168aca95c2 100644 --- a/flytectl/cmd/config/subcommand/config/console_flags.go +++ b/flytectl/cmd/config/subcommand/config/console_flags.go @@ -1,6 +1,6 @@ package config -import "github.com/flyteorg/flytestdlib/config" +import "github.com/flyteorg/flyte/flytestdlib/config" //go:generate pflags ConsoleConfig --default-var DefaultConsoleConfig --bind-default-var diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go index c05c6ca167..39dfc2b570 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config.go @@ -1,7 +1,7 @@ package executionclusterlabel import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // FileConfig shadow Config for ExecutionClusterLabel. diff --git a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go index 662f6658a4..79ea059930 100644 --- a/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionclusterlabel/file_config_test.go @@ -3,7 +3,7 @@ package executionclusterlabel import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go index 1726f0b693..cd538da67b 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config.go @@ -1,7 +1,7 @@ package executionqueueattribute import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // AttrFileConfig shadow Config for ExecutionQueueAttributes. diff --git a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go index 8148d8b7cd..191cabb023 100644 --- a/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/executionqueueattribute/file_config_test.go @@ -3,7 +3,7 @@ package executionqueueattribute import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go b/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go index 728be8582f..9e6aadfa67 100644 --- a/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go +++ b/flytectl/cmd/config/subcommand/matchable_attribute_decorator.go @@ -1,6 +1,6 @@ package subcommand -import "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" +import "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" // MatchableAttributeDecorator defines a decorator for any matchable attribute target. type MatchableAttributeDecorator interface { diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config.go b/flytectl/cmd/config/subcommand/plugin_override/file_config.go index af40066dd4..15349c83e7 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/file_config.go +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config.go @@ -1,7 +1,7 @@ package pluginoverride import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // FileConfig shadow Config for PluginOverrides. diff --git a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go index e2ecaa5d06..13037945af 100644 --- a/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go +++ b/flytectl/cmd/config/subcommand/plugin_override/file_config_test.go @@ -3,7 +3,7 @@ package pluginoverride import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config.go b/flytectl/cmd/config/subcommand/project/project_config.go index c278443f16..794f661df9 100644 --- a/flytectl/cmd/config/subcommand/project/project_config.go +++ b/flytectl/cmd/config/subcommand/project/project_config.go @@ -4,10 +4,10 @@ import ( "fmt" "io/ioutil" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "gopkg.in/yaml.v3" ) diff --git a/flytectl/cmd/config/subcommand/project/project_config_test.go b/flytectl/cmd/config/subcommand/project/project_config_test.go index b02daa4972..69a8bf4acb 100644 --- a/flytectl/cmd/config/subcommand/project/project_config_test.go +++ b/flytectl/cmd/config/subcommand/project/project_config_test.go @@ -4,9 +4,9 @@ import ( "errors" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/register/files_config.go b/flytectl/cmd/config/subcommand/register/files_config.go index 3a54203478..c1441d0567 100644 --- a/flytectl/cmd/config/subcommand/register/files_config.go +++ b/flytectl/cmd/config/subcommand/register/files_config.go @@ -1,6 +1,6 @@ package register -import "github.com/flyteorg/flytestdlib/config" +import "github.com/flyteorg/flyte/flytestdlib/config" //go:generate pflags FilesConfig --default-var DefaultFilesConfig --bind-default-var diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go index 6c31553f87..9629a71ee5 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config.go @@ -1,7 +1,7 @@ package taskresourceattribute import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // TaskResourceAttrFileConfig shadow Config for TaskResourceAttribute. diff --git a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go index 73b2248985..cba5ea672b 100644 --- a/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go +++ b/flytectl/cmd/config/subcommand/taskresourceattribute/file_config_test.go @@ -3,7 +3,7 @@ package taskresourceattribute import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go index 9dc6b01ed5..33ef8e1677 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config.go @@ -1,7 +1,7 @@ package workflowexecutionconfig import ( - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) // FileConfig shadow Config for WorkflowExecutionConfig. diff --git a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go index b6b8cfd840..45454f4536 100644 --- a/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go +++ b/flytectl/cmd/config/subcommand/workflowexecutionconfig/file_config_test.go @@ -3,7 +3,7 @@ package workflowexecutionconfig import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index e6d120b1bb..7f06f92094 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -12,10 +12,10 @@ import ( "github.com/flyteorg/flytectl/pkg/configutil" + "github.com/flyteorg/flyte/flytestdlib/config/viper" initConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/config" cmdcore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flytestdlib/config/viper" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/configuration/configuration_test.go b/flytectl/cmd/configuration/configuration_test.go index 2f48d28597..f48fe84e2f 100644 --- a/flytectl/cmd/configuration/configuration_test.go +++ b/flytectl/cmd/configuration/configuration_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flytectl/pkg/configutil" @@ -35,7 +35,7 @@ func TestCreateInitCommand(t *testing.T) { assert.Equal(t, "discover", cmdNouns[0].Use) assert.Equal(t, "Searches for a config in one of the default search paths.", cmdNouns[0].Short) assert.Equal(t, "docs", cmdNouns[1].Use) - assert.Equal(t, "Generate configuration documetation in rst format", cmdNouns[1].Short) + assert.Equal(t, "Generate configuration documentation in rst format", cmdNouns[1].Short) assert.Equal(t, "init", cmdNouns[2].Use) assert.Equal(t, initCmdShort, cmdNouns[2].Short) diff --git a/flytectl/cmd/core/cmd.go b/flytectl/cmd/core/cmd.go index a6f7c391df..2d00adc04e 100644 --- a/flytectl/cmd/core/cmd.go +++ b/flytectl/cmd/core/cmd.go @@ -8,9 +8,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/pkg/pkce" - "github.com/flyteorg/flyteidl/clients/go/admin" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/flytectl/cmd/core/cmd_ctx.go b/flytectl/cmd/core/cmd_ctx.go index f5cd095c4f..d492c53c4a 100644 --- a/flytectl/cmd/core/cmd_ctx.go +++ b/flytectl/cmd/core/cmd_ctx.go @@ -3,10 +3,10 @@ package cmdcore import ( "io" - "github.com/flyteorg/flyteidl/clients/go/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" ) type CommandContext struct { diff --git a/flytectl/cmd/core/cmd_test.go b/flytectl/cmd/core/cmd_test.go index 7ed13743a9..13737b4a61 100644 --- a/flytectl/cmd/core/cmd_test.go +++ b/flytectl/cmd/core/cmd_test.go @@ -5,8 +5,8 @@ import ( "net/url" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin" - "github.com/flyteorg/flytestdlib/config" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/flyteorg/flyte/flytestdlib/config" "github.com/spf13/cobra" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 839fa6e34e..7fc62f2045 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 6f25bab3cc..ee5dc268ef 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/suite" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index ea67980004..63b6fe0871 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -6,9 +6,9 @@ import ( "io/ioutil" "strings" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/google/uuid" "sigs.k8s.io/yaml" diff --git a/flytectl/cmd/create/execution_util_test.go b/flytectl/cmd/create/execution_util_test.go index bbfeccdc56..a865e77a64 100644 --- a/flytectl/cmd/create/execution_util_test.go +++ b/flytectl/cmd/create/execution_util_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index c6db389d05..bf4e70c09e 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -4,13 +4,13 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flytestdlib/logger" ) const ( diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index f0263bc461..a1f970e26b 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/create/serialization_utils.go b/flytectl/cmd/create/serialization_utils.go index 53045d2c9e..dfd772c604 100644 --- a/flytectl/cmd/create/serialization_utils.go +++ b/flytectl/cmd/create/serialization_utils.go @@ -3,8 +3,8 @@ package create import ( "fmt" - "github.com/flyteorg/flyteidl/clients/go/coreutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) // TODO: Move all functions to flyteidl diff --git a/flytectl/cmd/create/serialization_utils_test.go b/flytectl/cmd/create/serialization_utils_test.go index 5c7326493d..7b10cf1b7c 100644 --- a/flytectl/cmd/create/serialization_utils_test.go +++ b/flytectl/cmd/create/serialization_utils_test.go @@ -3,7 +3,7 @@ package create import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index fab4cbe5d0..5d2e0ff421 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -3,12 +3,12 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" ) // Long descriptions are whitespace sensitive when generating docs using Sphinx. diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go index 09d8a0e05d..63643a2c47 100644 --- a/flytectl/cmd/delete/execution_test.go +++ b/flytectl/cmd/delete/execution_test.go @@ -4,9 +4,9 @@ import ( "errors" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/delete/matchable_attribute_util.go b/flytectl/cmd/delete/matchable_attribute_util.go index 020a60968d..63c018cbd3 100644 --- a/flytectl/cmd/delete/matchable_attribute_util.go +++ b/flytectl/cmd/delete/matchable_attribute_util.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) func deleteMatchableAttr(ctx context.Context, project, domain, workflowName string, diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index 2f3eec61ed..5b7a04f8df 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -3,11 +3,11 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go index 17d8f02ae3..37dd139475 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index eea32e3256..544b8ae64f 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -3,11 +3,11 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go index 30d60f93e9..f7cc5e7f53 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index 63ae7ff561..082cfec4af 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -3,11 +3,11 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go index 834ae48e78..734323d9f1 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index a7705ed8d9..76b90b0235 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -3,11 +3,11 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_plugin_override_test.go b/flytectl/cmd/delete/matchable_plugin_override_test.go index 380412293c..1dcd10cadc 100644 --- a/flytectl/cmd/delete/matchable_plugin_override_test.go +++ b/flytectl/cmd/delete/matchable_plugin_override_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index f948ff8c5a..3bd3f4d366 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -3,11 +3,11 @@ package delete import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go index 71efaafac8..33744489b1 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index ad387d4ccd..a284ca6d0e 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -5,10 +5,10 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go index 800c7329d5..b3c41b09df 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config_test.go @@ -6,8 +6,8 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/demo/exec_test.go b/flytectl/cmd/demo/exec_test.go index 0375be916c..a842e39669 100644 --- a/flytectl/cmd/demo/exec_test.go +++ b/flytectl/cmd/demo/exec_test.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" - admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/demo/reload.go b/flytectl/cmd/demo/reload.go index e7100802de..05c1ccfd97 100644 --- a/flytectl/cmd/demo/reload.go +++ b/flytectl/cmd/demo/reload.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flytestdlib/logger" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/docker" "github.com/flyteorg/flytectl/pkg/k8s" - "github.com/flyteorg/flytestdlib/logger" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 26ec0b792a..55f9d26b77 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -4,12 +4,12 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/cmd/get/execution_test.go b/flytectl/cmd/get/execution_test.go index 64476ad82f..635ccce875 100644 --- a/flytectl/cmd/get/execution_test.go +++ b/flytectl/cmd/get/execution_test.go @@ -8,10 +8,10 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/execution_util.go b/flytectl/cmd/get/execution_util.go index bb460180af..f9ad49a2e5 100644 --- a/flytectl/cmd/get/execution_util.go +++ b/flytectl/cmd/get/execution_util.go @@ -10,10 +10,10 @@ import ( "gopkg.in/yaml.v3" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/clients/go/coreutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) // ExecutionConfig is duplicated struct from create with the same structure. This is to avoid the circular dependency. Only works with go-yaml. diff --git a/flytectl/cmd/get/execution_util_test.go b/flytectl/cmd/get/execution_util_test.go index 2d98c8b834..ff316ca4e0 100644 --- a/flytectl/cmd/get/execution_util_test.go +++ b/flytectl/cmd/get/execution_util_test.go @@ -3,8 +3,8 @@ package get import ( "testing" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index f83a1d1d4b..1e23041679 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -4,13 +4,13 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/cmd/get/launch_plan_test.go b/flytectl/cmd/get/launch_plan_test.go index 6e8618987e..f7f8daf242 100644 --- a/flytectl/cmd/get/launch_plan_test.go +++ b/flytectl/cmd/get/launch_plan_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/cmd/get/matchable_attribute_util.go b/flytectl/cmd/get/matchable_attribute_util.go index 0a6358bf39..df4468c639 100644 --- a/flytectl/cmd/get/matchable_attribute_util.go +++ b/flytectl/cmd/get/matchable_attribute_util.go @@ -3,9 +3,9 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) func FetchAndUnDecorateMatchableAttr(ctx context.Context, project, domain, workflowName string, diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 6fcf66213e..a9fd0b4082 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -3,11 +3,11 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go index 5bf48ad809..6e601f3c1c 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index 89cf5cf48d..e47e17ff5f 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -3,11 +3,11 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/matchable_execution_cluster_label_test.go b/flytectl/cmd/get/matchable_execution_cluster_label_test.go index 590fa1b53c..e418a5fc27 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 533b53a6d6..f5ac300a8a 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -3,11 +3,11 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go index e4e33e7ec8..a47b9c78ae 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index 8ff08ee615..be6a1004fe 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -3,11 +3,11 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/matchable_plugin_override_test.go b/flytectl/cmd/get/matchable_plugin_override_test.go index 24363966d3..a4f6c1256f 100644 --- a/flytectl/cmd/get/matchable_plugin_override_test.go +++ b/flytectl/cmd/get/matchable_plugin_override_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 40183615c1..63ec690666 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -3,11 +3,11 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/matchable_task_resource_attribute_test.go b/flytectl/cmd/get/matchable_task_resource_attribute_test.go index f9faba6eb9..c21ddcd9df 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index 59098e4a1d..ba414f7833 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -4,12 +4,12 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/flytectl/cmd/get/matchable_workflow_execution_config_test.go b/flytectl/cmd/get/matchable_workflow_execution_config_test.go index 1206e5b7f4..0f9658c7f4 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/get/node_execution.go b/flytectl/cmd/get/node_execution.go index 61695ece53..bec0a5a9a0 100644 --- a/flytectl/cmd/get/node_execution.go +++ b/flytectl/cmd/get/node_execution.go @@ -7,11 +7,11 @@ import ( "sort" "strconv" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/clients/go/coreutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/disiqueira/gotree" "github.com/golang/protobuf/jsonpb" diff --git a/flytectl/cmd/get/node_execution_test.go b/flytectl/cmd/get/node_execution_test.go index 1958f6a5c6..ca12baa41f 100644 --- a/flytectl/cmd/get/node_execution_test.go +++ b/flytectl/cmd/get/node_execution_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/event" + "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/event" "github.com/disiqueira/gotree" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 092935c59c..bf4b1473b9 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -5,8 +5,8 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/project" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/golang/protobuf/proto" "github.com/flyteorg/flytectl/cmd/config" diff --git a/flytectl/cmd/get/project_test.go b/flytectl/cmd/get/project_test.go index d2a3a1abe7..7efed267e2 100644 --- a/flytectl/cmd/get/project_test.go +++ b/flytectl/cmd/get/project_test.go @@ -8,8 +8,8 @@ import ( "github.com/flyteorg/flytectl/cmd/config/subcommand/project" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index 7a5e9dc70d..b5e1b13d8b 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -3,13 +3,13 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" taskConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/task" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" ) diff --git a/flytectl/cmd/get/task_test.go b/flytectl/cmd/get/task_test.go index aea8e41cc1..2429f38171 100644 --- a/flytectl/cmd/get/task_test.go +++ b/flytectl/cmd/get/task_test.go @@ -15,9 +15,9 @@ import ( "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index c428c2d6a7..d59437a3be 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -3,16 +3,16 @@ package get import ( "context" + "github.com/flyteorg/flyte/flytestdlib/logger" workflowconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flytestdlib/logger" "github.com/golang/protobuf/proto" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/get/workflow_test.go b/flytectl/cmd/get/workflow_test.go index ec8da17653..e534e373e0 100644 --- a/flytectl/cmd/get/workflow_test.go +++ b/flytectl/cmd/get/workflow_test.go @@ -15,9 +15,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflow" ) diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 04d34be9e1..fdccad08d5 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -4,11 +4,11 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd/config" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" g "github.com/flyteorg/flytectl/pkg/github" - "github.com/flyteorg/flytestdlib/logger" "github.com/google/go-github/v42/github" ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index e866743183..f9b70696ab 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -8,12 +8,12 @@ import ( "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytestdlib/storage" + "github.com/flyteorg/flyte/flytestdlib/storage" + "github.com/flyteorg/flyte/flytestdlib/logger" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flytestdlib/logger" ) const ( diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index 0a9eb330e3..0eec77014b 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -4,16 +4,16 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/contextutils" + "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" + "github.com/flyteorg/flyte/flytestdlib/storage" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flytestdlib/contextutils" - "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/flyteorg/flytestdlib/storage" + "github.com/flyteorg/flyte/flytestdlib/promutils" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flytestdlib/promutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 18ecede8ba..e4dd4355ad 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -18,25 +18,25 @@ import ( "strconv" "strings" - errors2 "github.com/flyteorg/flytestdlib/errors" + errors2 "github.com/flyteorg/flyte/flytestdlib/errors" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" g "github.com/flyteorg/flytectl/pkg/github" - "github.com/flyteorg/flytestdlib/contextutils" - "github.com/flyteorg/flytestdlib/promutils" - "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/flyteorg/flytestdlib/utils" + "github.com/flyteorg/flyte/flytestdlib/contextutils" + "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" + "github.com/flyteorg/flyte/flytestdlib/utils" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/storage" "github.com/flyteorg/flytectl/cmd/config" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/pkg/printer" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/logger" - "github.com/flyteorg/flytestdlib/storage" "github.com/google/go-github/v42/github" "github.com/golang/protobuf/jsonpb" diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index 9c9877ab6e..94dc1912cb 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -12,23 +12,23 @@ import ( "strings" "testing" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ghMocks "github.com/flyteorg/flytectl/pkg/github/mocks" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" - "github.com/flyteorg/flytestdlib/utils" + "github.com/flyteorg/flyte/flytestdlib/utils" v1 "k8s.io/api/core/v1" - "github.com/flyteorg/flytestdlib/contextutils" - "github.com/flyteorg/flytestdlib/promutils" - "github.com/flyteorg/flytestdlib/promutils/labeled" - "github.com/flyteorg/flytestdlib/storage" + "github.com/flyteorg/flyte/flytestdlib/contextutils" + "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" + "github.com/flyteorg/flyte/flytestdlib/storage" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" rconfig "github.com/flyteorg/flytectl/cmd/config/subcommand/register" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index e682eb63d7..418406c034 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -5,6 +5,8 @@ import ( "fmt" "os" + stdConfig "github.com/flyteorg/flyte/flytestdlib/config" + "github.com/flyteorg/flyte/flytestdlib/config/viper" "github.com/flyteorg/flytectl/cmd/compile" "github.com/flyteorg/flytectl/cmd/config" configuration "github.com/flyteorg/flytectl/cmd/configuration" @@ -20,8 +22,6 @@ import ( "github.com/flyteorg/flytectl/cmd/version" f "github.com/flyteorg/flytectl/pkg/filesystemutils" "github.com/flyteorg/flytectl/pkg/printer" - stdConfig "github.com/flyteorg/flytestdlib/config" - "github.com/flyteorg/flytestdlib/config/viper" "github.com/sirupsen/logrus" "github.com/spf13/cobra" diff --git a/flytectl/cmd/sandbox/exec_test.go b/flytectl/cmd/sandbox/exec_test.go index 8cd7059c19..b86a9a781a 100644 --- a/flytectl/cmd/sandbox/exec_test.go +++ b/flytectl/cmd/sandbox/exec_test.go @@ -10,7 +10,7 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" - admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/stretchr/testify/assert" diff --git a/flytectl/cmd/testutils/test_utils.go b/flytectl/cmd/testutils/test_utils.go index 37f71af493..28b7856666 100644 --- a/flytectl/cmd/testutils/test_utils.go +++ b/flytectl/cmd/testutils/test_utils.go @@ -14,11 +14,11 @@ import ( "github.com/stretchr/testify/assert" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" extMocks "github.com/flyteorg/flytectl/pkg/ext/mocks" - "github.com/flyteorg/flyteidl/clients/go/admin" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" ) const projectValue = "dummyProject" diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index d3f1fccdd5..d70b36eddd 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -5,13 +5,13 @@ import ( "fmt" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/cmd/update/execution_test.go b/flytectl/cmd/update/execution_test.go index 44a790e415..e1695319b5 100644 --- a/flytectl/cmd/update/execution_test.go +++ b/flytectl/cmd/update/execution_test.go @@ -4,12 +4,12 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/update/interfaces/mocks/updater.go b/flytectl/cmd/update/interfaces/mocks/updater.go index 3b56f35add..c702327116 100644 --- a/flytectl/cmd/update/interfaces/mocks/updater.go +++ b/flytectl/cmd/update/interfaces/mocks/updater.go @@ -7,7 +7,7 @@ import ( cmdcore "github.com/flyteorg/flytectl/cmd/core" - core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" mock "github.com/stretchr/testify/mock" ) diff --git a/flytectl/cmd/update/interfaces/updater.go b/flytectl/cmd/update/interfaces/updater.go index 3ea18f678a..3aea6aec25 100644 --- a/flytectl/cmd/update/interfaces/updater.go +++ b/flytectl/cmd/update/interfaces/updater.go @@ -3,8 +3,8 @@ package interfaces import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) //go:generate mockery -name=Updater -case=underscore diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index f1a9474e7c..28b7c6270b 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -5,13 +5,13 @@ import ( "fmt" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index 123413d6bf..2170ba22f1 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/cmd/update/launch_plan_meta_test.go b/flytectl/cmd/update/launch_plan_meta_test.go index 84187be99d..c2a8d637df 100644 --- a/flytectl/cmd/update/launch_plan_meta_test.go +++ b/flytectl/cmd/update/launch_plan_meta_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index 11eb15f8f0..f9c3d7dc8a 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -6,12 +6,12 @@ import ( "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/update/matchable_attribute_util.go b/flytectl/cmd/update/matchable_attribute_util.go index c978d9dd97..ddb2c11091 100644 --- a/flytectl/cmd/update/matchable_attribute_util.go +++ b/flytectl/cmd/update/matchable_attribute_util.go @@ -5,11 +5,11 @@ import ( "fmt" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) func DecorateAndUpdateMatchableAttr( diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index d18896cac5..51f5b64922 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index f355a53656..f5d1c6c4e0 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/clusterresourceattribute" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index dee80cb459..08b0d7424e 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_cluster_label_test.go b/flytectl/cmd/update/matchable_execution_cluster_label_test.go index 3b234c4a22..9aed3ebc96 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label_test.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionclusterlabel" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index 966972e771..8af5bd7762 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go index 8a14997660..61638b7d51 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute_test.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/executionqueueattribute" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 4b6d1358f1..c9f6ebe9aa 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_plugin_override_test.go b/flytectl/cmd/update/matchable_plugin_override_test.go index 7089df984f..2b6e2e7f6b 100644 --- a/flytectl/cmd/update/matchable_plugin_override_test.go +++ b/flytectl/cmd/update/matchable_plugin_override_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" pluginoverride "github.com/flyteorg/flytectl/cmd/config/subcommand/plugin_override" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index a296a4bd51..3e4282defc 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_task_resource_attribute_test.go b/flytectl/cmd/update/matchable_task_resource_attribute_test.go index fd485f910c..cad06fa7e7 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/taskresourceattribute" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 100ee7e77a..2921dbcf17 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" cmdCore "github.com/flyteorg/flytectl/cmd/core" diff --git a/flytectl/cmd/update/matchable_workflow_execution_config_test.go b/flytectl/cmd/update/matchable_workflow_execution_config_test.go index f81f92a883..3fd198e56a 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config_test.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/workflowexecutionconfig" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/named_entity.go b/flytectl/cmd/update/named_entity.go index 3101e29ba2..449639d751 100644 --- a/flytectl/cmd/update/named_entity.go +++ b/flytectl/cmd/update/named_entity.go @@ -5,11 +5,11 @@ import ( "fmt" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) //go:generate pflags NamedEntityConfig --default-var namedEntityConfig --bind-default-var diff --git a/flytectl/cmd/update/named_entity_test.go b/flytectl/cmd/update/named_entity_test.go index 732bc9d249..b02d6a5086 100644 --- a/flytectl/cmd/update/named_entity_test.go +++ b/flytectl/cmd/update/named_entity_test.go @@ -7,11 +7,11 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/mock" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/flyteorg/flytectl/cmd/testutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) func testNamedEntityUpdate( diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 881f61fec8..b9c2f17e90 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -5,12 +5,12 @@ import ( "fmt" "os" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" cmdCore "github.com/flyteorg/flytectl/cmd/core" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" ) const ( diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index a3152127d4..2f3fd11aed 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -4,12 +4,12 @@ import ( "fmt" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index 82f6d7a238..cb9e3e927a 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/cmd/update/task_meta_test.go b/flytectl/cmd/update/task_meta_test.go index e1ffc9a13a..01d9f3c742 100644 --- a/flytectl/cmd/update/task_meta_test.go +++ b/flytectl/cmd/update/task_meta_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index b30743b67f..d2c94d7e3e 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/cmd/update/workflow_meta_test.go b/flytectl/cmd/update/workflow_meta_test.go index 2d49de2b25..cfdc628751 100644 --- a/flytectl/cmd/update/workflow_meta_test.go +++ b/flytectl/cmd/update/workflow_meta_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index b760975a5a..b01a795a3a 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -10,11 +10,11 @@ import ( "github.com/flyteorg/flytectl/pkg/util" - stdlibversion "github.com/flyteorg/flytestdlib/version" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/flyteorg/flytectl/pkg/github" - "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/mouuff/go-rocket-update/pkg/updater" cmdCore "github.com/flyteorg/flytectl/cmd/core" diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index 44095a5c13..852d93dd1d 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -11,7 +11,7 @@ import ( "github.com/flyteorg/flytectl/pkg/platformutil" - stdlibversion "github.com/flyteorg/flytestdlib/version" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" cmdCore "github.com/flyteorg/flytectl/cmd/core" "github.com/spf13/cobra" diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index b5ff9cfe6f..dadbde6407 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -10,10 +10,10 @@ import ( "github.com/flyteorg/flytectl/pkg/platformutil" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flytestdlib/logger" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flytestdlib/logger" - stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/spf13/cobra" ) diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 9f67577aa9..f694089b9a 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -10,14 +10,14 @@ import ( "github.com/flyteorg/flytectl/cmd/testutils" - admin2 "github.com/flyteorg/flyteidl/clients/go/admin" + admin2 "github.com/flyteorg/flyte/flyteidl/clients/go/admin" "github.com/spf13/cobra" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" cmdCore "github.com/flyteorg/flytectl/cmd/core" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 98b30282d7..60e755e686 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -93,7 +93,7 @@ SEE ALSO * :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. -* :doc:`flytectl_config_docs` - Generate configuration documetation in rst format +* :doc:`flytectl_config_docs` - Generate configuration documentation in rst format * :doc:`flytectl_config_init` - Generates a Flytectl config file in the user's home directory. * :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/go.mod b/flytectl/go.mod index 534c99baaa..0344faeca5 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -9,19 +9,19 @@ require ( github.com/docker/docker v20.10.7+incompatible github.com/docker/go-connections v0.4.0 github.com/enescakir/emoji v1.0.0 - github.com/flyteorg/flyteidl v1.5.12 - github.com/flyteorg/flytepropeller v1.1.1 - github.com/flyteorg/flytestdlib v1.0.13 + github.com/flyteorg/flyte/flyteidl v1.9.12 + github.com/flyteorg/flyte/flytepropeller v1.9.12 + github.com/flyteorg/flyte/flytestdlib v1.9.12 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 - github.com/golang/protobuf v1.5.2 - github.com/google/go-cmp v0.5.8 + github.com/golang/protobuf v1.5.3 + github.com/google/go-cmp v0.5.9 github.com/google/go-github/v42 v42.0.0 - github.com/google/uuid v1.2.0 + github.com/google/uuid v1.3.0 github.com/hashicorp/go-version v1.3.0 github.com/hexops/gotextdiff v1.0.3 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 - github.com/mitchellh/mapstructure v1.4.3 + github.com/mitchellh/mapstructure v1.5.0 github.com/mouuff/go-rocket-update v1.5.1 github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 @@ -29,26 +29,27 @@ require ( github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.4.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.4 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/zalando/go-keyring v0.1.1 - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 - golang.org/x/text v0.3.7 - google.golang.org/grpc v1.46.0 - google.golang.org/protobuf v1.28.0 + golang.org/x/oauth2 v0.7.0 + golang.org/x/text v0.9.0 + google.golang.org/grpc v1.56.1 + google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v3 v3.0.1 gotest.tools v2.2.0+incompatible - k8s.io/api v0.21.3 - k8s.io/apimachinery v0.21.3 - k8s.io/client-go v0.21.3 + k8s.io/api v0.24.1 + k8s.io/apimachinery v0.24.1 + k8s.io/client-go v0.24.1 sigs.k8s.io/yaml v1.3.0 ) require ( - cloud.google.com/go v0.101.0 // indirect - cloud.google.com/go/compute v1.6.1 // indirect - cloud.google.com/go/iam v0.3.0 // indirect - cloud.google.com/go/storage v1.22.0 // indirect + cloud.google.com/go v0.110.0 // indirect + 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 github.com/Azure/azure-sdk-for-go v63.4.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 // indirect @@ -64,44 +65,50 @@ require ( github.com/aws/aws-sdk-go v1.44.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/containerd/containerd v1.5.10 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect github.com/danieljoos/wincred v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dnaeon/go-vcr v1.2.0 // indirect github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/evanphx/json-patch v4.9.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect - github.com/flyteorg/flyteplugins v1.0.0 // indirect - github.com/flyteorg/stow v0.3.6 // indirect + github.com/flyteorg/flyte/flyteplugins v0.0.0-00010101000000-000000000000 // indirect + github.com/flyteorg/stow v0.3.7 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v0.4.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.3.0 // indirect - github.com/googleapis/gnostic v0.5.1 // indirect - github.com/googleapis/go-type-adapters v1.0.0 // indirect - github.com/gorilla/mux v1.8.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // 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/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect 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-runewidth v0.0.13 // indirect @@ -110,6 +117,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/ncw/swift v1.0.53 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml v1.9.4 // indirect @@ -121,28 +129,36 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/spf13/afero v1.8.2 // 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 github.com/spf13/viper v1.11.0 // indirect - github.com/stretchr/objx v0.3.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect - golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect - google.golang.org/api v0.76.0 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/time v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog/v2 v2.8.0 // indirect - k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect - k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect +) + +replace ( + github.com/flyteorg/flyte/flyteidl => github.com/flyteorg/flyte/flyteidl v1.9.12 + github.com/flyteorg/flyte/flyteplugins => github.com/flyteorg/flyte/flyteplugins v1.9.12 + github.com/flyteorg/flyte/flytepropeller => github.com/flyteorg/flyte/flytepropeller v1.9.12 + github.com/flyteorg/flyte/flytestdlib => github.com/flyteorg/flyte/flytestdlib v1.9.12 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 38be461844..41bdd143c0 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -8,7 +8,6 @@ cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -16,41 +15,29 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.101.0 h1:g+LL+JvpvdyGtcaD2xw2mSByE/6F9s471eJSoaysM84= -cloud.google.com/go v0.101.0/go.mod h1:hEiddgDb77jDQ+I80tURYNJEnuwPzFU8awCFFRLKjW0= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= +cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -60,23 +47,18 @@ 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.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.0 h1:NUV0NNp9nkBuW66BFRLuMgldN60C57ET3dhbwLIYio8= -cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q1DeGFKQgE= +cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v62.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v63.4.0+incompatible h1:fle3M5Q7vr8auaiPffKyUQmLbvYeqpw30bKU6PrWJFo= github.com/Azure/azure-sdk-for-go v63.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 h1:3CVsSo4mp8NDWO11tHzN/mdo2zP0CtaSK5IcwBjfqRA= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 h1:NVS/4LOQfkBpk+B1VopIzv1ptmYeEskA8w/3K/w7vjo= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 h1:Px2KVERcYEg2Lv25AqC2hVr0xUWaq94wuEObLIkYzmA= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2/go.mod h1:CdSJQNNzZhCkwDaV27XV1w48ZBPtxe7mlrZAsPNxD5g= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 h1:0nJeKDmB7a1a8RDMjTltahlPsaNlWjq/LpkZleSwINk= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0/go.mod h1:mbwxKc/fW+IkF0GG591MuXw0KuEQBDkeRoZ9vmVJPxg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= @@ -84,47 +66,30 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= -github.com/Jeffail/gabs/v2 v2.5.1/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -148,35 +113,18 @@ github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:m github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/adammck/venv v0.0.0-20160819025605-8a9c907a37d3/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= -github.com/adammck/venv v0.0.0-20200610172036-e77789703e7c/go.mod h1:3zXR2a/VSQndtpShh783rUTaEA2mpqN2VqZclBARBc0= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= @@ -184,27 +132,9 @@ github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHS github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d/go.mod h1:mZUP7GJmjiWtf8v3FD1X/QdK08BqyeH/1Ejt0qhNzCs= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.23.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.37.1/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.37.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.0.0/go.mod h1:WysE/OpUgE37tjtmtJd8GXgT8s1euilE5XtUkRNUQ1w= -github.com/aws/aws-sdk-go-v2/credentials v1.0.0/go.mod h1:/SvsiqBf509hG4Bddigr3NB12MIpfHhZapyBurJe8aY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.0/go.mod h1:wpMHDCXvOXZxGCRSidyepa8uJHY4vaBGfY2/+oKU/Bc= -github.com/aws/aws-sdk-go-v2/service/athena v1.0.0/go.mod h1:qY8QFbemf2ceqweXcS6hQqiiIe1z42WqTvHsK2Lb0rE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.0/go.mod h1:3jExOmpbjgPnz2FJaMOfbSk1heTkZ66aD3yNtVhnjvI= -github.com/aws/aws-sdk-go-v2/service/sts v1.0.0/go.mod h1:5f+cELGATgill5Pu3/vK3Ebuigstc+qYEHW5MvGWZO4= -github.com/aws/smithy-go v1.0.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1/go.mod h1:jvdWlw8vowVGnZqSDC7yhPd7AifQeQbRDkZcQXV2nRg= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -213,9 +143,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= @@ -223,19 +151,17 @@ github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7 github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -244,19 +170,11 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -345,8 +263,6 @@ github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEka github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -359,9 +275,7 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= @@ -394,7 +308,6 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -403,7 +316,6 @@ github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6Uezg github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= @@ -412,54 +324,37 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +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/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flyteorg/flyteidl v1.0.0/go.mod h1:JW0z1ZaHS9zWvDAwSMIyGhsf+V4zrzBBgh5IuqzMFCM= -github.com/flyteorg/flyteidl v1.5.12 h1:bCSSie8Yru1e9yLHWPO3ORksHHskK+bmkxln/jV3bXM= -github.com/flyteorg/flyteidl v1.5.12/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og= -github.com/flyteorg/flyteplugins v1.0.0 h1:77hUJjiIxBmQ9rd3+cXjSGnzOVAFrSzCd59aIaYFB/8= -github.com/flyteorg/flyteplugins v1.0.0/go.mod h1:4Cpn+9RfanIieTTh2XsuL6zPYXtsR5UDe8YaEmXONT4= -github.com/flyteorg/flytepropeller v1.1.1 h1:z9OFS7VAsoFOyIGSfIszaMrERG8MOvS17yzpuiusb64= -github.com/flyteorg/flytepropeller v1.1.1/go.mod h1:x7vIuy9vmOPw9JSd+xAijeiHShmuieFZsTT1yLXhR90= -github.com/flyteorg/flytestdlib v1.0.0/go.mod h1:QSVN5wIM1lM9d60eAEbX7NwweQXW96t5x4jbyftn89c= -github.com/flyteorg/flytestdlib v1.0.13 h1:mmU+k0Bc7HB5kWCgxoNJ9lZeD9tV1c7e5oCgyXKgO8c= -github.com/flyteorg/flytestdlib v1.0.13/go.mod h1:nIBmBHtjTJvhZEn3e/EwVC/iMkR2tUX8hEiXjRBpH/s= -github.com/flyteorg/stow v0.3.3/go.mod h1:HBld7ud0i4khMHwJjkO8v+NSP7ddKa/ruhf4I8fliaA= -github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= -github.com/flyteorg/stow v0.3.6/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= +github.com/flyteorg/flyte/flyteidl v1.9.12 h1:9V3rng4g6wheLf3j4ISuT6YZR5NX2/wSqqbJiOBYt00= +github.com/flyteorg/flyte/flyteidl v1.9.12/go.mod h1:87ELgkbZ26Fz95zkUZZP3rFc5qi2KXBxlqZ/NBqRkWQ= +github.com/flyteorg/flyte/flyteplugins v1.9.12 h1:ceXJSePUchdqlGKx9Y1Yj6BnuXMO+PKMtTT4ongfdAk= +github.com/flyteorg/flyte/flyteplugins v1.9.12/go.mod h1:PCM5jdV3iASLgLcdHOj5bzkY5Bz4eBunll14jrJmJOQ= +github.com/flyteorg/flyte/flytepropeller v1.9.12 h1:8wkLq6nk6HMLCTwZrQzn6lc1f8qRmv7cuQKWoXJJPH8= +github.com/flyteorg/flyte/flytepropeller v1.9.12/go.mod h1:lTYcULg7WZXbz4OyCibNB3z3gv7Et1u1hfruHuD5mb4= +github.com/flyteorg/flyte/flytestdlib v1.9.12 h1:Rm4c6e+/G6yeW4wm/+A1pClasJtZolELJQyikuv5O1A= +github.com/flyteorg/flyte/flytestdlib v1.9.12/go.mod h1:ZnpzKetFifz05KvjX4/Au23m3gdTkYHnN/MvVZvvJYk= +github.com/flyteorg/stow v0.3.7 h1:Cx7j8/Ux6+toD5hp5fy++927V+yAcAttDeQAlUD/864= +github.com/flyteorg/stow v0.3.7/go.mod h1:5dfBitPM004dwaZdoVylVjxFT4GWAgI0ghAndhNUzCo= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -467,85 +362,45 @@ github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWp github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= 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-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +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-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -554,11 +409,9 @@ github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= @@ -586,8 +439,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -604,12 +455,14 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -621,10 +474,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -637,9 +488,7 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -647,45 +496,29 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0 h1:nRJtk3y8Fm770D42QV6T90ZnvFZyk7agSo3Q+Z9p3WI= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +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/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -694,78 +527,54 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -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.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= 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.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +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.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -799,38 +608,24 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubeflow/common v0.4.0/go.mod h1:X15/dRQQoB77wrqrPwVn4GqG2ubgk8xR24A80i61d/4= -github.com/kubeflow/mpi-operator/v2 v2.0.0-20210920181600-c5c0c3ef99ec/go.mod h1:cTBmZKLlrIXBWQ0A9Ik8h0i4zoGhR7ApHwUfrLDbhQc= -github.com/kubeflow/pytorch-operator v0.6.0/go.mod h1:zHblV+yTwVG4PCgKTU2wPfOmQ6TJdfT87lDfHrP1a1Y= -github.com/kubeflow/tf-operator v0.5.3/go.mod h1:EBtz5LQoKaHUl/5fV5vD1qXVNVNyn3TrFaH6eVoQ8SY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/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= @@ -841,20 +636,12 @@ github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vq github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -878,49 +665,35 @@ github.com/mouuff/go-rocket-update v1.5.1 h1:qGgUu/MP+aVQ63laEguRNimmNTPKs29xz0l github.com/mouuff/go-rocket-update v1.5.1/go.mod h1:CnOyUYCxAJyC1g1mebSGC7gJysLTlX+RpxKgD1B0zLs= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/ncw/swift v1.0.49/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -947,27 +720,14 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= 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= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -975,83 +735,59 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -1064,25 +800,19 @@ github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1094,23 +824,18 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= -github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1118,24 +843,24 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1156,7 +881,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= @@ -1165,70 +889,41 @@ github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRz go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 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.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 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= @@ -1239,8 +934,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-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4= -golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +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/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= @@ -1254,7 +949,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1266,22 +960,15 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1310,7 +997,6 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1319,22 +1005,14 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= 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= @@ -1343,19 +1021,13 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210126194326-f9ce19ea3013/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1367,21 +1039,13 @@ 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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1407,7 +1071,6 @@ golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1433,7 +1096,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1445,14 +1107,12 @@ golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1461,34 +1121,19 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/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-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.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-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= 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= @@ -1497,23 +1142,21 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.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-20180828015842-6cd1fcedba52/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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1524,18 +1167,12 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1543,7 +1180,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1559,16 +1195,12 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 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-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1576,22 +1208,14 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1608,33 +1232,14 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= -google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.38.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.76.0 h1:UkZl25bR1FHNqtK/EKs3vCdpZtUO6gea3YElTwc8pQg= -google.golang.org/api v0.76.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1649,7 +1254,6 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1667,6 +1271,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= @@ -1676,66 +1281,27 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 h1:G1IeWbjrqEq9ChWxEuRPJu6laA67+XgTFHVSAvepr38= -google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= @@ -1748,25 +1314,14 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1780,8 +1335,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1794,23 +1349,17 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1821,19 +1370,17 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1841,127 +1388,64 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20210217171935-8e2decd92398/go.mod h1:60tmSUpHxGPFerNHbo/ayI2lKxvtrhbxFyXuEIWJd78= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/api v0.19.6/go.mod h1:Plxx44Nh4zVblkJrIgxVPgPre1mvng6tXf1Sj3bs0fU= -k8s.io/api v0.19.9/go.mod h1:RcFj+riKQ1fAITdmtA6InI3LVEeKi+9LuvU7GVMeXJI= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ= -k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= -k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= -k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= -k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= -k8s.io/apimachinery v0.0.0-20210217011835-527a61b4dffe/go.mod h1:Z7ps/g0rjlTeMstYrMOUttJfT2Gg34DEaG/f2PYLCWY= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.19.6/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= -k8s.io/apimachinery v0.19.9/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= +k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= +k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= +k8s.io/apiextensions-apiserver v0.24.1 h1:5yBh9+ueTq/kfnHQZa0MAo6uNcPrtxPMpNQgorBaKS0= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= -k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= -k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= -k8s.io/apiserver v0.19.6/go.mod h1:05XquZxCDzQ27ebk7uV2LrFIK4lm5Yt47XkkUvLAoAM= -k8s.io/apiserver v0.19.9/go.mod h1:g6zpD+kcZFlO73pktPWRvL0tUGqj7/KaOowmRk8EpGg= +k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= +k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/client-go v0.0.0-20210217172142-7279fc64d847/go.mod h1:q0EaghmVye2uui19vxSZ2NG6ssgUWgjudO6vrwXneSI= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= -k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/client-go v0.19.6/go.mod h1:gEiS+efRlXYUEQ9Oz4lmNXlxAl5JZ8y2zbTDGhvXXnk= -k8s.io/client-go v0.19.9/go.mod h1:8GArfSmN7MwTidMGcLGM3QTYa7uekI/B6IOrM0s1XPs= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.21.3 h1:J9nxZTOmvkInRDCzcSNQmPJbDYN/PjlxXT9Mos3HcLg= -k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.19.6/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/code-generator v0.19.9/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= -k8s.io/component-base v0.19.6/go.mod h1:8Btsf8J00/fVDa/YFmXjei7gVkcFrlKZXjSeP4SZNJg= -k8s.io/component-base v0.19.9/go.mod h1:x9UmpImvXgVry1s9/hINgLz6iGBYUGvy3Xm7KZh1nnI= +k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= +k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/sample-controller v0.19.9/go.mod h1:pzC7f1rPpf0+o9rg45Ju8GY83nGARzWABmPblej9v/M= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= -k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E= -sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= -sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= -sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -volcano.sh/apis v1.2.0-k8s1.19.6/go.mod h1:UaeJ/s5Hyd+ZhFLc+Kw9YlgM8gRZ/5OzXqHa0yKOoXY= diff --git a/flytectl/main.go b/flytectl/main.go index ba6248d121..b410bcd0b6 100644 --- a/flytectl/main.go +++ b/flytectl/main.go @@ -4,8 +4,8 @@ import ( "context" "os" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/cmd" - "github.com/flyteorg/flytestdlib/logger" ) func main() { diff --git a/flytectl/pkg/adminutils/config.go b/flytectl/pkg/adminutils/config.go index 71f0a3f476..04bb5d81e6 100644 --- a/flytectl/pkg/adminutils/config.go +++ b/flytectl/pkg/adminutils/config.go @@ -1,6 +1,6 @@ package adminutils -import "github.com/flyteorg/flytestdlib/config" +import "github.com/flyteorg/flyte/flytestdlib/config" //go:generate pflags Config --default-var DefaultConfig --bind-default-var diff --git a/flytectl/pkg/ext/attribute_match_deleter_test.go b/flytectl/pkg/ext/attribute_match_deleter_test.go index c0105f99ce..885eff0585 100644 --- a/flytectl/pkg/ext/attribute_match_deleter_test.go +++ b/flytectl/pkg/ext/attribute_match_deleter_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/attribute_match_fetcher.go b/flytectl/pkg/ext/attribute_match_fetcher.go index 5106a170a1..eca2ce8e15 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher.go +++ b/flytectl/pkg/ext/attribute_match_fetcher.go @@ -6,7 +6,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminFetcherExtClient) FetchWorkflowAttributes(ctx context.Context, project, domain, name string, diff --git a/flytectl/pkg/ext/attribute_match_fetcher_test.go b/flytectl/pkg/ext/attribute_match_fetcher_test.go index 663e6e620b..b9ecff16d6 100644 --- a/flytectl/pkg/ext/attribute_match_fetcher_test.go +++ b/flytectl/pkg/ext/attribute_match_fetcher_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/attribute_match_updater.go b/flytectl/pkg/ext/attribute_match_updater.go index 44d00c394c..9153b8b35f 100644 --- a/flytectl/pkg/ext/attribute_match_updater.go +++ b/flytectl/pkg/ext/attribute_match_updater.go @@ -3,7 +3,7 @@ package ext import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminUpdaterExtClient) UpdateWorkflowAttributes(ctx context.Context, project, domain, name string, matchingAttr *admin.MatchingAttributes) error { diff --git a/flytectl/pkg/ext/attribute_match_updater_test.go b/flytectl/pkg/ext/attribute_match_updater_test.go index 0c331c9ef5..1fab0f6795 100644 --- a/flytectl/pkg/ext/attribute_match_updater_test.go +++ b/flytectl/pkg/ext/attribute_match_updater_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/attribute_matcher_deleter.go b/flytectl/pkg/ext/attribute_matcher_deleter.go index ef8a5730fb..e53490eaad 100644 --- a/flytectl/pkg/ext/attribute_matcher_deleter.go +++ b/flytectl/pkg/ext/attribute_matcher_deleter.go @@ -3,7 +3,7 @@ package ext import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminDeleterExtClient) DeleteWorkflowAttributes(ctx context.Context, project, domain, name string, rsType admin.MatchableResource) error { diff --git a/flytectl/pkg/ext/deleter.go b/flytectl/pkg/ext/deleter.go index db5d97a748..6b848cb278 100644 --- a/flytectl/pkg/ext/deleter.go +++ b/flytectl/pkg/ext/deleter.go @@ -3,8 +3,8 @@ package ext import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) //go:generate mockery -all -case=underscore diff --git a/flytectl/pkg/ext/deleter_test.go b/flytectl/pkg/ext/deleter_test.go index 17666b021d..7a307577bb 100644 --- a/flytectl/pkg/ext/deleter_test.go +++ b/flytectl/pkg/ext/deleter_test.go @@ -3,7 +3,7 @@ package ext import ( "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/ext/execution_fetcher.go b/flytectl/pkg/ext/execution_fetcher.go index 24251b39f6..41ebea9b16 100644 --- a/flytectl/pkg/ext/execution_fetcher.go +++ b/flytectl/pkg/ext/execution_fetcher.go @@ -3,9 +3,9 @@ package ext import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" ) func (a *AdminFetcherExtClient) FetchExecution(ctx context.Context, name, project, domain string) (*admin.Execution, error) { diff --git a/flytectl/pkg/ext/execution_fetcher_test.go b/flytectl/pkg/ext/execution_fetcher_test.go index a415660f5c..304f929880 100644 --- a/flytectl/pkg/ext/execution_fetcher_test.go +++ b/flytectl/pkg/ext/execution_fetcher_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/fetcher.go b/flytectl/pkg/ext/fetcher.go index 790eebde0e..2df2f2799c 100644 --- a/flytectl/pkg/ext/fetcher.go +++ b/flytectl/pkg/ext/fetcher.go @@ -5,8 +5,8 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) //go:generate mockery -all -case=underscore diff --git a/flytectl/pkg/ext/fetcher_test.go b/flytectl/pkg/ext/fetcher_test.go index f0ddffebd4..2654f5b538 100644 --- a/flytectl/pkg/ext/fetcher_test.go +++ b/flytectl/pkg/ext/fetcher_test.go @@ -3,7 +3,7 @@ package ext import ( "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/ext/launch_plan_fetcher.go b/flytectl/pkg/ext/launch_plan_fetcher.go index ad24b3abb5..76ee524993 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher.go +++ b/flytectl/pkg/ext/launch_plan_fetcher.go @@ -6,8 +6,8 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) // FetchAllVerOfLP fetches all the versions for give launch plan name diff --git a/flytectl/pkg/ext/launch_plan_fetcher_test.go b/flytectl/pkg/ext/launch_plan_fetcher_test.go index 39d0121c93..c2cf3140a4 100644 --- a/flytectl/pkg/ext/launch_plan_fetcher_test.go +++ b/flytectl/pkg/ext/launch_plan_fetcher_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go index 414cd17f54..c165501cd5 100644 --- a/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_deleter_ext_interface.go @@ -5,11 +5,11 @@ package mocks import ( context "context" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" mock "github.com/stretchr/testify/mock" - service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AdminDeleterExtInterface is an autogenerated mock type for the AdminDeleterExtInterface type diff --git a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go index 7d8e1ee284..b2e9814fb5 100644 --- a/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_fetcher_ext_interface.go @@ -5,13 +5,13 @@ package mocks import ( context "context" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" filters "github.com/flyteorg/flytectl/pkg/filters" mock "github.com/stretchr/testify/mock" - service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AdminFetcherExtInterface is an autogenerated mock type for the AdminFetcherExtInterface type diff --git a/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go b/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go index df851c5d29..74b08a115a 100644 --- a/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_service_fetcher_ext_interface.go @@ -5,11 +5,11 @@ package mocks import ( context "context" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" mock "github.com/stretchr/testify/mock" - service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AdminServiceFetcherExtInterface is an autogenerated mock type for the AdminServiceFetcherExtInterface type diff --git a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go index a59d8ca748..c1d9bc7e34 100644 --- a/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go +++ b/flytectl/pkg/ext/mocks/admin_updater_ext_interface.go @@ -5,11 +5,11 @@ package mocks import ( context "context" - admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" mock "github.com/stretchr/testify/mock" - service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) // AdminUpdaterExtInterface is an autogenerated mock type for the AdminUpdaterExtInterface type diff --git a/flytectl/pkg/ext/project_fetcher.go b/flytectl/pkg/ext/project_fetcher.go index 3834952877..2bac88296c 100644 --- a/flytectl/pkg/ext/project_fetcher.go +++ b/flytectl/pkg/ext/project_fetcher.go @@ -6,7 +6,7 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" ) func (a *AdminFetcherExtClient) ListProjects(ctx context.Context, filter filters.Filters) (*admin.Projects, error) { diff --git a/flytectl/pkg/ext/project_fetcher_test.go b/flytectl/pkg/ext/project_fetcher_test.go index 4b9c505485..d89d153aaa 100644 --- a/flytectl/pkg/ext/project_fetcher_test.go +++ b/flytectl/pkg/ext/project_fetcher_test.go @@ -3,8 +3,8 @@ package ext import ( "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/flytectl/pkg/ext/task_fetcher.go b/flytectl/pkg/ext/task_fetcher.go index 2c3366a5c0..3240c46214 100644 --- a/flytectl/pkg/ext/task_fetcher.go +++ b/flytectl/pkg/ext/task_fetcher.go @@ -6,8 +6,8 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) func (a *AdminFetcherExtClient) FetchAllVerOfTask(ctx context.Context, name, project, domain string, filter filters.Filters) ([]*admin.Task, error) { diff --git a/flytectl/pkg/ext/task_fetcher_test.go b/flytectl/pkg/ext/task_fetcher_test.go index 0bfc9ef8dd..a1f605272a 100644 --- a/flytectl/pkg/ext/task_fetcher_test.go +++ b/flytectl/pkg/ext/task_fetcher_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/ext/updater.go b/flytectl/pkg/ext/updater.go index a87afd4ca0..5121057d5b 100644 --- a/flytectl/pkg/ext/updater.go +++ b/flytectl/pkg/ext/updater.go @@ -3,8 +3,8 @@ package ext import ( "context" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" ) //go:generate mockery -all -case=underscore diff --git a/flytectl/pkg/ext/updater_test.go b/flytectl/pkg/ext/updater_test.go index 6e692c44cf..cdb21cf603 100644 --- a/flytectl/pkg/ext/updater_test.go +++ b/flytectl/pkg/ext/updater_test.go @@ -3,7 +3,7 @@ package ext import ( "testing" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/ext/workflow_fetcher.go b/flytectl/pkg/ext/workflow_fetcher.go index 98438e06f8..7b0bf9d82c 100644 --- a/flytectl/pkg/ext/workflow_fetcher.go +++ b/flytectl/pkg/ext/workflow_fetcher.go @@ -6,8 +6,8 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) // FetchAllVerOfWorkflow fetches all the versions for give workflow name diff --git a/flytectl/pkg/ext/workflow_fetcher_test.go b/flytectl/pkg/ext/workflow_fetcher_test.go index da027566e2..b035e71a99 100644 --- a/flytectl/pkg/ext/workflow_fetcher_test.go +++ b/flytectl/pkg/ext/workflow_fetcher_test.go @@ -7,9 +7,9 @@ import ( "github.com/flyteorg/flytectl/pkg/filters" - "github.com/flyteorg/flyteidl/clients/go/admin/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin/mocks" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/flytectl/pkg/filters/util.go b/flytectl/pkg/filters/util.go index b8584a7a57..a19481e32d 100644 --- a/flytectl/pkg/filters/util.go +++ b/flytectl/pkg/filters/util.go @@ -3,8 +3,8 @@ package filters import ( "strconv" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) func BuildResourceListRequestWithName(c Filters, project, domain, name string) (*admin.ResourceListRequest, error) { diff --git a/flytectl/pkg/filters/util_test.go b/flytectl/pkg/filters/util_test.go index 98cb98985c..b1289455a4 100644 --- a/flytectl/pkg/filters/util_test.go +++ b/flytectl/pkg/filters/util_test.go @@ -3,8 +3,8 @@ package filters import ( "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" "github.com/stretchr/testify/assert" ) diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index f76d7f7580..2d72b67af7 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -9,10 +9,10 @@ import ( "runtime" "strings" + "github.com/flyteorg/flyte/flytestdlib/logger" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/flyteorg/flytectl/pkg/platformutil" "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flytestdlib/logger" - stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/google/go-github/v42/github" "github.com/mouuff/go-rocket-update/pkg/provider" diff --git a/flytectl/pkg/github/githubutil_test.go b/flytectl/pkg/github/githubutil_test.go index ec303bd03e..41247ac9e3 100644 --- a/flytectl/pkg/github/githubutil_test.go +++ b/flytectl/pkg/github/githubutil_test.go @@ -6,9 +6,9 @@ import ( "strings" "testing" + stdlibversion "github.com/flyteorg/flyte/flytestdlib/version" "github.com/flyteorg/flytectl/pkg/github/mocks" "github.com/flyteorg/flytectl/pkg/platformutil" - stdlibversion "github.com/flyteorg/flytestdlib/version" "github.com/google/go-github/v42/github" "github.com/stretchr/testify/assert" diff --git a/flytectl/pkg/k8s/k8s_test.go b/flytectl/pkg/k8s/k8s_test.go index 0cf3db31bb..84dc16923c 100644 --- a/flytectl/pkg/k8s/k8s_test.go +++ b/flytectl/pkg/k8s/k8s_test.go @@ -33,7 +33,7 @@ users: - name: foo-user user: exec: - apiVersion: client.authentication.k8s.io/v1alpha1 + apiVersion: client.authentication.k8s.io/v1beta1 args: - arg-1 - arg-2 diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index f1b23d92a8..e3b406b927 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -9,10 +9,10 @@ import ( "sort" "strings" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/errors" "github.com/flyteorg/flytectl/pkg/visualize" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flytestdlib/errors" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 6d5441b9af..06d4c2c31d 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 6fb649ab7b..c8e6b7a56b 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -13,6 +13,7 @@ import ( "github.com/docker/docker/api/types/mount" "github.com/docker/go-connections/nat" "github.com/enescakir/emoji" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/clierrors" dockerCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/docker" sandboxCmdConfig "github.com/flyteorg/flytectl/cmd/config/subcommand/sandbox" @@ -21,7 +22,6 @@ import ( "github.com/flyteorg/flytectl/pkg/github" "github.com/flyteorg/flytectl/pkg/k8s" "github.com/flyteorg/flytectl/pkg/util" - "github.com/flyteorg/flytestdlib/logger" "github.com/kataras/tablewriter" corev1api "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/flytectl/pkg/visualize/graphviz.go b/flytectl/pkg/visualize/graphviz.go index 08aa188716..d088a2515b 100644 --- a/flytectl/pkg/visualize/graphviz.go +++ b/flytectl/pkg/visualize/graphviz.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" - "github.com/flyteorg/flyteidl/clients/go/coreutils" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" graphviz "github.com/awalterschulze/gographviz" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) const ( diff --git a/flytectl/pkg/visualize/graphviz_test.go b/flytectl/pkg/visualize/graphviz_test.go index 56b8621e2f..710ce01f1d 100644 --- a/flytectl/pkg/visualize/graphviz_test.go +++ b/flytectl/pkg/visualize/graphviz_test.go @@ -6,8 +6,8 @@ import ( "io/ioutil" "testing" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flytectl/pkg/visualize/mocks" - "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" graphviz "github.com/awalterschulze/gographviz" "github.com/golang/protobuf/jsonpb" From 664a604de50ef1907eeff428eb6abb72157f8760 Mon Sep 17 00:00:00 2001 From: Honnix Date: Thu, 26 Oct 2023 22:32:19 +0200 Subject: [PATCH 328/356] Fix self-upgrade (#437) Signed-off-by: Hongxin Liang --- flytectl/.goreleaser.yml | 6 +++--- flytectl/Makefile | 2 +- flytectl/docs/source/index.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 732586b758..018b9d48cb 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -13,7 +13,7 @@ builds: - arm64 - amd64 ldflags: - - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flyte/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flyte/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flyte/flytestdlib/version.BuildTime={{.Date}} - env: - CGO_ENABLED=0 main: ./main.go @@ -25,7 +25,7 @@ builds: - arm64 - amd64 ldflags: - - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flyte/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flyte/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flyte/flytestdlib/version.BuildTime={{.Date}} - env: - CGO_ENABLED=0 main: ./main.go @@ -34,7 +34,7 @@ builds: goos: - windows ldflags: - - -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}} + - -s -w -X github.com/flyteorg/flyte/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flyte/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flyte/flytestdlib/version.BuildTime={{.Date}} archives: - name_template: |- {{ .ProjectName }}_ diff --git a/flytectl/Makefile b/flytectl/Makefile index d515ffa462..e190089133 100644 --- a/flytectl/Makefile +++ b/flytectl/Makefile @@ -5,7 +5,7 @@ include boilerplate/flyte/precommit/Makefile GIT_VERSION := $(shell git describe --always --tags) GIT_HASH := $(shell git rev-parse --short HEAD) TIMESTAMP := $(shell date '+%Y-%m-%d') -PACKAGE ?=github.com/flyteorg/flytestdlib +PACKAGE ?=github.com/flyteorg/flyte/flytestdlib LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)" diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 3a10b2437a..66dc363f8d 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -95,7 +95,7 @@ The full list of available configurable options can be found by running ``flytec .. tabbed:: Others - For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. This file is typically searched in: From 2e49f752fb1497729274bf72c5b2c1a699be4731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Can=20=C3=9Cste?= Date: Wed, 1 Nov 2023 02:07:45 +0100 Subject: [PATCH 329/356] Fix project status change on update for archived projects (#438) Before, updating some field (i.e. `Description`) of an `Archived` project causes the project state to change to `Active`. This is caused by a bug in the `updateProjectsFunc` function used for the `update` command. During project updates, `edited`, a default project created based on the given configs/flags, comes with `admin.Project_ACTIVE` state by default if both `activate` and `archive` flags have not been set. Then a `copy` of the target project will be updated based on `edited` and then used for showing the diff. In the current implementation, the state of the `copy` is set to be the same as `edited` projects state, which is `Project_ACTIVE` if no flags are set. Also, after showing the diff, the `edited` is used for updating the project. Since it comes with `Project_ACTIVE` state by default, the target project will be updated to have `Project_ACTIVE` if both `activate` and `archive` flags are unset, regardless of the projects previous state. On this PR, we make sure we set the correct state to both `copy` and `edited` by checking if both `activate` and `archive` flags are set/unset. If one of the flags are set, we update target project state (`copy`) based on the `edited` state since it will have the desired state. If both flags are unset, we set the `edited` state to be the same as target (`copy`) state. This way, updating `archived` projects will not change their state. Signed-off-by: mcanueste --- flytectl/cmd/update/project.go | 34 +++++++++++++++++++++++++---- flytectl/cmd/update/project_test.go | 29 +++++++++++++++++++----- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index b9c2f17e90..215f2393d8 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -6,6 +6,7 @@ import ( "os" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" @@ -85,7 +86,9 @@ Usage ) func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { - edits, err := project.DefaultProjectConfig.GetProjectSpec(config.GetConfig()) + projectConfig := project.DefaultProjectConfig + + edits, err := projectConfig.GetProjectSpec(config.GetConfig()) if err != nil { return err } @@ -103,7 +106,7 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma // have a complete set of project's fields - it will only contain fields that // the update command allows updating. (For example, it won't have Domains field // initialized.) - currentProjectWithEdits := copyProjectWithEdits(currentProject, edits) + currentProjectWithEdits := copyProjectWithEdits(currentProject, edits, projectConfig) patch, err := DiffAsYaml(diffPathBefore, diffPathAfter, currentProject, currentProjectWithEdits) if err != nil { panic(err) @@ -136,10 +139,9 @@ func updateProjectsFunc(ctx context.Context, args []string, cmdCtx cmdCore.Comma // Makes a shallow copy of target and applies certain properties from edited to it. // The properties applied are only the ones supported by update command: state, name, // description, labels, etc. -func copyProjectWithEdits(target *admin.Project, edited *admin.Project) *admin.Project { +func copyProjectWithEdits(target *admin.Project, edited *admin.Project, projectConfig *project.ConfigProject) *admin.Project { copy := *target - copy.State = edited.State if edited.Name != "" { copy.Name = edited.Name } @@ -150,5 +152,29 @@ func copyProjectWithEdits(target *admin.Project, edited *admin.Project) *admin.P copy.Labels = edited.Labels } + // `edited` comes with `admin.Project_ACTIVE` state by default + // if both `activate` and `archive` flags have not been set. + // + // This will overwrite state of `copy` if we directly set it + // without checking for flags, which will show up on the diff. + // + // Also, after showing the diff, the `edited` is used for updating + // the project, which comes with `Project_ACTIVE` by default + // unless overwritten. Therefore, on the `else` block, + // we overwrite the `edited` with the state of `copy` + // if both `archive` and `activate` flags are unset. + // + // This is a bit hacky IMO. Proper solution would be to + // refactor `project.ConfigProject` and this file in order to + // separate the logic of setting `ConfigProject` struct fields + // from creation of a 'default' project based on those flags. + // Having a proper order of precedence between global config, + // YAML file input, and the flags for `ConfigProject` would also + // be good. + if projectConfig.Archive || projectConfig.Activate { + copy.State = edited.State + } else { + edited.State = copy.State + } return © } diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index 2f3fd11aed..1ef2c7b267 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -5,14 +5,13 @@ import ( "testing" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + + "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/project" "github.com/flyteorg/flytectl/cmd/testutils" "github.com/flyteorg/flytectl/pkg/ext" - - "github.com/flyteorg/flytectl/cmd/config" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" ) func TestProjectCanBeActivated(t *testing.T) { @@ -184,6 +183,26 @@ func TestProjectUpdateRequiresProjectId(t *testing.T) { }) } +func TestProjectUpdateDoesNotActivateArchivedProject(t *testing.T) { + testProjectUpdate( + /* setup */ func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project) { + project.State = admin.Project_ARCHIVED + config.Activate = false + config.Archive = false + config.Description = testutils.RandomName(12) + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateProject", s.Ctx, + mock.MatchedBy( + func(r *admin.Project) bool { + return r.State == admin.Project_ARCHIVED + })) + }) +} + func testProjectUpdate( setup func(s *testutils.TestStruct, config *project.ConfigProject, project *admin.Project), asserter func(s *testutils.TestStruct, err error), From 07f158df6598ef63106f1f0fd17aa9b75311afd7 Mon Sep 17 00:00:00 2001 From: Jeev B Date: Wed, 1 Nov 2023 12:49:48 -0700 Subject: [PATCH 330/356] Misc cleanups to aesthetics (#441) * Misc cleanups to aesthetics Signed-off-by: Jeev B * make generate Signed-off-by: Jeev B * Fix getting started test Signed-off-by: Jeev B * Fix tests Signed-off-by: Jeev B * Free up space in github runner for getting started test Signed-off-by: Jeev B * Check for pod ready condition instead of just phase Signed-off-by: Jeev B * Fix test Signed-off-by: Jeev B * Add a short sleep for sandbox to be ready to serve requests Signed-off-by: Jeev B --------- Signed-off-by: Jeev B --- flytectl/.github/workflows/checks.yml | 9 ++- flytectl/cmd/configuration/configuration.go | 2 +- flytectl/go.mod | 5 +- flytectl/go.sum | 4 ++ flytectl/pkg/docker/docker_util.go | 63 ++++++++++++++------- flytectl/pkg/docker/docker_util_test.go | 49 ++++++++++++---- flytectl/pkg/k8s/k8s.go | 10 ++-- flytectl/pkg/k8s/mocks/context_ops.go | 14 ++--- flytectl/pkg/sandbox/start.go | 41 ++++++++------ flytectl/pkg/sandbox/start_test.go | 62 ++++++++++++-------- 10 files changed, 171 insertions(+), 88 deletions(-) diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index d7d36c4b18..2c036ba3a4 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -63,6 +63,7 @@ jobs: name: Test Getting started runs-on: ubuntu-latest steps: + - uses: insightsengineering/disk-space-reclaimer@v1 - name: Checkout uses: actions/checkout@v2 - uses: actions/cache@v2 @@ -78,7 +79,13 @@ jobs: - name: Build Flytectl binary run: make compile - name: Create a sandbox cluster - run: bin/flytectl sandbox start + run: | + bin/flytectl demo start + # Sleep is necessary here since `flyte-proxy` might not be ready + # to serve requests when the above command exits successfully. + # Fixed in: https://github.com/flyteorg/flyte/pull/4348 + # TODO (jeev): Remove this when ^ is released. + sleep 5 - name: Setup flytectl config run: bin/flytectl config init - name: Register cookbook diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index 7f06f92094..010416e36d 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -87,7 +87,7 @@ func initFlytectlConfig(reader io.Reader) error { } templateValues := configutil.ConfigTemplateSpec{ - Host: "dns:///localhost:30081", + Host: "dns:///localhost:30080", Insecure: true, } templateStr := configutil.GetTemplate() diff --git a/flytectl/go.mod b/flytectl/go.mod index 0344faeca5..4beaf4d5a6 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -3,6 +3,7 @@ module github.com/flyteorg/flytectl go 1.19 require ( + github.com/apoorvam/goterminal v0.0.0-20180523175556-614d345c47e5 github.com/avast/retry-go v3.0.0+incompatible github.com/awalterschulze/gographviz v2.0.3+incompatible github.com/disiqueira/gotree v1.0.0 @@ -22,6 +23,7 @@ require ( github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 github.com/mitchellh/mapstructure v1.5.0 + github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 github.com/mouuff/go-rocket-update v1.5.1 github.com/opencontainers/image-spec v1.0.2 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 @@ -41,6 +43,7 @@ require ( k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 + k8s.io/kubernetes v1.13.0 sigs.k8s.io/yaml v1.3.0 ) @@ -54,6 +57,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.27 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect @@ -113,7 +117,6 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 41bdd143c0..00892a2001 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -123,6 +123,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apoorvam/goterminal v0.0.0-20180523175556-614d345c47e5 h1:VYqcjykqpcq262cDxBAkAelSdg6HETkxgwzQRTS40Aw= +github.com/apoorvam/goterminal v0.0.0-20180523175556-614d345c47e5/go.mod h1:E7x8aDc3AQzDKjEoIZCt+XYheHk2OkP+p2UgeNjecH8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -282,6 +284,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKY github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -1426,6 +1429,7 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/flytectl/pkg/docker/docker_util.go b/flytectl/pkg/docker/docker_util.go index 77475f8667..e9315cab1e 100644 --- a/flytectl/pkg/docker/docker_util.go +++ b/flytectl/pkg/docker/docker_util.go @@ -17,12 +17,14 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/volume" + "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config/subcommand/docker" cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils" f "github.com/flyteorg/flytectl/pkg/filesystemutils" + "github.com/moby/term" ) var ( @@ -152,34 +154,51 @@ func PullDockerImage(ctx context.Context, cli Docker, image string, pullPolicy I PrintPullImage(image, imagePullOptions) return nil } - fmt.Printf("%v pulling docker image for release %s\n", emoji.Whale, image) - if pullPolicy == ImagePullPolicyAlways || pullPolicy == ImagePullPolicyIfNotPresent { - if pullPolicy == ImagePullPolicyIfNotPresent { - imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) - if err != nil { - return err - } - for _, img := range imageSummary { - for _, tags := range img.RepoTags { - if image == tags { - return nil - } - } - } - } - r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{ - RegistryAuth: imagePullOptions.RegistryAuth, - Platform: imagePullOptions.Platform, - }) + var needsPull bool + if pullPolicy == ImagePullPolicyAlways { + needsPull = true + } else { + imageSummary, err := cli.ImageList(ctx, types.ImageListOptions{}) if err != nil { return err } + found := false + for _, img := range imageSummary { + for _, tags := range img.RepoTags { + if image == tags { + found = true + break + } + } + if found { + break + } + } + needsPull = !found + } - _, err = io.Copy(os.Stdout, r) + // Image already exists, nothing to do. + if !needsPull { + return nil + } + + // Image needs to be pulled but pull policy prevents it + if pullPolicy == ImagePullPolicyNever { + return fmt.Errorf("Image does not exist, but image pull policy prevents pulling it: %s", image) + } + + fmt.Printf("%v Pulling image %s\n", emoji.Whale, image) + r, err := cli.ImagePull(ctx, image, types.ImagePullOptions{ + RegistryAuth: imagePullOptions.RegistryAuth, + Platform: imagePullOptions.Platform, + }) + if err != nil { return err } - return nil + defer r.Close() + termFd, isTerm := term.GetFdInfo(os.Stderr) + return jsonmessage.DisplayJSONMessagesStream(r, os.Stderr, termFd, isTerm, nil) } // PrintPullImage helper function to print the sandbox pull image command @@ -237,7 +256,7 @@ func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, expo PrintCreateContainer(volumes, portBindings, name, image, Environment) return "", nil } - fmt.Printf("%v booting Flyte-sandbox container\n", emoji.FactoryWorker) + fmt.Printf("%v Starting container... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) resp, err := cli.ContainerCreate(ctx, &container.Config{ Env: Environment, Image: image, diff --git a/flytectl/pkg/docker/docker_util_test.go b/flytectl/pkg/docker/docker_util_test.go index 32ad1cda12..0de840bb7c 100644 --- a/flytectl/pkg/docker/docker_util_test.go +++ b/flytectl/pkg/docker/docker_util_test.go @@ -5,6 +5,7 @@ import ( "bufio" "context" "fmt" + "io" "os" "path/filepath" "strings" @@ -44,6 +45,10 @@ func setupSandbox() { containers = append(containers, container1) } +func dummyReader() io.ReadCloser { + return io.NopCloser(strings.NewReader("")) +} + func TestGetSandbox(t *testing.T) { setupSandbox() t.Run("Successfully get sandbox container", func(t *testing.T) { @@ -109,44 +114,68 @@ func TestRemoveSandboxWithNoReply(t *testing.T) { } func TestPullDockerImage(t *testing.T) { - t.Run("Successfully pull image Always", func(t *testing.T) { - setupSandbox() + t.Run("Successful pull existing image with ImagePullPolicyAlways", func(t *testing.T) { mockDocker := &mocks.Docker{} ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{{RepoTags: []string{"nginx:latest"}}}, nil) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}, false) + assert.Nil(t, err) + }) + + t.Run("Successful pull non-existent image with ImagePullPolicyAlways", func(t *testing.T) { + mockDocker := &mocks.Docker{} + ctx := context.Background() + // Verify the attributes + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}, false) assert.Nil(t, err) }) t.Run("Error in pull image", func(t *testing.T) { - setupSandbox() mockDocker := &mocks.Docker{} ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("error")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), fmt.Errorf("error")) err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyAlways, ImagePullOptions{}, false) assert.NotNil(t, err) }) - t.Run("Successfully pull image IfNotPresent", func(t *testing.T) { - setupSandbox() + t.Run("Success pull non-existent image with ImagePullPolicyIfNotPresent", func(t *testing.T) { mockDocker := &mocks.Docker{} ctx := context.Background() // Verify the attributes - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyIfNotPresent, ImagePullOptions{}, false) assert.Nil(t, err) }) - t.Run("Successfully pull image Never", func(t *testing.T) { - setupSandbox() + t.Run("Success skip existing image with ImagePullPolicyIfNotPresent", func(t *testing.T) { + mockDocker := &mocks.Docker{} + ctx := context.Background() + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{{RepoTags: []string{"nginx:latest"}}}, nil) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyIfNotPresent, ImagePullOptions{}, false) + assert.Nil(t, err) + }) + + t.Run("Success skip existing image with ImagePullPolicyNever", func(t *testing.T) { mockDocker := &mocks.Docker{} ctx := context.Background() + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{{RepoTags: []string{"nginx:latest"}}}, nil) err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyNever, ImagePullOptions{}, false) assert.Nil(t, err) }) + + t.Run("Error non-existent image with ImagePullPolicyNever", func(t *testing.T) { + mockDocker := &mocks.Docker{} + ctx := context.Background() + mockDocker.OnImageListMatch(ctx, types.ImageListOptions{}).Return([]types.ImageSummary{}, nil) + err := PullDockerImage(ctx, mockDocker, "nginx:latest", ImagePullPolicyNever, ImagePullOptions{}, false) + assert.ErrorContains(t, err, "Image does not exist, but image pull policy prevents pulling it") + }) } func TestStartContainer(t *testing.T) { diff --git a/flytectl/pkg/k8s/k8s.go b/flytectl/pkg/k8s/k8s.go index 705c6887e6..f185e53d2e 100644 --- a/flytectl/pkg/k8s/k8s.go +++ b/flytectl/pkg/k8s/k8s.go @@ -4,6 +4,7 @@ import ( "fmt" "os" + "github.com/enescakir/emoji" "github.com/pkg/errors" "k8s.io/client-go/kubernetes" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -18,7 +19,7 @@ type K8s interface { //go:generate mockery -name=ContextOps -case=underscore type ContextOps interface { CheckConfig() error - CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error + CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace string) error RemoveContext(ctxName string) error } @@ -64,7 +65,7 @@ func (k *ContextManager) CheckConfig() error { } // CopyContext copies context srcCtxName part of srcConfigAccess to targetCtxName part of targetConfigAccess. -func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName string) error { +func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName, targetCtxName, targetNamespace string) error { err := k.CheckConfig() if err != nil { return err @@ -86,7 +87,7 @@ func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, src _, exists = toStartingConfig.Contexts[targetCtxName] if exists { - fmt.Printf("context %v already exist. Overwriting it\n", targetCtxName) + fmt.Printf("%v Context %q already exists. Overwriting it!\n", emoji.FactoryWorker, targetCtxName) } else { toStartingConfig.Contexts[targetCtxName] = clientcmdapi.NewContext() } @@ -97,12 +98,13 @@ func (k *ContextManager) CopyContext(srcConfigAccess clientcmd.ConfigAccess, src toStartingConfig.AuthInfos[targetCtxName].LocationOfOrigin = k.configAccess.GetDefaultFilename() toStartingConfig.Contexts[targetCtxName].Cluster = targetCtxName toStartingConfig.Contexts[targetCtxName].AuthInfo = targetCtxName + toStartingConfig.Contexts[targetCtxName].Namespace = targetNamespace toStartingConfig.CurrentContext = targetCtxName if err := clientcmd.ModifyConfig(k.configAccess, *toStartingConfig, true); err != nil { return err } - fmt.Printf("context modified for %q and switched over to it.\n", targetCtxName) + fmt.Printf("%v Activated context %q!\n", emoji.FactoryWorker, targetCtxName) return nil } diff --git a/flytectl/pkg/k8s/mocks/context_ops.go b/flytectl/pkg/k8s/mocks/context_ops.go index 6229f02b45..74bd6c7587 100644 --- a/flytectl/pkg/k8s/mocks/context_ops.go +++ b/flytectl/pkg/k8s/mocks/context_ops.go @@ -53,8 +53,8 @@ func (_m ContextOps_CopyContext) Return(_a0 error) *ContextOps_CopyContext { return &ContextOps_CopyContext{Call: _m.Call.Return(_a0)} } -func (_m *ContextOps) OnCopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) *ContextOps_CopyContext { - c_call := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName) +func (_m *ContextOps) OnCopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string, targetNamespace string) *ContextOps_CopyContext { + c_call := _m.On("CopyContext", srcConfigAccess, srcCtxName, targetCtxName, targetNamespace) return &ContextOps_CopyContext{Call: c_call} } @@ -63,13 +63,13 @@ func (_m *ContextOps) OnCopyContextMatch(matchers ...interface{}) *ContextOps_Co return &ContextOps_CopyContext{Call: c_call} } -// CopyContext provides a mock function with given fields: srcConfigAccess, srcCtxName, targetCtxName -func (_m *ContextOps) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string) error { - ret := _m.Called(srcConfigAccess, srcCtxName, targetCtxName) +// CopyContext provides a mock function with given fields: srcConfigAccess, srcCtxName, targetCtxName, targetNamespace +func (_m *ContextOps) CopyContext(srcConfigAccess clientcmd.ConfigAccess, srcCtxName string, targetCtxName string, targetNamespace string) error { + ret := _m.Called(srcConfigAccess, srcCtxName, targetCtxName, targetNamespace) var r0 error - if rf, ok := ret.Get(0).(func(clientcmd.ConfigAccess, string, string) error); ok { - r0 = rf(srcConfigAccess, srcCtxName, targetCtxName) + if rf, ok := ret.Get(0).(func(clientcmd.ConfigAccess, string, string, string) error); ok { + r0 = rf(srcConfigAccess, srcCtxName, targetCtxName, targetNamespace) } else { r0 = ret.Error(0) } diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index c8e6b7a56b..9c9c73fb06 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -9,6 +9,7 @@ import ( "path/filepath" "time" + "github.com/apoorvam/goterminal" "github.com/avast/retry-go" "github.com/docker/docker/api/types/mount" "github.com/docker/go-connections/nat" @@ -27,6 +28,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/clientcmd" + "k8s.io/kubernetes/pkg/api/v1/pod" ) const ( @@ -62,13 +64,6 @@ func isNodeTainted(ctx context.Context, client corev1.CoreV1Interface) (bool, er return false, nil } -func isPodReady(v corev1api.Pod) bool { - if (v.Status.Phase == corev1api.PodRunning) || (v.Status.Phase == corev1api.PodSucceeded) { - return true - } - return false -} - func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*corev1api.PodList, error) { pods, err := client.Pods(flyteNamespace).List(ctx, v1.ListOptions{}) if err != nil { @@ -78,11 +73,14 @@ func getFlyteDeployment(ctx context.Context, client corev1.CoreV1Interface) (*co } func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface) error { - var data = os.Stdout - table := tablewriter.NewWriter(data) + writer := goterminal.New(os.Stdout) + defer writer.Reset() + + table := tablewriter.NewWriter(writer) table.SetHeader([]string{"Service", "Status", "Namespace"}) table.SetRowLine(true) + done := false for { isTaint, err := isNodeTainted(ctx, appsClient) if err != nil { @@ -100,15 +98,15 @@ func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface table.SetAutoWrapText(false) table.SetAutoFormatHeaders(true) - // Clear os.Stdout - _, _ = data.WriteString("\x1b[3;J\x1b[H\x1b[2J") - var total, ready int total = len(pods.Items) ready = 0 if total != 0 { for _, v := range pods.Items { - if isPodReady(v) { + // TODO (jeev): We should really be using + // `IsContainersReadyConditionTrue`, but that is not available until + // version v1.22.11. We are on v1.13.0 for some reason. + if pod.IsPodReadyConditionTrue(v.Status) { ready++ } if len(v.Status.Conditions) > 0 { @@ -117,14 +115,21 @@ func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface } table.Render() if total == ready { - break + done = true } } else { table.Append([]string{"k8s: This might take a little bit", "Bootstrapping", ""}) table.Render() } - time.Sleep(40 * time.Second) + writer.Clear() + writer.Print() + + if done { + break + } + + time.Sleep(5 * time.Second) } return nil @@ -150,11 +155,11 @@ func UpdateLocalKubeContext(k8sCtxMgr k8s.ContextOps, dockerCtx string, contextN GlobalFile: kubeConfigPath, LoadingRules: clientcmd.NewDefaultClientConfigLoadingRules(), } - return k8sCtxMgr.CopyContext(srcConfigAccess, dockerCtx, contextName) + return k8sCtxMgr.CopyContext(srcConfigAccess, dockerCtx, contextName, flyteNamespace) } func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService, reader io.Reader, sandboxConfig *sandboxCmdConfig.Config, defaultImageName string, defaultImagePrefix string, exposedPorts map[nat.Port]struct{}, portBindings map[nat.Port][]nat.PortBinding, consolePort int) (*bufio.Scanner, error) { - fmt.Printf("%v Bootstrapping a brand new flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) + fmt.Printf("%v Bootstrapping a brand new Flyte cluster... %v %v\n", emoji.FactoryWorker, emoji.Hammer, emoji.Wrench) if sandboxConfig.DryRun { docker.PrintRemoveContainer(docker.FlyteSandboxClusterName) } else { @@ -291,10 +296,10 @@ func StartCluster(ctx context.Context, args []string, sandboxConfig *sandboxCmdC } // Live-ness check + fmt.Printf("%v Waiting for cluster to come up... %v\n", emoji.HourglassNotDone, emoji.HourglassNotDone) err = retry.Do( func() error { // Have to get a new client every time because you run into x509 errors if not - fmt.Println("Waiting for cluster to come up...") k8sClient, err = k8s.GetK8sClient(docker.Kubeconfig, K8sEndpoint) if err != nil { logger.Debugf(ctx, "Error getting K8s client in liveness check %s", err) diff --git a/flytectl/pkg/sandbox/start_test.go b/flytectl/pkg/sandbox/start_test.go index a99f5b91f5..1bfec25e26 100644 --- a/flytectl/pkg/sandbox/start_test.go +++ b/flytectl/pkg/sandbox/start_test.go @@ -3,6 +3,7 @@ package sandbox import ( "context" "fmt" + "io" "io/ioutil" "os" "strings" @@ -69,8 +70,17 @@ var fakeNode = &corev1.Node{ var fakePod = corev1.Pod{ Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - Conditions: []corev1.PodCondition{}, + Phase: corev1.PodRunning, + Conditions: []corev1.PodCondition{ + { + Type: corev1.PodReady, + Status: corev1.ConditionTrue, + }, + { + Type: corev1.ContainersReady, + Status: corev1.ConditionTrue, + }, + }, }, } @@ -97,6 +107,10 @@ func sandboxSetup() { mockDocker.OnContainerWaitMatch(ctx, mock.Anything, container.WaitConditionNotRunning).Return(bodyStatus, errCh) } +func dummyReader() io.ReadCloser { + return io.NopCloser(strings.NewReader("")) +} + func TestStartFunc(t *testing.T) { defaultImagePrefix := "dind" exposedPorts, portBindings, _ := docker.GetSandboxPorts() @@ -117,7 +131,7 @@ func TestStartFunc(t *testing.T) { t.Run("Successfully run demo cluster", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -127,7 +141,7 @@ func TestStartFunc(t *testing.T) { }).Return(nil, nil) mockDocker.OnVolumeList(ctx, filters.NewArgs(filters.KeyValuePair{Key: mock.Anything, Value: mock.Anything})).Return(volume.VolumeListOKBody{Volumes: []*types.Volume{}}, nil) mockDocker.OnVolumeCreate(ctx, volume.VolumeCreateBody{Name: mock.Anything}).Return(types.Volume{}, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.Nil(t, err) }) t.Run("Successfully exit when demo cluster exist", func(t *testing.T) { @@ -140,7 +154,7 @@ func TestStartFunc(t *testing.T) { }, }, }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -158,14 +172,14 @@ func TestStartFunc(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.Nil(t, err) }) t.Run("Successfully run demo cluster with abs path of source code", func(t *testing.T) { @@ -174,21 +188,21 @@ func TestStartFunc(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, Timestamps: true, Follow: true, }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.Nil(t, err) }) t.Run("Successfully run demo cluster with specific version", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, ShowStdout: true, @@ -202,7 +216,7 @@ func TestStartFunc(t *testing.T) { }, nil, nil) githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.Nil(t, err) }) t.Run("Failed run demo cluster with wrong version", func(t *testing.T) { @@ -210,14 +224,14 @@ func TestStartFunc(t *testing.T) { mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) sandboxCmdConfig.DefaultConfig.Image = "" githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("non-existent-tag")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) assert.Equal(t, "non-existent-tag", err.Error()) }) t.Run("Error in pulling image", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, fmt.Errorf("failed to pull")) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), fmt.Errorf("failed to pull")) sandboxCmdConfig.DefaultConfig.Image = "" tag := "v0.15.0" githubMock.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ @@ -225,7 +239,7 @@ func TestStartFunc(t *testing.T) { }, nil, nil) githubMock.OnGetCommitSHA1Match(mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return("dummySha", nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) assert.Equal(t, "failed to pull", err.Error()) }) @@ -239,7 +253,7 @@ func TestStartFunc(t *testing.T) { }, }, }, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerRemove(ctx, mock.Anything, types.ContainerRemoveOptions{Force: true}).Return(fmt.Errorf("failed to remove container")) _, err := startSandbox(ctx, mockDocker, githubMock, strings.NewReader("y"), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) @@ -248,16 +262,16 @@ func TestStartFunc(t *testing.T) { t.Run("Error in start container", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(fmt.Errorf("failed to run container")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) assert.Equal(t, "failed to run container", err.Error()) }) t.Run("Error in reading logs", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -265,14 +279,14 @@ func TestStartFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, fmt.Errorf("failed to get container logs")) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), sandboxCmdConfig.DefaultConfig, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) assert.Equal(t, "failed to get container logs", err.Error()) }) t.Run("Error in list container", func(t *testing.T) { sandboxSetup() mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, @@ -280,7 +294,7 @@ func TestStartFunc(t *testing.T) { Timestamps: true, Follow: true, }).Return(nil, nil) - _, err := startSandbox(ctx, mockDocker, githubMock, os.Stdin, config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) + _, err := startSandbox(ctx, mockDocker, githubMock, dummyReader(), config, sandboxImageName, defaultImagePrefix, exposedPorts, portBindings, util.SandBoxConsolePort) assert.NotNil(t, err) assert.Equal(t, "failed to list containers", err.Error()) }) @@ -300,7 +314,7 @@ func TestStartFunc(t *testing.T) { } sandboxSetup() mockDocker.OnContainerList(ctx, types.ContainerListOptions{All: true}).Return([]types.Container{}, nil) - mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(mock.Anything, mock.Anything, mock.Anything).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) stringReader := strings.NewReader(docker.SuccessMessage) reader := ioutil.NopCloser(stringReader) @@ -317,7 +331,7 @@ func TestStartFunc(t *testing.T) { k8s.ContextMgr = mockK8sContextMgr ghutil.Client = githubMock mockK8sContextMgr.OnCheckConfig().Return(nil) - mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) + mockK8sContextMgr.OnCopyContextMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) err = StartSandboxCluster(context.Background(), []string{}, config) assert.Nil(t, err) }) @@ -327,7 +341,7 @@ func TestStartFunc(t *testing.T) { sandboxSetup() docker.Client = mockDocker mockDocker.OnContainerListMatch(mock.Anything, mock.Anything).Return([]types.Container{}, fmt.Errorf("failed to list containers")) - mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(os.Stdin, nil) + mockDocker.OnImagePullMatch(ctx, mock.Anything, types.ImagePullOptions{}).Return(dummyReader(), nil) mockDocker.OnContainerStart(ctx, "Hello", types.ContainerStartOptions{}).Return(nil) mockDocker.OnContainerLogsMatch(ctx, mock.Anything, types.ContainerLogsOptions{ ShowStderr: true, From 955392349019719dc72c85e8ba0e63779fd7291a Mon Sep 17 00:00:00 2001 From: Jeev B Date: Wed, 1 Nov 2023 13:15:21 -0700 Subject: [PATCH 331/356] Increase sleep seconds when waiting for sandbox (#442) Signed-off-by: Jeev B --- flytectl/.github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/.github/workflows/checks.yml b/flytectl/.github/workflows/checks.yml index 2c036ba3a4..211a7aab5b 100644 --- a/flytectl/.github/workflows/checks.yml +++ b/flytectl/.github/workflows/checks.yml @@ -85,7 +85,7 @@ jobs: # to serve requests when the above command exits successfully. # Fixed in: https://github.com/flyteorg/flyte/pull/4348 # TODO (jeev): Remove this when ^ is released. - sleep 5 + sleep 10 - name: Setup flytectl config run: bin/flytectl config init - name: Register cookbook From 936a24ac69eae542d353c3d5e7b11e4021f4a0dd Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:46:42 -0700 Subject: [PATCH 332/356] #minor Updated Sandbox config, with automated data configuration (#440) * Updated Sandbox config, with automated data configuration Signed-off-by: Ketan Umare * updated password Signed-off-by: Ketan Umare * updated Signed-off-by: Ketan Umare * Fix tests Signed-off-by: Eduardo Apolinario * Add unit-test Signed-off-by: Eduardo Apolinario --------- Signed-off-by: Ketan Umare Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/pkg/configutil/configutil.go | 29 +++++++++++---- flytectl/pkg/configutil/configutil_test.go | 41 +++++++++++++++++----- flytectl/pkg/sandbox/start.go | 6 +++- 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/flytectl/pkg/configutil/configutil.go b/flytectl/pkg/configutil/configutil.go index 5dcde9bd69..3727b09084 100644 --- a/flytectl/pkg/configutil/configutil.go +++ b/flytectl/pkg/configutil/configutil.go @@ -11,21 +11,36 @@ const ( AdminConfigTemplate = `admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: {{.Host}} - authType: Pkce insecure: {{.Insecure}} {{- if .Console}} console: endpoint: {{.Console}} {{- end}} -logger: - show-source: true - level: 0` +{{- if .DataConfig}} +# This is not a needed configuration, only useful if you want to explore the data in sandbox. For non sandbox, please +# do not use this configuration, instead prefer to use aws, gcs, azure sessions. Flytekit, should use fsspec to +# auto select the right backend to pull data as long as the sessions are configured. For Sandbox, this is special, as +# minio is s3 compatible and we ship with minio in sandbox. +storage: + connection: + endpoint: {{.DataConfig.Endpoint}} + access-key: {{.DataConfig.AccessKey}} + secret-key: {{.DataConfig.SecretKey}} +{{- end}} +` ) +type DataConfig struct { + Endpoint string + AccessKey string + SecretKey string +} + type ConfigTemplateSpec struct { - Host string - Insecure bool - Console string + Host string + Insecure bool + Console string + DataConfig *DataConfig } var ( diff --git a/flytectl/pkg/configutil/configutil_test.go b/flytectl/pkg/configutil/configutil_test.go index 6a689366e0..a8f8bf4d96 100644 --- a/flytectl/pkg/configutil/configutil_test.go +++ b/flytectl/pkg/configutil/configutil_test.go @@ -25,11 +25,8 @@ func TestSetupConfig(t *testing.T) { expected := `admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 - authType: Pkce insecure: true -logger: - show-source: true - level: 0` +` assert.Equal(t, expected, string(configBytes)) file, err = os.Create(file.Name()) @@ -46,13 +43,41 @@ logger: expected = `admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///admin.example.com - authType: Pkce insecure: true console: endpoint: https://console.example.com -logger: - show-source: true - level: 0` +` + assert.Equal(t, expected, string(configBytes)) + + file, err = os.Create(file.Name()) + require.NoError(t, err) + templateValue = ConfigTemplateSpec{ + Host: "dns:///admin.example.com", + Insecure: true, + DataConfig: &DataConfig{ + Endpoint: "http://localhost:9000", + AccessKey: "my-access-key", + SecretKey: "my-secret-key", + }, + } + err = SetupConfig(file.Name(), AdminConfigTemplate, templateValue) + assert.NoError(t, err) + configBytes, err = ioutil.ReadAll(file) + assert.NoError(t, err) + expected = `admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///admin.example.com + insecure: true +# This is not a needed configuration, only useful if you want to explore the data in sandbox. For non sandbox, please +# do not use this configuration, instead prefer to use aws, gcs, azure sessions. Flytekit, should use fsspec to +# auto select the right backend to pull data as long as the sessions are configured. For Sandbox, this is special, as +# minio is s3 compatible and we ship with minio in sandbox. +storage: + connection: + endpoint: http://localhost:9000 + access-key: my-access-key + secret-key: my-secret-key +` assert.Equal(t, expected, string(configBytes)) // Cleanup diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index 9c9c73fb06..ee7b8bc275 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -177,7 +177,11 @@ func startSandbox(ctx context.Context, cli docker.Docker, g github.GHRepoService templateValues := configutil.ConfigTemplateSpec{ Host: "localhost:30080", Insecure: true, - Console: fmt.Sprintf("http://localhost:%d", consolePort), + DataConfig: &configutil.DataConfig{ + Endpoint: "http://localhost:30002", + AccessKey: "minio", + SecretKey: "miniostorage", + }, } if err := configutil.SetupConfig(configutil.FlytectlConfig, configutil.GetTemplate(), templateValues); err != nil { return nil, err From c96ee7f18b8306a5cd8d625df6bacae0274f9cfc Mon Sep 17 00:00:00 2001 From: SophieTech88 <141538510+SophieTech88@users.noreply.github.com> Date: Sat, 11 Nov 2023 14:17:17 -0600 Subject: [PATCH 333/356] Update --force in doc (#443) --- flytectl/docs/source/gen/flytectl_update_launchplan.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index a3292dc8a0..7fafd67129 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -35,6 +35,7 @@ Options --activate activate launchplan. --archive disable the launch plan schedule (if it has an active schedule associated with it). --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for launchplan --version string version of the launchplan to be fetched. @@ -52,7 +53,7 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") From 23228584aaf7f80cc889cd08a1ab7aeb6c1e2ed5 Mon Sep 17 00:00:00 2001 From: Ruslan Gainanov Date: Tue, 21 Nov 2023 09:45:54 +0300 Subject: [PATCH 334/356] Include default MinIO credentials (#410) #3458 Include default MinIO credentials in sandbox console readout Signed-off-by: Ruslan Gainanov --- flytectl/pkg/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/pkg/util/util.go b/flytectl/pkg/util/util.go index 146ba6ec50..1eaa28ea4a 100644 --- a/flytectl/pkg/util/util.go +++ b/flytectl/pkg/util/util.go @@ -93,7 +93,7 @@ func PrintDemoStartMessage(flyteConsolePort int, kubeconfigLocation string, dryR fmt.Printf(" export KUBECONFIG=%v \n", kubeconfig) } fmt.Printf("%s Flyte sandbox ships with a Docker registry. Tag and push custom workflow images to localhost:30000\n", emoji.Whale) - fmt.Printf("%s The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console\n", emoji.OpenFileFolder) + fmt.Printf("%s The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console, default credentials - username: minio, password: miniostorage\n", emoji.OpenFileFolder) } // PrintSandboxStartMessage will print sandbox start success message From ca54f09eaadbb7989076ff1f312a93579d16a669 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Wed, 6 Dec 2023 18:15:32 -0800 Subject: [PATCH 335/356] Update help string for 'update task-meta' and 'update launchplan-meta' (#445) --- flytectl/cmd/update/launch_plan_meta.go | 6 +++--- flytectl/cmd/update/task_meta.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index 2170ba22f1..b0567dc49d 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the launch plan: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" Archiving launch plan named entity is not supported and would throw an error: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive Activating launch plan named entity would be a noop: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate Usage ` diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index cb9e3e927a..302ceb801f 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -16,17 +16,17 @@ const ( Update the description on the task: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" Archiving task named entity is not supported and would throw an error: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --archive + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --archive Activating task named entity would be a noop since archiving is not possible: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --activate + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --activate Usage ` From f727ff6440fb9873c42863a7220cd457469b43cf Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Tue, 12 Dec 2023 14:03:13 -0500 Subject: [PATCH 336/356] add monodocs build to ci in flytectl (#446) * add monodocs build to ci in flytectl Signed-off-by: Niels Bantilan * update name Signed-off-by: Niels Bantilan --------- Signed-off-by: Niels Bantilan --- flytectl/.github/workflows/monodocs_build.yml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 flytectl/.github/workflows/monodocs_build.yml diff --git a/flytectl/.github/workflows/monodocs_build.yml b/flytectl/.github/workflows/monodocs_build.yml new file mode 100644 index 0000000000..14818500b7 --- /dev/null +++ b/flytectl/.github/workflows/monodocs_build.yml @@ -0,0 +1,52 @@ +name: Monodocs Build + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + docs: + name: Monodocs Build + runs-on: ubuntu-latest + steps: + - name: Fetch flytectl code + uses: actions/checkout@v4 + with: + path: "${{ github.workspace }}/flytectl" + - name: Fetch flyte code + uses: actions/checkout@v4 + with: + repository: flyteorg/flyte + path: "${{ github.workspace }}/flyte" + - uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: 3.9 + - shell: bash -el {0} + working-directory: ${{ github.workspace }}/flyte + run: | + conda install -c conda-forge conda-lock + conda-lock install -n monodocs-env monodocs-environment.lock.yaml + - shell: bash -el {0} + run: | + conda activate monodocs-env + conda info + conda list + conda config --show-sources + conda config --show + printenv | sort + - name: Build the documentation + working-directory: ${{ github.workspace }}/flyte + shell: bash -el {0} + env: + FLYTECTL_LOCAL_PATH: ${{ github.workspace }}/flytectl + run: | + conda activate monodocs-env + make docs From 8913631e76502dc983a9d7a27400017f3aaebf79 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Thu, 14 Dec 2023 13:06:57 -0500 Subject: [PATCH 337/356] Monodocs dev build (#448) * update monodocs build ci with dev build, increase verbosity Signed-off-by: Niels Bantilan * remove env var Signed-off-by: Niels Bantilan --------- Signed-off-by: Niels Bantilan --- flytectl/.github/workflows/monodocs_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/.github/workflows/monodocs_build.yml b/flytectl/.github/workflows/monodocs_build.yml index 14818500b7..c0befb62d7 100644 --- a/flytectl/.github/workflows/monodocs_build.yml +++ b/flytectl/.github/workflows/monodocs_build.yml @@ -46,7 +46,7 @@ jobs: working-directory: ${{ github.workspace }}/flyte shell: bash -el {0} env: - FLYTECTL_LOCAL_PATH: ${{ github.workspace }}/flytectl + FLYTECTL_LOCAL_PATH: ${{ github.workspace }}/flytectl run: | conda activate monodocs-env - make docs + make -C docs clean html SPHINXOPTS="-W -vvv" From e38e7a0a69cefa2f3cf9ab71e81ba94e5cc872e3 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:32:32 -0800 Subject: [PATCH 338/356] fix: doc-requirements.txt to reduce vulnerabilities (#416) The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047 Co-authored-by: snyk-bot --- flytectl/doc-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index 65b0f20ea3..bb24f24d0d 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -13,7 +13,7 @@ beautifulsoup4==4.10.0 # furo # sphinx-code-include # sphinx-material -certifi==2021.10.8 +certifi==2023.7.22 # via requests charset-normalizer==2.0.10 # via requests From a9a45b3576852a640a53438491a31235236d0336 Mon Sep 17 00:00:00 2001 From: Soundarya Alagesan Date: Tue, 26 Dec 2023 20:19:20 +0530 Subject: [PATCH 339/356] Feature: update launchplan --archive to --deactivate (#449) * Rename --archive to --deactivate in update launchplan Signed-off-by: asoundarya96 * Rename --archive to --deactivate in update launchplan Signed-off-by: asoundarya96 * Keep --archive as deprecated flag Signed-off-by: asoundarya96 * make generate Signed-off-by: Eduardo Apolinario --------- Signed-off-by: asoundarya96 Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/clierrors/errors.go | 3 ++- .../subcommand/launchplan/updateconfig.go | 11 +++++---- .../launchplan/updateconfig_flags.go | 3 ++- .../launchplan/updateconfig_flags_test.go | 22 +++++++++++++---- flytectl/cmd/update/launch_plan.go | 23 ++++++++++++++---- flytectl/cmd/update/launch_plan_test.go | 24 ++++++++++++++++--- .../source/gen/flytectl_update_launchplan.rst | 9 +++---- 7 files changed, 72 insertions(+), 23 deletions(-) mode change 100755 => 100644 flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index 05ab96cb00..48fecd3f2f 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -1,7 +1,8 @@ package clierrors var ( - ErrInvalidStateUpdate = "invalid state passed. Specify either activate or archive\n" + ErrInvalidStateUpdate = "invalid state passed. Specify either activate or archive\n" + ErrInvalidBothStateUpdate = "invalid state passed. Specify either activate or deactivate\n" ErrProjectNotPassed = "project id wasn't passed\n" // #nosec ErrProjectIDBothPassed = "both project and id are passed\n" diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go index 36e353c2e1..5d3b113dac 100644 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig.go @@ -7,9 +7,10 @@ var ( // Config type UpdateConfig struct { - Archive bool `json:"archive" pflag:",disable the launch plan schedule (if it has an active schedule associated with it)."` - Activate bool `json:"activate" pflag:",activate launchplan."` - DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` - Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` - Version string `json:"version" pflag:",version of the launchplan to be fetched."` + Activate bool `json:"activate" pflag:",activate launchplan."` + Archive bool `json:"archive" pflag:",(Deprecated) disable the launch plan schedule (if it has an active schedule associated with it)."` + Deactivate bool `json:"deactivate" pflag:",disable the launch plan schedule (if it has an active schedule associated with it)."` + DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."` + Force bool `json:"force" pflag:",do not ask for an acknowledgement during updates."` + Version string `json:"version" pflag:",version of the launchplan to be fetched."` } diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go old mode 100755 new mode 100644 index 4a9cad23ba..b71224e72b --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags.go @@ -50,8 +50,9 @@ func (UpdateConfig) mustMarshalJSON(v json.Marshaler) string { // flags is json-name.json-sub-name... etc. func (cfg UpdateConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags := pflag.NewFlagSet("UpdateConfig", pflag.ExitOnError) - cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "disable the launch plan schedule (if it has an active schedule associated with it).") cmdFlags.BoolVar(&UConfig.Activate, fmt.Sprintf("%v%v", prefix, "activate"), UConfig.Activate, "activate launchplan.") + cmdFlags.BoolVar(&UConfig.Archive, fmt.Sprintf("%v%v", prefix, "archive"), UConfig.Archive, "(Deprecated) disable the launch plan schedule (if it has an active schedule associated with it).") + cmdFlags.BoolVar(&UConfig.Deactivate, fmt.Sprintf("%v%v", prefix, "deactivate"), UConfig.Deactivate, "disable the launch plan schedule (if it has an active schedule associated with it).") cmdFlags.BoolVar(&UConfig.DryRun, fmt.Sprintf("%v%v", prefix, "dryRun"), UConfig.DryRun, "execute command without making any modifications.") cmdFlags.BoolVar(&UConfig.Force, fmt.Sprintf("%v%v", prefix, "force"), UConfig.Force, "do not ask for an acknowledgement during updates.") cmdFlags.StringVar(&UConfig.Version, fmt.Sprintf("%v%v", prefix, "version"), UConfig.Version, "version of the launchplan to be fetched.") diff --git a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go index e9acca7bbe..fc58e7ac8f 100755 --- a/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go +++ b/flytectl/cmd/config/subcommand/launchplan/updateconfig_flags_test.go @@ -99,6 +99,20 @@ func TestUpdateConfig_SetFlags(t *testing.T) { cmdFlags := actual.GetPFlagSet("") assert.True(t, cmdFlags.HasFlags()) + t.Run("Test_activate", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("activate", testValue) + if vBool, err := cmdFlags.GetBool("activate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) t.Run("Test_archive", func(t *testing.T) { t.Run("Override", func(t *testing.T) { @@ -113,14 +127,14 @@ func TestUpdateConfig_SetFlags(t *testing.T) { } }) }) - t.Run("Test_activate", func(t *testing.T) { + t.Run("Test_deactivate", func(t *testing.T) { t.Run("Override", func(t *testing.T) { testValue := "1" - cmdFlags.Set("activate", testValue) - if vBool, err := cmdFlags.GetBool("activate"); err == nil { - testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Activate) + cmdFlags.Set("deactivate", testValue) + if vBool, err := cmdFlags.GetBool("deactivate"); err == nil { + testDecodeJson_UpdateConfig(t, fmt.Sprintf("%v", vBool), &actual.Deactivate) } else { assert.FailNow(t, err.Error()) diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 28b7c6270b..b20ad48040 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -7,6 +7,7 @@ import ( "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flytectl/clierrors" "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/launchplan" @@ -22,10 +23,10 @@ Activates a ` + "`launch plan `__" + ` a launch plan which deschedules any scheduled job associated with it: +Deactivates a ` + "`launch plan `__" + ` which deschedules any scheduled job associated with it: :: - flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --deactivate Usage ` @@ -45,14 +46,22 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont activate := launchplan.UConfig.Activate archive := launchplan.UConfig.Archive - if activate == archive && archive { - return fmt.Errorf(clierrors.ErrInvalidStateUpdate) + + var deactivate bool + if archive { + deprecatedCommandWarning(ctx, "archive", "deactivate") + deactivate = true + } else { + deactivate = launchplan.UConfig.Deactivate + } + if activate == deactivate && deactivate { + return fmt.Errorf(clierrors.ErrInvalidBothStateUpdate) } var newState admin.LaunchPlanState if activate { newState = admin.LaunchPlanState_ACTIVE - } else if archive { + } else if deactivate { newState = admin.LaunchPlanState_INACTIVE } @@ -106,3 +115,7 @@ func updateLPFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandCont return nil } + +func deprecatedCommandWarning(ctx context.Context, oldCommand string, newCommand string) { + logger.Warningf(ctx, "--%v is deprecated, Please use --%v", oldCommand, newCommand) +} diff --git a/flytectl/cmd/update/launch_plan_test.go b/flytectl/cmd/update/launch_plan_test.go index f9c3d7dc8a..4bc92ef095 100644 --- a/flytectl/cmd/update/launch_plan_test.go +++ b/flytectl/cmd/update/launch_plan_test.go @@ -53,14 +53,32 @@ func TestLaunchPlanCanBeArchived(t *testing.T) { }) } -func TestLaunchPlanCannotBeActivatedAndArchivedAtTheSameTime(t *testing.T) { +func TestLaunchPlanCanBeDeactivated(t *testing.T) { + testLaunchPlanUpdate( + /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { + launchplan.Closure.State = admin.LaunchPlanState_ACTIVE + config.Deactivate = true + config.Force = true + }, + /* assert */ func(s *testutils.TestStruct, err error) { + assert.Nil(t, err) + s.MockAdminClient.AssertCalled( + t, "UpdateLaunchPlan", s.Ctx, + mock.MatchedBy( + func(r *admin.LaunchPlanUpdateRequest) bool { + return r.State == admin.LaunchPlanState_INACTIVE + })) + }) +} + +func TestLaunchPlanCannotBeActivatedAndDeactivatedAtTheSameTime(t *testing.T) { testLaunchPlanUpdate( /* setup */ func(s *testutils.TestStruct, config *launchplan.UpdateConfig, launchplan *admin.LaunchPlan) { config.Activate = true - config.Archive = true + config.Deactivate = true }, /* assert */ func(s *testutils.TestStruct, err error) { - assert.ErrorContains(t, err, "Specify either activate or archive") + assert.ErrorContains(t, err, "Specify either activate or deactivate") s.MockAdminClient.AssertNotCalled(t, "UpdateLaunchPlan", mock.Anything, mock.Anything) }) } diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 7fafd67129..b6de8566a5 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -15,10 +15,10 @@ Activates a `launch plan `__ a launch plan which deschedules any scheduled job associated with it: +Deactivates a `launch plan `__ which deschedules any scheduled job associated with it: :: - flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --archive + flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --deactivate Usage @@ -33,7 +33,7 @@ Options :: --activate activate launchplan. - --archive disable the launch plan schedule (if it has an active schedule associated with it). + --deactivate disable the launch plan schedule (if it has an active schedule associated with it). --dryRun execute command without making any modifications. --force do not ask for an acknowledgement during updates. -h, --help help for launchplan @@ -53,11 +53,12 @@ Options inherited from parent commands --admin.clientSecretEnvVar string Environment variable containing the client secret --admin.clientSecretLocation string File containing the client secret (default "/etc/secrets/client_secret") --admin.command strings Command for external authentication token generation - --admin.defaultServiceConfig string + --admin.defaultServiceConfig string --admin.deviceFlowConfig.pollInterval string amount of time the device flow would poll the token endpoint if auth server doesn't return a polling interval. Okta and google IDP do return an interval' (default "5s") --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") From 9322c069d7d04bfc359607e6390f80f7d80108f5 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Mon, 8 Jan 2024 16:31:52 -0500 Subject: [PATCH 340/356] add monodocs redirect banner (#452) Signed-off-by: Niels Bantilan --- flytectl/docs/source/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 9d28a8f1d3..d9f9045f68 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -93,15 +93,24 @@ html_logo = "flyte_circle_gradient_1_4x4.png" html_favicon = "flyte_circle_gradient_1_4x4.png" +announcement = """ +📢 This is the old documentation for Flyte. +Please visit the new documentation here. +""" + html_theme_options = { "light_css_variables": { "color-brand-primary": "#4300c9", "color-brand-content": "#4300c9", + "color-announcement-background": "#FEE7B8", + "color-announcement-text": "#535353", }, "dark_css_variables": { "color-brand-primary": "#9D68E4", "color-brand-content": "#9D68E4", + "color-announcement-background": "#493100", }, + "announcement": announcement, } html_context = { From 06765aabccbe6ab7c4c5f7dfdef1677c8b783896 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Thu, 11 Jan 2024 12:03:56 -0500 Subject: [PATCH 341/356] add flytectl docs redirects to monodocs (#454) Signed-off-by: Niels Bantilan --- flytectl/doc-requirements.in | 1 + flytectl/doc-requirements.txt | 70 ++++++++++--------- flytectl/docs/source/conf.py | 10 +++ flytectl/docs/source/gen/flytectl.rst | 1 + flytectl/docs/source/gen/flytectl_compile.rst | 1 + .../docs/source/gen/flytectl_completion.rst | 1 + flytectl/docs/source/gen/flytectl_config.rst | 2 + .../source/gen/flytectl_config_discover.rst | 1 + .../docs/source/gen/flytectl_config_docs.rst | 5 +- .../docs/source/gen/flytectl_config_init.rst | 2 + .../source/gen/flytectl_config_validate.rst | 1 + flytectl/docs/source/gen/flytectl_create.rst | 1 + .../source/gen/flytectl_create_execution.rst | 34 +++++++-- .../source/gen/flytectl_create_project.rst | 2 + flytectl/docs/source/gen/flytectl_delete.rst | 1 + ...ectl_delete_cluster-resource-attribute.rst | 1 + ...lytectl_delete_execution-cluster-label.rst | 1 + ...tectl_delete_execution-queue-attribute.rst | 1 + .../source/gen/flytectl_delete_execution.rst | 1 + .../gen/flytectl_delete_plugin-override.rst | 1 + ...lytectl_delete_task-resource-attribute.rst | 1 + ...tectl_delete_workflow-execution-config.rst | 1 + flytectl/docs/source/gen/flytectl_demo.rst | 1 + .../docs/source/gen/flytectl_demo_exec.rst | 1 + .../docs/source/gen/flytectl_demo_reload.rst | 3 + .../docs/source/gen/flytectl_demo_start.rst | 3 + .../docs/source/gen/flytectl_demo_status.rst | 1 + .../source/gen/flytectl_demo_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_get.rst | 1 + ...lytectl_get_cluster-resource-attribute.rst | 1 + .../flytectl_get_execution-cluster-label.rst | 1 + ...flytectl_get_execution-queue-attribute.rst | 1 + .../source/gen/flytectl_get_execution.rst | 1 + .../source/gen/flytectl_get_launchplan.rst | 1 + .../gen/flytectl_get_plugin-override.rst | 1 + .../docs/source/gen/flytectl_get_project.rst | 1 + .../flytectl_get_task-resource-attribute.rst | 1 + .../docs/source/gen/flytectl_get_task.rst | 1 + ...flytectl_get_workflow-execution-config.rst | 1 + .../docs/source/gen/flytectl_get_workflow.rst | 1 + .../docs/source/gen/flytectl_register.rst | 1 + .../source/gen/flytectl_register_examples.rst | 1 + .../source/gen/flytectl_register_files.rst | 1 + flytectl/docs/source/gen/flytectl_sandbox.rst | 1 + .../docs/source/gen/flytectl_sandbox_exec.rst | 1 + .../source/gen/flytectl_sandbox_start.rst | 3 + .../source/gen/flytectl_sandbox_status.rst | 1 + .../source/gen/flytectl_sandbox_teardown.rst | 1 + flytectl/docs/source/gen/flytectl_update.rst | 8 +-- ...ectl_update_cluster-resource-attribute.rst | 2 + ...lytectl_update_execution-cluster-label.rst | 2 + ...tectl_update_execution-queue-attribute.rst | 2 + .../source/gen/flytectl_update_execution.rst | 2 + .../gen/flytectl_update_launchplan-meta.rst | 8 ++- .../source/gen/flytectl_update_launchplan.rst | 1 + .../gen/flytectl_update_plugin-override.rst | 2 + .../source/gen/flytectl_update_project.rst | 8 ++- .../source/gen/flytectl_update_task-meta.rst | 8 ++- ...lytectl_update_task-resource-attribute.rst | 2 + ...tectl_update_workflow-execution-config.rst | 2 + .../gen/flytectl_update_workflow-meta.rst | 2 + flytectl/docs/source/gen/flytectl_upgrade.rst | 1 + flytectl/docs/source/gen/flytectl_version.rst | 1 + 63 files changed, 167 insertions(+), 56 deletions(-) diff --git a/flytectl/doc-requirements.in b/flytectl/doc-requirements.in index 0bdd65dd01..38b976f528 100644 --- a/flytectl/doc-requirements.in +++ b/flytectl/doc-requirements.in @@ -7,3 +7,4 @@ sphinx-copybutton sphinx_fontawesome sphinxcontrib-youtube sphinx-panels +sphinx-reredirects diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index bb24f24d0d..bc5dfeb5df 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -1,21 +1,21 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # pip-compile doc-requirements.in # -alabaster==0.7.12 +alabaster==0.7.16 # via sphinx -babel==2.9.1 +babel==2.14.0 # via sphinx -beautifulsoup4==4.10.0 +beautifulsoup4==4.12.2 # via # furo # sphinx-code-include # sphinx-material -certifi==2023.7.22 +certifi==2023.11.17 # via requests -charset-normalizer==2.0.10 +charset-normalizer==3.3.2 # via requests css-html-js-minify==2.5.5 # via sphinx-material @@ -25,64 +25,69 @@ docutils==0.17.1 # sphinx-panels furo @ git+https://github.com/flyteorg/furo@main # via -r doc-requirements.in -idna==3.3 +idna==3.6 # via requests -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx -jinja2==3.0.3 +jinja2==3.1.3 # via sphinx -lxml==4.9.1 +lxml==5.1.0 # via sphinx-material -markupsafe==2.0.1 +markupsafe==2.1.3 # via jinja2 -packaging==21.3 +packaging==23.2 # via sphinx -pygments==2.11.2 +pygments==2.17.2 # via + # furo # sphinx # sphinx-prompt -pyparsing==3.0.6 - # via packaging -python-slugify[unidecode]==5.0.2 +python-slugify[unidecode]==8.0.1 # via sphinx-material -pytz==2021.3 - # via babel -requests==2.27.1 - # via sphinx +requests==2.31.0 + # via + # sphinx + # sphinxcontrib-youtube six==1.16.0 # via sphinx-code-include snowballstemmer==2.2.0 # via sphinx -soupsieve==2.3.1 +soupsieve==2.5 # via beautifulsoup4 -sphinx==4.3.2 +sphinx==4.5.0 # via # -r doc-requirements.in # furo + # sphinx-basic-ng # sphinx-code-include # sphinx-copybutton # sphinx-fontawesome # sphinx-material # sphinx-panels # sphinx-prompt - # sphinxcontrib-yt + # sphinx-reredirects + # sphinxcontrib-youtube +sphinx-basic-ng==1.0.0b2 + # via furo sphinx-code-include==1.1.1 # via -r doc-requirements.in -sphinx-copybutton==0.4.0 +sphinx-copybutton==0.5.2 # via -r doc-requirements.in sphinx-fontawesome==0.0.6 # via -r doc-requirements.in -sphinx-material==0.0.35 +sphinx-material==0.0.36 # via -r doc-requirements.in sphinx-panels==0.6.0 # via -r doc-requirements.in sphinx-prompt==1.5.0 # via -r doc-requirements.in -sphinxcontrib-applehelp==1.0.2 +sphinx-reredirects==0.1.3 + # via -r doc-requirements.in +sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx @@ -90,14 +95,11 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sphinxcontrib-youtube==1.2.0 +sphinxcontrib-youtube==1.3.0 # via -r doc-requirements.in text-unidecode==1.3 # via python-slugify -unidecode==1.3.2 +unidecode==1.3.8 # via python-slugify -urllib3==1.26.7 +urllib3==2.1.0 # via requests - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index d9f9045f68..905b3067eb 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -44,6 +44,7 @@ "sphinx_copybutton", "sphinx_fontawesome", "sphinxcontrib.youtube", + "sphinx_reredirects", "sphinx_panels", ] @@ -201,3 +202,12 @@ "flyteidl": ("https://docs.flyte.org/projects/flyteidl/en/latest", None), "flyte": ("https://docs.flyte.org/en/latest", None), } + +if int(os.environ.get("ENABLE_SPHINX_REDIRECTS", 0)): + # Redirects to the new docs site + redirects = { + "verbs.html": "https://docs.flyte.org/en/latest/flytectl/verbs.html", + "nouns.html": "https://docs.flyte.org/en/latest/flytectl/nouns.html", + "gen/*": "https://docs.flyte.org/en/latest/flytectl/$source.html", + "contribute.html": "https://docs.flyte.org/en/latest/flytectl/contribute.html", + } diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index c30c126970..9109b234bd 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -30,6 +30,7 @@ Options --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_compile.rst b/flytectl/docs/source/gen/flytectl_compile.rst index 0e1785242f..6ce685df5b 100644 --- a/flytectl/docs/source/gen/flytectl_compile.rst +++ b/flytectl/docs/source/gen/flytectl_compile.rst @@ -56,6 +56,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index aedf9442c5..5671d3453b 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -103,6 +103,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 60e755e686..be0ef53651 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -18,6 +18,7 @@ Options --file stringArray Passes the config file to load. If empty, it'll first search for the config file path then, if found, will load config from there. + --force Force to overwrite the default config file without confirmation -h, --help help for config Options inherited from parent commands @@ -39,6 +40,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index 092093e469..6727e00da8 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -41,6 +41,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_config_docs.rst b/flytectl/docs/source/gen/flytectl_config_docs.rst index b6c9cb869e..06d0969e83 100644 --- a/flytectl/docs/source/gen/flytectl_config_docs.rst +++ b/flytectl/docs/source/gen/flytectl_config_docs.rst @@ -3,13 +3,13 @@ flytectl config docs -------------------- -Generate configuration documetation in rst format +Generate configuration documentation in rst format Synopsis ~~~~~~~~ -Generate configuration documetation in rst format +Generate configuration documentation in rst format :: @@ -41,6 +41,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index 07cd65bd1c..ea2a964d67 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -53,6 +53,7 @@ Options :: --console string Endpoint of console, if different than flyte admin + --force Force to overwrite the default config file without confirmation -h, --help help for init --host string Endpoint of flyte admin --insecure Enable insecure mode @@ -76,6 +77,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index 9d9491da9b..41a5511b11 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -43,6 +43,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 7a28ca97aa..8827dc20e9 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 4fdbf89b93..a51529dcbd 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -56,20 +56,39 @@ The generated spec file can be modified to change the input values, as shown bel task: core.control_flow.merge_sort.merge version: "v2" -3. Run the execution by passing the generated YAML file. +3. [Optional] Update the envs for the execution, if needed. +The generated spec file can be modified to change the envs values, as shown below: + +.. code-block:: yaml + + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + envs: + foo: bar + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.control_flow.merge_sort.merge + version: "v2" + +4. Run the execution by passing the generated YAML file. The file can then be passed through the command line. It is worth noting that the source's and target's project and domain can be different. :: flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -4. To relaunch an execution, pass the current execution ID as follows: +5. To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development -5. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: +6. To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: @@ -77,7 +96,7 @@ It is worth noting that the source's and target's project and domain can be diff See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. -6. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, +7. You can create executions idempotently by naming them. This is also a way to *name* an execution for discovery. Note, an execution id has to be unique within a project domain. So if the *name* matches an existing execution an already exists exceptioj will be raised. @@ -85,7 +104,7 @@ will be raised. flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development custom_name -7. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. +8. Generic/Struct/Dataclass/JSON types are supported for execution in a similar manner. The following is an example of how generic data can be specified while creating the execution. :: @@ -105,7 +124,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -8. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": +9. Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -129,7 +148,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -9. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor +10. If you have configured a plugin that implements github.com/flyteorg/flyteadmin/pkg/workflowengine/interfaces/WorkflowExecutor that supports cluster pools, then when creating a new execution, you can assign it to a specific cluster pool: :: @@ -180,6 +199,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index a8e6b370aa..16dedc8af4 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -54,6 +54,7 @@ Options --description string description for the project specified as argument. --dryRun execute command without making any modifications. --file string file for the project definition. + --force Skips asking for an acknowledgement during an update operation. Only used in update -h, --help help for project --id string id for the project specified as argument. --labels stringToString labels for the project specified as argument. (default []) @@ -78,6 +79,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index d338a8618b..485404ade9 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index a8ae5e39ac..5264b9046e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -77,6 +77,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index 92ac7a3b5b..3314aba82e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -74,6 +74,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 74c8504ed8..57bd1c6d04 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -78,6 +78,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 71577b850b..c336e66abf 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -85,6 +85,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index e2e2d6f426..58e26d4457 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -79,6 +79,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 8e3c540585..f523a7717e 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -79,6 +79,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index 6376d8d73c..389dad93be 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -77,6 +77,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo.rst b/flytectl/docs/source/gen/flytectl_demo.rst index 904d048264..2176c7b95d 100644 --- a/flytectl/docs/source/gen/flytectl_demo.rst +++ b/flytectl/docs/source/gen/flytectl_demo.rst @@ -60,6 +60,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo_exec.rst b/flytectl/docs/source/gen/flytectl_demo_exec.rst index 6b360fbe38..8a0c9c4861 100644 --- a/flytectl/docs/source/gen/flytectl_demo_exec.rst +++ b/flytectl/docs/source/gen/flytectl_demo_exec.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo_reload.rst b/flytectl/docs/source/gen/flytectl_demo_reload.rst index 09bd874661..9fccacec1c 100644 --- a/flytectl/docs/source/gen/flytectl_demo_reload.rst +++ b/flytectl/docs/source/gen/flytectl_demo_reload.rst @@ -30,8 +30,10 @@ Options :: --dev Optional. Only start minio and postgres in the sandbox. + --disable-agent Optional. Disable the agent service. --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + --force Optional. Forcefully delete existing sandbox cluster if it exists. -h, --help help for reload --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --imagePullOptions.platform string Forces a specific platform's image to be pulled.' @@ -60,6 +62,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo_start.rst b/flytectl/docs/source/gen/flytectl_demo_start.rst index ef1ae5ad90..89ed10f585 100644 --- a/flytectl/docs/source/gen/flytectl_demo_start.rst +++ b/flytectl/docs/source/gen/flytectl_demo_start.rst @@ -91,8 +91,10 @@ Options :: --dev Optional. Only start minio and postgres in the sandbox. + --disable-agent Optional. Disable the agent service. --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + --force Optional. Forcefully delete existing sandbox cluster if it exists. -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --imagePullOptions.platform string Forces a specific platform's image to be pulled.' @@ -121,6 +123,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo_status.rst b/flytectl/docs/source/gen/flytectl_demo_status.rst index 296de34f75..3d21334326 100644 --- a/flytectl/docs/source/gen/flytectl_demo_status.rst +++ b/flytectl/docs/source/gen/flytectl_demo_status.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_demo_teardown.rst b/flytectl/docs/source/gen/flytectl_demo_teardown.rst index 544f9179bc..42d9c22630 100644 --- a/flytectl/docs/source/gen/flytectl_demo_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_demo_teardown.rst @@ -50,6 +50,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index 1710535505..f48ddf3ef8 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index e047a87002..b242491a88 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -85,6 +85,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index ed79e39e96..9147ff0736 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -84,6 +84,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index 3be1a9b9a7..71929da6ae 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -87,6 +87,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index e460dbecde..38543aad68 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -117,6 +117,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 12df2747f5..e340b86636 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -152,6 +152,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index 21d69b8bc6..bf9437513c 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -106,6 +106,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index b3136ffe85..07d25570a2 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -89,6 +89,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 095c0c5983..2b2f369afe 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -89,6 +89,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 8f54e8f280..383645221e 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -133,6 +133,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index 9850f7bf6f..8c332c3ada 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -146,6 +146,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 7584c765c4..f446fdeb9f 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -117,6 +117,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 234c1210da..745dffa9b6 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -42,6 +42,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index 438b6feff4..9c681548d1 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -68,6 +68,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 633984e3ba..512b1166b6 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -145,6 +145,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index 87f1cda5ee..8cc08fc448 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -66,6 +66,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index 1bfbb38742..f1f3c44600 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 13d0af086a..048b92b24e 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -86,8 +86,10 @@ Options :: --dev Optional. Only start minio and postgres in the sandbox. + --disable-agent Optional. Disable the agent service. --dryRun Optional. Only print the docker commands to bring up flyte sandbox/demo container.This will still call github api's to get the latest flyte release to use' --env strings Optional. Provide Env variable in key=value format which can be passed to sandbox container. + --force Optional. Forcefully delete existing sandbox cluster if it exists. -h, --help help for start --image string Optional. Provide a fully qualified path to a Flyte compliant docker image. --imagePullOptions.platform string Forces a specific platform's image to be pulled.' @@ -116,6 +118,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 0eb7f19c07..abce271578 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 7a52bc5dff..c57c64b61a 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -49,6 +49,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 0dfd304ab4..27949e6145 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -10,12 +10,11 @@ Synopsis -Currently, this command only provides subcommands to update project. -Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -Update Flyte resources; if a project: +Provides subcommands to update Flyte resources, such as tasks, workflows, launch plans, executions, and projects. +Update Flyte resource; e.g., to activate a project: :: - flytectl update project -p flytesnacks --activateProject + flytectl update project -p flytesnacks --activate Options @@ -44,6 +43,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index 21f631bb28..55ea963f65 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -63,6 +63,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for cluster-resource-attribute Options inherited from parent commands @@ -84,6 +85,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 67cfd6f911..0117986578 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -56,6 +56,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for execution-cluster-label Options inherited from parent commands @@ -77,6 +78,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index 5b6f11e623..5b3f080c03 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -67,6 +67,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for execution-queue-attribute Options inherited from parent commands @@ -88,6 +89,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 3dd6920c9d..373b625c9a 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -36,6 +36,7 @@ Options --activate activate execution. --archive archive execution. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for execution Options inherited from parent commands @@ -57,6 +58,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index a6fc2310c6..8e28b948c3 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the launch plan: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --description "Mergesort example" Archiving launch plan named entity is not supported and would throw an error: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --archive Activating launch plan named entity would be a noop: :: - flytectl update launchplan -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate + flytectl update launchplan-meta -p flytesnacks -d development core.advanced.merge_sort.merge_sort --activate Usage @@ -41,6 +41,7 @@ Options --archive archive named entity. --description string description of the named entity. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for launchplan-meta Options inherited from parent commands @@ -62,6 +63,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index b6de8566a5..203e060a4e 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -33,6 +33,7 @@ Options :: --activate activate launchplan. + --archive (Deprecated) disable the launch plan schedule (if it has an active schedule associated with it). --deactivate disable the launch plan schedule (if it has an active schedule associated with it). --dryRun execute command without making any modifications. --force do not ask for an acknowledgement during updates. diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index ebfb2fb165..95f744f85e 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -69,6 +69,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for plugin-override Options inherited from parent commands @@ -90,6 +91,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 051de3238b..c4eeb48abe 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -26,7 +26,7 @@ Incorrect usage when passing both archive and activate: :: - flytectl update project -p flytesnacks --archiveProject --activate + flytectl update project -p flytesnacks --archive --activate Incorrect usage when passing unknown-project: @@ -38,7 +38,7 @@ project ID is required flag :: - flytectl update project unknown-project --archiveProject + flytectl update project unknown-project --archive Update projects.(project/projects can be used interchangeably in these commands) @@ -49,7 +49,7 @@ Update projects.(project/projects can be used interchangeably in these commands) Update a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project --file project.yaml + flytectl update project --file project.yaml .. code-block:: yaml @@ -93,6 +93,7 @@ Options --description string description for the project specified as argument. --dryRun execute command without making any modifications. --file string file for the project definition. + --force Skips asking for an acknowledgement during an update operation. Only used in update -h, --help help for project --id string id for the project specified as argument. --labels stringToString labels for the project specified as argument. (default []) @@ -117,6 +118,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 6470e908fd..61312af748 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -13,17 +13,17 @@ Synopsis Update the description on the task: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --description "Merge sort example" Archiving task named entity is not supported and would throw an error: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --archive + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --archive Activating task named entity would be a noop since archiving is not possible: :: - flytectl update task -d development -p flytesnacks core.control_flow.merge_sort.merge --activate + flytectl update task-meta -d development -p flytesnacks core.control_flow.merge_sort.merge --activate Usage @@ -41,6 +41,7 @@ Options --archive archive named entity. --description string description of the named entity. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for task-meta Options inherited from parent commands @@ -62,6 +63,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index 91512cacd4..0ef4798aab 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -69,6 +69,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for task-resource-attribute Options inherited from parent commands @@ -90,6 +91,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 9d8bc3188a..b025df8a57 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -65,6 +65,7 @@ Options --attrFile string attribute file name to be used for updating attribute for the resource type. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for workflow-execution-config Options inherited from parent commands @@ -86,6 +87,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 6765578ab8..aadccfabd2 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -41,6 +41,7 @@ Options --archive archive named entity. --description string description of the named entity. --dryRun execute command without making any modifications. + --force do not ask for an acknowledgement during updates. -h, --help help for workflow-meta Options inherited from parent commands @@ -62,6 +63,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index b44645a51d..a0bcedda9d 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -57,6 +57,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index ce0ea2e057..220a375741 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -46,6 +46,7 @@ Options inherited from parent commands --admin.deviceFlowConfig.refreshTime string grace period from the token expiry after which it would refresh the token. (default "5m0s") --admin.deviceFlowConfig.timeout string amount of time the device flow should complete or else it will be cancelled. (default "10m0s") --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.httpProxyURL string OPTIONAL: HTTP Proxy to be used for OAuth requests. --admin.insecure Use insecure connection. --admin.insecureSkipVerify InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. Caution : shouldn't be use for production usecases' --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") From d30de343a83a3e414b0b952a50982c7d0652145c Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Thu, 11 Jan 2024 12:39:16 -0500 Subject: [PATCH 342/356] add monodocs index page in flytectl (#453) Signed-off-by: Niels Bantilan --- flytectl/docs/source/conf.py | 8 ++- flytectl/docs/source/docs_index.rst | 12 ++++ flytectl/docs/source/index.rst | 5 ++ flytectl/docs/source/overview.rst | 105 ++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 flytectl/docs/source/docs_index.rst create mode 100644 flytectl/docs/source/overview.rst diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index 905b3067eb..eb5edae7e5 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -78,7 +78,13 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [u"_build", "Thumbs.db", ".DS_Store"] +exclude_patterns = [ + u"_build", + "Thumbs.db", + ".DS_Store", + "docs_index.rst", + "overview.rst", +] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "tango" diff --git a/flytectl/docs/source/docs_index.rst b/flytectl/docs/source/docs_index.rst new file mode 100644 index 0000000000..f57f41f530 --- /dev/null +++ b/flytectl/docs/source/docs_index.rst @@ -0,0 +1,12 @@ +********************** +FlyteCTL API Reference +********************** + +.. toctree:: + :maxdepth: 2 + + Overview + CLI Entrypoint + verbs + nouns + contribute diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 66dc363f8d..0445ec929c 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -1,3 +1,8 @@ +.. DO NOT EDIT THIS FILE! + This file is the index for the old flytekit documentation. The index for the monodocs is now + at `docs_index.rst`. Please edit that file if you want to add new entries to the flytekit api + documentation. + .. flytectl doc #################################################### diff --git a/flytectl/docs/source/overview.rst b/flytectl/docs/source/overview.rst new file mode 100644 index 0000000000..fb533372fd --- /dev/null +++ b/flytectl/docs/source/overview.rst @@ -0,0 +1,105 @@ +#################################################### +Flytectl: The Official Flyte Command-line Interface +#################################################### + +Overview +========= +This video will take you on a tour of Flytectl - how to install and configure it, as well as how to use the Verbs and Nouns sections on the left hand side menu. Detailed information can be found in the sections below the video. + +.. youtube:: cV8ezYnBANE + + +Installation +============ + +Flytectl is a Golang binary that can be installed on any platform supported by Golang. + +.. tabbed:: OSX + + .. prompt:: bash $ + + brew install flyteorg/homebrew-tap/flytectl + + *Upgrade* existing installation using the following command: + + .. prompt:: bash $ + + flytectl upgrade + +.. tabbed:: Other Operating systems + + .. prompt:: bash $ + + curl -sL https://ctl.flyte.org/install | bash + + *Upgrade* existing installation using the following command: + + .. prompt:: bash $ + + flytectl upgrade + +**Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: + +.. prompt:: bash $ + + flytectl version + +Configuration +============= + +Flytectl allows you to communicate with FlyteAdmin using a YAML file or by passing every configuration value +on the command-line. The following configuration can be used for the setup: + +Basic Configuration +-------------------- + +The full list of available configurable options can be found by running ``flytectl --help``, or `here `__. + +.. NOTE:: + + Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in the config file. + +.. tabbed:: Local Flyte Sandbox + + Automatically configured for you by ``flytectl sandbox`` command. + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). + authType: Pkce # authType: Pkce # if using authentication or just drop this. + +.. tabbed:: AWS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + +.. tabbed:: GCS Configuration + + .. code-block:: yaml + + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + +.. tabbed:: Others + + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + + Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. + This file is typically searched in: + + * ``$HOME/.flyte`` + * currDir from where you run flytectl + * ``/etc/flyte/config`` + + You can also pass the file name in the command line using ``--config ``. From f5473de479ee105e3e34791a12e4a5976bcb8493 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Thu, 11 Jan 2024 13:06:33 -0500 Subject: [PATCH 343/356] fix dependencies (#455) Signed-off-by: Niels Bantilan --- flytectl/doc-requirements.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index bc5dfeb5df..dd99b08872 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile doc-requirements.in # -alabaster==0.7.16 +alabaster==0.7.13 # via sphinx babel==2.14.0 # via sphinx @@ -29,6 +29,8 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx +importlib-metadata==7.0.1 + # via sphinx jinja2==3.1.3 # via sphinx lxml==5.1.0 @@ -44,6 +46,8 @@ pygments==2.17.2 # sphinx-prompt python-slugify[unidecode]==8.0.1 # via sphinx-material +pytz==2023.3.post1 + # via babel requests==2.31.0 # via # sphinx @@ -103,3 +107,5 @@ unidecode==1.3.8 # via python-slugify urllib3==2.1.0 # via requests +zipp==3.17.0 + # via importlib-metadata From dda6460af737bf3295ea1b94c452ddb4f6859507 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 17 Jan 2024 17:06:15 -0800 Subject: [PATCH 344/356] Hydrate failure node (#456) Signed-off-by: Kevin Su --- flytectl/cmd/register/files_test.go | 25 ++++++++++++++++++ flytectl/cmd/register/register.go | 4 +-- flytectl/cmd/register/register_util.go | 10 +++++++ .../cmd/register/testdata/failure-node.tgz | Bin 0 -> 1671 bytes 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 flytectl/cmd/register/testdata/failure-node.tgz diff --git a/flytectl/cmd/register/files_test.go b/flytectl/cmd/register/files_test.go index 0eec77014b..129d4f49c1 100644 --- a/flytectl/cmd/register/files_test.go +++ b/flytectl/cmd/register/files_test.go @@ -60,6 +60,31 @@ func TestRegisterFromFiles(t *testing.T) { err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) assert.Nil(t, err) }) + t.Run("Register a workflow with a failure node", func(t *testing.T) { + s := setup() + testScope := promutils.NewTestScope() + labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey) + registerFilesSetup() + rconfig.DefaultFilesConfig.Archive = true + rconfig.DefaultFilesConfig.OutputLocationPrefix = s3Output + rconfig.DefaultFilesConfig.DeprecatedSourceUploadPath = s3Output + mockStorage, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, testScope.NewSubScope("flytectl")) + assert.Nil(t, err) + Client = mockStorage + + args := []string{"testdata/failure-node.tgz"} + s.MockAdminClient.OnCreateTaskMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateWorkflowMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnCreateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + s.MockAdminClient.OnUpdateLaunchPlanMatch(mock.Anything, mock.Anything).Return(nil, nil) + mockDataProxy := s.MockClient.DataProxyClient().(*mocks.DataProxyServiceClient) + mockDataProxy.OnCreateUploadLocationMatch(s.Ctx, mock.Anything).Return(&service.CreateUploadLocationResponse{}, nil) + + err = registerFromFilesFunc(s.Ctx, args, s.CmdCtx) + assert.Nil(t, err) + }) t.Run("Failed fast registration while uploading the codebase", func(t *testing.T) { s := setup() registerFilesSetup() diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index a04c99bd19..7caa1e9bbd 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -10,7 +10,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( registerCmdShort = "Registers tasks, workflows, and launch plans from a list of generated serialized files." - registercmdLong = ` + registerCmdLong = ` Take input files as serialized versions of the tasks/workflows/launchplans and register them with FlyteAdmin. Currently, these input files are protobuf files generated as output from Flytekit serialize. Project and Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. @@ -23,7 +23,7 @@ func RemoteRegisterCommand() *cobra.Command { registerCmd := &cobra.Command{ Use: "register", Short: registerCmdShort, - Long: registercmdLong, + Long: registerCmdLong, } registerResourcesFuncs := map[string]cmdcore.CommandEntry{ "files": {CmdFunc: registerFromFilesFunc, Aliases: []string{"file"}, PFlagProvider: rconfig.DefaultFilesConfig, diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index e4dd4355ad..5234e86697 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -491,6 +491,11 @@ func hydrateSpec(message proto.Message, uploadLocation storage.DataReference, co return err } } + if workflowSpec.Template.GetFailureNode() != nil { + if err := hydrateNode(workflowSpec.Template.GetFailureNode(), config.Version, config.Force); err != nil { + return err + } + } hydrateIdentifier(workflowSpec.Template.Id, config.Version, config.Force) for _, subWorkflow := range workflowSpec.SubWorkflows { for _, Noderef := range subWorkflow.Nodes { @@ -498,6 +503,11 @@ func hydrateSpec(message proto.Message, uploadLocation storage.DataReference, co return err } } + if subWorkflow.GetFailureNode() != nil { + if err := hydrateNode(subWorkflow.GetFailureNode(), config.Version, config.Force); err != nil { + return err + } + } hydrateIdentifier(subWorkflow.Id, config.Version, config.Force) } case *admin.TaskSpec: diff --git a/flytectl/cmd/register/testdata/failure-node.tgz b/flytectl/cmd/register/testdata/failure-node.tgz new file mode 100644 index 0000000000000000000000000000000000000000..7ac63e86fe471e5f3407ec113b20d18325b6746f GIT binary patch literal 1671 zcmV;226*`&iwFp_WvFEW|8;I@Z*DDNX>w+4Z+9(lVPk7yXJsyQXL9!-vcA|?#I*uq=JZEE?9FhZaX8!M-IYSv6#>SV=y~C%%tBF9FijlsZ z^_LKCzTNKar-V_a6c3dYtlJ5_K;B--rZKm;7dH097t|q^#Z9+dHe6y+v&@kKw(z!* z!aaJO+Bxp;j&1e(Ivecs)U+%{Y-ZbLum4lWREk!b{eM^NH~b0ZWU+dE@!r1y<3Ei5 zL*u_w<`%I`82>Y1gjDLyqfqGL(A#S_g;Dn!&2Atneyb*oY9PE&RH{wcOGHqiMtkc$ z`@e0PXN~`q*nDvOXVfHIDUvk%e@4fD^kxa^YOeHo;#Q!owvWP{mam6iXBTsAL(OUT zs6mOrw=AP3_Nn`5o7r{3YIfZ=YD~Ur`HneW>7Tc*l-AHkNJC4$wZvdo&U2j0O+xtbSxCxzE!VR`6TbmWOVaC*)y zU9awl>TbK$@a46=a0h=P3%}j>Z15hkyu9ZAJ161WvV3pfSEsv9OCwn$(P=gJMS#mE z55TCl0%7!@WyR};txC1!hhD=MfqeRPuiFeOy;oB?JvFcEc(u1n-)q&nO@Z;*FB@Nt z3ie(HzCQTkONzFH^J@hdG=cws{}!A7%8m{GeBLqrRp$E@m~VcVFCS9iJm5dzzfAL=X<7vMFBAO7Ch^}vyTiME0yCaf#?#xc)bLCdIsbBukK zge8?tc{KnG(Eqpk&qwv2g8rwX|IS$bcNt9oWkdgYoc{Ca>p!adSb)Km`#5+Cx-)aR=R0)tA>0`leT}uY;f!AfzfUSLA6eUuaQ5 z$QPQge4)XH0`o|~f53m2lK*V#x-Rfv7WmJanE%}ro?q#Q%{-*Fdy(A@ZY89KZlh$1OCeb|JjrHuhZQ+xOfIo z-29(yIm7dRmMjkZmj?g+RY3REe5n}M3bg#q96mFNyYzFE7^I=0HDl`vzIj|;#Vh^N zjGlMJVUHX0K0PzjIOA}OfC_JjL7pPE|591m-#iFr~ z;Zbt%o?gln=s)QH82xu#w+#B91^sv8^`B2!{}~y{|Ft*+{ZB>z@2iCb;{QWJNKo)S zboW^4ZliY*VHI6PSMYN5m?2FF{D08@xz&GH4%21kfc|Ge|J}*?zjXTRf2eKIk^Emu zK>t(G|NjaJl6&cFz5nkb?|&67N070u5CwmHeBJBl8bVlYH~j5RH$2#Upd|v8D4@VT zSU`a%4k)m>2`Fd~`N?$TXP)>E)_={6|D19BM>&J#-`U{5avc9nfBhF5`Tnm%90&L> z75@t=i=|1fUB_y03tluXutmcsX6Y-@D=H?03kN&o*$68~Wk z16a@)0O&vH{}}yuDg6FJHuRsy>Hm!UfB63Iy!ihtk^j%Y{|Emc^nWq*pR+On{m+E{ zvqbBEFSH6IR{w1_y#CjQ@4uy_|9|Jux)k>Z$y$Mw>{&$t;H$BVtN$?nKQsLwJO9re zZiD=1LjQSE{pZuue?~_2AN>Dx^nYFY|4GIFr*onL!~;P8!T-O6{=Y@#s0;v*1^qWC z$NzZ>>pv)WM(6+G_g~V{|2IkI|2fS6C!YWRu|NNR3$4BbL(!U*ky~s&*3JP`n~Da( z8Zh8L;J>N!pWK1~P$u}#isQc-<$nPGrNe*m`5!z{{s)hb_k0WS9xyO4FfcGMFfcGM RFfg#0*#9H`En)zm006%ic47bk literal 0 HcmV?d00001 From 71e61f18c6c7cafa316beb9bb6345e2e5541bd47 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Mon, 22 Jan 2024 13:42:30 -0800 Subject: [PATCH 345/356] Remove dependency on unsupported `k8s.io/kubernetes` library (#457) --- flytectl/go.mod | 1 - flytectl/go.sum | 2 -- flytectl/pkg/sandbox/start.go | 12 ++++++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/flytectl/go.mod b/flytectl/go.mod index 4beaf4d5a6..700445c958 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -43,7 +43,6 @@ require ( k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 - k8s.io/kubernetes v1.13.0 sigs.k8s.io/yaml v1.3.0 ) diff --git a/flytectl/go.sum b/flytectl/go.sum index 00892a2001..88b64583da 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -1429,8 +1429,6 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/flytectl/pkg/sandbox/start.go b/flytectl/pkg/sandbox/start.go index ee7b8bc275..7ba775f702 100644 --- a/flytectl/pkg/sandbox/start.go +++ b/flytectl/pkg/sandbox/start.go @@ -28,7 +28,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/clientcmd" - "k8s.io/kubernetes/pkg/api/v1/pod" ) const ( @@ -103,12 +102,13 @@ func WatchFlyteDeployment(ctx context.Context, appsClient corev1.CoreV1Interface ready = 0 if total != 0 { for _, v := range pods.Items { - // TODO (jeev): We should really be using - // `IsContainersReadyConditionTrue`, but that is not available until - // version v1.22.11. We are on v1.13.0 for some reason. - if pod.IsPodReadyConditionTrue(v.Status) { - ready++ + for _, condition := range v.Status.Conditions { + if string(condition.Type) == string(corev1api.PodReady) && condition.Status == corev1api.ConditionTrue { + ready++ + break + } } + if len(v.Status.Conditions) > 0 { table.Append([]string{v.GetName(), string(v.Status.Phase), v.GetNamespace()}) } From 9feeb8e8a8a01f9c1b9bcb845a8a1e452e31b03a Mon Sep 17 00:00:00 2001 From: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:24:44 +0100 Subject: [PATCH 346/356] Update docs for `flytectl update project` (#458) * project-archive-with-yaml Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> * fix syntax Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> * fix list Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> * update generated Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> --------- Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> --- flytectl/cmd/update/project.go | 79 +++++++++++-------- flytectl/docs/source/gen/flytectl_update.rst | 2 +- .../source/gen/flytectl_update_project.rst | 79 +++++++++++-------- 3 files changed, 91 insertions(+), 69 deletions(-) diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index 215f2393d8..bf883af450 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -15,71 +15,82 @@ import ( ) const ( - projectShort = "Update project resources" + projectShort = "Update the characteristics of a project" projectLong = ` -Update the project according to the flags passed. Allows you to archive or activate a project. -Activate project flytesnacks: -:: - - flytectl update project -p flytesnacks --activate +Allows you to update the characteristics of a project, including its name, labels and description. +Also allows you to archive or activate (unarchive) a project. -Archive project flytesnacks: +To archive a project, specify its ID with the *p* flag and add the *archive* flag: :: - flytectl update project -p flytesnacks --archive + flytectl update project -p my-project-id --archive -Incorrect usage when passing both archive and activate: +To activate (unarchive) an archived project, specify its ID with the *p* flag and add the *activate* flag: :: - flytectl update project -p flytesnacks --archive --activate + flytectl update project -p my-project-id --activate -Incorrect usage when passing unknown-project: +To update the characteristics of a project using flags, specify the project ID with the *p* flag and the flags corresponding to the characteristics you want to update: :: - flytectl update project unknown-project --archive + flytectl update project -p my-project-id --description "A wonderful project" --labels app=my-app -project ID is required flag +To update the characteristics of a project using a *yaml* file, define the file with the project ID desired updates: + +.. code-block:: yaml + + id: "my-project-id" + name: "my-project-name" + labels: + values: + app: my-app + description: "A wonderful project" -:: - flytectl update project unknown-project --archive +(Note: The name parameter must not contain whitespace) -Update projects.(project/projects can be used interchangeably in these commands) +Then, pass it in using the *file* flag: :: - flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl update project --file project.yaml -Update a project by definition file. Note: The name shouldn't contain any whitespace characters. -:: +To archive or activate (unarchive) a project using a *yaml* file: + +* Add a state field, with a value of *0* for activated (unarchived) or *1* for archived, at the top level of the the *yaml* file. - flytectl update project --file project.yaml +* Add the *archive* flag to the command. + +For example, to archive a project: .. code-block:: yaml - id: "project-unique-id" - name: "Name" - labels: - values: - app: flyte - description: "Some description for the project" + # update.yaml + id: "my-project-id" + state: 1 -Update a project state by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project --file project.yaml --archive + $ uctl update project --file update.yaml --archive + +And to activate (unarchive) the same project: .. code-block:: yaml - id: "project-unique-id" - name: "Name" - labels: - values: - app: flyte - description: "Some description for the project" + # update.yaml + id: "my-project-id" + state: 0 + +:: + + $ uctl update project --file update.yaml --archive + +Note that when using a *yaml* file, the *activate* flag is not used. +Instead, the *archive* flag is used for *both* archiving and activating (unarchiving) with the difference being in the *state* field of the *yaml* file. +Furthermore, the *state* field only takes effect if the *archive* flag is present in the command. Usage ` diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index 27949e6145..ffc18b7101 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -104,7 +104,7 @@ SEE ALSO * :doc:`flytectl_update_launchplan` - Updates launch plan status * :doc:`flytectl_update_launchplan-meta` - Updates the launch plan metadata * :doc:`flytectl_update_plugin-override` - Update matchable resources of plugin overrides -* :doc:`flytectl_update_project` - Update project resources +* :doc:`flytectl_update_project` - Update the characteristics of a project * :doc:`flytectl_update_task-meta` - Update task metadata * :doc:`flytectl_update_task-resource-attribute` - Update matchable resources of task attributes * :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index c4eeb48abe..5d27380478 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -3,76 +3,87 @@ flytectl update project ----------------------- -Update project resources +Update the characteristics of a project Synopsis ~~~~~~~~ -Update the project according to the flags passed. Allows you to archive or activate a project. -Activate project flytesnacks: -:: - - flytectl update project -p flytesnacks --activate +Allows you to update the characteristics of a project, including its name, labels and description. +Also allows you to archive or activate (unarchive) a project. -Archive project flytesnacks: +To archive a project, specify its ID with the *p* flag and add the *archive* flag: :: - flytectl update project -p flytesnacks --archive + flytectl update project -p my-project-id --archive -Incorrect usage when passing both archive and activate: +To activate (unarchive) an archived project, specify its ID with the *p* flag and add the *activate* flag: :: - flytectl update project -p flytesnacks --archive --activate + flytectl update project -p my-project-id --activate -Incorrect usage when passing unknown-project: +To update the characteristics of a project using flags, specify the project ID with the *p* flag and the flags corresponding to the characteristics you want to update: :: - flytectl update project unknown-project --archive + flytectl update project -p my-project-id --description "A wonderful project" --labels app=my-app -project ID is required flag +To update the characteristics of a project using a *yaml* file, define the file with the project ID desired updates: + +.. code-block:: yaml + + id: "my-project-id" + name: "my-project-name" + labels: + values: + app: my-app + description: "A wonderful project" -:: - flytectl update project unknown-project --archive +(Note: The name parameter must not contain whitespace) -Update projects.(project/projects can be used interchangeably in these commands) +Then, pass it in using the *file* flag: :: - flytectl update project -p flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl update project --file project.yaml -Update a project by definition file. Note: The name shouldn't contain any whitespace characters. -:: +To archive or activate (unarchive) a project using a *yaml* file: + +* Add a state field, with a value of *0* for activated (unarchived) or *1* for archived, at the top level of the the *yaml* file. - flytectl update project --file project.yaml +* Add the *archive* flag to the command. + +For example, to archive a project: .. code-block:: yaml - id: "project-unique-id" - name: "Name" - labels: - values: - app: flyte - description: "Some description for the project" + # update.yaml + id: "my-project-id" + state: 1 -Update a project state by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl update project --file project.yaml --archive + $ uctl update project --file update.yaml --archive + +And to activate (unarchive) the same project: .. code-block:: yaml - id: "project-unique-id" - name: "Name" - labels: - values: - app: flyte - description: "Some description for the project" + # update.yaml + id: "my-project-id" + state: 0 + +:: + + $ uctl update project --file update.yaml --archive + +Note that when using a *yaml* file, the *activate* flag is not used. +Instead, the *archive* flag is used for *both* archiving and activating (unarchiving) with the difference being in the *state* field of the *yaml* file. +Furthermore, the *state* field only takes effect if the *archive* flag is present in the command. Usage From b725a65b645c94da81856a37b5b14d78f3492630 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Mon, 5 Feb 2024 17:05:22 -0500 Subject: [PATCH 347/356] install latest flyteidl with monodocs build (#459) Signed-off-by: Niels Bantilan --- flytectl/.github/workflows/monodocs_build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flytectl/.github/workflows/monodocs_build.yml b/flytectl/.github/workflows/monodocs_build.yml index c0befb62d7..a2610915fb 100644 --- a/flytectl/.github/workflows/monodocs_build.yml +++ b/flytectl/.github/workflows/monodocs_build.yml @@ -35,8 +35,10 @@ jobs: conda install -c conda-forge conda-lock conda-lock install -n monodocs-env monodocs-environment.lock.yaml - shell: bash -el {0} + working-directory: ${{ github.workspace }}/flyte run: | conda activate monodocs-env + pip install ./flyteidl conda info conda list conda config --show-sources From cff5a3d9bb2e81c9b5bbfb811304fbb7b72fba71 Mon Sep 17 00:00:00 2001 From: Guy Rapaport Date: Sat, 10 Feb 2024 06:09:23 +0200 Subject: [PATCH 348/356] Update typo nodID -> nodeID in execution.go, flytectl_get_execution.rst (#450) Signed-off-by: Guy Rapaport --- flytectl/cmd/get/execution.go | 2 +- flytectl/docs/source/gen/flytectl_get_execution.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 55f9d26b77..abb89631f2 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -82,7 +82,7 @@ Task execution view is available in YAML/JSON format too. The following example :: - flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -o yaml Usage ` diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 38543aad68..56ed2a6a70 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -75,7 +75,7 @@ Task execution view is available in YAML/JSON format too. The following example :: - flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodID n0 -o yaml + flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -o yaml Usage From 8362431a1e41c837fef7a113c549d6a255b26509 Mon Sep 17 00:00:00 2001 From: Jeongwon Song <46633758+jsong336@users.noreply.github.com> Date: Mon, 19 Feb 2024 23:55:27 -0500 Subject: [PATCH 349/356] Fix: Check for git authentication when GITHUB_TOKEN exists (#463) Signed-off-by: Jeongwon Song --- flytectl/pkg/github/githubutil.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flytectl/pkg/github/githubutil.go b/flytectl/pkg/github/githubutil.go index 2d72b67af7..680085370b 100644 --- a/flytectl/pkg/github/githubutil.go +++ b/flytectl/pkg/github/githubutil.go @@ -231,7 +231,12 @@ func GetGHRepoService() GHRepoService { gh = github.NewClient(oauth2.NewClient(context.Background(), oauth2.StaticTokenSource( &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")}, ))) - } else { + if _, err := ListReleases(flyte, gh.Repositories); err != nil { + logger.Warnf(context.Background(), "Found GITHUB_TOKEN but failed to fetch releases. Using empty http.Client: %s.", err) + gh = nil + } + } + if gh == nil { gh = github.NewClient(&http.Client{}) } return gh.Repositories From 007a4b1f6d03cf104bcbab712c96e591e0d2a084 Mon Sep 17 00:00:00 2001 From: Nikki Everett Date: Mon, 4 Mar 2024 09:21:10 -0600 Subject: [PATCH 350/356] update links for monodocs (#465) Signed-off-by: nikki everett --- flytectl/.goreleaser.yml | 2 +- flytectl/README.md | 2 +- flytectl/cmd/update/launch_plan.go | 4 ++-- flytectl/docs/source/conf.py | 2 +- flytectl/docs/source/gen/flytectl_update_launchplan.rst | 4 ++-- flytectl/docs/source/overview.rst | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flytectl/.goreleaser.yml b/flytectl/.goreleaser.yml index 018b9d48cb..15c88a7c5a 100644 --- a/flytectl/.goreleaser.yml +++ b/flytectl/.goreleaser.yml @@ -79,7 +79,7 @@ brews: # Your app's homepage. # Default is empty. - homepage: "https://docs.flyte.org/projects/flytectl" + homepage: "https://docs.flyte.org/en/latest/flytectl/docs_index.html" # Your app's description. # Default is empty. diff --git a/flytectl/README.md b/flytectl/README.md index b7676ec842..5a6e5fc26e 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -11,7 +11,7 @@

Documentation · - Contribution Guide + Contribution Guide

diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index b20ad48040..6d1e7661e2 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -18,12 +18,12 @@ import ( const ( updateLPShort = "Updates launch plan status" updateLPLong = ` -Activates a ` + "`launch plan `__" + ` which activates the scheduled job associated with it: +Activates a ` + "`launch plan `__" + ` which activates the scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate -Deactivates a ` + "`launch plan `__" + ` which deschedules any scheduled job associated with it: +Deactivates a ` + "`launch plan `__" + ` which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --deactivate diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index eb5edae7e5..2f473ff5b5 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -205,7 +205,7 @@ # -- Options for intersphinx ------------------------------------------------- # intersphinx configuration intersphinx_mapping = { - "flyteidl": ("https://docs.flyte.org/projects/flyteidl/en/latest", None), + "flyteidl": ("https://docs.flyte.org/en/latest/reference_flyteidl.html", None), "flyte": ("https://docs.flyte.org/en/latest", None), } diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index 203e060a4e..bb9992861d 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -10,12 +10,12 @@ Synopsis -Activates a `launch plan `__ which activates the scheduled job associated with it: +Activates a `launch plan `__ which activates the scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --activate -Deactivates a `launch plan `__ which deschedules any scheduled job associated with it: +Deactivates a `launch plan `__ which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytesnacks -d development core.control_flow.merge_sort.merge_sort --version v1 --deactivate diff --git a/flytectl/docs/source/overview.rst b/flytectl/docs/source/overview.rst index fb533372fd..08bb11a01c 100644 --- a/flytectl/docs/source/overview.rst +++ b/flytectl/docs/source/overview.rst @@ -53,7 +53,7 @@ on the command-line. The following configuration can be used for the setup: Basic Configuration -------------------- -The full list of available configurable options can be found by running ``flytectl --help``, or `here `__. +The full list of available configurable options can be found by running ``flytectl --help``, or `here `__. .. NOTE:: From 44c55f63df5b543d53328c81901457a24cb58cef Mon Sep 17 00:00:00 2001 From: Troy Chiu <114708546+troychiu@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:10:23 -0700 Subject: [PATCH 351/356] Update admin endpoint to use port 30080 in config.yaml (#467) Signed-off-by: troychiu --- flytectl/config.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/flytectl/config.yaml b/flytectl/config.yaml index c26a2e5aef..af21453aeb 100644 --- a/flytectl/config.yaml +++ b/flytectl/config.yaml @@ -1,6 +1,6 @@ admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///localhost:30081 + endpoint: dns:///localhost:30080 insecure: true authType: Pkce console: @@ -8,14 +8,3 @@ console: logger: show-source: true level: 0 -storage: - connection: - access-key: minio - auth-type: accesskey - disable-ssl: true - endpoint: http://localhost:30084 - region: us-east-1 - secret-key: miniostorage - type: minio - container: "my-s3-bucket" - enable-multicontainer: true From b03e86de079ff3fbce837500e41a7c3e13ac93e2 Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Thu, 11 Apr 2024 14:07:53 -0700 Subject: [PATCH 352/356] Fix get task resource attribute comment (#469) Signed-off-by: Yee Hing Tong --- flytectl/cmd/get/matchable_task_resource_attribute.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 63ec690666..cfc5f4c6d4 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -2,7 +2,6 @@ package get import ( "context" - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" @@ -44,7 +43,7 @@ Example: content of tra.yaml: :: - flytectl get task-resource-attribute --attrFile tra.yaml + flytectl get -p flytesnacks -d development task-resource-attribute --attrFile tra.yaml .. code-block:: yaml From de61bd0192acfda9cfa4cda4d6034ba00391d59a Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Sun, 21 Apr 2024 01:00:32 -0400 Subject: [PATCH 353/356] use sphinx-design directives instead of sphinx-panels (#471) Signed-off-by: cosmicBboy --- flytectl/docs/source/index.rst | 90 ++++++++++++++++--------------- flytectl/docs/source/overview.rst | 90 ++++++++++++++++--------------- 2 files changed, 94 insertions(+), 86 deletions(-) diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 0445ec929c..93ccc96622 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -21,29 +21,31 @@ Installation Flytectl is a Golang binary that can be installed on any platform supported by Golang. -.. tabbed:: OSX +.. tab-set:: - .. prompt:: bash $ + .. tab-item:: OSX - brew install flyteorg/homebrew-tap/flytectl + .. prompt:: bash $ - *Upgrade* existing installation using the following command: + brew install flyteorg/homebrew-tap/flytectl - .. prompt:: bash $ + *Upgrade* existing installation using the following command: - flytectl upgrade + .. prompt:: bash $ -.. tabbed:: Other Operating systems + flytectl upgrade - .. prompt:: bash $ + .. tab-item:: Other Operating systems - curl -sL https://ctl.flyte.org/install | bash + .. prompt:: bash $ - *Upgrade* existing installation using the following command: + curl -sL https://ctl.flyte.org/install | bash - .. prompt:: bash $ + *Upgrade* existing installation using the following command: - flytectl upgrade + .. prompt:: bash $ + + flytectl upgrade **Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: @@ -66,50 +68,52 @@ The full list of available configurable options can be found by running ``flytec Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in the config file. -.. tabbed:: Local Flyte Sandbox +.. tab-set:: + + .. tab-item:: Local Flyte Sandbox + + Automatically configured for you by ``flytectl sandbox`` command. - Automatically configured for you by ``flytectl sandbox`` command. + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). + authType: Pkce # authType: Pkce # if using authentication or just drop this. - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///localhost:30081 - insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). - authType: Pkce # authType: Pkce # if using authentication or just drop this. + .. tab-item:: AWS Configuration -.. tabbed:: AWS Configuration + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + .. tab-item:: GCS Configuration -.. tabbed:: GCS Configuration + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + .. tab-item:: Others -.. tabbed:: Others + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. - For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. + This file is typically searched in: - Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. - This file is typically searched in: + * ``$HOME/.flyte`` + * currDir from where you run flytectl + * ``/etc/flyte/config`` - * ``$HOME/.flyte`` - * currDir from where you run flytectl - * ``/etc/flyte/config`` - - You can also pass the file name in the command line using ``--config ``. + You can also pass the file name in the command line using ``--config ``. .. toctree:: diff --git a/flytectl/docs/source/overview.rst b/flytectl/docs/source/overview.rst index 08bb11a01c..aac4c99ee6 100644 --- a/flytectl/docs/source/overview.rst +++ b/flytectl/docs/source/overview.rst @@ -14,29 +14,31 @@ Installation Flytectl is a Golang binary that can be installed on any platform supported by Golang. -.. tabbed:: OSX +.. tab-set:: - .. prompt:: bash $ + .. tab-item:: OSX - brew install flyteorg/homebrew-tap/flytectl + .. prompt:: bash $ - *Upgrade* existing installation using the following command: + brew install flyteorg/homebrew-tap/flytectl - .. prompt:: bash $ + *Upgrade* existing installation using the following command: - flytectl upgrade + .. prompt:: bash $ -.. tabbed:: Other Operating systems + flytectl upgrade - .. prompt:: bash $ + .. tab-item:: Other Operating systems - curl -sL https://ctl.flyte.org/install | bash + .. prompt:: bash $ - *Upgrade* existing installation using the following command: + curl -sL https://ctl.flyte.org/install | bash - .. prompt:: bash $ + *Upgrade* existing installation using the following command: - flytectl upgrade + .. prompt:: bash $ + + flytectl upgrade **Test** if Flytectl is installed correctly (your Flytectl version should be > 0.2.0) using the following command: @@ -59,47 +61,49 @@ The full list of available configurable options can be found by running ``flytec Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in the config file. -.. tabbed:: Local Flyte Sandbox +.. tab-set:: + + .. tab-item:: Local Flyte Sandbox + + Automatically configured for you by ``flytectl sandbox`` command. - Automatically configured for you by ``flytectl sandbox`` command. + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:///localhost:30081 + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). + authType: Pkce # authType: Pkce # if using authentication or just drop this. - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:///localhost:30081 - insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). - authType: Pkce # authType: Pkce # if using authentication or just drop this. + .. tab-item:: AWS Configuration -.. tabbed:: AWS Configuration + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: true # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + .. tab-item:: GCS Configuration -.. tabbed:: GCS Configuration + .. code-block:: yaml - .. code-block:: yaml + admin: + # For GRPC endpoints you might want to use dns:///flyte.myexample.com + endpoint: dns:/// + authType: Pkce # authType: Pkce # if using authentication or just drop this. + insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) - admin: - # For GRPC endpoints you might want to use dns:///flyte.myexample.com - endpoint: dns:/// - authType: Pkce # authType: Pkce # if using authentication or just drop this. - insecure: false # insecure: True # Set to true if the endpoint isn't accessible through TLS/SSL connection (not recommended except on local sandbox deployment) + .. tab-item:: Others -.. tabbed:: Others + For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. - For other supported storage backends like Oracle, Azure, etc., refer to the configuration structure `here `__. + Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. + This file is typically searched in: - Place the config file in ``$HOME/.flyte`` directory with the name config.yaml. - This file is typically searched in: + * ``$HOME/.flyte`` + * currDir from where you run flytectl + * ``/etc/flyte/config`` - * ``$HOME/.flyte`` - * currDir from where you run flytectl - * ``/etc/flyte/config`` - - You can also pass the file name in the command line using ``--config ``. + You can also pass the file name in the command line using ``--config ``. From 8a8bbc05be3e918e6ac32849a2b86dce1b7f5a2c Mon Sep 17 00:00:00 2001 From: Brian Chen <50983601+zychen5186@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:24:13 -0700 Subject: [PATCH 354/356] Integrate Bubbletea Pagination into get execution (#473) * feat: add pagination for get execution (draft) Signed-off-by: zychen5186 fix: catches existing commands in os.Args Signed-off-by: zychen5186 fix: restore neccessary codes Signed-off-by: zychen5186 * feat: use -i to trigger bubbletea, add pagination for get execution Signed-off-by: zychen5186 * change dot to arabic paging format Signed-off-by: zychen5186 change dot to arabic paging format Signed-off-by: zychen5186 change var names Signed-off-by: zychen5186 fix: lint Signed-off-by: zychen5186 * reuse JSONToTable Signed-off-by: zychen5186 * reuse JSONToTable Signed-off-by: zychen5186 change := to var Signed-off-by: zychen5186 * keep original format when not using bubbletea Signed-off-by: zychen5186 * improve readability and no functionality is changed Signed-off-by: zychen5186 --------- Signed-off-by: zychen5186 --- flytectl/cmd/config/config.go | 7 +- flytectl/cmd/get/execution.go | 19 +++ .../get/matchable_task_resource_attribute.go | 1 + flytectl/cmd/register/files.go | 2 +- flytectl/cmd/root.go | 1 + flytectl/go.mod | 24 +++- flytectl/go.sum | 42 ++++++ .../pkg/bubbletea/bubbletea_pagination.go | 74 ++++++++++ .../bubbletea/bubbletea_pagination_util.go | 136 ++++++++++++++++++ flytectl/pkg/printer/printer.go | 13 +- flytectl/pkg/printer/printer_test.go | 3 +- 11 files changed, 306 insertions(+), 16 deletions(-) create mode 100644 flytectl/pkg/bubbletea/bubbletea_pagination.go create mode 100644 flytectl/pkg/bubbletea/bubbletea_pagination_util.go diff --git a/flytectl/cmd/config/config.go b/flytectl/cmd/config/config.go index 8bf5cc986b..76b4b7c880 100644 --- a/flytectl/cmd/config/config.go +++ b/flytectl/cmd/config/config.go @@ -19,9 +19,10 @@ var ( // Config hold configration for flytectl flag type Config struct { - Project string `json:"project" pflag:",Specifies the project to work on."` - Domain string `json:"domain" pflag:",Specifies the domain to work on."` - Output string `json:"output" pflag:",Specifies the output type."` + Project string `json:"project" pflag:",Specifies the project to work on."` + Domain string `json:"domain" pflag:",Specifies the domain to work on."` + Output string `json:"output" pflag:",Specifies the output type."` + Interactive bool `json:"interactive" pflag:",Set this to trigger bubbletea interface."` } // OutputFormat will return output formate diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index abb89631f2..da597c5187 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -9,6 +9,9 @@ import ( "github.com/flyteorg/flytectl/cmd/config" "github.com/flyteorg/flytectl/cmd/config/subcommand/execution" cmdCore "github.com/flyteorg/flytectl/cmd/core" + + "github.com/flyteorg/flytectl/pkg/bubbletea" + "github.com/flyteorg/flytectl/pkg/filters" "github.com/flyteorg/flytectl/pkg/printer" "github.com/golang/protobuf/proto" @@ -111,6 +114,16 @@ func ExecutionToProtoMessages(l []*admin.Execution) []proto.Message { return messages } +func getCallBack(ctx context.Context, cmdCtx cmdCore.CommandContext) bubbletea.DataCallback { + return func(filter filters.Filters) []proto.Message { + executionList, err := cmdCtx.AdminFetcherExt().ListExecution(ctx, config.GetConfig().Project, config.GetConfig().Domain, filter) + if err != nil { + return nil + } + return ExecutionToProtoMessages(executionList.Executions) + } +} + func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { adminPrinter := printer.Printer{} var executions []*admin.Execution @@ -146,6 +159,12 @@ func getExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.Command return err } logger.Infof(ctx, "Retrieved %v executions", len(executionList.Executions)) + + if config.GetConfig().Interactive { + bubbletea.Paginator(executionColumns, getCallBack(ctx, cmdCtx)) + return nil + } + return adminPrinter.Print(config.GetConfig().MustOutputFormat(), executionColumns, ExecutionToProtoMessages(executionList.Executions)...) } diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index cfc5f4c6d4..c27a0b663d 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -2,6 +2,7 @@ package get import ( "context" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flytectl/cmd/config" sconfig "github.com/flyteorg/flytectl/cmd/config/subcommand" diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index f9b70696ab..bc2049902e 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -162,7 +162,7 @@ func Register(ctx context.Context, args []string, cfg *config.Config, cmdCtx cmd payload, _ := json.Marshal(registerResults) registerPrinter := printer.Printer{} - _ = registerPrinter.JSONToTable(payload, projectColumns) + _ = registerPrinter.JSONToTable(os.Stdout, payload, projectColumns) if tmpDir != "" { if _err := os.RemoveAll(tmpDir); _err != nil { logger.Errorf(ctx, "unable to delete temp dir %v due to %v", tmpDir, _err) diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index 418406c034..b1a97bbb5c 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -56,6 +56,7 @@ func newRootCmd() *cobra.Command { rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.") rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats())) + rootCmd.PersistentFlags().BoolVarP(&(config.GetConfig().Interactive), "interactive", "i", false, "Set this flag to use an interactive CLI") rootCmd.AddCommand(get.CreateGetCommand()) compileCmd := compile.CreateCompileCommand() diff --git a/flytectl/go.mod b/flytectl/go.mod index 700445c958..9e492aa0ec 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -21,7 +21,7 @@ require ( github.com/hashicorp/go-version v1.3.0 github.com/hexops/gotextdiff v1.0.3 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 - github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 + github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7 github.com/mitchellh/mapstructure v1.5.0 github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 github.com/mouuff/go-rocket-update v1.5.1 @@ -66,9 +66,14 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect github.com/aws/aws-sdk-go v1.44.2 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/charmbracelet/bubbles v0.18.0 // indirect + github.com/charmbracelet/bubbletea v0.25.0 // indirect + github.com/charmbracelet/lipgloss v0.10.0 // indirect + github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/containerd v1.5.10 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect @@ -77,7 +82,7 @@ require ( github.com/dnaeon/go-vcr v1.2.0 // indirect github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect @@ -110,15 +115,21 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 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-runewidth v0.0.13 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-localereader v0.0.1 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/muesli/reflow v0.3.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/ncw/swift v1.0.53 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -129,7 +140,7 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/rivo/uniseg v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.4.1 // indirect @@ -141,7 +152,8 @@ require ( golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/term v0.7.0 // indirect golang.org/x/time v0.1.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 88b64583da..0d6318416f 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -137,6 +137,8 @@ github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -161,6 +163,12 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= +github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= +github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM= +github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg= +github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s= +github.com/charmbracelet/lipgloss v0.10.0/go.mod h1:Wig9DSfvANsxqkRsqj6x87irdy123SR4dOXlKa91ciE= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= @@ -196,6 +204,8 @@ github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -327,6 +337,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -614,6 +626,10 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 h1:O664tckOIC4smyHDDJPXAh/YBYYc0Y1O8S5wmZDm3d8= github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7 h1:J6LE/95ZXKZLdAG5xF+FF+h+CEKF78+UN5ZV8VJSCCk= +github.com/landoop/tableprinter v0.0.0-20201125135848-89e81fc956e7/go.mod h1:f0X1c0za3TbET/rl5ThtCSel0+G3/yZ8iuU9BxnyVK0= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= @@ -632,9 +648,16 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx 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.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= +github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= @@ -667,6 +690,14 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mouuff/go-rocket-update v1.5.1 h1:qGgUu/MP+aVQ63laEguRNimmNTPKs29xz0lZW6QRFaQ= github.com/mouuff/go-rocket-update v1.5.1/go.mod h1:CnOyUYCxAJyC1g1mebSGC7gJysLTlX+RpxKgD1B0zLs= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= +github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -780,8 +811,12 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.6/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1042,6 +1077,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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1131,8 +1168,12 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.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/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.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= @@ -1429,6 +1470,7 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination.go b/flytectl/pkg/bubbletea/bubbletea_pagination.go new file mode 100644 index 0000000000..b79ff4da5a --- /dev/null +++ b/flytectl/pkg/bubbletea/bubbletea_pagination.go @@ -0,0 +1,74 @@ +package bubbletea + +import ( + "fmt" + "log" + "strings" + + "github.com/charmbracelet/bubbles/paginator" + "github.com/flyteorg/flytectl/pkg/printer" + "github.com/golang/protobuf/proto" + + tea "github.com/charmbracelet/bubbletea" +) + +type pageModel struct { + items []proto.Message + paginator paginator.Model +} + +func newModel(initMsg []proto.Message) pageModel { + p := paginator.New() + p.PerPage = msgPerPage + p.SetTotalPages(len(initMsg)) + + return pageModel{ + paginator: p, + items: initMsg, + } +} + +func (m pageModel) Init() tea.Cmd { + return nil +} + +func (m pageModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { + var cmd tea.Cmd + switch msg := msg.(type) { + case tea.KeyMsg: + switch msg.String() { + case "q", "esc", "ctrl+c": + return m, tea.Quit + } + } + m.paginator, cmd = m.paginator.Update(msg) + preFetchBatch(&m) + return m, cmd +} + +func (m pageModel) View() string { + var b strings.Builder + table, err := getTable(&m) + if err != nil { + return "" + } + b.WriteString(table) + b.WriteString(fmt.Sprintf(" PAGE - %d\n", m.paginator.Page+1)) + b.WriteString("\n\n h/l ←/→ page • q: quit\n") + return b.String() +} + +func Paginator(_listHeader []printer.Column, _callback DataCallback) { + listHeader = _listHeader + callback = _callback + + var msg []proto.Message + for i := firstBatchIndex; i < lastBatchIndex+1; i++ { + msg = append(msg, getMessageList(i)...) + } + + p := tea.NewProgram(newModel(msg)) + if _, err := p.Run(); err != nil { + log.Fatal(err) + } +} diff --git a/flytectl/pkg/bubbletea/bubbletea_pagination_util.go b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go new file mode 100644 index 0000000000..68d52d858a --- /dev/null +++ b/flytectl/pkg/bubbletea/bubbletea_pagination_util.go @@ -0,0 +1,136 @@ +package bubbletea + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + + "github.com/flyteorg/flytectl/pkg/filters" + "github.com/flyteorg/flytectl/pkg/printer" + + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" +) + +type DataCallback func(filter filters.Filters) []proto.Message + +type PrintableProto struct{ proto.Message } + +const ( + msgPerBatch = 100 // Please set msgPerBatch as a multiple of msgPerPage + msgPerPage = 10 + pagePerBatch = msgPerBatch / msgPerPage +) + +var ( + // Used for indexing local stored rows + localPageIndex int + // Recording batch index fetched from admin + firstBatchIndex int32 = 1 + lastBatchIndex int32 = 10 + batchLen = make(map[int32]int) + // Callback function used to fetch data from the module that called bubbletea pagination. + callback DataCallback + // The header of the table + listHeader []printer.Column + + marshaller = jsonpb.Marshaler{ + Indent: "\t", + } +) + +func (p PrintableProto) MarshalJSON() ([]byte, error) { + buf := new(bytes.Buffer) + err := marshaller.Marshal(buf, p.Message) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func getSliceBounds(idx int, length int) (start int, end int) { + start = idx * msgPerPage + end = min(idx*msgPerPage+msgPerPage, length) + return start, end +} + +func getTable(m *pageModel) (string, error) { + start, end := getSliceBounds(localPageIndex, len(m.items)) + curShowMessage := m.items[start:end] + printableMessages := make([]*PrintableProto, 0, len(curShowMessage)) + for _, m := range curShowMessage { + printableMessages = append(printableMessages, &PrintableProto{Message: m}) + } + + jsonRows, err := json.Marshal(printableMessages) + if err != nil { + return "", fmt.Errorf("failed to marshal proto messages") + } + + var buf strings.Builder + p := printer.Printer{} + if err := p.JSONToTable(&buf, jsonRows, listHeader); err != nil { + return "", err + } + + return buf.String(), nil +} + +func getMessageList(batchIndex int32) []proto.Message { + msg := callback(filters.Filters{ + Limit: msgPerBatch, + Page: batchIndex, + SortBy: "created_at", + Asc: false, + }) + batchLen[batchIndex] = len(msg) + + return msg +} + +func countTotalPages() int { + sum := 0 + for _, l := range batchLen { + sum += l + } + return sum +} + +// Only (lastBatchIndex-firstBatchIndex)*msgPerBatch of rows are stored in local memory. +// When user tries to get rows out of this range, this function will be triggered. +func preFetchBatch(m *pageModel) { + localPageIndex = m.paginator.Page - int(firstBatchIndex-1)*pagePerBatch + + // Triggers when user is at the last local page + if localPageIndex+1 == len(m.items)/msgPerPage { + newMessages := getMessageList(lastBatchIndex + 1) + m.paginator.SetTotalPages(countTotalPages()) + if len(newMessages) != 0 { + lastBatchIndex++ + m.items = append(m.items, newMessages...) + m.items = m.items[batchLen[firstBatchIndex]:] // delete the msgs in the "firstBatchIndex" batch + localPageIndex -= batchLen[firstBatchIndex] / msgPerPage + firstBatchIndex++ + } + return + } + // Triggers when user is at the first local page + if localPageIndex == 0 && firstBatchIndex > 1 { + newMessages := getMessageList(firstBatchIndex - 1) + m.paginator.SetTotalPages(countTotalPages()) + firstBatchIndex-- + m.items = append(newMessages, m.items...) + m.items = m.items[:len(m.items)-batchLen[lastBatchIndex]] // delete the msgs in the "lastBatchIndex" batch + localPageIndex += batchLen[firstBatchIndex] / msgPerPage + lastBatchIndex-- + return + } +} diff --git a/flytectl/pkg/printer/printer.go b/flytectl/pkg/printer/printer.go index e3b406b927..6dcf98d73e 100644 --- a/flytectl/pkg/printer/printer.go +++ b/flytectl/pkg/printer/printer.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "io" "net/url" "os" "sort" @@ -112,7 +113,7 @@ func projectColumns(rows []interface{}, column []Column) [][]string { return responses } -func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error { +func (p Printer) JSONToTable(w io.Writer, jsonRows []byte, columns []Column) error { var rawRows []interface{} if err := json.Unmarshal(jsonRows, &rawRows); err != nil { return errors.Wrapf("JSONUnmarshalFailure", err, "failed to unmarshal into []interface{} from json") @@ -122,7 +123,7 @@ func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error { } rows := projectColumns(rawRows, columns) - printer := tableprinter.New(os.Stdout) + printer := tableprinter.New(w) // TODO make this configurable printer.AutoWrapText = false printer.BorderLeft = true @@ -141,7 +142,9 @@ func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error { if r := printer.Render(headers, rows, positions, true); r == -1 { return fmt.Errorf("failed to render table") } - fmt.Printf("%d rows\n", len(rows)) + if w == os.Stdout { + fmt.Printf("%d rows\n", len(rows)) + } return nil } @@ -155,7 +158,7 @@ func (p Printer) PrintInterface(format OutputFormat, columns []Column, v interfa case OutputFormatJSON, OutputFormatYAML: return printJSONYaml(format, v) default: // Print table - return p.JSONToTable(jsonRows, columns) + return p.JSONToTable(os.Stdout, jsonRows, columns) } } @@ -285,7 +288,7 @@ func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto. if err != nil { return errors.Wrapf("ProtoToJSONFailure", err, "failed to marshal proto messages") } - return p.JSONToTable(rows, columns) + return p.JSONToTable(os.Stdout, rows, columns) } return nil } diff --git a/flytectl/pkg/printer/printer_test.go b/flytectl/pkg/printer/printer_test.go index 06d4c2c31d..eb4960a878 100644 --- a/flytectl/pkg/printer/printer_test.go +++ b/flytectl/pkg/printer/printer_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "fmt" + "os" "testing" "time" @@ -53,7 +54,7 @@ func TestJSONToTable(t *testing.T) { b, err := json.Marshal(j) assert.NoError(t, err) p := Printer{} - assert.NoError(t, p.JSONToTable(b, []Column{ + assert.NoError(t, p.JSONToTable(os.Stdout, b, []Column{ {"A", "$.a", &trunc}, {"S", "$.s.y", nil}, })) From ce0fd450cdd7d66dca345e00b5e82c46b3ea86a0 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:16:39 -0700 Subject: [PATCH 355/356] Do not upload codecoverage data from boilerplate (#478) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/boilerplate/flyte/golang_test_targets/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/flytectl/boilerplate/flyte/golang_test_targets/Makefile b/flytectl/boilerplate/flyte/golang_test_targets/Makefile index 280e1e55e4..aad7f21986 100644 --- a/flytectl/boilerplate/flyte/golang_test_targets/Makefile +++ b/flytectl/boilerplate/flyte/golang_test_targets/Makefile @@ -54,4 +54,3 @@ test_unit_visual: .PHONY: test_unit_codecov test_unit_codecov: go test ./... -race -coverprofile=coverage.txt -covermode=atomic - curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh From ec3f38b2e316a6710fcbc31a6579cbb260b80f37 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Tue, 30 Apr 2024 11:27:54 -0700 Subject: [PATCH 356/356] fix: doc-requirements.txt to reduce vulnerabilities (#479) The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-3164749 - https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047 - https://snyk.io/vuln/SNYK-PYTHON-JINJA2-6150717 - https://snyk.io/vuln/SNYK-PYTHON-PYGMENTS-1086606 - https://snyk.io/vuln/SNYK-PYTHON-PYGMENTS-1088505 - https://snyk.io/vuln/SNYK-PYTHON-PYGMENTS-5750273 - https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-5595532 - https://snyk.io/vuln/SNYK-PYTHON-SETUPTOOLS-3180412 - https://snyk.io/vuln/SNYK-PYTHON-SPHINX-570772 - https://snyk.io/vuln/SNYK-PYTHON-SPHINX-570773 - https://snyk.io/vuln/SNYK-PYTHON-SPHINX-5811865 - https://snyk.io/vuln/SNYK-PYTHON-SPHINX-5812109 Co-authored-by: snyk-bot --- flytectl/doc-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/flytectl/doc-requirements.txt b/flytectl/doc-requirements.txt index dd99b08872..8e5f0fda9f 100644 --- a/flytectl/doc-requirements.txt +++ b/flytectl/doc-requirements.txt @@ -109,3 +109,4 @@ urllib3==2.1.0 # via requests zipp==3.17.0 # via importlib-metadata +setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability